Skip to content

feat(config): admit prompts/<role>/SYSTEM.md + expose Prompts info bucket (RIG-3075) - #808

Merged
mattwilkinsonn merged 4 commits into
mainfrom
compass-server/rig-3075-prompts-info-bucket
Aug 31, 2026
Merged

feat(config): admit prompts/<role>/SYSTEM.md + expose Prompts info bucket (RIG-3075)#808
mattwilkinsonn merged 4 commits into
mainfrom
compass-server/rig-3075-prompts-info-bucket

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 2 PRs:

  1. main
  2. docs(server): ManagerResolver nearest-ancestor contract + proto role-comment sweep (RIG-3080) #805
  3. "feat(config): admit prompts//SYSTEM.md + expose Prompts info bucket (RIG-3075)" (this PR)

Add prompts/ as a whitelisted config-bundle top dir at all three admission
doors — store (internal/store/agent_config.go), runner unpack twin
(internal/runner/config_materialize.go), and CLI builder (cmd/compass/bundle.go)
— with a dedicated strict grammar: exactly prompts/<role>/SYSTEM.md (three
path components, <role> under the safe-name regex, filename exactly
SYSTEM.md). The case precedes the skills/extensions fall-through at each door
because that fall-through admits arbitrary depth under <name>, which would
wrongly accept a too-deep or wrong-filename prompt member.

Expose shipped role prompts by name via a Prompts info bucket: new
repeated string prompts = 10 on GetAgentConfigInfoResponse (+ regen across
the go, compass-client, and compass-agent gen lanes), the service mapping in
agent_config_service.go, and the agent-config info CLI render bucket. This
lets an operator verify a role prompt is bundle-delivered before the seed flips
the root to that role (T6).

Tests: prompts accept/reject matrices at store + runner + CLI doors, the
member-name walk buckets <role>, the service e2e pgtest round-trips
Put -> GetAgentConfigInfo -> Prompts, and the CLI render surfaces the bucket.
Red-green verified: dropping the strict store-door case admits the too-deep and
wrong-filename members the reject matrix pins.

Refs RIG-3075

Co-authored-by: Matt Wilkinson matt@rigel.build

@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

RIG-3075

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-server-rig-3075-prom.compass-eng-docs.pages.dev

Deployed from compass-server/rig-3075-prompts-info-bucket at 83f8c33.

@rigel-mintaka
rigel-mintaka force-pushed the compass-server/rig-3075-prompts-info-bucket branch from 4ae7671 to ccd8999 Compare August 31, 2026 20:03
rigel-mintaka and others added 4 commits August 31, 2026 16:24
…comment sweep (RIG-3080)

Taxonomy T7 from the frozen manager-role-taxonomy record (RIG-3066). Two
doc/spec surfaces drift under the three-role taxonomy and are corrected here
before an implementer codes against them; both are comment-only and
regen-neutral.

- `go/internal/linearagent/routing.go`: the `ManagerResolver` seam doc said
  the tree walk goes "up parent_agent_id to a role=\"manager\" agent". Under
  the taxonomy that is wrong twice — a `manager`-only filter skips an `owner`
  parent (routing a domain-owned artifact past its owning tier), and every tree
  node is now Manager-class so the filter is vestigial. Reworded to the nearest
  tree ancestor (any Manager-class role). Only the interface + test fakes exist
  today (`NewResolver` is called only from tests), so this prevents a future
  implementer hardcoding `role==\"manager\"`.
- `proto/compass/v1/compass.proto`: the `role` field comment said
  "operator-set role". After T1 the label is spawner-selected from the closed
  taxonomy and server-validated; the provision field stays server-authoritative
  (populated from the stored role, overwrites client-supplied). Swept the
  comment to match the T1 invariant.

Verified: gofmt clean; go build ./internal/linearagent/... exit 0; go test
./internal/linearagent/... ok (routing fakes green); proto diff is comment-only
(regen-neutral, confirmed no non-comment line changed).

