feat(skills): add /kiro-getspecs brownfield bootstrap#176
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2d6e8911a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - Single seed: `/kiro-spec-requirements <slug>` | ||
| - Multiple seeds: `/kiro-spec-batch` (after reviewing briefs) | ||
| - Steering only: `/kiro-steering` sync if they want refinement before specs |
There was a problem hiding this comment.
Emit Codex-prefixed handoff commands
In Codex skills installs, the generated AGENTS.md and existing Codex skill templates instruct users to invoke skills with the $kiro-... prefix, but this new handoff emits /kiro-... commands. When a Codex user finishes $kiro-getspecs, following these next-step commands will not invoke the installed Codex skills, so the brownfield bootstrap stalls before requirements or batch generation; the same prefix regression should be corrected in the Codex handoff text added/changed in this commit.
Useful? React with 👍 / 👎.
| - Run `/kiro-spec-design $1` to create technical design document | ||
| - Or `/kiro-spec-design $1 -y` to auto-approve requirements and proceed directly |
There was a problem hiding this comment.
Restore Windsurf-prefixed design commands
Windsurf skill templates use @kiro-... invocations, and this file already keeps that prefix for the missing-requirements and prior-bootstrap guidance. After this change, a Windsurf user completing @kiro-validate-gap is told to run /kiro-spec-design, which does not match the installed Windsurf skill invocation and breaks the normal continuation to design generation.
Useful? React with 👍 / 👎.
7d8fae6 to
8b2a8ec
Compare
Introduce /kiro-getspecs as the code-first entry point for adopting cc-sdd on existing repositories that have implementation but no (or incomplete) .kiro/ specs. What it does: - Reverse-engineers stack, architecture, and module boundaries from code - Writes steering (product, tech, structure), roadmap.md, and spec seeds - Each seed: brief.md + spec.json + requirements.md stub (project description only — same contract as /kiro-spec-init; EARS stays in /kiro-spec-requirements) - Does not write design.md, tasks.md, or spec-kit .specify/ artifacts Pipeline handoffs (minimal, required): - kiro-spec-init: brownfield seed path when brief + spec.json exist - kiro-spec-requirements: derive project description from brief if needed - kiro-spec-batch / kiro-discovery: point brownfield repos to getSpecs Docs: - docs/guides/brownfield-getspecs.md (architecture + seed contract diagrams) - CHANGELOG [Unreleased], RELEASE_NOTES, skill-reference, agent AGENTS.md Tests: npm test in tools/cc-sdd — 193/193 passing (all 8 agent manifests) Credits: logic distilled from spec-kit brownfield extensions, mapped to native .kiro/ outputs for Kiro/cc-sdd portability. Co-authored-by: Cursor <cursoragent@cursor.com>
8b2a8ec to
d4d2c3c
Compare
Claude Code handoff parity, native getSpecs skill format, JA/ZH doc mirrors, and EN seed-contract wording. 193/193 tests passing. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks for taking a look when you have time. Follow-up aligned with cc-sdd conventions (commit
Brownfield gap today: Happy to split handoff-only edits into a follow-up PR if you prefer a smaller review surface. |
Address Codex review on PR gotalab#176: - Codex validate-gap: use $kiro-* invocations (not /kiro-*) - Windsurf validate-gap: restore @kiro-spec-design handoff - spec-batch: restore per-agent skill install paths (.agents, .windsurf, .opencode, .github, .gemini, .agent) broken in brownfield handoff edits Tests: cd tools/cc-sdd && npm test → 193/193 passed Co-authored-by: Cursor <cursoragent@cursor.com>
Follow-up: Codex review addressed (
|
|
@codex review |
|
@gotalab — ready for human review when you have a moment. Latest: Scope: skill #18 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1323dc8be4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 3. **Check Uniqueness / Brownfield seed**: | ||
| - If the directory exists with `brief.md` and `spec.json` but **no** `requirements.md` (typical `$kiro-getspecs` seed): use that directory. Write `requirements.md` stub from `requirements-init.md` using the brief; **do not** recreate or overwrite `spec.json`. Stop after stub write. | ||
| - If the directory exists with only `brief.md` (no `spec.json`, from `$kiro-discovery`): use that directory. | ||
| - If the directory exists with all three files: report conflict and ask whether to refresh the stub only. |
There was a problem hiding this comment.
Accept getSpecs stubs instead of reporting conflicts
When a brownfield repo is bootstrapped with /kiro-getspecs and the user follows the advertised handoff to /kiro-spec-batch, each seed already has brief.md, spec.json, and a requirements.md stub because the new getSpecs skill writes all three files. This branch therefore makes kiro-spec-init report a conflict/ask for input before requirements generation, which breaks the autonomous batch path for getSpecs seeds; it should recognize an ungenerated stub as reusable rather than treating all three files as a conflict.
Useful? React with 👍 / 👎.
…seed detection When /kiro-getspecs writes all three files (brief.md, spec.json, requirements.md stub), kiro-spec-init flagged the dir as a conflict. Now detects stub by empty `## Requirements` section — treat as reusable seed for batch flow. Fixes last open Codex P2: batch path from getSpecs → kiro-spec-batch. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
For Windsurf installs, the generated AGENTS.md explicitly says Windsurf does not support programmatic sub-agent dispatch and should execute such skill work sequentially in the main context. This new Step 4 unconditionally tells the user to spawn a review sub-agent, unlike Step 3's inline fallback, so /kiro-spec-batch can get stuck or skip the cross-spec review/remediation path on Windsurf. Add the same “if unavailable, run inline” fallback here and for the follow-up fix dispatch.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ## Step 4: Cross-Spec Review | ||
|
|
||
| After all waves complete, perform a cross-spec consistency review. This is the highest-value quality gate -- it catches issues that per-spec review gates cannot. | ||
| After all waves complete, spawn a **single sub-agent** for cross-spec consistency review. This is the highest-value quality gate -- it catches issues that per-spec review gates cannot. |
There was a problem hiding this comment.
Add inline fallback for no-subagent platforms
For Antigravity installs, the generated AGENTS.md explicitly says Antigravity does not support programmatic sub-agent dispatch and should execute such skill work sequentially in the main context. This new Step 4 unconditionally tells the user to spawn a review sub-agent, unlike Step 3's inline fallback, so /kiro-spec-batch can get stuck or skip the cross-spec review/remediation path on Antigravity. Add the same “if unavailable, run inline” fallback here and for the follow-up fix dispatch.
Useful? React with 👍 / 👎.
Windsurf does not support programmatic sub-agent dispatch. Step 4 (cross-spec review) now includes "if unavailable, run inline" fallback for both the review task and the fix-dispatch loop. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@codex review — Windsurf cross-spec review and fix-dispatch now include inline fallback. npm test → 193/193. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6081c3c82
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - Creates/updates: `{{KIRO_DIR}}/steering/{product,tech,structure,roadmap}.md` | ||
| - Creates spec seeds: `{{KIRO_DIR}}/specs/<slug>/{spec.json,brief.md,requirements.md}` — `requirements.md` is **project-description stub only** (same as `@kiro-spec-init`), not EARS requirements | ||
| - Does NOT create: EARS requirements body, `design.md`, `tasks.md`, `.specify/` | ||
| 4. **Safety check**: If any spec has `spec.json` with `approvals.requirements.approved: true` or `approvals.design.approved: true`, list them and ask before overwriting or duplicating boundaries. |
There was a problem hiding this comment.
Guard draft specs before writing seeds
When a brownfield repo already has partial .kiro/specs/ with draft or in-progress specs, this gate only asks before touching specs whose requirements or design are approved; Phase 5 then creates and writes seed files for every chosen slug, so a matching unapproved spec can be overwritten without warning. Since the skill explicitly supports partial .kiro/ additive merge mode, protect any existing spec directory (skip, suffix, or ask) before writing seeds, not only approved specs.
Useful? React with 👍 / 👎.
…allback - getSpecs Phase 0 safety check now scans ALL existing spec dirs (not just approved ones) before writing seeds. Falls back to ask/keep. - Antigravity kiro-spec-batch Step 4 now has inline fallback for cross-spec review and fix-dispatch (same pattern as Windsurf). Co-authored-by: Cursor <cursoragent@cursor.com>
|
@codex review — two new P2s resolved:
npm test → 193/193. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33633e4e41
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - [ ] slug-b -- one line. Dependencies: slug-a | ||
| ``` | ||
|
|
||
| Mark `[x]` only when a spec has approved requirements (rare on first bootstrap). |
There was a problem hiding this comment.
Keep roadmap checkboxes aligned with batch skipping
When getSpecs runs in additive mode against a repo that already has a spec with approved requirements but no design.md/tasks.md, this instruction tells it to mark that roadmap entry [x]. I checked kiro-spec-batch: it parses [x] as “done” and its constraints skip features with [x], so /kiro-spec-batch will never finish those partially complete specs. The checkbox should mean fully batch-complete, or approved-requirements specs need a separate status.
Useful? React with 👍 / 👎.
Summary
Adds
/kiro-getspecs— the brownfield entry point for cc-sdd when a repository already has code but no (or incomplete).kiro/specs.This PR adds one new skill (#18) plus minimal handoff updates so seeds plug into the existing pipeline without bypassing phase gates.
What it does
.kiro/inventory, root listingproduct.md,tech.md,structure.mdroadmap.md+ per-slug seed bundle (see below)/kiro-spec-requirementsor/kiro-spec-batchSpec seed bundle (per slug)
Each seed is a handoff package, not a finished spec:
Not written: EARS acceptance criteria,
design.md,tasks.md, spec-kit.specify/.Why it exists
.kiro/specs//kiro-discovery(needs an idea)/kiro-getspecs(reads code).specify/(not Kiro-portable).kiro/only/kiro-spec-init× NLogic distilled from spec-kit brownfield extensions, mapped to cc-sdd artifacts.
Pipeline position
Discovery (
/kiro-discovery) remains the idea-first router. getSpecs is code-first bootstrap. They complement; they do not replace each other.Files added / touched
New skill (×8 agents):
skills/kiro-getspecs/SKILL.mdreferences/analysis-guide.md,references/spec-seed-template.mdtemplates/shared/settings/rules/getspecs-principles.mdHandoff (minimal, required for pipeline integrity):
kiro-spec-init— brownfield seed path whenbrief + spec.jsonexistkiro-spec-requirements— derive project description from brief if stub missingkiro-spec-batch— init step respects existing seedskiro-discovery— redirect substantial brownfield repos to getSpecsDocs: docs/guides/brownfield-getspecs.md (includes mermaid diagrams)
Validation
npm testintools/cc-sdd— 193/193 passing (all 8 agent manifests)brief + spec.json + requirements stubverified on diskagents/openai.yamlfor new skillUsage
Scope note
This PR intentionally does not change EARS gates, design review, or impl loops. getSpecs only accelerates day-zero adoption on brownfield repos.