mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-10-19 06:10:10 +08:00
@fission-ai/openspec@1.14.0
11
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
73207a6f2c |
feat(copilot): make cloud coding-agent files opt-in (#1517)
* feat(copilot): make cloud coding-agent files opt-in Selecting the `github-copilot` tool auto-generated a GitHub Actions workflow (.github/workflows/copilot-setup-steps.yml) plus an agent file. Writing into a user's CI on init/update is invasive, benefits only the narrow set of Copilot *cloud* coding-agent users, and couples us to GitHub's externally-owned custom-agent format. Cloud files are now opt-in: - `openspec init` prompts before generating them (default No) and records the choice in openspec/config.yaml (`githubCopilot.cloudAgent`). - `--copilot-cloud` / `--no-copilot-cloud` decide non-interactively. - `openspec update` never prompts; it only refreshes files for projects that opted in, or that already have generated cloud files (so existing setups keep working — the migration path). The pre-existing content-matching guarantees are unchanged and now proven by regression tests: a user-customized cloud file is never overwritten or deleted. Opt-in state is persisted via the YAML document model so the user's hand-authored config comments and formatting survive untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(copilot): polish the cloud opt-in — safety, UX, and docs Follow-up hardening driven by a five-agent review swarm over the opt-in. Correctness: - persistCopilotCloudOptIn no longer throws on a scalar/`null` config file (reproduced crash); it starts a fresh map while preserving comment-only and empty files. - Explicit opt-out (`--no-copilot-cloud` / `cloudAgent: false`) now removes OpenSpec-managed cloud files on both init and update, instead of orphaning them. Customized files are still never touched. - `--copilot-cloud` / `--no-copilot-cloud` warns when github-copilot isn't among the selected tools, instead of silently no-opping. UX / discoverability: - init prints whether cloud files were written or, when skipped for want of a signal, how to enable them (`--copilot-cloud`). - When the user opts in but already has their own copilot-setup-steps.yml or agent file, init/update say it was left untouched and that the OpenSpec install step must be added by hand — the direct answer to "will this affect my existing Copilot cloud agent?". - Clearer interactive prompt (names both files; distinguishes the GitHub-hosted cloud agent from Copilot in the editor); a dim, interactive-only, decision- gated hint on `openspec update`; tightened flag help text. Docs (the feature was undocumented): new "GitHub Copilot cloud coding agent" section in supported-tools.md; init flags in cli.md; the githubCopilot.cloudAgent key in customization.md. Tests: interactive prompt (accept/decline), opt-out removal + customized-file preservation, config.yml variant, scalar-config regression, collision reporting, flag-ignored warning, re-init honoring persisted opt-in, and the config parse/warn branches. 2763 tests pass; the only failures are pre-existing and unrelated (completion mocks, adapters loader, one config-profile PATH case, one experimental-alias case), verified identical on clean main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(copilot): make init cloud-file output honest; harden config guard Final hardening pass (adversarial review of the opt-in polish). - init's success line listed both cloud-file paths from the *decision* to write, not from what was written — so it claimed files that a write skipped (user already owns them) or that the alternate-agent path removed. It now lists only OpenSpec-managed files that actually exist after the write (listManagedCloudFiles), keeps the "left untouched" caveat for user-owned files, and reports opt-out removals in the normal output block. - persistCopilotCloudOptIn's non-map guard used isCollection, which is also true for sequences, so a YAML list at the config root still made setIn throw. Gate on isMap so scalars AND sequences fall back to a fresh document; empty/comment-only files still round-trip with comments intact. - Fixed a misleading catch comment on the opt-out removal path. Tests: success-line accuracy over a user-owned file, sequence-root config regression, and listManagedCloudFiles coverage. 318 tests pass across the touched suites; build + lint clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(copilot): replace a non-map githubCopilot node before setIn Addresses alfred review on #1517. The prior guard only fixed a non-map config *root*; a valid top-level map whose `githubCopilot` value is itself a scalar/null/sequence (`githubCopilot: false`, `null`, or a list) still made `setIn(['githubCopilot','cloudAgent'], ...)` throw, which init swallowed — so the explicit opt-in/out was never saved. Now the intermediate node is replaced with an empty map before descending, keeping the rest of the config and its comments intact. Regression covers all three reproduced cases (false/null/sequence). Full suite: 2770 pass; only the pre-existing unrelated failures remain. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(copilot): never throw persisting into an unparseable config Deeper pass on persistCopilotCloudOptIn (the function alfred flagged), driven by an exhaustive input-shape check. Two malformed inputs still threw at toString(): a multi-document YAML stream and a tab-indented (syntactically invalid) file. Such a file can't be edited without corrupting it, so persist now detects parse errors and leaves it untouched (no throw, no clobber) — it is already invalid, so readProjectConfig ignores it regardless. With this the function is throw-free across every shape exercised: empty, comment-only, scalar/sequence root, a non-map githubCopilot value, anchors, CRLF, BOM, and the two malformed cases (now skipped byte-identical). Regression added for the multi-document case. Touched suites: 314 pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
1014c59ed1 |
docs: catalog intent-driven community schema (#1487)
Co-authored-by: SuhaibAslam <SuhaibAslam@users.noreply.github.com> |
||
|
|
ec6cbb4b0b |
docs: add anvil to Community Schemas table (#1469)
* docs: add anvil to Community Schemas table Adds a row to the Community Schemas catalog in docs/customization.md for the anvil schema (jikkujoyce/openspec-schemas), a spec-driven workflow with TDD discipline and an adversarial review gate. Documentation only; the schema itself lives in its own repository. Generated with Cursor using Claude Opus 5. * docs(customization): describe anvil's review verdict as advisory The row said the VERDICT: line "gates test-plan, tasks, and apply", which reads as enforcement. OpenSpec's artifact graph only checks that artifact files exist, and the anvil bundle ships no CI or hook — its own schema.yaml and README say the gate is honored by the agent, not mechanically enforced. Reword to match, and backtick artifact names consistently across the cell. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs(customization): trim the anvil row to sibling length The cell ran nearly twice as long as any other row in the table. Drop the verdict-staleness rule and the 1:1 mapping detail — both are README material — and keep the flow, the adversarial review gate, its advisory caveat, and the test-plan ledger. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Clay Good <hi@claygood.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
f917b8be5e |
fix(status): order artifacts by the schema, not the alphabet (#1465)
* fix(status): order artifacts by the schema, not the alphabet
Artifacts that become ready at the same time were sorted alphabetically,
so spec-driven's `specs` and `design` - both requiring only `proposal` -
came back as design first. `openspec status` listed design above specs
and `nextSteps` pointed at design, sending agents to write design.md
before any spec existed. That contradicts the schema's own description
(proposal -> specs -> design -> tasks), the design instruction ("reference
the specs for requirements"), the workflow docs, and the schema `openspec
schema init` scaffolds (where design requires specs).
Break ties by the order the schema declares its artifacts instead. The
dependency edges are untouched, so nothing newly blocks and no artifact
becomes mandatory - only the order of equally-ready artifacts changes, and
it now follows the sequence the schema author wrote, for custom schemas
too.
Closes #692
Closes #695
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(status): re-sort the whole ready queue, not just new arrivals
CodeRabbit caught it: sorting only the newly ready artifacts left an
already-queued artifact ahead of one declared earlier. For [root, child,
laterRoot] where child requires root, the build order came out root ->
laterRoot -> child even though child is declared first and both are ready
after root. Sort the full queue after each push.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(instructions): order unlocks like status, and document the guarantee
Adversarial review found `unlocks` was left alphabetical while build order,
ready lists and blocked lists moved to declaration order, so `openspec
instructions proposal` said "enables: design, specs" while `openspec status`
listed specs first - the one field whose job is naming what comes next
disagreed with everything else. getAllArtifacts() already yields declaration
order, so the stray sort is simply dropped.
Also make compareByDeclarationOrder a method rather than an arrow-valued
field: the field added an own enumerable function property that made
ArtifactGraph fail structuredClone.
Docs and specs updated for the new guarantee:
- openspec/specs/{artifact-graph,cli-artifact-workflow,instruction-loader}
- docs/agent-contract.md: status --json and instructions --json ordering
- docs/opsx.md: the status sample's missingDeps was missing design
- changeset
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs(commands): correct the continue transcript's blocked and unlocked lines
The sample said tasks was blocked by specs alone and that creating specs
made tasks available; tasks needs design too. Same class of inaccuracy as
the status samples this branch already corrected.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* docs: state the ordering guarantee as dependency-order-then-declaration
CodeRabbit was right that "artifacts appear in the order the schema
declares them" over-claims: dependency order still wins, and declaration
order only breaks ties. Proved with a schema that declares tasks, specs,
proposal - status renders proposal, specs, tasks, not the declared order.
Corrected in the cli-artifact-workflow spec, agent-contract.md, cli.md and
the changeset.
Also restores "status": "blocked" in the opsx.md status sample (split across
two lines so the ASCII box still aligns) and uses "recommends writing next"
in the artifact-graph spec.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
eac2973819 |
feat(instructions): add runtime context and operation guidance (#1062)
* docs(openspec): define runtime guidance for apply and archive - add typed apply and archive operation guidance - extend runtime instruction inputs for apply and archive - preserve existing archive execution and spec sync behavior * docs(openspec): refine apply and archive guidance design - carry artifact rules into archive-driven spec sync - reuse one config snapshot per instruction command - clarify that operation guidance is advisory - classify bulk archive skill as a new capability * docs(openspec): clarify artifact rule handling for archive and sync - define owning artifact resolution for mixed schemas - apply artifact rules in archive and standalone sync flows - align archive and bulk guidance conflict semantics - clarify existing apply pause-on-blocker behavior * docs(openspec): tighten archive and spec sync contracts - scope delta discovery and artifact rules to the specs artifact - fail closed on invalid archive and specs instruction responses - clarify no-write and no-move behavior for single and bulk archive * feat(workflow): extend config injection to apply and archive - expose project context and operation guidance in apply/archive instructions - apply context and guidance across apply, archive, bulk archive, and spec sync - preserve workflow state, artifact-rule boundaries, and fail-closed behavior - update generated skills, documentation, tests, and parity hashes * fix(skills): make the archive-inputs lookup fail open `openspec instructions archive` is introduced by this PR, so no released CLI has it. The archive and bulk-archive skills required a zero exit status from that lookup and told the agent to stop when it failed. `skills/` is installed standalone via `npx skills add Fission-AI/OpenSpec` and drives whatever CLI the user already has, so between merging this and publishing the next release every skills.sh consumer would have had archiving blocked outright — verified against @fission-ai/openspec@1.6.0, which exits 1 on that command. The lookup only supplies optional prompt inputs, so it now degrades: on a non-zero exit or invalid JSON the workflow continues with no context and no operation guidance. The `openspec instructions specs` lookup is an existing command and stays fail-closed, since a missing rule set there would silently change what gets written to main specs. Parity assertions updated to encode fail-open for archive inputs and fail-closed for specs rules. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: showms <showms@users.noreply.github.com> Co-authored-by: Clay Good <hi@claygood.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
fdf3d1282d |
docs: add e2e-runbooks to Community Schemas table (#1255)
Co-authored-by: Clay Good <hi@claygood.com> |
||
|
|
a824aae9da |
docs: add nanopm to community schemas catalog (#1109)
* docs: add nanopm community schema to catalog * docs: add design artifact mapping to nanopm description --------- Co-authored-by: Clay Good <hi@claygood.com> |
||
|
|
76c80f80f3 |
docs: add Community Schemas section + README entry (#1043)
Adds a "Community Schemas" section to docs/customization.md cataloging community-maintained schema bundles distributed via standalone repositories. Modeled after github/spec-kit's community extension catalog (https://github.com/github/spec-kit/tree/main/extensions). The first entry is `superpowers-bridge` from JiangWay/openspec-schemas — born from the proposal in PR #970 and now maintained externally. Also adds a brief 4-line "Community schemas" introductory section in README.md (between Docs and Why OpenSpec) pointing readers to the catalog. Documentation only; no code or schema changes. Refs: #970 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
12a7224dc6 |
chore: remove TDD schema and all references (#586)
* chore: remove TDD schema and all references TDD was an internal test example that should not be in user-facing docs. This removes: - The schemas/tdd directory and all its templates - All TDD references from documentation - TDD examples from skill templates and source code comments * test: update tests to remove TDD schema references All tests that referenced the removed TDD schema have been updated to use spec-driven or custom-schema names instead. * chore: remove accidentally committed files |
||
|
|
0bfe1d4426 |
docs: rewrite customization guide to document schema commands (#582)
* docs: rewrite customization guide to document schema commands The old guide described a painful manual process for schema customization (mkdir, npm list, cp commands) and even listed "No scaffolding" as a limitation. But the `openspec schema` commands have existed for a while: - `schema fork` - copy existing schema to customize - `schema init` - create new schema from scratch - `schema validate` - check schema structure - `schema which` - debug resolution precedence Rewrote the guide to: - Lead with the actual CLI commands instead of manual steps - Remove the misleading "Current Limitations" section - Add practical examples (TDD workflow, adding review artifact) - Structure progressively: config → custom schemas → global overrides * docs: add language tags to code blocks in customization guide Address review feedback from CodeRabbit: - Add 'text' language tag to directory tree code blocks - Satisfies MD040 markdown lint rule |
||
|
|
3261ccf6dc |
feat: onboarding skill and comprehensive documentation overhaul (#574)
* feat(skills): add opsx:onboard guided workflow skill Add a new onboard skill that walks users through their first complete OpenSpec workflow cycle. The skill provides interactive guidance through task selection, change creation, artifact building, implementation, and archiving. Also includes: - New README with updated branding and workflow examples - Documentation structure placeholders - Change artifacts for the onboard skill feature * test(skills): update skill-generation tests for onboard skill Update test expectations from 9 to 10 skills after adding opsx:onboard. * docs: update README links and add doc cleanup checklist - Replace placeholder links in README_NEW.md with actual doc paths - Add documentation cleanup checklist to README_RENEWAL_PROMPTS.md * docs: overhaul documentation with new workflows, getting-started, and customization guides - Rewrite workflows.md with action-based philosophy and workflow patterns - Rewrite getting-started.md with clearer onboarding flow - Rewrite customization.md with schema customization guidance - Add cross-references between docs (Commands, Customization links) - Remove obsolete docs: artifact_poc, experimental-release-plan, project-config-demo, schema-customization, schema-workflow-gaps - Update README_RENEWAL_PROMPTS.md checklist * docs: continue documentation overhaul with expanded guides and restructuring - Expand cli.md, commands.md, and concepts.md with comprehensive content - Add installation.md, multi-language.md, and supported-tools.md - Rename experimental-workflow.md to opsx.md - Remove i18n.md (replaced by multi-language.md) - Update README links and cleanup prompts * chore(assets): consolidate logo images * docs: enhance README with badges, usage notes, and contributing guidelines - Update Discord badge to show member count - Add collapsible section with stars/downloads/contributors badges - Add OpenSpec Dashboard preview section - Add usage notes for model selection and context hygiene - Expand contributing section with guidelines for small/large changes - Clarify AI-generated code policy * docs: remove misleading mid-flight update claims The documentation claimed users could edit artifacts mid-implementation and seamlessly continue, but no such mechanism exists. This removes: - "Mid-Flight Correction" section from workflows.md - Feedback arrows and "update as you learn" from all diagrams - Mid-flight claims from commands.md, opsx.md, concepts.md - Example blocks showing edit-then-continue workflow Also adds a proposal for future artifact regeneration support that would actually make this workflow possible. * docs: fix PR review comments (markdown linting and accuracy) - Add language tags to fenced code blocks (MD040) - Remove blank line between blockquotes (MD028) - Capitalize "Markdown" as proper noun - Update deprecated command reference (experimental -> update) - Update skill count from 9 to 10, add openspec-onboard - Fix typo: fix-midlight -> fix-midflight * chore: remove polish-release-notes CI workflow Replaced with local /polish-release skill. The claude-code-action doesn't work well with repository_dispatch triggers (no PR context). * docs: clarify /opsx:sync is optional (archive prompts if needed) Remove sync from main workflow flows and diagrams since archive already prompts to sync when needed. Most users will never need to call sync directly. - Remove sync from completion flow diagrams - Remove "Sync Specs Regularly" best practice section - Update command descriptions to note it's optional - Update "When to sync" to "When to use manually" * docs: redesign README with simplified content and new OPSX callout - Simplify badges and logo presentation - Add collapsible "most loved" section - Replace detailed explanation with concise philosophy - Add prominent /opsx:onboard callout for new workflow - Remove README_NEW.md (content merged into README.md) - Remove renewal prompts documentation * docs: add README_OLD.md as reference backup * docs: fix command directory paths for multiple tools Correct commands locations for Antigravity, Codex, Crush, OpenCode, and Qoder in the supported tools table. |