feat(cli): add OpenSpec as alternative workflow mode#79
Merged
Conversation
Extend WorkflowMode to four values (speckit | openspec | vibe | none),
removing the redundant `speckit: boolean` from ProjectConfig. New
src/generators/openspec.ts bootstraps OpenSpec via
`npx --yes @fission-ai/openspec@latest init --tools <aiTool> --force .`,
mirroring the speckit silent-skip pattern (warn, never abort).
CLI gains `--speckit` and `--openspec` flags with mutual-exclusion
gate; `--workflow` description updated to list openspec. AGENTS.md and
CLAUDE.md templates render `Workflow Mode:` and a parameterized
`{{#if workflowOpenspec}}` doc block — no hard-coded project names,
all paths driven by `{{name}}`.
`commands/new.ts` dispatches the bootstrap on workflowMode;
`commands/add.ts` exposes openspec as a layer with spec-mode conflict
group; `detect-project.ts` recognizes `openspec/config.yaml` as a
sentinel.
Tests: 554/554 passing. New coverage: initOpenspec argv shape,
isNpxAvailable detection, CLI mutual-exclusion (FR-009/SC-004),
template rendering for both AGENTS.md and CLAUDE.md (positive +
negative cases, plus a guard that no `relationship-crm` reference
leaks into generated artifacts — SC-006).
Spec artifacts under specs/018-openspec-spec-mode/ included for
auditability of the spec → plan → tasks workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WorkflowModeto four values (speckit | openspec | vibe | none) and removes the redundantspeckit: booleanfromProjectConfig. Single source of truth, no impossible states.src/generators/openspec.tsbootstraps OpenSpec vianpx --yes @fission-ai/openspec@latest init --tools <aiTool> --force .. No global install required; failures degrade to a warning (never abort the project), matching the speckit silent-skip pattern (Constitution §5).--speckitand--openspec(mutually exclusive);--workflowdescription updated to listopenspec. Mutual-exclusion gate fires before any filesystem work.AGENTS.md(Codex) andCLAUDE.md(Claude Code) templates gain aWorkflow Mode:line and a parameterized{{#if workflowOpenspec}}documentation block. Project name is injected via{{name}}— no hard-coded reference to any sample project.commands/add.tsexposesopenspecas a layer (spec-mode conflict group withspeckit);utils/detect-project.tsrecognizesopenspec/config.yamlas a sentinel.specs/018-openspec-spec-mode/(spec.md, plan.md, tasks.md, qa-summary.md, checklists/requirements.md) included for auditability.Test plan
npm run typecheck— 0 errorsnpm test -- --run— 554/554 tests passing across 51 filessrc/generators/__tests__/openspec.test.tscover argv shape (codex + claude),isNpxAvailabledetection, early-skip whenaiTool === "none", and silent-failure on non-zero exitsrc/__tests__/new-command.test.tsasserts--speckit --openspecexits with code 1 and the conflict message (covers FR-009 / SC-004)Workflow Mode: openspec, the OpenSpec doc section, parameterised{{name}}substitution, and absence of any hard-coded sample project name (SC-006)forgekit new tmp-openspec-smoke --ai-tool codex --openspec --no-git -yproducedopenspec/config.yaml+ 4 native skills under.codex/skills/openspec-*/+ parameterised AGENTS.md--ai-tool claudebefore merge (skills land under.claude/skills/openspec-*/)