diff --git a/GEMINI.md b/GEMINI.md new file mode 100644 index 00000000..f3096544 --- /dev/null +++ b/GEMINI.md @@ -0,0 +1,45 @@ +# AI-DLC and Spec-Driven Development + +Kiro-style Spec Driven Development implementation on AI-DLC (AI Development Life Cycle) + +## Project Context + +### Paths +- Steering: `.kiro/steering/` +- Specs: `.kiro/specs/` + +### Steering vs Specification + +**Steering** (`.kiro/steering/`) - Guide AI with project-wide rules and context +**Specs** (`.kiro/specs/`) - Formalize development process for individual features + +### Active Specifications +- Check `.kiro/specs/` for active specifications +- Use `/kiro:spec-status [feature-name]` to check progress + +## Development Guidelines +- Think in English, generate responses in Japanese. All Markdown content written to project files (e.g., requirements.md, design.md, tasks.md, research.md, validation reports) MUST be written in the target language configured for this specification (see spec.json.language). + +## Minimal Workflow +- Phase 0 (optional): `/kiro:steering`, `/kiro:steering-custom` +- Phase 1 (Specification): + - `/kiro:spec-init "description"` + - `/kiro:spec-requirements {feature}` + - `/kiro:validate-gap {feature}` (optional: for existing codebase) + - `/kiro:spec-design {feature} [-y]` + - `/kiro:validate-design {feature}` (optional: design review) + - `/kiro:spec-tasks {feature} [-y]` +- Phase 2 (Implementation): `/kiro:spec-impl {feature} [tasks]` + - `/kiro:validate-impl {feature}` (optional: after implementation) +- Progress check: `/kiro:spec-status {feature}` (use anytime) + +## Development Rules +- 3-phase approval workflow: Requirements → Design → Tasks → Implementation +- Human review required each phase; use `-y` only for intentional fast-track +- Keep steering current and verify alignment with `/kiro:spec-status` +- Follow the user's instructions precisely, and within that scope act autonomously: gather the necessary context and complete the requested work end-to-end in this run, asking questions only when essential information is missing or the instructions are critically ambiguous. + +## Steering Configuration +- Load entire `.kiro/steering/` as project memory +- Default files: `product.md`, `tech.md`, `structure.md` +- Custom files are supported (managed via `/kiro:steering-custom`) diff --git a/README.md b/README.md index 9ea77596..7813c8f2 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,14 @@ 👻 **Kiro-inspired** — Similar Spec-Driven, AI-DLC style as Kiro IDE, so existing Kiro specs remain compatible and portable. -Stop losing 70% of development time to meetings, documentation ceremonies, and scattered context. cc-sdd brings structured **AI-DLC** (AI-Driven Development Lifecycle) and **Spec-Driven Development** to Claude Code, Cursor, Gemini CLI, Codex CLI, GitHub Copilot, Qwen Code, OpenCode, and Windsurf. +Stop losing 70% of development time to meetings, documentation ceremonies, and scattered context. cc-sdd brings structured **AI-DLC** (AI-Driven Development Lifecycle) and **Spec-Driven Development** to Claude Code, Cursor, Gemini CLI, Codex CLI, GitHub Copilot, Qwen Code, OpenCode, Windsurf, and Google Antigravity. ### What you get: - ✅ **Spec-first guarantees** — Approve requirements/design upfront, then AI implements exactly as specified - ✅ **Parallel execution ready** — Tasks decomposed for concurrent implementation with dependency tracking - ✅ **Team-aligned templates** — Customize once, all agents output docs that fit your approval process - ✅ **Project Memory** — AI remembers your architecture, patterns, and standards across sessions -- ✅ **8 agents, unified workflow** — Same spec-driven process across Claude, Cursor, Gemini, Codex, Copilot, Qwen, OpenCode, Windsurf +- ✅ **9 agents, unified workflow** — Same spec-driven process across Claude, Cursor, Gemini, Codex, Copilot, Qwen, OpenCode, Windsurf, Google Antigravity - ✅ **Hours instead of weeks** — Feature planning goes from days to hours with AI-assisted specs ## 🚀 Quick Start @@ -35,7 +35,7 @@ npx cc-sdd@latest --claude --lang en ## Claude Code # ✅ That's it! Now run: /kiro:spec-init ``` -**Installation takes 30 seconds.** Supports 8 agents (Claude (Commands / Subagents), Cursor, Gemini, Codex, Copilot, Qwen, OpenCode, Windsurf) × 13 languages. +**Installation takes 30 seconds.** Supports 9 agents (Claude (Commands / Subagents), Cursor, Gemini, Codex, Copilot, Qwen, OpenCode, Windsurf, Google Antigravity) × 13 languages. 📖 **Next steps:** [All installation options](#%EF%B8%8F-advanced-installation) | [Command Reference](docs/guides/command-reference.md) | [Spec-Driven Guide](docs/guides/spec-driven.md) @@ -93,6 +93,7 @@ npx cc-sdd@latest --qwen # Qwen Code npx cc-sdd@latest --opencode # OpenCode (11 commands) npx cc-sdd@latest --opencode-agent # OpenCode Subagents (12 commands + 9 subagents) npx cc-sdd@latest --windsurf # Windsurf IDE +npx cc-sdd@latest --antigravity # Google Antigravity ``` ### Choose Your Language diff --git a/docs/guides/command-reference.md b/docs/guides/command-reference.md index bd16730f..e93cb78d 100644 --- a/docs/guides/command-reference.md +++ b/docs/guides/command-reference.md @@ -4,7 +4,7 @@ Complete reference for all cc-sdd commands with detailed usage, examples, and troubleshooting. -> **Note**: This reference is based on Claude Code command templates. While the core functionality is consistent across all supported agents (Cursor, Gemini CLI, Codex CLI, GitHub Copilot, Qwen Code, Windsurf), command syntax and features may vary slightly depending on your agent. Refer to your agent's specific documentation for platform-specific details. +> **Note**: This reference is based on Claude Code command templates. While the core functionality is consistent across all supported agents (Cursor, Gemini CLI, Codex CLI, GitHub Copilot, Qwen Code, Google Antigravity, Windsurf), command syntax and features may vary slightly depending on your agent. Refer to your agent's specific documentation for platform-specific details. > For installation, CLI setup, and workspace prerequisites, see the [Project README](../../README.md). For an overview of additional docs and guides, start with the [Docs README](../README.md). diff --git a/docs/guides/ja/command-reference.md b/docs/guides/ja/command-reference.md index 4acda70a..67c29fda 100644 --- a/docs/guides/ja/command-reference.md +++ b/docs/guides/ja/command-reference.md @@ -4,7 +4,7 @@ cc-sdd が提供する11個のAI-DLCコマンドについて、その役割、入力、出力を一覧にしたリファレンスである。各フェーズで確認すべき成果物と次のアクションをすぐに把握できるよう、英語版の `docs/guides/command-reference.md` を基に日本語で要約している。 -> **補足**: コマンドのテンプレートは Claude Code を基準にしているが、Cursor、Gemini CLI、Codex CLI、GitHub Copilot、Qwen Code、Windsurf など、他のエージェントでも同じ11個のコマンドが利用可能である(UIの詳細は各エージェントのドキュメントを参照すること)。 +> **補足**: コマンドのテンプレートは Claude Code を基準にしているが、Cursor、Gemini CLI、Codex CLI、GitHub Copilot、Qwen Code、Google Antigravity、Windsurf など、他のエージェントでも同じ11個のコマンドが利用可能である(UIの詳細は各エージェントのドキュメントを参照すること)。 > > インストールやワークスペースの前提条件については[プロジェクトのREADME](../../README.md)を、各ドキュメントの概要については[Docs README](../README.md)を参照すること。 diff --git a/tools/cc-sdd/README.md b/tools/cc-sdd/README.md index 2bab3439..e14a8de0 100644 --- a/tools/cc-sdd/README.md +++ b/tools/cc-sdd/README.md @@ -8,7 +8,7 @@ English | 日本語 | 繁體中文 -✨ **Transform Claude Code / Cursor IDE / Gemini CLI / Codex CLI / GitHub Copilot / Qwen Code / OpenCode / Windsurf from prototype to production-ready development.** +✨ **Transform Claude Code / Cursor IDE / Gemini CLI / Codex CLI / GitHub Copilot / Qwen Code / OpenCode / Windsurf / Google Antigravity from prototype to production-ready development.** 👻 **Kiro-inspired** — Similar Spec-Driven, AI-DLC style as Kiro IDE, so existing Kiro specs remain compatible and portable. @@ -17,7 +17,7 @@ English | 日本語 | - ✅ **Separate Research** — Keep discovery notes (Research.md) separate from final design (Design.md) - ✅ **Quality Gates** — validate-gap/design/impl commands catch integration issues before coding - ✅ **Customize Once** — Adapt templates to your team's process; all agents follow the same workflow -- ✅ **Universal Workflow** — 8 agents × 13 languages share the same 11-command process +- ✅ **Universal Workflow** — 9 agents × 13 languages share the same 11-command process --- @@ -49,6 +49,7 @@ npx cc-sdd@latest --qwen --lang de # Qwen Code npx cc-sdd@latest --opencode --lang en # OpenCode (11 commands) npx cc-sdd@latest --opencode-agent --lang ja # OpenCode Subagents (12 commands + 9 subagents) npx cc-sdd@latest --windsurf --lang ja # Windsurf IDE +npx cc-sdd@latest --antigravity --lang en # Google Antigravity (11 workflows + 1 skill) # Note: @next is now reserved for future alpha/beta versions ``` @@ -132,6 +133,7 @@ npx cc-sdd@latest --windsurf --lang ja # Windsurf IDE | **GitHub Copilot** | ✅ Full | 11 prompts | | **Qwen Code** | ✅ Full | 11 commands | | **Windsurf IDE** | ✅ Full | 11 workflows | +| **Google Antigravity** | ✅ Full | 11 workflows + 1 skill | | Others (Factory AI Droid) | 📅 Planned | - | ## 📋 Commands diff --git a/tools/cc-sdd/README_ja.md b/tools/cc-sdd/README_ja.md index 62a10763..0a76c6db 100644 --- a/tools/cc-sdd/README_ja.md +++ b/tools/cc-sdd/README_ja.md @@ -8,7 +8,7 @@ English | 日本語 | 繁體中文 -✨ **Claude Code / Cursor IDE / Gemini CLI / Codex CLI / GitHub Copilot / Qwen Code / OpenCode / Windsurf をプロトタイプから本番仕様駆動へ。要件・設計・タスク・プロジェクトメモリをチームのワークフローに沿うようカスタマイズできます。** +✨ **Claude Code / Cursor IDE / Gemini CLI / Codex CLI / GitHub Copilot / Qwen Code / OpenCode / Windsurf / Google Antigravity をプロトタイプから本番仕様駆動へ。要件・設計・タスク・プロジェクトメモリをチームのワークフローに沿うようカスタマイズできます。** 👻 **Kiro互換** — Kiro IDE に似た Spec-Driven / AI-DLC スタイルで、既存の Kiro 仕様書もそのまま扱えます。 @@ -17,12 +17,12 @@ - ✅ **Research の分離** — 調査メモ(Research.md)と最終設計(Design.md)を分けて管理 - ✅ **品質ゲート** — validate-gap/design/impl コマンドでコーディング前に統合問題を検出 - ✅ **一度だけカスタマイズ** — テンプレートをチームプロセスに適応、全エージェントが同じワークフローに従う -- ✅ **統一ワークフロー** — 8エージェント × 13言語で同じ11コマンドプロセスを共有 +- ✅ **統一ワークフロー** — 9エージェント × 13言語で同じ11コマンドプロセスを共有 > インストール手順だけ知りたい場合は [インストール](#-インストール) へジャンプ。v1.1.5 維持なら `npx cc-sdd@1.1.5 --claude-code ...`、v2 移行は [Migration Guide](../../docs/guides/migration-guide.md) / [日本語版](../../docs/guides/ja/migration-guide.md) を参照。 -Claude Code、Cursor IDE、Gemini CLI、Codex CLI、GitHub Copilot、Qwen Code、OpenCode、Windsurfを **AI-DLC (AI駆動開発ライフサイクル)**へ。**AIネイティブプロセス**と**最小限の人間承認ゲート**:AIが実行を駆動し、人間が各フェーズで重要な決定を検証。 +Claude Code、Cursor IDE、Gemini CLI、Codex CLI、GitHub Copilot、Qwen Code、OpenCode、Windsurf、Google Antigravityを **AI-DLC (AI駆動開発ライフサイクル)**へ。**AIネイティブプロセス**と**最小限の人間承認ゲート**:AIが実行を駆動し、人間が各フェーズで重要な決定を検証。 ## 🚀 インストール @@ -49,6 +49,7 @@ npx cc-sdd@latest --qwen --lang ja # Qwen Code npx cc-sdd@latest --opencode --lang ja # OpenCode(11コマンド) npx cc-sdd@latest --opencode-agent --lang ja # OpenCode Subagents(12コマンド + 9サブエージェント) npx cc-sdd@latest --windsurf --lang ja # Windsurf IDE +npx cc-sdd@latest --antigravity --lang ja # Google Antigravity(11ワークフロー + 1スキル) # 注: @nextは今後のアルファ/ベータ版用に予約されています ``` @@ -132,6 +133,7 @@ npx cc-sdd@latest --windsurf --lang ja # Windsurf IDE | **GitHub Copilot** | ✅ 完全対応 | 11 プロンプト | | **Qwen Code** | ✅ 完全対応 | 11 コマンド | | **Windsurf IDE** | ✅ 完全対応 | 11 ワークフロー | +| **Google Antigravity** | ✅ 完全対応 | 11 ワークフロー + 1 スキル | | その他(Factory AI Droid) | 📅 予定 | - | ## 📋 コマンド diff --git a/tools/cc-sdd/README_zh-TW.md b/tools/cc-sdd/README_zh-TW.md index 7a7ea1d3..194bd18c 100644 --- a/tools/cc-sdd/README_zh-TW.md +++ b/tools/cc-sdd/README_zh-TW.md @@ -8,7 +8,7 @@ English | 日本語 | 繁體中文 -✨ **將 Claude Code / Cursor IDE / Gemini CLI / Codex CLI / GitHub Copilot / Qwen Code / OpenCode / Windsurf 直接帶入 Spec-Driven / AI-DLC 的生產級流程,需求・設計・任務・指導文件一次對齊團隊審核。** +✨ **將 Claude Code / Cursor IDE / Gemini CLI / Codex CLI / GitHub Copilot / Qwen Code / OpenCode / Windsurf / Google Antigravity 直接帶入 Spec-Driven / AI-DLC 的生產級流程,需求・設計・任務・指導文件一次對齊團隊審核。** 👻 **Kiro 相容** — 與 Kiro IDE 相似的 Spec-Driven / AI-DLC 風格,可沿用既有 Kiro 規格並保持互通。 @@ -17,7 +17,7 @@ - ✅ **分離研究** — 將探索筆記(Research.md)與最終設計(Design.md)分開管理 - ✅ **品質關卡** — validate-gap/design/impl 指令在編碼前捕捉整合問題 - ✅ **一次自訂** — 將模板適應至團隊流程;所有代理遵循相同工作流程 -- ✅ **統一工作流程** — 7 代理 × 13 語言共享相同的 11 指令流程 +- ✅ **統一工作流程** — 9 代理 × 13 語言共享相同的 11 指令流程 > 只想看安裝?跳到 [安裝](#-安裝)。若要維持 1.1.5,使用 `npx cc-sdd@1.1.5 --claude-code ...`;升級 v2.0.0 請參考 [Migration Guide](../../docs/guides/migration-guide.md) | [日文版](../../docs/guides/ja/migration-guide.md)。 @@ -46,6 +46,7 @@ npx cc-sdd@latest --qwen --lang zh-TW # Qwen Code npx cc-sdd@latest --opencode --lang zh-TW # OpenCode(11 個指令) npx cc-sdd@latest --opencode-agent --lang zh-TW # OpenCode Subagents(12 個指令 + 9 個子代理) npx cc-sdd@latest --windsurf --lang zh-TW # Windsurf IDE +npx cc-sdd@latest --antigravity --lang zh-TW # Google Antigravity(11 個工作流程 + 1 個技能) # 注意:@next 現已保留給未來的 alpha/beta 版本 ``` @@ -129,6 +130,7 @@ npx cc-sdd@latest --windsurf --lang zh-TW # Windsurf IDE | **GitHub Copilot** | ✅ 完全支援 | 11 個提示 | `AGENTS.md` | | **Qwen Code** | ✅ 完全支援 | 11 個指令 | `QWEN.md` | | **Windsurf IDE** | ✅ 完全支援 | 11 個工作流程 | `AGENTS.md` | +| **Google Antigravity** | ✅ 完全支援 | 11 個工作流程 + 1 個技能 | `GEMINI.md` | | 其他(Factory AI Droid) | 📅 規劃中 | - | ## 📋 指令 diff --git a/tools/cc-sdd/package.json b/tools/cc-sdd/package.json index af549af5..e6cf69ef 100644 --- a/tools/cc-sdd/package.json +++ b/tools/cc-sdd/package.json @@ -1,7 +1,7 @@ { "name": "cc-sdd", "version": "2.1.1", - "description": "Transform your coding workflow with AI-DLC and Spec-Driven Development. One command installs 11 powerful slash commands, Project Memory, and structured development workflows for 8 AI coding agents.", + "description": "Transform your coding workflow with AI-DLC and Spec-Driven Development. One command installs 11 powerful slash commands, Project Memory, and structured development workflows for 9 AI coding agents.", "keywords": [ "claude-code", "cursor", @@ -11,6 +11,7 @@ "github-copilot", "qwen-code", "opencode", + "google-antigravity", "sdd", "spec-driven-development", "kiro", diff --git a/tools/cc-sdd/src/agents/registry.ts b/tools/cc-sdd/src/agents/registry.ts index 5b18dbaf..f68ca178 100644 --- a/tools/cc-sdd/src/agents/registry.ts +++ b/tools/cc-sdd/src/agents/registry.ts @@ -227,6 +227,24 @@ export const agentDefinitions = { }, manifestId: 'opencode-agent', }, + 'google-antigravity': { + label: 'Google Antigravity', + description: + 'Installs kiro workflows in `.agent/workflows/`, shared settings in `{{KIRO_DIR}}/settings/`, and a GEMINI.md quickstart.', + aliasFlags: ['--google-antigravity', '--antigravity'], + recommendedModels: ['Gemini 3.1 Pro Preview or newer'], + layout: { + commandsDir: '.agent/workflows', + agentDir: '.agent', + docFile: 'GEMINI.md', + }, + commands: { + spec: '`/kiro-spec-init `', + steering: '`/kiro-steering`', + steeringCustom: '`/kiro-steering-custom `', + }, + manifestId: 'google-antigravity', + }, } as const satisfies Record; export type AgentType = keyof typeof agentDefinitions; diff --git a/tools/cc-sdd/templates/agents/google-antigravity/docs/GEMINI.md b/tools/cc-sdd/templates/agents/google-antigravity/docs/GEMINI.md new file mode 100644 index 00000000..e4c91f10 --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/docs/GEMINI.md @@ -0,0 +1,45 @@ +# AI-DLC and Spec-Driven Development + +Kiro-style Spec Driven Development implementation on AI-DLC (AI Development Life Cycle) + +## Project Context + +### Paths +- Steering: `{{KIRO_DIR}}/steering/` +- Specs: `{{KIRO_DIR}}/specs/` + +### Steering vs Specification + +**Steering** (`{{KIRO_DIR}}/steering/`) - Guide AI with project-wide rules and context +**Specs** (`{{KIRO_DIR}}/specs/`) - Formalize development process for individual features + +### Active Specifications +- Check `{{KIRO_DIR}}/specs/` for active specifications +- Use `/kiro-spec-status [feature-name]` to check progress + +## Development Guidelines +{{DEV_GUIDELINES}} + +## Minimal Workflow +- Phase 0 (optional): `/kiro-steering`, `/kiro-steering-custom` +- Phase 1 (Specification): + - `/kiro-spec-init "description"` + - `/kiro-spec-requirements {feature}` + - `/kiro-validate-gap {feature}` (optional: for existing codebase) + - `/kiro-spec-design {feature} [-y]` + - `/kiro-validate-design {feature}` (optional: design review) + - `/kiro-spec-tasks {feature} [-y]` +- Phase 2 (Implementation): `/kiro-spec-impl {feature} [tasks]` + - `/kiro-validate-impl {feature}` (optional: after implementation) +- Progress check: `/kiro-spec-status {feature}` (use anytime) + +## Development Rules +- 3-phase approval workflow: Requirements → Design → Tasks → Implementation +- Human review required each phase; use `-y` only for intentional fast-track +- Keep steering current and verify alignment with `/kiro-spec-status` +- Follow the user's instructions precisely, and within that scope act autonomously: gather the necessary context and complete the requested work end-to-end in this run, asking questions only when essential information is missing or the instructions are critically ambiguous. + +## Steering Configuration +- Load entire `{{KIRO_DIR}}/steering/` as project memory +- Default files: `product.md`, `tech.md`, `structure.md` +- Custom files are supported (managed via `/kiro-steering-custom`) diff --git a/tools/cc-sdd/templates/agents/google-antigravity/skills/kiro-sdd/SKILL.md b/tools/cc-sdd/templates/agents/google-antigravity/skills/kiro-sdd/SKILL.md new file mode 100644 index 00000000..0861fec0 --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/skills/kiro-sdd/SKILL.md @@ -0,0 +1,29 @@ +--- +name: kiro-sdd +description: Guide for Spec-Driven Development (SDD) using Kiro on AI-DLC +--- +# Spec-Driven Development (SDD) + +This skill enables the agent to autonomously discover and utilize the Kiro Spec-Driven Development workflow. + +## Overview +Kiro-style Spec Driven Development implementation on AI-DLC (AI Development Life Cycle) + +## Commands Available +- `/kiro-spec-init `: Initialize a new specification. +- `/kiro-spec-requirements `: Generate requirements. +- `/kiro-spec-design `: Generate technical design. +- `/kiro-spec-tasks `: Generate implementation tasks. +- `/kiro-spec-impl `: Execute implementation tasks. +- `/kiro-spec-status `: Check specification progress. +- `/kiro-steering`: Manage project steering files. +- `/kiro-steering-custom`: Create custom steering files. + +## Workflow +1. Initialize spec: `/kiro-spec-init` +2. Define requirements: `/kiro-spec-requirements` +3. Design: `/kiro-spec-design` +4. Tasks: `/kiro-spec-tasks` +5. Implementation: `/kiro-spec-impl` + +Always verify alignment with steering context in `{{KIRO_DIR}}/steering/`. diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-design.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-design.md new file mode 100644 index 00000000..50c75486 --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-design.md @@ -0,0 +1,182 @@ +--- +description: Create comprehensive technical design for a specification +auto_execution_mode: 3 +--- + +description: Create comprehensive technical design for a specification +argument-hint: [-y:$2] + + +# Technical Design Generator + + +- **Mission**: Generate comprehensive technical design document that translates requirements (WHAT) into architectural design (HOW) +- **Success Criteria**: + - All requirements mapped to technical components with clear interfaces + - Appropriate architecture discovery and research completed + - Design aligns with steering context and existing patterns + - Visual diagrams included for complex architectures + + + +## Core Task +Generate technical design document for feature **$1** based on approved requirements. + +## Execution Steps + +### Step 1: Load Context + +**Read all necessary context**: +- `{{KIRO_DIR}}/specs/$1/spec.json`, `requirements.md`, `design.md` (if exists) +- **Entire `{{KIRO_DIR}}/steering/` directory** for complete project memory +- `{{KIRO_DIR}}/settings/templates/specs/design.md` for document structure +- `{{KIRO_DIR}}/settings/rules/design-principles.md` for design principles +- `{{KIRO_DIR}}/settings/templates/specs/research.md` for discovery log structure + +**Validate requirements approval**: +- If `-y` flag provided ($2 == "-y"): Auto-approve requirements in spec.json +- Otherwise: Verify approval status (stop if unapproved, see Safety & Fallback) + +### Step 2: Discovery & Analysis + +**Critical: This phase ensures design is based on complete, accurate information.** + +1. **Classify Feature Type**: + - **New Feature** (greenfield) → Full discovery required + - **Extension** (existing system) → Integration-focused discovery + - **Simple Addition** (CRUD/UI) → Minimal or no discovery + - **Complex Integration** → Comprehensive analysis required + +2. **Execute Appropriate Discovery Process**: + + **For Complex/New Features**: + - Read and execute `{{KIRO_DIR}}/settings/rules/design-discovery-full.md` + - Conduct thorough research using WebSearch/WebFetch: + - Latest architectural patterns and best practices + - External dependency verification (APIs, libraries, versions, compatibility) + - Official documentation, migration guides, known issues + - Performance benchmarks and security considerations + + **For Extensions**: + - Read and execute `{{KIRO_DIR}}/settings/rules/design-discovery-light.md` + - Focus on integration points, existing patterns, compatibility + - Use Grep to analyze existing codebase patterns + + **For Simple Additions**: + - Skip formal discovery, quick pattern check only + +3. **Retain Discovery Findings for Step 3**: + - External API contracts and constraints + - Technology decisions with rationale + - Existing patterns to follow or extend + - Integration points and dependencies + - Identified risks and mitigation strategies + - Potential architecture patterns and boundary options (note details in `research.md`) + - Parallelization considerations for future tasks (capture dependencies in `research.md`) + +4. **Persist Findings to Research Log**: + - Create or update `{{KIRO_DIR}}/specs/$1/research.md` using the shared template + - Summarize discovery scope and key findings (Summary section) + - Record investigations in Research Log topics with sources and implications + - Document architecture pattern evaluation, design decisions, and risks using the template sections + - Use the language specified in spec.json when writing or updating `research.md` + +### Step 3: Generate Design Document + +1. **Load Design Template and Rules**: + - Read `{{KIRO_DIR}}/settings/templates/specs/design.md` for structure + - Read `{{KIRO_DIR}}/settings/rules/design-principles.md` for principles + +2. **Generate Design Document**: + - **Follow specs/design.md template structure and generation instructions strictly** + - **Integrate all discovery findings**: Use researched information (APIs, patterns, technologies) throughout component definitions, architecture decisions, and integration points + - If existing design.md found in Step 1, use it as reference context (merge mode) + - Apply design rules: Type Safety, Visual Communication, Formal Tone + - Use language specified in spec.json + - Ensure sections reflect updated headings ("Architecture Pattern & Boundary Map", "Technology Stack & Alignment", "Components & Interface Contracts") and reference supporting details from `research.md` + +3. **Update Metadata** in spec.json: + - Set `phase: "design-generated"` + - Set `approvals.design.generated: true, approved: false` + - Set `approvals.requirements.approved: true` + - Update `updated_at` timestamp + +## Critical Constraints + - **Type Safety**: + - Enforce strong typing aligned with the project's technology stack. + - For statically typed languages, define explicit types/interfaces and avoid unsafe casts. + - For TypeScript, never use `any`; prefer precise types and generics. + - For dynamically typed languages, provide type hints/annotations where available (e.g., Python type hints) and validate inputs at boundaries. + - Document public interfaces and contracts clearly to ensure cross-component type safety. +- **Latest Information**: Use WebSearch/WebFetch for external dependencies and best practices +- **Steering Alignment**: Respect existing architecture patterns from steering context +- **Template Adherence**: Follow specs/design.md template structure and generation instructions strictly +- **Design Focus**: Architecture and interfaces ONLY, no implementation code +- **Requirements Traceability IDs**: Use numeric requirement IDs only (e.g. "1.1", "1.2", "3.1", "3.3") exactly as defined in requirements.md. Do not invent new IDs or use alphabetic labels. + +### Language Reminder +- Markdown prompt content must remain in English, even when spec.json requests another language for design output. The generated design.md and research.md should use the spec language. + + +## Tool Guidance +- **Read first**: Load all context before taking action (specs, steering, templates, rules) +- **Research when uncertain**: Use WebSearch/WebFetch for external dependencies, APIs, and latest best practices +- **Analyze existing code**: Use Grep to find patterns and integration points in codebase +- **Write last**: Generate design.md only after all research and analysis complete + +## Output Description + +**Command execution output** (separate from design.md content): + +Provide brief summary in the language specified in spec.json: + +1. **Status**: Confirm design document generated at `{{KIRO_DIR}}/specs/$1/design.md` +2. **Discovery Type**: Which discovery process was executed (full/light/minimal) +3. **Key Findings**: 2-3 critical insights from discovery that shaped the design +4. **Next Action**: Approval workflow guidance (see Safety & Fallback) + +**Format**: Concise Markdown (under 200 words) - this is the command output, NOT the design document itself + +**Note**: The actual design document follows `{{KIRO_DIR}}/settings/templates/specs/design.md` structure. + +## Safety & Fallback + +### Error Scenarios + +**Requirements Not Approved**: +- **Stop Execution**: Cannot proceed without approved requirements +- **User Message**: "Requirements not yet approved. Approval required before design generation." +- **Suggested Action**: "Run `/kiro-spec-design $1 -y` to auto-approve requirements and proceed" + +**Missing Requirements**: +- **Stop Execution**: Requirements document must exist +- **User Message**: "No requirements.md found at `{{KIRO_DIR}}/specs/$1/requirements.md`" +- **Suggested Action**: "Run `/kiro-spec-requirements $1` to generate requirements first" + +**Template Missing**: +- **User Message**: "Template file missing at `{{KIRO_DIR}}/settings/templates/specs/design.md`" +- **Suggested Action**: "Check repository setup or restore template file" +- **Fallback**: Use inline basic structure with warning + +**Steering Context Missing**: +- **Warning**: "Steering directory empty or missing - design may not align with project standards" +- **Proceed**: Continue with generation but note limitation in output + +**Discovery Complexity Unclear**: +- **Default**: Use full discovery process (`{{KIRO_DIR}}/settings/rules/design-discovery-full.md`) +- **Rationale**: Better to over-research than miss critical context +- **Invalid Requirement IDs**: + - **Stop Execution**: If requirements.md is missing numeric IDs or uses non-numeric headings (for example, "Requirement A"), stop and instruct the user to fix requirements.md before continuing. + +### Next Phase: Task Generation + +**If Design Approved**: +- Review generated design at `{{KIRO_DIR}}/specs/$1/design.md` +- **Optional**: Run `/kiro-validate-design $1` for interactive quality review +- Then `/kiro-spec-tasks $1 -y` to generate implementation tasks + +**If Modifications Needed**: +- Provide feedback and re-run `/kiro-spec-design $1` +- Existing design used as reference (merge mode) + +**Note**: Design approval is mandatory before proceeding to task generation. diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-impl.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-impl.md new file mode 100644 index 00000000..fe18d9aa --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-impl.md @@ -0,0 +1,113 @@ +--- +description: Execute spec tasks using TDD methodology +auto_execution_mode: 3 +--- + +description: Execute spec tasks using TDD methodology +argument-hint: [task-numbers:$2] + + +# Implementation Task Executor + + +- **Mission**: Execute implementation tasks using Test-Driven Development methodology based on approved specifications +- **Success Criteria**: + - All tests written before implementation code + - Code passes all tests with no regressions + - Tasks marked as completed in tasks.md + - Implementation aligns with design and requirements + + + +## Core Task +Execute implementation tasks for feature **$1** using Test-Driven Development. + +## Execution Steps + +### Step 1: Load Context + +**Read all necessary context**: +- `{{KIRO_DIR}}/specs/$1/spec.json`, `requirements.md`, `design.md`, `tasks.md` +- **Entire `{{KIRO_DIR}}/steering/` directory** for complete project memory + +**Validate approvals**: +- Verify tasks are approved in spec.json (stop if not, see Safety & Fallback) + +### Step 2: Select Tasks + +**Determine which tasks to execute**: +- If `$2` provided: Execute specified task numbers (e.g., "1.1" or "1,2,3") +- Otherwise: Execute all pending tasks (unchecked `- [ ]` in tasks.md) + +### Step 3: Execute with TDD + +For each selected task, follow Kent Beck's TDD cycle: + +1. **RED - Write Failing Test**: + - Write test for the next small piece of functionality + - Test should fail (code doesn't exist yet) + - Use descriptive test names + +2. **GREEN - Write Minimal Code**: + - Implement simplest solution to make test pass + - Focus only on making THIS test pass + - Avoid over-engineering + +3. **REFACTOR - Clean Up**: + - Improve code structure and readability + - Remove duplication + - Apply design patterns where appropriate + - Ensure all tests still pass after refactoring + +4. **VERIFY - Validate Quality**: + - All tests pass (new and existing) + - No regressions in existing functionality + - Code coverage maintained or improved + +5. **MARK COMPLETE**: + - Update checkbox from `- [ ]` to `- [x]` in tasks.md + +## Critical Constraints +- **TDD Mandatory**: Tests MUST be written before implementation code +- **Task Scope**: Implement only what the specific task requires +- **Test Coverage**: All new code must have tests +- **No Regressions**: Existing tests must continue to pass +- **Design Alignment**: Implementation must follow design.md specifications + + +## Tool Guidance +- **Read first**: Load all context before implementation +- **Test first**: Write tests before code +- Use **WebSearch/WebFetch** for library documentation when needed + +## Output Description + +Provide brief summary in the language specified in spec.json: + +1. **Tasks Executed**: Task numbers and test results +2. **Status**: Completed tasks marked in tasks.md, remaining tasks count + +**Format**: Concise (under 150 words) + +## Safety & Fallback + +### Error Scenarios + +**Tasks Not Approved or Missing Spec Files**: +- **Stop Execution**: All spec files must exist and tasks must be approved +- **Suggested Action**: "Complete previous phases: `/kiro-spec-requirements`, `/kiro-spec-design`, `/kiro-spec-tasks`" + +**Test Failures**: +- **Stop Implementation**: Fix failing tests before continuing +- **Action**: Debug and fix, then re-run + +### Task Execution + +**Execute specific task(s)**: +- `/kiro-spec-impl $1 1.1` - Single task +- `/kiro-spec-impl $1 1,2,3` - Multiple tasks + +**Execute all pending**: +- `/kiro-spec-impl $1` - All unchecked tasks + + diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-init.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-init.md new file mode 100644 index 00000000..01f21405 --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-init.md @@ -0,0 +1,69 @@ +--- +description: Initialize a new specification with detailed project description +auto_execution_mode: 3 +--- + +description: Initialize a new specification with detailed project description +argument-hint: + + +# Spec Initialization + + +- **Mission**: Initialize the first phase of spec-driven development by creating directory structure and metadata for a new specification +- **Success Criteria**: + - Generate appropriate feature name from project description + - Create unique spec structure without conflicts + - Provide clear path to next phase (requirements generation) + + + +## Core Task +Generate a unique feature name from the project description ($ARGUMENTS) and initialize the specification structure. + +## Execution Steps +1. **Check Uniqueness**: Verify `{{KIRO_DIR}}/specs/` for naming conflicts (append number suffix if needed) +2. **Create Directory**: `{{KIRO_DIR}}/specs/[feature-name]/` +3. **Initialize Files Using Templates**: + - Read `{{KIRO_DIR}}/settings/templates/specs/init.json` + - Read `{{KIRO_DIR}}/settings/templates/specs/requirements-init.md` + - Replace placeholders: + - `{{FEATURE_NAME}}` → generated feature name + - `{{TIMESTAMP}}` → current ISO 8601 timestamp + - `{{PROJECT_DESCRIPTION}}` → $ARGUMENTS + - Write `spec.json` and `requirements.md` to spec directory + +## Important Constraints +- DO NOT generate requirements/design/tasks at this stage +- Follow stage-by-stage development principles +- Maintain strict phase separation +- Only initialization is performed in this phase + + +## Tool Guidance +- Use **Glob** to check existing spec directories for name uniqueness +- Use **Read** to fetch templates: `init.json` and `requirements-init.md` +- Use **Write** to create spec.json and requirements.md after placeholder replacement +- Perform validation before any file write operation + +## Output Description +Provide output in the language specified in `spec.json` with the following structure: + +1. **Generated Feature Name**: `feature-name` format with 1-2 sentence rationale +2. **Project Summary**: Brief summary (1 sentence) +3. **Created Files**: Bullet list with full paths +4. **Next Step**: Command block showing `/kiro-spec-requirements ` +5. **Notes**: Explain why only initialization was performed (2-3 sentences on phase separation) + +**Format Requirements**: +- Use Markdown headings (##, ###) +- Wrap commands in code blocks +- Keep total output concise (under 250 words) +- Use clear, professional language per `spec.json.language` + +## Safety & Fallback +- **Ambiguous Feature Name**: If feature name generation is unclear, propose 2-3 options and ask user to select +- **Template Missing**: If template files don't exist in `{{KIRO_DIR}}/settings/templates/specs/`, report error with specific missing file path and suggest checking repository setup +- **Directory Conflict**: If feature name already exists, append numeric suffix (e.g., `feature-name-2`) and notify user of automatic conflict resolution +- **Write Failure**: Report error with specific path and suggest checking permissions or disk space + diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-requirements.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-requirements.md new file mode 100644 index 00000000..cebb276b --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-requirements.md @@ -0,0 +1,99 @@ +--- +description: Generate comprehensive requirements for a specification +auto_execution_mode: 3 +--- + +description: Generate comprehensive requirements for a specification +argument-hint: + + +# Requirements Generation + + +- **Mission**: Generate comprehensive, testable requirements in EARS format based on the project description from spec initialization +- **Success Criteria**: + - Create complete requirements document aligned with steering context + - Follow the project's EARS patterns and constraints for all acceptance criteria + - Focus on core functionality without implementation details + - Update metadata to track generation status + + + +## Core Task +Generate complete requirements for feature **$1** based on the project description in requirements.md. + +## Execution Steps + +1. **Load Context**: + - Read `{{KIRO_DIR}}/specs/$1/spec.json` for language and metadata + - Read `{{KIRO_DIR}}/specs/$1/requirements.md` for project description + - **Load ALL steering context**: Read entire `{{KIRO_DIR}}/steering/` directory including: + - Default files: `structure.md`, `tech.md`, `product.md` + - All custom steering files (regardless of mode settings) + - This provides complete project memory and context + +2. **Read Guidelines**: + - Read `{{KIRO_DIR}}/settings/rules/ears-format.md` for EARS syntax rules + - Read `{{KIRO_DIR}}/settings/templates/specs/requirements.md` for document structure + +3. **Generate Requirements**: + - Create initial requirements based on project description + - Group related functionality into logical requirement areas + - Apply EARS format to all acceptance criteria + - Use language specified in spec.json + +4. **Update Metadata**: + - Set `phase: "requirements-generated"` + - Set `approvals.requirements.generated: true` + - Update `updated_at` timestamp + +## Important Constraints +- Focus on WHAT, not HOW (no implementation details) +- Requirements must be testable and verifiable +- Choose appropriate subject for EARS statements (system/service name for software) +- Generate initial version first, then iterate with user feedback (no sequential questions upfront) +- Requirement headings in requirements.md MUST include a leading numeric ID only (for example: "Requirement 1", "1.", "2 Feature ..."); do not use alphabetic IDs like "Requirement A". + + +## Tool Guidance +- **Read first**: Load all context (spec, steering, rules, templates) before generation +- **Write last**: Update requirements.md only after complete generation +- Use **WebSearch/WebFetch** only if external domain knowledge needed + +## Output Description +Provide output in the language specified in spec.json with: + +1. **Generated Requirements Summary**: Brief overview of major requirement areas (3-5 bullets) +2. **Document Status**: Confirm requirements.md updated and spec.json metadata updated +3. **Next Steps**: Guide user on how to proceed (approve and continue, or modify) + +**Format Requirements**: +- Use Markdown headings for clarity +- Include file paths in code blocks +- Keep summary concise (under 300 words) + +## Safety & Fallback + +### Error Scenarios +- **Missing Project Description**: If requirements.md lacks project description, ask user for feature details +- **Ambiguous Requirements**: Propose initial version and iterate with user rather than asking many upfront questions +- **Template Missing**: If template files don't exist, use inline fallback structure with warning +- **Language Undefined**: Default to English (`en`) if spec.json doesn't specify language +- **Incomplete Requirements**: After generation, explicitly ask user if requirements cover all expected functionality +- **Steering Directory Empty**: Warn user that project context is missing and may affect requirement quality +- **Non-numeric Requirement Headings**: If existing headings do not include a leading numeric ID (for example, they use "Requirement A"), normalize them to numeric IDs and keep that mapping consistent (never mix numeric and alphabetic labels). + +### Next Phase: Design Generation + +**If Requirements Approved**: +- Review generated requirements at `{{KIRO_DIR}}/specs/$1/requirements.md` +- **Optional Gap Analysis** (for existing codebases): + - Run `/kiro-validate-gap $1` to analyze implementation gap with current code + - Identifies existing components, integration points, and implementation strategy + - Recommended for brownfield projects; skip for greenfield +- Then `/kiro-spec-design $1 -y` to proceed to design phase + +**If Modifications Needed**: +- Provide feedback and re-run `/kiro-spec-requirements $1` + +**Note**: Approval is mandatory before proceeding to design phase. diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-status.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-status.md new file mode 100644 index 00000000..64d4842e --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-status.md @@ -0,0 +1,89 @@ +--- +description: Show specification status and progress +auto_execution_mode: 3 +--- + +description: Show specification status and progress +argument-hint: + + +# Specification Status + + +- **Mission**: Display comprehensive status and progress for a specification +- **Success Criteria**: + - Show current phase and completion status + - Identify next actions and blockers + - Provide clear visibility into progress + + + +## Core Task +Generate status report for feature **$1** showing progress across all phases. + +## Execution Steps + +### Step 1: Load Spec Context +- Read `{{KIRO_DIR}}/specs/$1/spec.json` for metadata and phase status +- Read existing files: `requirements.md`, `design.md`, `tasks.md` (if they exist) +- Check `{{KIRO_DIR}}/specs/$1/` directory for available files + +### Step 2: Analyze Status + +**Parse each phase**: +- **Requirements**: Count requirements and acceptance criteria +- **Design**: Check for architecture, components, diagrams +- **Tasks**: Count completed vs total tasks (parse `- [x]` vs `- [ ]`) +- **Approvals**: Check approval status in spec.json + +### Step 3: Generate Report + +Create report in the language specified in spec.json covering: +1. **Current Phase & Progress**: Where the spec is in the workflow +2. **Completion Status**: Percentage complete for each phase +3. **Task Breakdown**: If tasks exist, show completed/remaining counts +4. **Next Actions**: What needs to be done next +5. **Blockers**: Any issues preventing progress + +## Critical Constraints +- Use language from spec.json +- Calculate accurate completion percentages +- Identify specific next action commands + + +## Tool Guidance +- **Read**: Load spec.json first, then other spec files as needed +- **Parse carefully**: Extract completion data from tasks.md checkboxes +- Use **Glob** to check which spec files exist + +## Output Description + +Provide status report in the language specified in spec.json: + +**Report Structure**: +1. **Feature Overview**: Name, phase, last updated +2. **Phase Status**: Requirements, Design, Tasks with completion % +3. **Task Progress**: If tasks exist, show X/Y completed +4. **Next Action**: Specific command to run next +5. **Issues**: Any blockers or missing elements + +**Format**: Clear, scannable format with emojis (✅/⏳/❌) for status + +## Safety & Fallback + +### Error Scenarios + +**Spec Not Found**: +- **Message**: "No spec found for `$1`. Check available specs in `{{KIRO_DIR}}/specs/`" +- **Action**: List available spec directories + +**Incomplete Spec**: +- **Warning**: Identify which files are missing +- **Suggested Action**: Point to next phase command + +### List All Specs + +To see all available specs: +- Run with no argument or use wildcard +- Shows all specs in `{{KIRO_DIR}}/specs/` with their status + diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-tasks.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-tasks.md new file mode 100644 index 00000000..88953bfe --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-spec-tasks.md @@ -0,0 +1,139 @@ +--- +description: Generate implementation tasks for a specification +auto_execution_mode: 3 +--- + +description: Generate implementation tasks for a specification +argument-hint: [-y:$2] [--sequential:$3] + + +# Implementation Tasks Generator + + +- **Mission**: Generate detailed, actionable implementation tasks that translate technical design into executable work items +- **Success Criteria**: + - All requirements mapped to specific tasks + - Tasks properly sized (1-3 hours each) + - Clear task progression with proper hierarchy + - Natural language descriptions focused on capabilities + + + +## Core Task +Generate implementation tasks for feature **$1** based on approved requirements and design. + +## Execution Steps + +### Step 1: Load Context + +**Read all necessary context**: +- `{{KIRO_DIR}}/specs/$1/spec.json`, `requirements.md`, `design.md` +- `{{KIRO_DIR}}/specs/$1/tasks.md` (if exists, for merge mode) +- **Entire `{{KIRO_DIR}}/steering/` directory** for complete project memory + +**Validate approvals**: +- If `-y` flag provided ($2 == "-y"): Auto-approve requirements and design in spec.json +- Otherwise: Verify both approved (stop if not, see Safety & Fallback) +- Determine sequential mode: `sequential = ($3 == "--sequential")` + +### Step 2: Generate Implementation Tasks + +**Load generation rules and template**: +- Read `{{KIRO_DIR}}/settings/rules/tasks-generation.md` for principles +- If `sequential == false`: Read `{{KIRO_DIR}}/settings/rules/tasks-parallel-analysis.md` for parallel judgement criteria +- Read `{{KIRO_DIR}}/settings/templates/specs/tasks.md` for format (supports `(P)` markers) + +**Generate task list following all rules**: +- Use language specified in spec.json +- Map all requirements to tasks and list numeric requirement IDs only (comma-separated) without extra narration, descriptive suffixes, parentheses, translations, or free-form labels +- Ensure all design components included +- Verify task progression is logical and incremental +- Collapse single-subtask structures by promoting them to major tasks and keep container summaries concise +- Apply `(P)` markers to tasks that satisfy parallel criteria (skip markers when `sequential == true`) +- Mark optional acceptance-criteria-focused test coverage subtasks with `- [ ]*` only when deferrable post-MVP +- If existing tasks.md found, merge with new content + +### Step 3: Finalize + +**Write and update**: +- Create/update `{{KIRO_DIR}}/specs/$1/tasks.md` +- Update spec.json metadata: + - Set `phase: "tasks-generated"` + - Set `approvals.tasks.generated: true, approved: false` + - Set `approvals.requirements.approved: true` + - Set `approvals.design.approved: true` + - Update `updated_at` timestamp + +## Critical Constraints +- **Follow rules strictly**: All principles in tasks-generation.md are mandatory +- **Natural Language**: Describe what to do, not code structure details +- **Complete Coverage**: ALL requirements must map to tasks +- **Maximum 2 Levels**: Major tasks and sub-tasks only (no deeper nesting) +- **Sequential Numbering**: Major tasks increment (1, 2, 3...), never repeat +- **Task Integration**: Every task must connect to the system (no orphaned work) + + +## Tool Guidance +- **Read first**: Load all context, rules, and templates before generation +- **Write last**: Generate tasks.md only after complete analysis and verification + +## Output Description + +Provide brief summary in the language specified in spec.json: + +1. **Status**: Confirm tasks generated at `{{KIRO_DIR}}/specs/$1/tasks.md` +2. **Task Summary**: + - Total: X major tasks, Y sub-tasks + - All Z requirements covered + - Average task size: 1-3 hours per sub-task +3. **Quality Validation**: + - ✅ All requirements mapped to tasks + - ✅ Task dependencies verified + - ✅ Testing tasks included +4. **Next Action**: Review tasks and proceed when ready + +**Format**: Concise (under 200 words) + +## Safety & Fallback + +### Error Scenarios + +**Requirements or Design Not Approved**: +- **Stop Execution**: Cannot proceed without approved requirements and design +- **User Message**: "Requirements and design must be approved before task generation" +- **Suggested Action**: "Run `/kiro-spec-tasks $1 -y` to auto-approve both and proceed" + +**Missing Requirements or Design**: +- **Stop Execution**: Both documents must exist +- **User Message**: "Missing requirements.md or design.md at `{{KIRO_DIR}}/specs/$1/`" +- **Suggested Action**: "Complete requirements and design phases first" + +**Incomplete Requirements Coverage**: +- **Warning**: "Not all requirements mapped to tasks. Review coverage." +- **User Action Required**: Confirm intentional gaps or regenerate tasks + +**Template/Rules Missing**: +- **User Message**: "Template or rules files missing in `{{KIRO_DIR}}/settings/`" +- **Fallback**: Use inline basic structure with warning +- **Suggested Action**: "Check repository setup or restore template files" +- **Missing Numeric Requirement IDs**: + - **Stop Execution**: All requirements in requirements.md MUST have numeric IDs. If any requirement lacks a numeric ID, stop and request that requirements.md be fixed before generating tasks. + +### Next Phase: Implementation + +**Before Starting Implementation**: +- **IMPORTANT**: Clear conversation history and free up context before running `/kiro-spec-impl` +- This applies when starting first task OR switching between tasks +- Fresh context ensures clean state and proper task focus + +**If Tasks Approved**: +- Execute specific task: `/kiro-spec-impl $1 1.1` (recommended: clear context between each task) +- Execute multiple tasks: `/kiro-spec-impl $1 1.1,1.2` (use cautiously, clear context between tasks) +- Without arguments: `/kiro-spec-impl $1` (executes all pending tasks - NOT recommended due to context bloat) + +**If Modifications Needed**: +- Provide feedback and re-run `/kiro-spec-tasks $1` +- Existing tasks used as reference (merge mode) + +**Note**: The implementation phase will guide you through executing tasks with appropriate context and validation. + diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-steering-custom.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-steering-custom.md new file mode 100644 index 00000000..d58d0bb4 --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-steering-custom.md @@ -0,0 +1,129 @@ +--- +description: Create custom steering documents for specialized project contexts +auto_execution_mode: 3 +--- + +description: Create custom steering documents for specialized project contexts + + +# Kiro Custom Steering Creation + + +**Role**: Create specialized steering documents beyond core files (product, tech, structure). + +**Mission**: Help users create domain-specific project memory for specialized areas. + +**Success Criteria**: +- Custom steering captures specialized patterns +- Follows same granularity principles as core steering +- Provides clear value for specific domain + + + +## Workflow + +1. **Ask user** for custom steering needs: + - Domain/topic (e.g., "API standards", "testing approach") + - Specific requirements or patterns to document + +2. **Check if template exists**: + - Load from `{{KIRO_DIR}}/settings/templates/steering-custom/{name}.md` if available + - Use as starting point, customize based on project + +3. **Analyze codebase** (JIT) for relevant patterns: + - **Glob** for related files + - **Read** for existing implementations + - **Grep** for specific patterns + +4. **Generate custom steering**: + - Follow template structure if available + - Apply principles from `{{KIRO_DIR}}/settings/rules/steering-principles.md` + - Focus on patterns, not exhaustive lists + - Keep to 100-200 lines (2-3 minute read) + +5. **Create file** in `{{KIRO_DIR}}/steering/{name}.md` + +## Available Templates + +Templates available in `{{KIRO_DIR}}/settings/templates/steering-custom/`: + +1. **api-standards.md** - REST/GraphQL conventions, error handling +2. **testing.md** - Test organization, mocking, coverage +3. **security.md** - Auth patterns, input validation, secrets +4. **database.md** - Schema design, migrations, query patterns +5. **error-handling.md** - Error types, logging, retry strategies +6. **authentication.md** - Auth flows, permissions, session management +7. **deployment.md** - CI/CD, environments, rollback procedures + +Load template when needed, customize for project. + +## Steering Principles + +From `{{KIRO_DIR}}/settings/rules/steering-principles.md`: + +- **Patterns over lists**: Document patterns, not every file/component +- **Single domain**: One topic per file +- **Concrete examples**: Show patterns with code +- **Maintainable size**: 100-200 lines typical +- **Security first**: Never include secrets or sensitive data + + + +## Tool guidance + +- **Read**: Load template, analyze existing code +- **Glob**: Find related files for pattern analysis +- **Grep**: Search for specific patterns +- **LS**: Understand relevant structure + +**JIT Strategy**: Load template only when creating that type of steering. + +## Output description + +Chat summary with file location (file created directly). + +``` +✅ Custom Steering Created + +## Created: +- {{KIRO_DIR}}/steering/api-standards.md + +## Based On: +- Template: api-standards.md +- Analyzed: src/api/ directory patterns +- Extracted: REST conventions, error format + +## Content: +- Endpoint naming patterns +- Request/response format +- Error handling conventions +- Authentication approach + +Review and customize as needed. +``` + +## Examples + +### Success: API Standards +**Input**: "Create API standards steering" +**Action**: Load template, analyze src/api/, extract patterns +**Output**: api-standards.md with project-specific REST conventions + +### Success: Testing Strategy +**Input**: "Document our testing approach" +**Action**: Load template, analyze test files, extract patterns +**Output**: testing.md with test organization and mocking strategies + +## Safety & Fallback + +- **No template**: Generate from scratch based on domain knowledge +- **Security**: Never include secrets (load principles) +- **Validation**: Ensure doesn't duplicate core steering content + +## Notes + +- Templates are starting points, customize for project +- Follow same granularity principles as core steering +- All steering files loaded as project memory +- Custom files equally important as core files + diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-steering.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-steering.md new file mode 100644 index 00000000..86700f66 --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-steering.md @@ -0,0 +1,147 @@ +--- +description: Manage {{KIRO_DIR}}/steering/ as persistent project knowledge +auto_execution_mode: 3 +--- + +description: Manage {{KIRO_DIR}}/steering/ as persistent project knowledge + + +# Kiro Steering Management + + +**Role**: Maintain `{{KIRO_DIR}}/steering/` as persistent project memory. + +**Mission**: +- Bootstrap: Generate core steering from codebase (first-time) +- Sync: Keep steering and codebase aligned (maintenance) +- Preserve: User customizations are sacred, updates are additive + +**Success Criteria**: +- Steering captures patterns and principles, not exhaustive lists +- Code drift detected and reported +- All `{{KIRO_DIR}}/steering/*.md` treated equally (core + custom) + + + +## Scenario Detection + +Check `{{KIRO_DIR}}/steering/` status: + +**Bootstrap Mode**: Empty OR missing core files (product.md, tech.md, structure.md) +**Sync Mode**: All core files exist + +--- + +## Bootstrap Flow + +1. Load templates from `{{KIRO_DIR}}/settings/templates/steering/` +2. Analyze codebase (JIT): + - `glob_file_search` for source files + - `read_file` for README, package.json, etc. + - `grep` for patterns +3. Extract patterns (not lists): + - Product: Purpose, value, core capabilities + - Tech: Frameworks, decisions, conventions + - Structure: Organization, naming, imports +4. Generate steering files (follow templates) +5. Load principles from `{{KIRO_DIR}}/settings/rules/steering-principles.md` +6. Present summary for review + +**Focus**: Patterns that guide decisions, not catalogs of files/dependencies. + +--- + +## Sync Flow + +1. Load all existing steering (`{{KIRO_DIR}}/steering/*.md`) +2. Analyze codebase for changes (JIT) +3. Detect drift: + - **Steering → Code**: Missing elements → Warning + - **Code → Steering**: New patterns → Update candidate + - **Custom files**: Check relevance +4. Propose updates (additive, preserve user content) +5. Report: Updates, warnings, recommendations + +**Update Philosophy**: Add, don't replace. Preserve user sections. + +--- + +## Granularity Principle + +From `{{KIRO_DIR}}/settings/rules/steering-principles.md`: + +> "If new code follows existing patterns, steering shouldn't need updating." + +Document patterns and principles, not exhaustive lists. + +**Bad**: List every file in directory tree +**Good**: Describe organization pattern with examples + + + +## Tool guidance + +- `glob_file_search`: Find source/config files +- `read_file`: Read steering, docs, configs +- `grep`: Search patterns +- `list_dir`: Analyze structure + +**JIT Strategy**: Fetch when needed, not upfront. + +## Output description + +Chat summary only (files updated directly). + +### Bootstrap: +``` +✅ Steering Created + +## Generated: +- product.md: [Brief description] +- tech.md: [Key stack] +- structure.md: [Organization] + +Review and approve as Source of Truth. +``` + +### Sync: +``` +✅ Steering Updated + +## Changes: +- tech.md: React 18 → 19 +- structure.md: Added API pattern + +## Code Drift: +- Components not following import conventions + +## Recommendations: +- Consider api-standards.md +``` + +## Examples + +### Bootstrap +**Input**: Empty steering, React TypeScript project +**Output**: 3 files with patterns - "Feature-first", "TypeScript strict", "React 19" + +### Sync +**Input**: Existing steering, new `/api` directory +**Output**: Updated structure.md, flagged non-compliant files, suggested api-standards.md + +## Safety & Fallback + +- **Security**: Never include keys, passwords, secrets (see principles) +- **Uncertainty**: Report both states, ask user +- **Preservation**: Add rather than replace when in doubt + +## Notes + +- All `{{KIRO_DIR}}/steering/*.md` loaded as project memory +- Templates and principles are external for customization +- Focus on patterns, not catalogs +- "Golden Rule": New code following patterns shouldn't require steering updates +- Avoid documenting agent-specific tooling directories (e.g. `.cursor/`, `.gemini/`, `.claude/`) +- `{{KIRO_DIR}}/settings/` content should NOT be documented in steering files (settings are metadata, not project knowledge) +- Light references to `{{KIRO_DIR}}/specs/` and `{{KIRO_DIR}}/steering/` are acceptable; avoid other `.kiro/` directories + diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-validate-design.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-validate-design.md new file mode 100644 index 00000000..558b0edd --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-validate-design.md @@ -0,0 +1,95 @@ +--- +description: Interactive technical design quality review and validation +auto_execution_mode: 3 +--- + +description: Interactive technical design quality review and validation +argument-hint: + + +# Technical Design Validation + + +- **Mission**: Conduct interactive quality review of technical design to ensure readiness for implementation +- **Success Criteria**: + - Critical issues identified (maximum 3 most important concerns) + - Balanced assessment with strengths recognized + - Clear GO/NO-GO decision with rationale + - Actionable feedback for improvements if needed + + + +## Core Task +Interactive design quality review for feature **$1** based on approved requirements and design document. + +## Execution Steps + +1. **Load Context**: + - Read `{{KIRO_DIR}}/specs/$1/spec.json` for language and metadata + - Read `{{KIRO_DIR}}/specs/$1/requirements.md` for requirements + - Read `{{KIRO_DIR}}/specs/$1/design.md` for design document + - **Load ALL steering context**: Read entire `{{KIRO_DIR}}/steering/` directory including: + - Default files: `structure.md`, `tech.md`, `product.md` + - All custom steering files (regardless of mode settings) + - This provides complete project memory and context + +2. **Read Review Guidelines**: + - Read `{{KIRO_DIR}}/settings/rules/design-review.md` for review criteria and process + +3. **Execute Design Review**: + - Follow design-review.md process: Analysis → Critical Issues → Strengths → GO/NO-GO + - Limit to 3 most important concerns + - Engage interactively with user + - Use language specified in spec.json for output + +4. **Provide Decision and Next Steps**: + - Clear GO/NO-GO decision with rationale + - Guide user on proceeding based on decision + +## Important Constraints +- **Quality assurance, not perfection seeking**: Accept acceptable risk +- **Critical focus only**: Maximum 3 issues, only those significantly impacting success +- **Interactive approach**: Engage in dialogue, not one-way evaluation +- **Balanced assessment**: Recognize both strengths and weaknesses +- **Actionable feedback**: All suggestions must be implementable + + +## Tool Guidance +- **Read first**: Load all context (spec, steering, rules) before review +- **Grep if needed**: Search codebase for pattern validation or integration checks +- **Interactive**: Engage with user throughout the review process + +## Output Description +Provide output in the language specified in spec.json with: + +1. **Review Summary**: Brief overview (2-3 sentences) of design quality and readiness +2. **Critical Issues**: Maximum 3, following design-review.md format +3. **Design Strengths**: 1-2 positive aspects +4. **Final Assessment**: GO/NO-GO decision with rationale and next steps + +**Format Requirements**: +- Use Markdown headings for clarity +- Follow design-review.md output format +- Keep summary concise + +## Safety & Fallback + +### Error Scenarios +- **Missing Design**: If design.md doesn't exist, stop with message: "Run `/kiro-spec-design $1` first to generate design document" +- **Design Not Generated**: If design phase not marked as generated in spec.json, warn but proceed with review +- **Empty Steering Directory**: Warn user that project context is missing and may affect review quality +- **Language Undefined**: Default to English (`en`) if spec.json doesn't specify language + +### Next Phase: Task Generation + +**If Design Passes Validation (GO Decision)**: +- Review feedback and apply changes if needed +- Run `/kiro-spec-tasks $1` to generate implementation tasks +- Or `/kiro-spec-tasks $1 -y` to auto-approve and proceed directly + +**If Design Needs Revision (NO-GO Decision)**: +- Address critical issues identified +- Re-run `/kiro-spec-design $1` with improvements +- Re-validate with `/kiro-validate-design $1` + +**Note**: Design validation is recommended but optional. Quality review helps catch issues early. diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-validate-gap.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-validate-gap.md new file mode 100644 index 00000000..73ff4113 --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-validate-gap.md @@ -0,0 +1,91 @@ +--- +description: Analyze implementation gap between requirements and existing codebase +auto_execution_mode: 3 +--- + +description: Analyze implementation gap between requirements and existing codebase +argument-hint: + + +# Implementation Gap Validation + + +- **Mission**: Analyze the gap between requirements and existing codebase to inform implementation strategy +- **Success Criteria**: + - Comprehensive understanding of existing codebase patterns and components + - Clear identification of missing capabilities and integration challenges + - Multiple viable implementation approaches evaluated + - Technical research needs identified for design phase + + + +## Core Task +Analyze implementation gap for feature **$1** based on approved requirements and existing codebase. + +## Execution Steps + +1. **Load Context**: + - Read `{{KIRO_DIR}}/specs/$1/spec.json` for language and metadata + - Read `{{KIRO_DIR}}/specs/$1/requirements.md` for requirements + - **Load ALL steering context**: Read entire `{{KIRO_DIR}}/steering/` directory including: + - Default files: `structure.md`, `tech.md`, `product.md` + - All custom steering files (regardless of mode settings) + - This provides complete project memory and context + +2. **Read Analysis Guidelines**: + - Read `{{KIRO_DIR}}/settings/rules/gap-analysis.md` for comprehensive analysis framework + +3. **Execute Gap Analysis**: + - Follow gap-analysis.md framework for thorough investigation + - Analyze existing codebase using Grep and Read tools + - Use WebSearch/WebFetch for external dependency research if needed + - Evaluate multiple implementation approaches (extend/new/hybrid) + - Use language specified in spec.json for output + +4. **Generate Analysis Document**: + - Create comprehensive gap analysis following the output guidelines in gap-analysis.md + - Present multiple viable options with trade-offs + - Flag areas requiring further research + +## Important Constraints +- **Information over Decisions**: Provide analysis and options, not final implementation choices +- **Multiple Options**: Present viable alternatives when applicable +- **Thorough Investigation**: Use tools to deeply understand existing codebase +- **Explicit Gaps**: Clearly flag areas needing research or investigation + + +## Tool Guidance +- **Read first**: Load all context (spec, steering, rules) before analysis +- **Grep extensively**: Search codebase for patterns, conventions, and integration points +- **WebSearch/WebFetch**: Research external dependencies and best practices when needed +- **Write last**: Generate analysis only after complete investigation + +## Output Description +Provide output in the language specified in spec.json with: + +1. **Analysis Summary**: Brief overview (3-5 bullets) of scope, challenges, and recommendations +2. **Document Status**: Confirm analysis approach used +3. **Next Steps**: Guide user on proceeding to design phase + +**Format Requirements**: +- Use Markdown headings for clarity +- Keep summary concise (under 300 words) +- Detailed analysis follows gap-analysis.md output guidelines + +## Safety & Fallback + +### Error Scenarios +- **Missing Requirements**: If requirements.md doesn't exist, stop with message: "Run `/kiro-spec-requirements $1` first to generate requirements" +- **Requirements Not Approved**: If requirements not approved, warn user but proceed (gap analysis can inform requirement revisions) +- **Empty Steering Directory**: Warn user that project context is missing and may affect analysis quality +- **Complex Integration Unclear**: Flag for comprehensive research in design phase rather than blocking +- **Language Undefined**: Default to English (`en`) if spec.json doesn't specify language + +### Next Phase: Design Generation + +**If Gap Analysis Complete**: +- Review gap analysis insights +- Run `/kiro-spec-design $1` to create technical design document +- Or `/kiro-spec-design $1 -y` to auto-approve requirements and proceed directly + +**Note**: Gap analysis is optional but recommended for brownfield projects to inform design decisions. diff --git a/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-validate-impl.md b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-validate-impl.md new file mode 100644 index 00000000..168ee0ff --- /dev/null +++ b/tools/cc-sdd/templates/agents/google-antigravity/workflows/kiro-validate-impl.md @@ -0,0 +1,141 @@ +--- +description: Validate implementation against requirements, design, and tasks +auto_execution_mode: 3 +--- + +description: Validate implementation against requirements, design, and tasks +argument-hint: [feature-name:$1] [task-numbers:$2] + + +# Implementation Validation + + +- **Mission**: Verify that implementation aligns with approved requirements, design, and tasks +- **Success Criteria**: + - All specified tasks marked as completed + - Tests exist and pass for implemented functionality + - Requirements traceability confirmed (EARS requirements covered) + - Design structure reflected in implementation + - No regressions in existing functionality + + + +## Core Task +Validate implementation for feature(s) and task(s) based on approved specifications. + +## Execution Steps + +### 1. Detect Validation Target + +**If no arguments provided** (`$1` empty): +- Parse conversation history for `/kiro-spec-impl [tasks]` commands +- Extract feature names and task numbers from each execution +- Aggregate all implemented tasks by feature +- Report detected implementations (e.g., "user-auth: 1.1, 1.2, 1.3") +- If no history found, scan `{{KIRO_DIR}}/specs/` for features with completed tasks `[x]` + +**If feature provided** (`$1` present, `$2` empty): +- Use specified feature +- Detect all completed tasks `[x]` in `{{KIRO_DIR}}/specs/$1/tasks.md` + +**If both feature and tasks provided** (`$1` and `$2` present): +- Validate specified feature and tasks only (e.g., `user-auth 1.1,1.2`) + +### 2. Load Context + +For each detected feature: +- Read `{{KIRO_DIR}}/specs//spec.json` for metadata +- Read `{{KIRO_DIR}}/specs//requirements.md` for requirements +- Read `{{KIRO_DIR}}/specs//design.md` for design structure +- Read `{{KIRO_DIR}}/specs//tasks.md` for task list +- **Load ALL steering context**: Read entire `{{KIRO_DIR}}/steering/` directory including: + - Default files: `structure.md`, `tech.md`, `product.md` + - All custom steering files (regardless of mode settings) + +### 3. Execute Validation + +For each task, verify: + +#### Task Completion Check +- Checkbox is `[x]` in tasks.md +- If not completed, flag as "Task not marked complete" + +#### Test Coverage Check +- Tests exist for task-related functionality +- Tests pass (no failures or errors) +- Use Bash to run test commands (e.g., `npm test`, `pytest`) +- If tests fail or don't exist, flag as "Test coverage issue" + +#### Requirements Traceability +- Identify EARS requirements related to the task +- Use Grep to search implementation for evidence of requirement coverage +- If requirement not traceable to code, flag as "Requirement not implemented" + +#### Design Alignment +- Check if design.md structure is reflected in implementation +- Verify key interfaces, components, and modules exist +- Use Grep/LS to confirm file structure matches design +- If misalignment found, flag as "Design deviation" + +#### Regression Check +- Run full test suite (if available) +- Verify no existing tests are broken +- If regressions detected, flag as "Regression detected" + +### 4. Generate Report + +Provide summary in the language specified in spec.json: +- Validation summary by feature +- Coverage report (tasks, requirements, design) +- Issues and deviations with severity (Critical/Warning) +- GO/NO-GO decision + +## Important Constraints +- **Conversation-aware**: Prioritize conversation history for auto-detection +- **Non-blocking warnings**: Design deviations are warnings unless critical +- **Test-first focus**: Test coverage is mandatory for GO decision +- **Traceability required**: All requirements must be traceable to implementation + + +## Tool Guidance +- **Conversation parsing**: Extract `/kiro-spec-impl` patterns from history +- **Read context**: Load all specs and steering before validation +- **Bash for tests**: Execute test commands to verify pass status +- **Grep for traceability**: Search codebase for requirement evidence +- **LS/Glob for structure**: Verify file structure matches design + +## Output Description + +Provide output in the language specified in spec.json with: + +1. **Detected Target**: Features and tasks being validated (if auto-detected) +2. **Validation Summary**: Brief overview per feature (pass/fail counts) +3. **Issues**: List of validation failures with severity and location +4. **Coverage Report**: Requirements/design/task coverage percentages +5. **Decision**: GO (ready for next phase) / NO-GO (needs fixes) + +**Format Requirements**: +- Use Markdown headings and tables for clarity +- Flag critical issues with ⚠️ or 🔴 +- Keep summary concise (under 400 words) + +## Safety & Fallback + +### Error Scenarios +- **No Implementation Found**: If no `/kiro-spec-impl` in history and no `[x]` tasks, report "No implementations detected" +- **Test Command Unknown**: If test framework unclear, warn and skip test validation (manual verification required) +- **Missing Spec Files**: If spec.json/requirements.md/design.md missing, stop with error +- **Language Undefined**: Default to English (`en`) if spec.json doesn't specify language + +### Next Steps Guidance + +**If GO Decision**: +- Implementation validated and ready +- Proceed to deployment or next feature + +**If NO-GO Decision**: +- Address critical issues listed +- Re-run `/kiro-spec-impl [tasks]` for fixes +- Re-validate with `/kiro-validate-impl [feature] [tasks]` + +**Note**: Validation is recommended after implementation to ensure spec alignment and quality. diff --git a/tools/cc-sdd/templates/manifests/google-antigravity.json b/tools/cc-sdd/templates/manifests/google-antigravity.json new file mode 100644 index 00000000..e3e113dd --- /dev/null +++ b/tools/cc-sdd/templates/manifests/google-antigravity.json @@ -0,0 +1,50 @@ +{ + "version": 1, + "artifacts": [ + { + "id": "commands", + "source": { + "type": "templateDir", + "fromDir": "templates/agents/{{AGENT}}/workflows", + "toDir": "{{AGENT_COMMANDS_DIR}}" + }, + "when": { + "agent": "google-antigravity" + } + }, + { + "id": "skills", + "source": { + "type": "templateDir", + "fromDir": "templates/agents/{{AGENT}}/skills", + "toDir": "{{AGENT_DIR}}/skills" + }, + "when": { + "agent": "google-antigravity" + } + }, + { + "id": "doc_main", + "source": { + "type": "templateFile", + "from": "templates/agents/{{AGENT}}/docs/GEMINI.md", + "toDir": ".", + "rename": "{{AGENT_DOC}}" + }, + "when": { + "agent": "google-antigravity" + } + }, + { + "id": "settings_common", + "source": { + "type": "templateDir", + "fromDir": "templates/shared/settings", + "toDir": "{{KIRO_DIR}}/settings" + }, + "when": { + "agent": "google-antigravity" + } + } + ] +} diff --git a/tools/cc-sdd/test/agentLayout.test.ts b/tools/cc-sdd/test/agentLayout.test.ts index e5f26815..fdcf3975 100644 --- a/tools/cc-sdd/test/agentLayout.test.ts +++ b/tools/cc-sdd/test/agentLayout.test.ts @@ -68,4 +68,13 @@ describe('resolveAgentLayout', () => { }); }); + it('returns google-antigravity defaults', () => { + const res = resolveAgentLayout('google-antigravity'); + expect(res).toEqual({ + commandsDir: '.agent/workflows', + agentDir: '.agent', + docFile: 'GEMINI.md', + }); + }); + }); diff --git a/tools/cc-sdd/test/args.test.ts b/tools/cc-sdd/test/args.test.ts index a94d6bbb..d3804302 100644 --- a/tools/cc-sdd/test/args.test.ts +++ b/tools/cc-sdd/test/args.test.ts @@ -44,6 +44,8 @@ describe('parseArgs', () => { expect(parseArgs(['--claude-agent']).agent).toBe('claude-code-agent'); expect(parseArgs(['--claude-code-agent']).agent).toBe('claude-code-agent'); expect(parseArgs(['--windsurf']).agent).toBe('windsurf'); + expect(parseArgs(['--google-antigravity']).agent).toBe('google-antigravity'); + expect(parseArgs(['--antigravity']).agent).toBe('google-antigravity'); expect(() => parseArgs(['--agent', 'qwen-code', '--gemini-cli'])).toThrowError(/agent.*conflict/i); expect(() => parseArgs(['--gemini-cli', '--qwen-code'])).toThrowError(/agent.*conflict/i); diff --git a/tools/cc-sdd/test/realManifestGoogleAntigravity.test.ts b/tools/cc-sdd/test/realManifestGoogleAntigravity.test.ts new file mode 100644 index 00000000..b059ca42 --- /dev/null +++ b/tools/cc-sdd/test/realManifestGoogleAntigravity.test.ts @@ -0,0 +1,104 @@ +import { describe, it, expect } from 'vitest'; +import { runCli } from '../src/index'; +import { mkdtemp, readFile, stat } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; + +const makeIO = () => { + const logs: string[] = []; + const errs: string[] = []; + return { + io: { + log: (m: string) => logs.push(m), + error: (m: string) => errs.push(m), + exit: (_c: number) => {}, + }, + get logs() { return logs; }, + get errs() { return errs; }, + }; +}; + +const mkTmp = async () => mkdtemp(join(tmpdir(), 'ccsdd-real-manifest-antigravity-')); +const exists = async (p: string) => { try { await stat(p); return true; } catch { return false; } }; + +// vitest runs in tools/cc-sdd; repoRoot is two levels up +const repoRoot = join(process.cwd(), '..', '..'); +const manifestPath = join(repoRoot, 'tools/cc-sdd/templates/manifests/google-antigravity.json'); + +describe('real google-antigravity manifest (mac)', () => { + const runtimeDarwin = { platform: 'darwin' } as const; + + it('dry-run prints plan for google-antigravity.json with placeholders applied', async () => { + const ctx = makeIO(); + const code = await runCli(['--dry-run', '--lang', 'en', '--agent', 'google-antigravity', '--manifest', manifestPath], runtimeDarwin, ctx.io, {}); + expect(code).toBe(0); + const out = ctx.logs.join('\\n'); + expect(out).toMatch(/Plan \(dry-run\)/); + expect(out).toContain('[templateDir] commands: templates/agents/google-antigravity/workflows -> .agent/workflows'); + expect(out).toContain('[templateDir] skills: templates/agents/google-antigravity/skills -> .agent/skills'); + expect(out).toContain('[templateFile] doc_main: templates/agents/google-antigravity/docs/GEMINI.md -> ./GEMINI.md'); + expect(out).toContain('[templateDir] settings_common: templates/shared/settings -> .kiro/settings'); + }); + + it('apply writes GEMINI.md and command files to cwd', async () => { + const cwd = await mkTmp(); + const ctx = makeIO(); + const code = await runCli(['--lang', 'en', '--agent', 'google-antigravity', '--manifest', manifestPath, '--overwrite=force'], runtimeDarwin, ctx.io, {}, { cwd, templatesRoot: process.cwd() }); + expect(code).toBe(0); + + const doc = join(cwd, 'GEMINI.md'); + expect(await exists(doc)).toBe(true); + const text = await readFile(doc, 'utf8'); + expect(text).toMatch(/# AI-DLC and Spec-Driven Development/); + + const cmd = join(cwd, '.agent/workflows/kiro-spec-init.md'); + expect(await exists(cmd)).toBe(true); + + const skill = join(cwd, '.agent/skills/kiro-sdd/SKILL.md'); + expect(await exists(skill)).toBe(true); + + const settingsRule = join(cwd, '.kiro/settings/rules/design-principles.md'); + expect(await exists(settingsRule)).toBe(true); + + expect(ctx.logs.join('\\n')).toMatch(/Setup completed: written=\d+, skipped=\d+/); + }); +}); + +describe('real google-antigravity manifest (linux)', () => { + const runtimeLinux = { platform: 'linux' } as const; + + it('dry-run prints plan including commands for linux', async () => { + const ctx = makeIO(); + const code = await runCli(['--dry-run', '--lang', 'en', '--agent', 'google-antigravity', '--manifest', manifestPath], runtimeLinux, ctx.io, {}); + expect(code).toBe(0); + const out = ctx.logs.join('\\n'); + expect(out).toMatch(/Plan \(dry-run\)/); + expect(out).toContain('[templateDir] commands: templates/agents/google-antigravity/workflows -> .agent/workflows'); + expect(out).toContain('[templateDir] skills: templates/agents/google-antigravity/skills -> .agent/skills'); + expect(out).toContain('[templateFile] doc_main: templates/agents/google-antigravity/docs/GEMINI.md -> ./GEMINI.md'); + expect(out).toContain('[templateDir] settings_common: templates/shared/settings -> .kiro/settings'); + }); + + it('apply writes GEMINI.md and command files to cwd on linux', async () => { + const cwd = await mkTmp(); + const ctx = makeIO(); + const code = await runCli(['--lang', 'en', '--agent', 'google-antigravity', '--manifest', manifestPath, '--overwrite=force'], runtimeLinux, ctx.io, {}, { cwd, templatesRoot: process.cwd() }); + expect(code).toBe(0); + + const doc = join(cwd, 'GEMINI.md'); + expect(await exists(doc)).toBe(true); + const text = await readFile(doc, 'utf8'); + expect(text).toMatch(/# AI-DLC and Spec-Driven Development/); + + const cmd = join(cwd, '.agent/workflows/kiro-spec-init.md'); + expect(await exists(cmd)).toBe(true); + + const skill = join(cwd, '.agent/skills/kiro-sdd/SKILL.md'); + expect(await exists(skill)).toBe(true); + + const settingsTemplate = join(cwd, '.kiro/settings/templates/specs/init.json'); + expect(await exists(settingsTemplate)).toBe(true); + + expect(ctx.logs.join('\\n')).toMatch(/Setup completed: written=\d+, skipped=\d+/); + }); +});