Refs RIG-3080

Co-authored-by: Matt Wilkinson <matt@rigel.build>

jj-hooks: autofixes for compass-server/rig-3080-managerresolver-contract
Review-loop polish on the ProvisionAgentWorkspaceRequest.role doc comment (three low-severity findings): reflow so "INVALID_ARGUMENT on an unknown label" is not split mid-phrase; use the Connect-canonical INVALID_ARGUMENT spelling instead of the Go-flavored CodeInvalidArgument (the comment generates into both Go and TS clients); and spell out that a role is required at spawn while the provision wire field stays optional (an empty stored role yields the default block-0), reconciling with the trailing "empty" clause. Comment-only + regen across all gen trees; no wire/field change.

Refs RIG-3066

Co-authored-by: Matt Wilkinson <matt@rigel.build>
…cket (RIG-3075)

Add `prompts/` as a whitelisted config-bundle top dir at all three admission
doors — store (`internal/store/agent_config.go`), runner unpack twin
(`internal/runner/config_materialize.go`), and CLI builder (`cmd/compass/bundle.go`)
— with a dedicated strict grammar: exactly `prompts/<role>/SYSTEM.md` (three
path components, `<role>` under the safe-name regex, filename exactly
`SYSTEM.md`). The case precedes the skills/extensions fall-through at each door
because that fall-through admits arbitrary depth under `<name>`, which would
wrongly accept a too-deep or wrong-filename prompt member.

Expose shipped role prompts by name via a `Prompts` info bucket: new
`repeated string prompts = 10` on `GetAgentConfigInfoResponse` (+ regen across
the go, compass-client, and compass-agent gen lanes), the service mapping in
`agent_config_service.go`, and the `agent-config info` CLI render bucket. This
lets an operator verify a role prompt is bundle-delivered before the seed flips
the root to that role (T6).

Tests: prompts accept/reject matrices at store + runner + CLI doors, the
member-name walk buckets `<role>`, the service e2e pgtest round-trips
Put -> GetAgentConfigInfo -> Prompts, and the CLI render surfaces the bucket.
Red-green verified: dropping the strict store-door case admits the too-deep and
wrong-filename members the reject matrix pins.

Refs RIG-3075

Co-authored-by: Matt Wilkinson <matt@rigel.build>
…meration (RIG-3075)

Review-loop fixes on the prompts/<role>/SYSTEM.md admission (one medium, one low).

MEDIUM — door-parity test-coverage gap: the store and CLI reject-sets both cover a bad prompts role name, but the runner reject-set (TestConfigMaterializeRejectsNewMemberStructure) did not, leaving validateNestedMember's configTopLevelName role-name guard undefended — deleting that line kept every runner prompts test green. Added the 'prompts bad role name' reject case; red-green proven (neuter the guard → the new case reddens with 'expected rejection, got nil error').

LOW — stale enumeration strings: admitting prompts/ made four operator-facing rejection/help messages wrong (they listed skills/extensions/mcp/settings/rules/agents but omitted prompts/), so a top-dir typo got an error whose list omitted the now-valid prompts/. Refreshed all four (store configMemberParts, runner validateMemberPath, bundle.go empty-dir + errNotWhitelisted) and the two coupled TestBuildBundleEmpty substring assertions.

Refs RIG-3066

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-server/rig-3080-managerresolver-contract branch from 2845fb9 to 48a26e3 Compare August 31, 2026 20:35
@rigel-mintaka
rigel-mintaka force-pushed the compass-server/rig-3075-prompts-info-bucket branch from 3996c59 to 83f8c33 Compare August 31, 2026 20:38
Base automatically changed from compass-server/rig-3080-managerresolver-contract to main August 31, 2026 21:00
@mattwilkinsonn
mattwilkinsonn merged commit a9b889f into main Aug 31, 2026
15 checks passed
@mattwilkinsonn
mattwilkinsonn deleted the compass-server/rig-3075-prompts-info-bucket branch August 31, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants