experiment(stores): upstream work end to end — one door, workflows as data, serves links, live rollups#1286
experiment(stores): upstream work end to end — one door, workflows as data, serves links, live rollups#1286clay-good wants to merge 48 commits into
Conversation
Add a short, plain-language guide for grouping related changes under one shared
plan ("an initiative"), shown in a single repo and across many repos via a store.
Includes a real worked example built from changes already in this repo, and links
it from the docs index. Beta, alongside the existing stores guide.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds initiatives documentation and example materials, introduces store-aware initiative discovery proposals, and wires ChangesInitiatives documentation and examples
Store-aware CLI and initiative listing
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Expand the example and guide to show that an initiative holds more than changes: personas (who the work serves), decision records (ADRs), and an optional schema that defines your own artifact types (persona -> adr -> spec -> tasks). The schema output shown is real (captured from `openspec schemas`). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a one-pager (brief) artifact to the example schema, making the graph one-pager -> persona -> adr -> spec -> tasks. Include finished-example/, a change taken fully through that graph (real files), and show the completed run in the guide: status 5/5 complete and `validate --strict` passing. All output captured from a real run; the schema is not added to the repo's active set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (5)
docs/stores-beta/initiatives.md (2)
25-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd language specifiers to fenced code blocks for syntax highlighting and accessibility.
Twenty code blocks lack language identifiers, triggering MD040 warnings. This hurts readability (no syntax highlighting) and accessibility (screen readers can't announce the code type).
Add these specifiers:
- File trees →
text- Shell commands →
bash- YAML config →
yaml- Command output →
text📝 Suggested fixes (excerpt)
- ``` + ```text openspec/ initiatives/ smoother-setup/ README.md the shared plan: what this is and why these changes go together inventory.md the list of changes, and where each one stands```diff - ``` + ```bash openspec list --changes```diff - ``` + ```yaml references: - team-plans```diff - ``` + ```bash openspec validate example-first-run --type change --strict</details> Also applies to: 43-55, 59-61, 72-78, 99-101, 103-107, 111-114, 118-129, 134-141, 145-147, 169-184, 189-191, 194-200, 206-208, 210-220, 222-224, 226-228 <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/stores-beta/initiatives.mdaround lines 25 - 31, Add language
identifiers to all fenced code blocks in the initiatives docs so Markdown lint
MD040 stops flagging them. Update the existing fences in the relevant sections
of docs/stores-beta/initiatives.md to use the right specifier based on content:
file trees with text, shell commands with bash, YAML snippets with yaml, and
command output with text. Make sure the repeated examples in the affected
sections are updated consistently so the markdown stays readable and accessible.</details> <!-- cr-comment:v1:fefae1bd15fd32332c3150a2 --> --- `243-243`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Strong accuracy claim requires verification.** The statement "Every command and its output above came from a normal OpenSpec install" is a strong claim. If any output was manually edited for clarity or reconstructed from memory, this could become inaccurate as the CLI evolves. Consider softening to "Command output shown is representative of a normal OpenSpec install" or adding a version note, unless you have high confidence every snippet was captured verbatim from a real run. <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/stores-beta/initiatives.mdat line 243, The wording in the OpenSpec
install note is making an overly strong provenance claim; update the affected
text in the initiatives documentation to either soften it to representative
output or qualify it with a specific version/capture note. Use the surrounding
install narrative in the same section to locate the sentence, and ensure the
revised phrasing avoids asserting that every command and output was captured
verbatim unless that can be verified.</details> <!-- cr-comment:v1:d943cc4f4728404a2355a2f1 --> </blockquote></details> <details> <summary>openspec/initiatives/smoother-setup/decisions/0002-tool-native-paths.md (1)</summary><blockquote> `1-3`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Minor format inconsistency with ADR 0001.** ADR 0001 includes an introductory quote block explaining what an ADR is; ADR 0002 omits it. For consistency across the initiative's decision records, consider adding the same intro to 0002, or removing it from 0001 if you prefer brevity. <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@openspec/initiatives/smoother-setup/decisions/0002-tool-native-paths.md
around lines 1 - 3, ADR 0002 is missing the same introductory quote block used
in ADR 0001, creating a format inconsistency between decision records. Update
the ADR 0002 document to either add the shared intro near the top or remove the
intro from ADR 0001 for consistency; use the ADR headings and title in 0002 to
place the change cleanly.</details> <!-- cr-comment:v1:e80d3fe6e806ee5a304cd9b2 --> </blockquote></details> <details> <summary>openspec/initiatives/smoother-setup/inventory.md (1)</summary><blockquote> `13-23`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _⚡ Quick win_ **Add language specifiers to fenced code blocks.** The two command examples lack language tags, which hurts syntax highlighting and accessibility. ```diff See live status any time: -``` +```shell openspec list --changesOpen any change to see its full plan:
-
+shell
openspec show simplify-skill-installation🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openspec/initiatives/smoother-setup/inventory.md` around lines 13 - 23, Add the missing language specifiers to the fenced examples in inventory.md so the command snippets render correctly. Update the two markdown code fences around the openspec list and openspec show examples to use a shell language tag, keeping the content unchanged. Use the existing fenced examples in the setup instructions section as the target location.openspec/initiatives/smoother-setup/example-schema/finished-example/.openspec.yaml (1)
1-2: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider adding
versionfield to match schema declaration.The schema.yaml declares
version: 1, but the metadata file only includesschema: initiativewithout a corresponding version. If the metadata validation expects a version field or if future schema versions are anticipated, include it here for consistency.schema: initiative +version: 1 created: 2026-06-30🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openspec/initiatives/smoother-setup/example-schema/finished-example/.openspec.yaml` around lines 1 - 2, Add the missing version metadata to the initiative definition so it matches the schema declaration. Update the .openspec YAML for the example initiative by including a version field alongside schema: initiative, keeping the metadata consistent with the versioned schema used elsewhere. Use the existing initiative metadata structure in the .openspec file as the place to add it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@docs/stores-beta/initiatives.md`:
- Around line 25-31: Add language identifiers to all fenced code blocks in the
initiatives docs so Markdown lint MD040 stops flagging them. Update the existing
fences in the relevant sections of docs/stores-beta/initiatives.md to use the
right specifier based on content: file trees with text, shell commands with
bash, YAML snippets with yaml, and command output with text. Make sure the
repeated examples in the affected sections are updated consistently so the
markdown stays readable and accessible.
- Line 243: The wording in the OpenSpec install note is making an overly strong
provenance claim; update the affected text in the initiatives documentation to
either soften it to representative output or qualify it with a specific
version/capture note. Use the surrounding install narrative in the same section
to locate the sentence, and ensure the revised phrasing avoids asserting that
every command and output was captured verbatim unless that can be verified.
In `@openspec/initiatives/smoother-setup/decisions/0002-tool-native-paths.md`:
- Around line 1-3: ADR 0002 is missing the same introductory quote block used in
ADR 0001, creating a format inconsistency between decision records. Update the
ADR 0002 document to either add the shared intro near the top or remove the
intro from ADR 0001 for consistency; use the ADR headings and title in 0002 to
place the change cleanly.
In
`@openspec/initiatives/smoother-setup/example-schema/finished-example/.openspec.yaml`:
- Around line 1-2: Add the missing version metadata to the initiative definition
so it matches the schema declaration. Update the .openspec YAML for the example
initiative by including a version field alongside schema: initiative, keeping
the metadata consistent with the versioned schema used elsewhere. Use the
existing initiative metadata structure in the .openspec file as the place to add
it.
In `@openspec/initiatives/smoother-setup/inventory.md`:
- Around line 13-23: Add the missing language specifiers to the fenced examples
in inventory.md so the command snippets render correctly. Update the two
markdown code fences around the openspec list and openspec show examples to use
a shell language tag, keeping the content unchanged. Use the existing fenced
examples in the setup instructions section as the target location.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 93189cf8-0118-48b8-a5b4-2db11986357e
📒 Files selected for processing (21)
docs/README.mddocs/stores-beta/initiatives.mdopenspec/initiatives/smoother-setup/README.mdopenspec/initiatives/smoother-setup/decisions/0001-aliases-over-rename.mdopenspec/initiatives/smoother-setup/decisions/0002-tool-native-paths.mdopenspec/initiatives/smoother-setup/example-schema/finished-example/.openspec.yamlopenspec/initiatives/smoother-setup/example-schema/finished-example/adr.mdopenspec/initiatives/smoother-setup/example-schema/finished-example/one-pager.mdopenspec/initiatives/smoother-setup/example-schema/finished-example/persona.mdopenspec/initiatives/smoother-setup/example-schema/finished-example/specs/first-run-skills/spec.mdopenspec/initiatives/smoother-setup/example-schema/finished-example/tasks.mdopenspec/initiatives/smoother-setup/example-schema/schema.yamlopenspec/initiatives/smoother-setup/example-schema/templates/adr.mdopenspec/initiatives/smoother-setup/example-schema/templates/one-pager.mdopenspec/initiatives/smoother-setup/example-schema/templates/persona.mdopenspec/initiatives/smoother-setup/example-schema/templates/spec.mdopenspec/initiatives/smoother-setup/example-schema/templates/tasks.mdopenspec/initiatives/smoother-setup/inventory.mdopenspec/initiatives/smoother-setup/personas/coding-agent.mdopenspec/initiatives/smoother-setup/personas/new-user.mdopenspec/initiatives/smoother-setup/personas/team-lead.md
Frame the prototype's rough edges as a short forward plan (an initiative command, cross-repo status rollup, ready-made artifact types), so the guide reads as a plan, not only a how-to. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-artifacts superpower Lead on the wedge (define your own artifact types, share them in a store every repo reads), deliver it through the cross-repo happy path, and propose the build (store-aware artifact/schema discovery + initiative precedence) as a validated OpenSpec change. Trim the example from ~20 files to 9 while keeping personas + decision records to show customizability. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@openspec/changes/initiatives-in-stores/specs/store-aware-artifacts/spec.md`:
- Around line 3-22: Clarify the `--store` discovery behavior in the store-aware
schema discovery requirement by explicitly stating whether `openspec schemas
--store acme-plans` should merge store schemas with the current repo’s own
schemas or show only the selected store’s schemas. Update the requirement text
and the “Listing a store’s schemas” scenario so the contract is unambiguous, and
align the “Referenced store schemas are visible from a repo” scenario with the
same discovery rules using the store-aware schema discovery language.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ef8289f3-2a22-46c2-a341-18f2e8ae8c33
📒 Files selected for processing (10)
docs/README.mddocs/stores-beta/initiatives.mdopenspec/changes/initiatives-in-stores/design.mdopenspec/changes/initiatives-in-stores/proposal.mdopenspec/changes/initiatives-in-stores/specs/store-aware-artifacts/spec.mdopenspec/changes/initiatives-in-stores/tasks.mdopenspec/initiatives/smoother-setup/brief.mdopenspec/initiatives/smoother-setup/example-schema/schema.yamlopenspec/initiatives/smoother-setup/example-schema/templates/brief.mdopenspec/initiatives/smoother-setup/example-schema/templates/decision.md
✅ Files skipped from review due to trivial changes (7)
- openspec/initiatives/smoother-setup/example-schema/templates/brief.md
- openspec/initiatives/smoother-setup/brief.md
- openspec/changes/initiatives-in-stores/proposal.md
- openspec/changes/initiatives-in-stores/tasks.md
- openspec/initiatives/smoother-setup/example-schema/templates/decision.md
- docs/README.md
- docs/stores-beta/initiatives.md
Decide Option 1 as the build: the store initiative is canonical, a same-id local one shadows it and is reported (never silently wins, never hard-blocks). Best for orgs — governance + no silent drift + velocity — and reuses schema shadowing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lup + shadow precedence Build the initiatives-in-stores prototype: - openspec schemas --store <id>: store-aware schema discovery. Success keeps the bare-array agent contract; only which root it reads changes. - openspec list --initiatives [--store <id>]: lists initiatives (initiative.yaml manifest) and rolls up the live status of the changes each groups, from the same source as list --changes. - Canonical-vs-shadow precedence: a local initiative colliding with a referenced store's is reported (shadowsStore in JSON, "(shadows: <id>)" in the list), never silently overriding, never blocking local work. Keep the completion registry + store-selection guidance + agent contract in sync (schemas joins the store-aware command set), add unit tests, and flip the guide from proposed to working with real captured output. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gent instruction block Extend the referenced-store index so a repo that references a store sees that store's own custom artifact types (project schemas) and initiatives, each with a one-line summary and a fetch command (openspec schemas/list --initiatives --store <id>). Rendered in the <referenced_stores> instruction block and the apply section; keys are omitted when a store defines none, so existing output is unchanged. Also regenerate the skill-templates-parity golden hashes for the store-selection guidance update from the previous commit (schemas joined the store-aware set); the feedback template hash is unchanged, confirming the blast radius. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/core/initiatives.ts`:
- Around line 59-75: The readManifest function currently only type-asserts
parseYaml output and silently falls back to {}, so invalid initiative.yaml
shapes (especially changes not being an array) can corrupt listInitiatives
counts without any warning. Add structural validation inside readManifest for
the parsed InitiativeManifest fields, especially changes, and treat invalid
shapes as a parse failure instead of returning a misleading object. Also emit a
warning or diagnostic on parse/validation failure, consistent with
readProjectConfig behavior, so callers can detect bad manifests before
listInitiatives iterates over changeId values.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4ce4cc06-f780-4f1b-a61c-d5f8c9950f3f
📒 Files selected for processing (12)
docs/agent-contract.mddocs/stores-beta/initiatives.mddocs/stores-beta/user-guide.mdopenspec/changes/initiatives-in-stores/tasks.mdopenspec/initiatives/smoother-setup/initiative.yamlsrc/cli/index.tssrc/commands/workflow/schemas.tssrc/core/completions/command-registry.tssrc/core/initiatives.tssrc/core/templates/workflows/store-selection.tstest/core/completions/command-registry.test.tstest/core/initiatives.test.ts
✅ Files skipped from review due to trivial changes (3)
- src/core/templates/workflows/store-selection.ts
- docs/stores-beta/initiatives.md
- openspec/changes/initiatives-in-stores/tasks.md
…spec context` Enrich available referenced-store members with the store's own custom artifact types (project schema names) and initiative ids, rendered in the human listing and carried in --json (artifactTypes/initiatives, present only when non-empty). Read-only enrichment in the context command; the working-set model and code-workspace builder are unchanged. Completes task 1.3 (both the agent instruction block and context now advertise a store's artifacts). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ow works Guide's "Read by name" bullet now states the agent sees a store's artifact types and initiatives in its context (instruction block + openspec context), each with a summary and fetch command. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Scaffold an initiative folder (initiative.yaml manifest + brief.md stub) under the existing `new` group — --store-aware and --title-aware, with a duplicate guard and --json. Deliberately thin: a folder and a manifest, not a revived initiative command group. Sync the store-selection guidance (new initiative joins the store-aware set), the completion registry, the registry test, and the skill-templates-parity golden hashes (feedback hash unchanged confirms the blast radius). Add new-initiative command tests + agent-contract entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
An initiative.yaml change entry may now be `{ id, store }`, so an initiative in
a planning store aggregates the live task status of changes implemented in the
code repos where they actually live. list --initiatives resolves each change
against its named store's root (or the initiative's own root for plain ids),
sums the rollup, shows a per-change breakdown with each change's home, marks a
missing change/store as not-found, and reports the distinct `stores` span.
Plain-string entries (the solo/local case) are unchanged.
Adds changeStatuses/stores to the JSON, a cross-repo breakdown in the human
output, tests (cross-repo + unregistered-store not-found), an agent-contract
update, a spec scenario, and a "solo vs across repos" section in the guide.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
alfred-openspec
left a comment
There was a problem hiding this comment.
Strong direction and the main store/initiative shape looks right, but I found one manifest-integrity blocker before this should merge. new initiative --title 'API: v2' writes invalid YAML, then list --initiatives silently falls back to the id because manifest parse errors are swallowed, so the scaffold needs YAML-safe serialization and/or a visible malformed-manifest diagnostic.
…single change A plan is one folder, openspec/plan/. Numbered subfolders are ordered stages; names and contents are the user's own; unnumbered entries are context. Changes point UP with one metadata line (plan: local | <store-id>) — no manifest. `openspec list --plan [--store <id>]` rolls up the stages plus every change on this machine pointing at the plan, across registered repos, with live task status. Referenced stores' plan stages surface in `openspec context` and the agent instruction block. One explore-style skill (openspec-plan, /opsx:plan) drives translation stage-to-stage and syncs status back up; it is instructed to write less, not more. Solo: plan in your repo, `plan: local`. Team: same folder in a store — the store is the parent/global level, repos are children pointing up. Replaces the manifest-based initiative surfaces from earlier in this PR. Dogfooded: this repo's own openspec/plan/ groups four real changes; the change record openspec/changes/add-plan-folder validates --strict. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5a205e1 to
3fea56e
Compare
…ansitions Stage folder names are the team's workflow (00_product/ 01_engineering/, or any longer chain); the transition rule is one sentence — read what is lower-numbered, produce what your stage owes the next. Stage documents can be any format (a PRD, an RFC, or any other doc format); position carries the meaning. - skill: adds the 'Advance the workflow' move + upstream-tracing decompose - docs: stages-as-workflow section + lifecycle-by-persona table - change record: new design decision, proposal line, spec scenario - tests: stage-chain module test; golden hashes regenerated Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…workflow merge Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
No chain is the base case: the skill, docs, and design now frame stages as any workflow in folder names — two-stage, five-stage, or none — with the lifecycle described by position (first stage, middle, last) instead of job titles. Golden hashes regenerated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…eam join, core skill A real dogfood on a multi-repo product found the two load-bearing joints half-wired. This closes them, plus the friction it logged: - Linking is the registration: `new change --initiative <store>/<name>` records the checkout machine-locally (stores/linked-roots.yaml), so the rollup finds plain code repos without registering them as stores and with nothing written into the repo. - The join: `instructions` and `instructions apply` for a linked change open with an <initiative> block — the ref, the on-disk upstream path, and the read-upstream-first instruction. Stale refs stay visible. - `initiatives` joins the core profile so `openspec init` actually generates the documented skill. - Rollup nudges the evergreen sync when an initiative's changes are all complete; link hints are store-qualified; store setup seeds openspec/initiatives/; no-root errors lead with `openspec init`; `--remote` help names .openspec-store/store.yaml. - Product names removed from templates, docs, and the change record. Tests: linked-root discovery + resolveInitiativeLink units; pins updated (profiles, store scaffold shape, parity hashes regenerated from dist). Full suite green locally except the 17 known env-only zsh-installer failures. `openspec validate add-initiatives --strict` passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Dogfood round 2 (fresh repos, CLI-output-only bar) confirmed the round-1 fixes but caught the cold start: a first-time user with a fresh store has no way to learn the folder/stage layout from the CLI. Both empty states now teach it — the seeded-but-empty portfolio and the no-folder hint name evergreen files, one-folder-per-initiative, and numbered stage subfolders. Deliberately not added: a `new initiative` command (creating the folder stays the whole ceremony, and /opsx:initiatives is the guided path). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…matic Dogfood round 3 drove the whole loop through the skill (all five moves passed) and left two instruction fixes; this lands them plus the two automations that collapse the multi-repo flow: - `store setup <id>` no longer needs --path: non-interactive runs default to ~/openspec/<id>, the same visible location the interactive prompt already prefilled. One command, zero decisions. - Linking wires the agent context too: `new change --initiative <store>/<name>` adds the store to `references:` in openspec/config.yaml (format-preserving edit, announced in output, conservative fallback to the printed one-liner when the config can't be edited with certainty). JSON output carries `initiative.reference_wiring`. - Blocked-state hints stop naming skills that may not be installed: CLI text and the apply skill template now point at the always-available `openspec instructions <artifact> --change <name>` path. - Initiatives skill: naming a module, crate, or tool upstream is fine; paths and line-anchored code stay banned. The team path is now: store setup → new change --initiative → list --initiatives. Three commands; discovery, references, and hints all automatic and announced. Tests: addReferenceToProjectConfig unit coverage (add/append/already/skip, comment preservation); store-setup default-path test; parity hashes regenerated from dist. Full suite green except the 17 known env-only zsh-installer failures. Change record validates --strict. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…test os.homedir() reads HOME on POSIX but USERPROFILE on Windows, so the Windows runner resolved ~/openspec/<id> into its real home instead of the test sandbox. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Upstream work is a change in the store, typed by the store's schema; stages are artifacts; standing truths are the store's specs. The wiring survives retargeted: serves: metadata + new change --serves, linked-root recording, auto-references, the upstream instructions block, and list --downstream for the rollup. The schema system opens up instead: notes: surfaced on every instruction surface, instructions/<artifact>.md files, schema inheritance through references:, and a declarative structure: map in config. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ma inheritance Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… docs to the new direction Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A fresh store now defaults to the built-in documentation-only 'requirements' schema (proposal → specs, notes steering agents past the missing implementation phase), 'openspec new schema <name>' scaffolds a team's own workflow as a folder (stages = artifacts, ordered by requires:), setup output teaches the draft → serve → rollup loop, every generated skill knows when to link work with --serves, and the new-change progress line resolves the schema the way createChange does. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nge record Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…llup noise cut Round 4 on a real multi-repo product surfaced two defects: metadata validation hard-failed on the string-form initiative: refs the beta wrote into real repos (now tolerated read-only alongside the object form), and every serving change earned its own upstream row so busy repos rolled up as noise (downstream work now only gets a row when something serves it). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nce, and changeset The user guide's walkthrough outputs now match the build (setup teaches the loop, fresh stores default to the requirements workflow), the cross-team story hands off to --serves where read-only references stop, linked-roots state and the per-machine rollup scope are documented, and cli.md covers --serves, --downstream, new schema, schemas --store, and the pathless setup contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ing) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…se from proposal openspec new schema duplicated main's existing schema init, so it is gone; schema init instead gains --store, per-stage instruction files seeded from the built-in guidance, and honest next steps — plus two fixes main shipped with (--default wrote a defaultSchema: key nothing reads; the hint printed an invalid command). New specs created by archiving now seed their Purpose from the proposal's Why instead of a TBD placeholder. Docs gain the team-wide status (CI) and schema versioning defaults. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…estly Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…emas A schema that defines no specs-generating artifact is deliberately documentation-free-form; validating its changes errored with 'must have at least one delta'. Both validation paths now consult the change's resolved schema, with any resolution failure falling back to the strict behavior. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ns as documented A fresh CI machine has no linked-root records (linking is recorded on the developer's machine), so the documented team-wide status pattern could not actually find serving changes. list --downstream --scan <dir> rolls up a directory of checkouts with no per-machine state; proven end to end against bare git remotes and a zero-state home. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A cold-start session (CLI + guides only) completed the whole loop first try; a multi-stage session built its own three-stage chain and archived it. Their friction logs drive this commit: rollup 'complete' now means the whole change (tasks AND artifacts — checked-off tasks with no approved proposal no longer read as done); schema init accepts custom stage names wired sequentially in the order given; schema validate/which accept --store; an explicit ## Purpose in a delta spec survives into the standing spec; the empty success_criteria stub is gone; status grows a glyph legend; archive says 'not tracked by this schema' when the schema has no tasks phase. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…als, and traceability The proposal stage now asks for explicit non-goals (the deferral list that stops downstream work from building the wrong thing) and 1-3 measurable success signals; the specs stage requires every requirement to trace to something the proposal states, flagging untraceable ones as scope creep instead of writing them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nest A serving change's instructions now tell the agent what to do when implementation disagrees with the upstream requirement: flag it upstream (or propose a change against the synced spec, once archived) instead of silently diverging. Truth flowed up at archive time; now drift is caught while the work is still in motion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3fea56e to
5ebeb86
Compare
structure: is now a filesystem definition, not documentation — keys ending / are folders, other keys files, store setup materializes whatever is missing (markdown seeded with its purpose, nothing ever overwritten, paths confined to openspec/), and store doctor flags drift with the one-command fix. And the whole loop gets a single entry point: /opsx:store, a generated core-profile skill that reads machine state, routes to the one situation that applies, runs the deterministic commands itself, and ends every reply with numbered next moves — zero mechanics of its own, so agents stay on the rails while users just talk. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e final state Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…aming Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One door
Type one thing, then just talk:
That's the whole user experience this PR builds toward. The skill (generated by plain
openspec init, part of the core profile) reads your machine's actual state, figures out the one thing that makes sense right now — set up, draft, link, check status, or archive — runs the commands itself, and ends every reply with a few numbered next moves, one recommended. You never learn the commands unless you want to. And because the skill carries zero logic of its own — everything underneath is a deterministic CLI call — the agent can't drift, and everything it does, you or CI can run directly.Here's what it's driving.
What the door does for you
Teams decide what to build before code exists. This PR gives that work a home and a loop: a shared store (a git repo of decisions — what's agreed lives in
specs/, what's being decided lives inchanges/), and one thread connecting every code change to the decision it implements.Every output below is from a real run.
1. Set up once — it's ready immediately. A fresh store comes with a working requirements workflow and teaches its own loop:
2. Draft with gates. Requirements are an ordinary change — each stage guided, reviewed, and unlocked in order:
3. Link work with one flag. The link wires everything — the repo sees the store's context, agents get the upstream requirements in their instructions automatically (with a standing rule: if implementation shows a requirement is wrong, flag it upstream instead of silently diverging), and status knows where to look:
4. Status computes itself. Progress comes from the work — task checkboxes and artifacts actually present, never a report someone wrote. A ✓ means genuinely done:
(
--scan <dir>gives a stateless CI machine the same rollup from a folder of clones.)5. Close the loop. Archive the decision and it becomes standing truth — a spec every future change traces against, with every existing link still resolving:
The store, as an SDK
Everything a team can define about its store is plain files in git — one config and one folder per workflow. Declare it, and the CLI makes it real, enforces it, and teaches it to every agent in every repo that references the store:
Nothing else exists — no server, no hidden state, no registration beyond your machine's store list.
openspec schema init <name> --artifacts <your,stage,names> --store <id>scaffolds the workflow folder so nobody starts from blank YAML; repos that reference the store inherit its workflows automatically; and versioning is git — pull the store, and every repo follows.Proven, not just demoed
--helpand the guides) completed every step on the first attempt.The rounds surfaced real defects — old metadata failing to load, tasks-done counting as done with no approved proposal, the scaffolder rejecting custom stage names — every one fixed here with a regression test.
Choices made, each reversible in one line
/opsx:store, generated in the core profileschema:in the store's configinstruction:still worksstructure:map, materialized by setup, checked by doctorserves:lines — no manifest🤖 Generated with Claude Code