spec-kitty-cli 0.12.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spec_kitty_cli-0.12.1.dist-info/METADATA +1767 -0
- spec_kitty_cli-0.12.1.dist-info/RECORD +242 -0
- spec_kitty_cli-0.12.1.dist-info/WHEEL +4 -0
- spec_kitty_cli-0.12.1.dist-info/entry_points.txt +2 -0
- spec_kitty_cli-0.12.1.dist-info/licenses/LICENSE +21 -0
- specify_cli/__init__.py +171 -0
- specify_cli/acceptance.py +627 -0
- specify_cli/agent_utils/README.md +157 -0
- specify_cli/agent_utils/__init__.py +9 -0
- specify_cli/agent_utils/status.py +356 -0
- specify_cli/cli/__init__.py +6 -0
- specify_cli/cli/commands/__init__.py +46 -0
- specify_cli/cli/commands/accept.py +189 -0
- specify_cli/cli/commands/agent/__init__.py +22 -0
- specify_cli/cli/commands/agent/config.py +382 -0
- specify_cli/cli/commands/agent/context.py +191 -0
- specify_cli/cli/commands/agent/feature.py +1057 -0
- specify_cli/cli/commands/agent/release.py +11 -0
- specify_cli/cli/commands/agent/tasks.py +1253 -0
- specify_cli/cli/commands/agent/workflow.py +801 -0
- specify_cli/cli/commands/context.py +246 -0
- specify_cli/cli/commands/dashboard.py +85 -0
- specify_cli/cli/commands/implement.py +973 -0
- specify_cli/cli/commands/init.py +827 -0
- specify_cli/cli/commands/init_help.py +62 -0
- specify_cli/cli/commands/merge.py +755 -0
- specify_cli/cli/commands/mission.py +240 -0
- specify_cli/cli/commands/ops.py +265 -0
- specify_cli/cli/commands/orchestrate.py +640 -0
- specify_cli/cli/commands/repair.py +175 -0
- specify_cli/cli/commands/research.py +165 -0
- specify_cli/cli/commands/sync.py +364 -0
- specify_cli/cli/commands/upgrade.py +249 -0
- specify_cli/cli/commands/validate_encoding.py +186 -0
- specify_cli/cli/commands/validate_tasks.py +186 -0
- specify_cli/cli/commands/verify.py +310 -0
- specify_cli/cli/helpers.py +123 -0
- specify_cli/cli/step_tracker.py +91 -0
- specify_cli/cli/ui.py +192 -0
- specify_cli/core/__init__.py +53 -0
- specify_cli/core/agent_context.py +311 -0
- specify_cli/core/config.py +96 -0
- specify_cli/core/context_validation.py +362 -0
- specify_cli/core/dependency_graph.py +351 -0
- specify_cli/core/git_ops.py +129 -0
- specify_cli/core/multi_parent_merge.py +323 -0
- specify_cli/core/paths.py +260 -0
- specify_cli/core/project_resolver.py +110 -0
- specify_cli/core/stale_detection.py +263 -0
- specify_cli/core/tool_checker.py +79 -0
- specify_cli/core/utils.py +43 -0
- specify_cli/core/vcs/__init__.py +114 -0
- specify_cli/core/vcs/detection.py +341 -0
- specify_cli/core/vcs/exceptions.py +85 -0
- specify_cli/core/vcs/git.py +1304 -0
- specify_cli/core/vcs/jujutsu.py +1208 -0
- specify_cli/core/vcs/protocol.py +285 -0
- specify_cli/core/vcs/types.py +249 -0
- specify_cli/core/version_checker.py +261 -0
- specify_cli/core/worktree.py +506 -0
- specify_cli/dashboard/__init__.py +28 -0
- specify_cli/dashboard/diagnostics.py +204 -0
- specify_cli/dashboard/handlers/__init__.py +17 -0
- specify_cli/dashboard/handlers/api.py +143 -0
- specify_cli/dashboard/handlers/base.py +65 -0
- specify_cli/dashboard/handlers/features.py +390 -0
- specify_cli/dashboard/handlers/router.py +81 -0
- specify_cli/dashboard/handlers/static.py +50 -0
- specify_cli/dashboard/lifecycle.py +541 -0
- specify_cli/dashboard/scanner.py +437 -0
- specify_cli/dashboard/server.py +123 -0
- specify_cli/dashboard/static/dashboard/dashboard.css +722 -0
- specify_cli/dashboard/static/dashboard/dashboard.js +1424 -0
- specify_cli/dashboard/static/spec-kitty.png +0 -0
- specify_cli/dashboard/templates/__init__.py +36 -0
- specify_cli/dashboard/templates/index.html +258 -0
- specify_cli/doc_generators.py +621 -0
- specify_cli/doc_state.py +408 -0
- specify_cli/frontmatter.py +384 -0
- specify_cli/gap_analysis.py +915 -0
- specify_cli/gitignore_manager.py +300 -0
- specify_cli/guards.py +145 -0
- specify_cli/legacy_detector.py +83 -0
- specify_cli/manifest.py +286 -0
- specify_cli/merge/__init__.py +63 -0
- specify_cli/merge/executor.py +653 -0
- specify_cli/merge/forecast.py +215 -0
- specify_cli/merge/ordering.py +126 -0
- specify_cli/merge/preflight.py +230 -0
- specify_cli/merge/state.py +185 -0
- specify_cli/merge/status_resolver.py +354 -0
- specify_cli/mission.py +654 -0
- specify_cli/missions/documentation/command-templates/implement.md +309 -0
- specify_cli/missions/documentation/command-templates/plan.md +275 -0
- specify_cli/missions/documentation/command-templates/review.md +344 -0
- specify_cli/missions/documentation/command-templates/specify.md +206 -0
- specify_cli/missions/documentation/command-templates/tasks.md +189 -0
- specify_cli/missions/documentation/mission.yaml +113 -0
- specify_cli/missions/documentation/templates/divio/explanation-template.md +192 -0
- specify_cli/missions/documentation/templates/divio/howto-template.md +168 -0
- specify_cli/missions/documentation/templates/divio/reference-template.md +179 -0
- specify_cli/missions/documentation/templates/divio/tutorial-template.md +146 -0
- specify_cli/missions/documentation/templates/generators/jsdoc.json.template +18 -0
- specify_cli/missions/documentation/templates/generators/sphinx-conf.py.template +36 -0
- specify_cli/missions/documentation/templates/plan-template.md +269 -0
- specify_cli/missions/documentation/templates/release-template.md +222 -0
- specify_cli/missions/documentation/templates/spec-template.md +172 -0
- specify_cli/missions/documentation/templates/task-prompt-template.md +140 -0
- specify_cli/missions/documentation/templates/tasks-template.md +159 -0
- specify_cli/missions/research/command-templates/merge.md +388 -0
- specify_cli/missions/research/command-templates/plan.md +125 -0
- specify_cli/missions/research/command-templates/review.md +144 -0
- specify_cli/missions/research/command-templates/tasks.md +225 -0
- specify_cli/missions/research/mission.yaml +115 -0
- specify_cli/missions/research/templates/data-model-template.md +33 -0
- specify_cli/missions/research/templates/plan-template.md +161 -0
- specify_cli/missions/research/templates/research/evidence-log.csv +18 -0
- specify_cli/missions/research/templates/research/source-register.csv +18 -0
- specify_cli/missions/research/templates/research-template.md +35 -0
- specify_cli/missions/research/templates/spec-template.md +64 -0
- specify_cli/missions/research/templates/task-prompt-template.md +148 -0
- specify_cli/missions/research/templates/tasks-template.md +114 -0
- specify_cli/missions/software-dev/command-templates/accept.md +75 -0
- specify_cli/missions/software-dev/command-templates/analyze.md +183 -0
- specify_cli/missions/software-dev/command-templates/checklist.md +286 -0
- specify_cli/missions/software-dev/command-templates/clarify.md +157 -0
- specify_cli/missions/software-dev/command-templates/constitution.md +432 -0
- specify_cli/missions/software-dev/command-templates/dashboard.md +101 -0
- specify_cli/missions/software-dev/command-templates/implement.md +41 -0
- specify_cli/missions/software-dev/command-templates/merge.md +383 -0
- specify_cli/missions/software-dev/command-templates/plan.md +171 -0
- specify_cli/missions/software-dev/command-templates/review.md +32 -0
- specify_cli/missions/software-dev/command-templates/specify.md +321 -0
- specify_cli/missions/software-dev/command-templates/tasks.md +566 -0
- specify_cli/missions/software-dev/mission.yaml +100 -0
- specify_cli/missions/software-dev/templates/plan-template.md +132 -0
- specify_cli/missions/software-dev/templates/spec-template.md +116 -0
- specify_cli/missions/software-dev/templates/task-prompt-template.md +140 -0
- specify_cli/missions/software-dev/templates/tasks-template.md +159 -0
- specify_cli/orchestrator/__init__.py +75 -0
- specify_cli/orchestrator/agent_config.py +224 -0
- specify_cli/orchestrator/agents/__init__.py +170 -0
- specify_cli/orchestrator/agents/augment.py +112 -0
- specify_cli/orchestrator/agents/base.py +243 -0
- specify_cli/orchestrator/agents/claude.py +112 -0
- specify_cli/orchestrator/agents/codex.py +106 -0
- specify_cli/orchestrator/agents/copilot.py +137 -0
- specify_cli/orchestrator/agents/cursor.py +139 -0
- specify_cli/orchestrator/agents/gemini.py +115 -0
- specify_cli/orchestrator/agents/kilocode.py +94 -0
- specify_cli/orchestrator/agents/opencode.py +132 -0
- specify_cli/orchestrator/agents/qwen.py +96 -0
- specify_cli/orchestrator/config.py +455 -0
- specify_cli/orchestrator/executor.py +642 -0
- specify_cli/orchestrator/integration.py +1230 -0
- specify_cli/orchestrator/monitor.py +898 -0
- specify_cli/orchestrator/scheduler.py +832 -0
- specify_cli/orchestrator/state.py +508 -0
- specify_cli/orchestrator/testing/__init__.py +122 -0
- specify_cli/orchestrator/testing/availability.py +346 -0
- specify_cli/orchestrator/testing/fixtures.py +684 -0
- specify_cli/orchestrator/testing/paths.py +218 -0
- specify_cli/plan_validation.py +107 -0
- specify_cli/scripts/debug-dashboard-scan.py +61 -0
- specify_cli/scripts/tasks/acceptance_support.py +695 -0
- specify_cli/scripts/tasks/task_helpers.py +506 -0
- specify_cli/scripts/tasks/tasks_cli.py +848 -0
- specify_cli/scripts/validate_encoding.py +180 -0
- specify_cli/task_metadata_validation.py +274 -0
- specify_cli/tasks_support.py +447 -0
- specify_cli/template/__init__.py +47 -0
- specify_cli/template/asset_generator.py +206 -0
- specify_cli/template/github_client.py +334 -0
- specify_cli/template/manager.py +193 -0
- specify_cli/template/renderer.py +99 -0
- specify_cli/templates/AGENTS.md +190 -0
- specify_cli/templates/POWERSHELL_SYNTAX.md +229 -0
- specify_cli/templates/agent-file-template.md +35 -0
- specify_cli/templates/checklist-template.md +42 -0
- specify_cli/templates/claudeignore-template +58 -0
- specify_cli/templates/command-templates/accept.md +141 -0
- specify_cli/templates/command-templates/analyze.md +253 -0
- specify_cli/templates/command-templates/checklist.md +352 -0
- specify_cli/templates/command-templates/clarify.md +224 -0
- specify_cli/templates/command-templates/constitution.md +432 -0
- specify_cli/templates/command-templates/dashboard.md +175 -0
- specify_cli/templates/command-templates/implement.md +190 -0
- specify_cli/templates/command-templates/merge.md +374 -0
- specify_cli/templates/command-templates/plan.md +171 -0
- specify_cli/templates/command-templates/research.md +88 -0
- specify_cli/templates/command-templates/review.md +510 -0
- specify_cli/templates/command-templates/specify.md +321 -0
- specify_cli/templates/command-templates/status.md +92 -0
- specify_cli/templates/command-templates/tasks.md +199 -0
- specify_cli/templates/git-hooks/pre-commit +22 -0
- specify_cli/templates/git-hooks/pre-commit-agent-check +37 -0
- specify_cli/templates/git-hooks/pre-commit-encoding-check +142 -0
- specify_cli/templates/plan-template.md +108 -0
- specify_cli/templates/spec-template.md +118 -0
- specify_cli/templates/task-prompt-template.md +165 -0
- specify_cli/templates/tasks-template.md +161 -0
- specify_cli/templates/vscode-settings.json +13 -0
- specify_cli/text_sanitization.py +225 -0
- specify_cli/upgrade/__init__.py +18 -0
- specify_cli/upgrade/detector.py +239 -0
- specify_cli/upgrade/metadata.py +182 -0
- specify_cli/upgrade/migrations/__init__.py +65 -0
- specify_cli/upgrade/migrations/base.py +80 -0
- specify_cli/upgrade/migrations/m_0_10_0_python_only.py +359 -0
- specify_cli/upgrade/migrations/m_0_10_12_constitution_cleanup.py +99 -0
- specify_cli/upgrade/migrations/m_0_10_14_update_implement_slash_command.py +176 -0
- specify_cli/upgrade/migrations/m_0_10_1_populate_slash_commands.py +174 -0
- specify_cli/upgrade/migrations/m_0_10_2_update_slash_commands.py +172 -0
- specify_cli/upgrade/migrations/m_0_10_6_workflow_simplification.py +174 -0
- specify_cli/upgrade/migrations/m_0_10_8_fix_memory_structure.py +252 -0
- specify_cli/upgrade/migrations/m_0_10_9_repair_templates.py +168 -0
- specify_cli/upgrade/migrations/m_0_11_0_workspace_per_wp.py +182 -0
- specify_cli/upgrade/migrations/m_0_11_1_improved_workflow_templates.py +173 -0
- specify_cli/upgrade/migrations/m_0_11_1_update_implement_slash_command.py +160 -0
- specify_cli/upgrade/migrations/m_0_11_2_improved_workflow_templates.py +173 -0
- specify_cli/upgrade/migrations/m_0_11_3_workflow_agent_flag.py +114 -0
- specify_cli/upgrade/migrations/m_0_12_0_documentation_mission.py +155 -0
- specify_cli/upgrade/migrations/m_0_12_1_remove_kitty_specs_from_gitignore.py +183 -0
- specify_cli/upgrade/migrations/m_0_2_0_specify_to_kittify.py +80 -0
- specify_cli/upgrade/migrations/m_0_4_8_gitignore_agents.py +118 -0
- specify_cli/upgrade/migrations/m_0_5_0_encoding_hooks.py +141 -0
- specify_cli/upgrade/migrations/m_0_6_5_commands_rename.py +169 -0
- specify_cli/upgrade/migrations/m_0_6_7_ensure_missions.py +228 -0
- specify_cli/upgrade/migrations/m_0_7_2_worktree_commands_dedup.py +89 -0
- specify_cli/upgrade/migrations/m_0_7_3_update_scripts.py +114 -0
- specify_cli/upgrade/migrations/m_0_8_0_remove_active_mission.py +82 -0
- specify_cli/upgrade/migrations/m_0_8_0_worktree_agents_symlink.py +148 -0
- specify_cli/upgrade/migrations/m_0_9_0_frontmatter_only_lanes.py +346 -0
- specify_cli/upgrade/migrations/m_0_9_1_complete_lane_migration.py +656 -0
- specify_cli/upgrade/migrations/m_0_9_2_research_mission_templates.py +221 -0
- specify_cli/upgrade/registry.py +121 -0
- specify_cli/upgrade/runner.py +284 -0
- specify_cli/validators/__init__.py +14 -0
- specify_cli/validators/paths.py +154 -0
- specify_cli/validators/research.py +428 -0
- specify_cli/verify_enhanced.py +270 -0
- specify_cli/workspace_context.py +224 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Agent Rules for Spec Kitty Projects
|
|
2
|
+
|
|
3
|
+
**⚠️ CRITICAL**: All AI agents working in this project must follow these rules.
|
|
4
|
+
|
|
5
|
+
These rules apply to **all commands** (specify, plan, research, tasks, implement, review, merge, etc.).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Path Reference Rule
|
|
10
|
+
|
|
11
|
+
**When you mention directories or files, provide either the absolute path or a path relative to the project root.**
|
|
12
|
+
|
|
13
|
+
✅ **CORRECT**:
|
|
14
|
+
- `kitty-specs/001-feature/tasks/WP01.md`
|
|
15
|
+
- `/Users/robert/Code/myproject/kitty-specs/001-feature/spec.md`
|
|
16
|
+
- `tasks/WP01.md` (relative to feature directory)
|
|
17
|
+
|
|
18
|
+
❌ **WRONG**:
|
|
19
|
+
- "the tasks folder" (which one? where?)
|
|
20
|
+
- "WP01.md" (in which lane? which feature?)
|
|
21
|
+
- "the spec" (which feature's spec?)
|
|
22
|
+
|
|
23
|
+
**Why**: Clarity and precision prevent errors. Never refer to a folder by name alone.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. UTF-8 Encoding Rule
|
|
28
|
+
|
|
29
|
+
**When writing ANY markdown, JSON, YAML, CSV, or code files, use ONLY UTF-8 compatible characters.**
|
|
30
|
+
|
|
31
|
+
### What to Avoid (Will Break the Dashboard)
|
|
32
|
+
|
|
33
|
+
❌ **Windows-1252 smart quotes**: " " ' ' (from Word/Outlook/Office)
|
|
34
|
+
❌ **Em/en dashes and special punctuation**: — –
|
|
35
|
+
❌ **Copy-pasted arrows**: → (becomes illegal bytes)
|
|
36
|
+
❌ **Multiplication sign**: × (0xD7 in Windows-1252)
|
|
37
|
+
❌ **Plus-minus sign**: ± (0xB1 in Windows-1252)
|
|
38
|
+
❌ **Degree symbol**: ° (0xB0 in Windows-1252)
|
|
39
|
+
❌ **Copy/paste from Microsoft Office** without cleaning
|
|
40
|
+
|
|
41
|
+
**Real examples that crashed the dashboard:**
|
|
42
|
+
- "User's favorite feature" → "User's favorite feature" (smart quote)
|
|
43
|
+
- "Price: $100 ± $10" → "Price: $100 +/- $10"
|
|
44
|
+
- "Temperature: 72°F" → "Temperature: 72 degrees F"
|
|
45
|
+
- "3 × 4 matrix" → "3 x 4 matrix"
|
|
46
|
+
|
|
47
|
+
### What to Use Instead
|
|
48
|
+
|
|
49
|
+
✅ Standard ASCII quotes: `"`, `'`
|
|
50
|
+
✅ Hyphen-minus: `-` instead of en/em dash
|
|
51
|
+
✅ ASCII arrow: `->` instead of →
|
|
52
|
+
✅ Lowercase `x` for multiplication
|
|
53
|
+
✅ `+/-` for plus-minus
|
|
54
|
+
✅ ` degrees` for temperature
|
|
55
|
+
✅ Plain punctuation
|
|
56
|
+
|
|
57
|
+
### Safe Characters
|
|
58
|
+
|
|
59
|
+
✅ Emoji (proper UTF-8)
|
|
60
|
+
✅ Accented characters typed directly: café, naïve, Zürich
|
|
61
|
+
✅ Unicode math typed directly (√ ≈ ≠ ≤ ≥)
|
|
62
|
+
|
|
63
|
+
### Copy/Paste Guidance
|
|
64
|
+
|
|
65
|
+
1. Paste into a plain-text buffer first (VS Code, TextEdit in plain mode)
|
|
66
|
+
2. Replace smart quotes and dashes
|
|
67
|
+
3. Verify no � replacement characters appear
|
|
68
|
+
4. Run `spec-kitty validate-encoding --feature <feature-id>` to check
|
|
69
|
+
5. Run `spec-kitty validate-encoding --feature <feature-id> --fix` to auto-repair
|
|
70
|
+
|
|
71
|
+
**Failure to follow this rule causes the dashboard to render blank pages.**
|
|
72
|
+
|
|
73
|
+
### Auto-Fix Available
|
|
74
|
+
|
|
75
|
+
If you accidentally introduce problematic characters:
|
|
76
|
+
```bash
|
|
77
|
+
# Check for encoding issues
|
|
78
|
+
spec-kitty validate-encoding --feature 001-my-feature
|
|
79
|
+
|
|
80
|
+
# Automatically fix all issues (creates .bak backups)
|
|
81
|
+
spec-kitty validate-encoding --feature 001-my-feature --fix
|
|
82
|
+
|
|
83
|
+
# Check all features at once
|
|
84
|
+
spec-kitty validate-encoding --all --fix
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 3. Context Management Rule
|
|
90
|
+
|
|
91
|
+
**Build the context you need, then maintain it intelligently.**
|
|
92
|
+
|
|
93
|
+
- Session start (0 tokens): You have zero context. Read plan.md, tasks.md, relevant artifacts.
|
|
94
|
+
- Mid-session (you already read them): Use your judgment—don’t re-read everything unless necessary.
|
|
95
|
+
- Never skip relevant information; do skip redundant re-reads to save tokens.
|
|
96
|
+
- Rely on the steps in the command you are executing.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 4. Work Quality Rule
|
|
101
|
+
|
|
102
|
+
**Produce secure, tested, documented work.**
|
|
103
|
+
|
|
104
|
+
- Follow the plan and constitution requirements.
|
|
105
|
+
- Prefer existing patterns over invention.
|
|
106
|
+
- Treat security warnings as fatal—fix or escalate.
|
|
107
|
+
- Run all required tests before claiming work is complete.
|
|
108
|
+
- Be transparent: state what you did, what you didn’t, and why.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 5. Git Discipline Rule
|
|
113
|
+
|
|
114
|
+
**Keep commits clean and auditable.**
|
|
115
|
+
|
|
116
|
+
- Commit only meaningful units of work.
|
|
117
|
+
- Write descriptive commit messages (imperative mood).
|
|
118
|
+
- Do not rewrite history of shared branches.
|
|
119
|
+
- Keep feature branches up to date with main via merge or rebase as appropriate.
|
|
120
|
+
- Never commit secrets, tokens, or credentials.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 6. Git Best Practices for Agent Directories
|
|
125
|
+
|
|
126
|
+
**NEVER commit agent directories to git.**
|
|
127
|
+
|
|
128
|
+
### Why Agent Directories Must Not Be Committed
|
|
129
|
+
|
|
130
|
+
Agent directories like `.claude/`, `.codex/`, `.gemini/` contain:
|
|
131
|
+
- Authentication tokens and API keys
|
|
132
|
+
- User-specific credentials (auth.json)
|
|
133
|
+
- Session data and conversation history
|
|
134
|
+
- Temporary files and caches
|
|
135
|
+
|
|
136
|
+
### What Should Be Committed
|
|
137
|
+
|
|
138
|
+
✅ **DO commit:**
|
|
139
|
+
- `.kittify/templates/` - Command templates (source)
|
|
140
|
+
- `.kittify/missions/` - Mission definitions
|
|
141
|
+
- `.kittify/memory/constitution.md` - Project constitution
|
|
142
|
+
- `.gitignore` - With all agent directories excluded
|
|
143
|
+
|
|
144
|
+
❌ **DO NOT commit:**
|
|
145
|
+
- `.claude/`, `.codex/`, `.gemini/`, etc. - Agent runtime directories
|
|
146
|
+
- `.kittify/templates/command-templates/` - These are templates, not final commands
|
|
147
|
+
- Any `auth.json`, `credentials.json`, or similar files
|
|
148
|
+
|
|
149
|
+
### Automatic Protection
|
|
150
|
+
|
|
151
|
+
Spec Kitty automatically:
|
|
152
|
+
1. Adds all agent directories to `.gitignore` during `spec-kitty init`
|
|
153
|
+
2. Installs pre-commit hook to block accidental commits
|
|
154
|
+
3. Creates `.claudeignore` to optimize AI scanning
|
|
155
|
+
|
|
156
|
+
### Manual Verification
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Verify .gitignore protection
|
|
160
|
+
cat .gitignore | grep -E '\.(claude|codex|gemini|cursor)/'
|
|
161
|
+
|
|
162
|
+
# Check for accidentally staged agent files
|
|
163
|
+
git status | grep -E '\.(claude|codex|gemini|cursor)/'
|
|
164
|
+
|
|
165
|
+
# If you find staged agent files, unstage them:
|
|
166
|
+
git reset HEAD .claude/
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Worktree Constitution Sharing
|
|
170
|
+
|
|
171
|
+
In worktrees, `.kittify/memory/` is a symlink to the main repo's memory,
|
|
172
|
+
ensuring all feature branches share the same constitution.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# In a worktree, this should show a symlink:
|
|
176
|
+
ls -la .kittify/memory
|
|
177
|
+
# lrwxr-xr-x ... .kittify/memory -> ../../../.kittify/memory
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
This is intentional and correct - it ensures a single source of truth for project principles.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
### Quick Reference
|
|
185
|
+
|
|
186
|
+
- 📁 **Paths**: Always specify exact locations.
|
|
187
|
+
- 🔤 **Encoding**: UTF-8 only. Run the validator when unsure.
|
|
188
|
+
- 🧠 **Context**: Read what you need; don’t forget what you already learned.
|
|
189
|
+
- ✅ **Quality**: Follow secure, tested, documented practices.
|
|
190
|
+
- 📝 **Git**: Commit cleanly with clear messages.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# PowerShell Syntax Guide for AI Agents
|
|
2
|
+
|
|
3
|
+
**⚠️ READ THIS if you are working in a PowerShell environment**
|
|
4
|
+
|
|
5
|
+
This guide helps AI agents use correct PowerShell syntax when working with spec-kitty workflows.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Quick Reference: Bash vs PowerShell
|
|
10
|
+
|
|
11
|
+
| Task | ❌ Bash (WRONG) | ✅ PowerShell (CORRECT) |
|
|
12
|
+
|------|-----------------|-------------------------|
|
|
13
|
+
| **Command chaining** | `cmd1 && cmd2` | `cmd1; cmd2` |
|
|
14
|
+
| **Parameter flags** | `--json --paths-only` | `-Json -PathsOnly` |
|
|
15
|
+
| **Script path** | `./scripts/bash/script.sh` | `..\scripts\powershell\Script.ps1` |
|
|
16
|
+
| **Environment variable** | `$VAR_NAME` | `$env:VAR_NAME` |
|
|
17
|
+
| **Current directory** | `pwd` | `Get-Location` (or `pwd` alias) |
|
|
18
|
+
| **List files** | `ls -la` | `Get-ChildItem` (or `ls` alias) |
|
|
19
|
+
| **File exists check** | `[ -f file.txt ]` | `Test-Path file.txt` |
|
|
20
|
+
| **Directory separator** | `/path/to/file` | `\path\to\file` |
|
|
21
|
+
| **Home directory** | `~/projects` | `$HOME\projects` |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Location Verification (PowerShell)
|
|
26
|
+
|
|
27
|
+
**Check your current location:**
|
|
28
|
+
```powershell
|
|
29
|
+
Get-Location
|
|
30
|
+
git branch --show-current
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Expected for feature worktrees:**
|
|
34
|
+
- Location: `C:\Users\...\project\.worktrees\001-feature-name`
|
|
35
|
+
- Branch: `001-feature-name` (NOT `main`)
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Running Spec-Kitty Commands (PowerShell)
|
|
40
|
+
|
|
41
|
+
### Using the spec-kitty CLI
|
|
42
|
+
|
|
43
|
+
Spec-kitty uses a Python CLI that works across all platforms:
|
|
44
|
+
|
|
45
|
+
**Common commands:**
|
|
46
|
+
- `spec-kitty agent feature create-feature <slug>` - Create a new feature
|
|
47
|
+
- `spec-kitty verify-setup` - Check environment and paths
|
|
48
|
+
- `spec-kitty agent workflow implement <WPID> --agent <name>` - Start implementing a work package
|
|
49
|
+
- `spec-kitty agent workflow review <WPID> --agent <name>` - Start reviewing a work package
|
|
50
|
+
- `spec-kitty agent tasks move-task <WPID> --to for_review` - Complete implementation (move to review)
|
|
51
|
+
- `spec-kitty merge` - Merge completed feature
|
|
52
|
+
|
|
53
|
+
### Parameter Naming Convention
|
|
54
|
+
|
|
55
|
+
PowerShell uses **PascalCase** with leading dash:
|
|
56
|
+
- `-Json` (not `--json`)
|
|
57
|
+
- `-FeatureName` (not `--feature-name`)
|
|
58
|
+
- `-IncludeTasks` (not `--include-tasks`)
|
|
59
|
+
- `-RequireTasks` (not `--require-tasks`)
|
|
60
|
+
|
|
61
|
+
### Examples
|
|
62
|
+
|
|
63
|
+
**Create feature:**
|
|
64
|
+
```powershell
|
|
65
|
+
.\.kittify\scripts\powershell\Create-NewFeature.ps1 `
|
|
66
|
+
-FeatureName "User Authentication" `
|
|
67
|
+
-FeatureDescription "Add login and registration"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Check prerequisites:**
|
|
71
|
+
```powershell
|
|
72
|
+
.\.kittify\scripts\powershell\check-prerequisites.ps1 -Json -IncludeTasks
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Move task to review (after implementation):**
|
|
76
|
+
```powershell
|
|
77
|
+
# Using the CLI (recommended):
|
|
78
|
+
spec-kitty agent tasks move-task WP01 --to for_review --note "Ready for review"
|
|
79
|
+
|
|
80
|
+
# Or using PowerShell script:
|
|
81
|
+
.\.kittify\scripts\powershell\Move-TaskToLane.ps1 `
|
|
82
|
+
-Feature "001-auth" `
|
|
83
|
+
-TaskId "WP01" `
|
|
84
|
+
-Lane "for_review" `
|
|
85
|
+
-ShellPid $PID `
|
|
86
|
+
-Agent "claude"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Common Mistakes to Avoid
|
|
92
|
+
|
|
93
|
+
### ❌ Don't Use Bash Operators
|
|
94
|
+
|
|
95
|
+
```powershell
|
|
96
|
+
# WRONG:
|
|
97
|
+
cd worktrees && pwd
|
|
98
|
+
|
|
99
|
+
# CORRECT:
|
|
100
|
+
cd worktrees; Get-Location
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### ❌ Don't Use Bash-Style Parameters
|
|
104
|
+
|
|
105
|
+
```powershell
|
|
106
|
+
# WRONG:
|
|
107
|
+
.\check-prerequisites.ps1 --json --require-tasks
|
|
108
|
+
|
|
109
|
+
# CORRECT:
|
|
110
|
+
.\check-prerequisites.ps1 -Json -RequireTasks
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Path Separators in PowerShell
|
|
114
|
+
|
|
115
|
+
PowerShell on Windows uses backslashes for native paths:
|
|
116
|
+
|
|
117
|
+
```powershell
|
|
118
|
+
# WRONG (Unix-style paths on Windows):
|
|
119
|
+
cd ./.kittify/memory
|
|
120
|
+
|
|
121
|
+
# CORRECT (Windows-style paths):
|
|
122
|
+
cd .\.kittify\memory
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Note: Git commands work with forward slashes, but native PowerShell file operations expect backslashes. The spec-kitty CLI handles this automatically.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Environment Variables
|
|
130
|
+
|
|
131
|
+
**Setting variables:**
|
|
132
|
+
```powershell
|
|
133
|
+
$env:SPEC_KITTY_TEMPLATE_ROOT = "C:\path\to\spec-kitty"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Reading variables:**
|
|
137
|
+
```powershell
|
|
138
|
+
echo $env:SPEC_KITTY_TEMPLATE_ROOT
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Checking if set:**
|
|
142
|
+
```powershell
|
|
143
|
+
if ($env:SPEC_KITTY_TEMPLATE_ROOT) {
|
|
144
|
+
Write-Host "Variable is set"
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## File Operations
|
|
151
|
+
|
|
152
|
+
**Check if file exists:**
|
|
153
|
+
```powershell
|
|
154
|
+
if (Test-Path "spec.md") {
|
|
155
|
+
Write-Host "Spec exists"
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Read file:**
|
|
160
|
+
```powershell
|
|
161
|
+
$content = Get-Content "spec.md" -Raw
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Create directory:**
|
|
165
|
+
```powershell
|
|
166
|
+
New-Item -ItemType Directory -Path "tasks\planned" -Force
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Workflow Tips
|
|
172
|
+
|
|
173
|
+
1. **Always use full parameter names** in scripts (not abbreviations)
|
|
174
|
+
2. **Use semicolons** to chain commands, not `&&` or `||`
|
|
175
|
+
3. **Backslashes** for local paths, forward slashes OK for git operations
|
|
176
|
+
4. **$PID** contains current PowerShell process ID (use for --shell-pid)
|
|
177
|
+
5. **Tab completion** works for parameter names in PowerShell
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## When to Use What
|
|
182
|
+
|
|
183
|
+
**Use PowerShell scripts when:**
|
|
184
|
+
- User specified `--script ps` during init
|
|
185
|
+
- You're in a Windows PowerShell terminal
|
|
186
|
+
- Templates reference `.ps1` files in frontmatter
|
|
187
|
+
|
|
188
|
+
**Use Bash scripts when:**
|
|
189
|
+
- User specified `--script sh` during init
|
|
190
|
+
- You're in bash/zsh/fish terminal
|
|
191
|
+
- Templates reference `.sh` files in frontmatter
|
|
192
|
+
|
|
193
|
+
**Using spec-kitty commands:**
|
|
194
|
+
All spec-kitty commands work the same way on PowerShell and Bash:
|
|
195
|
+
```powershell
|
|
196
|
+
spec-kitty agent workflow implement WP01 --agent claude # Auto-moves to doing
|
|
197
|
+
spec-kitty agent tasks move-task WP01 --to for_review # Completion step
|
|
198
|
+
spec-kitty verify-setup
|
|
199
|
+
spec-kitty dashboard
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The CLI is cross-platform and handles path differences automatically.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Debugging PowerShell Issues
|
|
207
|
+
|
|
208
|
+
**Common errors and solutions:**
|
|
209
|
+
|
|
210
|
+
1. **"Parameter cannot be found that matches parameter name"**
|
|
211
|
+
- You used bash-style parameters (`--json`)
|
|
212
|
+
- Fix: Use PowerShell style (`-Json`)
|
|
213
|
+
|
|
214
|
+
2. **"The term '&&' is not recognized"**
|
|
215
|
+
- You used bash command chaining
|
|
216
|
+
- Fix: Use semicolon (`;`) instead
|
|
217
|
+
|
|
218
|
+
3. **"Cannot find path"**
|
|
219
|
+
- You used forward slashes in PowerShell path
|
|
220
|
+
- Fix: Use backslashes (`\`) for local paths
|
|
221
|
+
|
|
222
|
+
4. **"Unable to import mission module"**
|
|
223
|
+
- Python can't find specify_cli package
|
|
224
|
+
- Check: `pip show spec-kitty-cli`
|
|
225
|
+
- Fix: Reinstall or check virtual environment
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
**For full spec-kitty documentation, see the main templates and README.**
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# [PROJECT NAME] Development Guidelines
|
|
2
|
+
*Path: [templates/agent-file-template.md](templates/agent-file-template.md)*
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Auto-generated from all feature plans. Last updated: [DATE]
|
|
6
|
+
|
|
7
|
+
## Active Technologies
|
|
8
|
+
[EXTRACTED FROM ALL PLAN.MD FILES]
|
|
9
|
+
|
|
10
|
+
## Project Structure
|
|
11
|
+
```
|
|
12
|
+
[ACTUAL STRUCTURE FROM PLANS]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
[ONLY COMMANDS FOR ACTIVE TECHNOLOGIES]
|
|
17
|
+
|
|
18
|
+
[IF SCRIPT_TYPE=powershell]
|
|
19
|
+
## PowerShell Syntax
|
|
20
|
+
**⚠️ IMPORTANT**: You are in a PowerShell environment. See [.kittify/templates/POWERSHELL_SYNTAX.md](.kittify/templates/POWERSHELL_SYNTAX.md) for correct syntax.
|
|
21
|
+
|
|
22
|
+
Quick reminders:
|
|
23
|
+
- Use `-Json` not `--json`
|
|
24
|
+
- Use `;` not `&&` for command chaining
|
|
25
|
+
- Use `.\.kittify\scripts\powershell\` not `./kittify/scripts/bash/`
|
|
26
|
+
[ENDIF]
|
|
27
|
+
|
|
28
|
+
## Code Style
|
|
29
|
+
[LANGUAGE-SPECIFIC, ONLY FOR LANGUAGES IN USE]
|
|
30
|
+
|
|
31
|
+
## Recent Changes
|
|
32
|
+
[LAST 3 FEATURES AND WHAT THEY ADDED]
|
|
33
|
+
|
|
34
|
+
<!-- MANUAL ADDITIONS START -->
|
|
35
|
+
<!-- MANUAL ADDITIONS END -->
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# [CHECKLIST TYPE] Checklist: [FEATURE NAME]
|
|
2
|
+
*Path: [templates/checklist-template.md](templates/checklist-template.md)*
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
**Purpose**: [Brief description of what this checklist covers]
|
|
6
|
+
**Created**: [DATE]
|
|
7
|
+
**Feature**: [Link to spec.md or relevant documentation]
|
|
8
|
+
|
|
9
|
+
**Note**: This checklist is generated by the `/speckit.checklist` command based on feature context and requirements.
|
|
10
|
+
|
|
11
|
+
<!--
|
|
12
|
+
============================================================================
|
|
13
|
+
IMPORTANT: The checklist items below are SAMPLE ITEMS for illustration only.
|
|
14
|
+
|
|
15
|
+
The /speckit.checklist command MUST replace these with actual items based on:
|
|
16
|
+
- User's specific checklist request
|
|
17
|
+
- Feature requirements from spec.md
|
|
18
|
+
- Technical context from plan.md
|
|
19
|
+
- Implementation details from tasks.md
|
|
20
|
+
|
|
21
|
+
DO NOT keep these sample items in the generated checklist file.
|
|
22
|
+
============================================================================
|
|
23
|
+
-->
|
|
24
|
+
|
|
25
|
+
## [Category 1]
|
|
26
|
+
|
|
27
|
+
- [ ] CHK001 First checklist item with clear action
|
|
28
|
+
- [ ] CHK002 Second checklist item
|
|
29
|
+
- [ ] CHK003 Third checklist item
|
|
30
|
+
|
|
31
|
+
## [Category 2]
|
|
32
|
+
|
|
33
|
+
- [ ] CHK004 Another category item
|
|
34
|
+
- [ ] CHK005 Item with specific criteria
|
|
35
|
+
- [ ] CHK006 Final item in this category
|
|
36
|
+
|
|
37
|
+
## Notes
|
|
38
|
+
|
|
39
|
+
- Check items off as completed: `[x]`
|
|
40
|
+
- Add comments or findings inline
|
|
41
|
+
- Link to relevant resources or documentation
|
|
42
|
+
- Items are numbered sequentially for easy reference
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Spec Kitty Configuration and Templates
|
|
2
|
+
# These are internal directories that shouldn't be scanned by AI assistants
|
|
3
|
+
|
|
4
|
+
# Template directories (not working code)
|
|
5
|
+
.kittify/templates/
|
|
6
|
+
.kittify/missions/
|
|
7
|
+
.kittify/scripts/
|
|
8
|
+
|
|
9
|
+
# Agent command directories (generated from templates, not source)
|
|
10
|
+
.claude/
|
|
11
|
+
.codex/
|
|
12
|
+
.gemini/
|
|
13
|
+
.cursor/
|
|
14
|
+
.qwen/
|
|
15
|
+
.opencode/
|
|
16
|
+
.windsurf/
|
|
17
|
+
.kilocode/
|
|
18
|
+
.augment/
|
|
19
|
+
.roo/
|
|
20
|
+
.amazonq/
|
|
21
|
+
.github/copilot/
|
|
22
|
+
|
|
23
|
+
# Git metadata
|
|
24
|
+
.git/
|
|
25
|
+
|
|
26
|
+
# Build artifacts and caches
|
|
27
|
+
__pycache__/
|
|
28
|
+
*.pyc
|
|
29
|
+
*.pyo
|
|
30
|
+
.pytest_cache/
|
|
31
|
+
.coverage
|
|
32
|
+
htmlcov/
|
|
33
|
+
node_modules/
|
|
34
|
+
dist/
|
|
35
|
+
build/
|
|
36
|
+
*.egg-info/
|
|
37
|
+
|
|
38
|
+
# Virtual environments
|
|
39
|
+
.venv/
|
|
40
|
+
venv/
|
|
41
|
+
env/
|
|
42
|
+
|
|
43
|
+
# OS-specific files
|
|
44
|
+
.DS_Store
|
|
45
|
+
Thumbs.db
|
|
46
|
+
desktop.ini
|
|
47
|
+
|
|
48
|
+
# IDE directories
|
|
49
|
+
.vscode/
|
|
50
|
+
.idea/
|
|
51
|
+
*.swp
|
|
52
|
+
*.swo
|
|
53
|
+
*~
|
|
54
|
+
|
|
55
|
+
# Logs and databases
|
|
56
|
+
*.log
|
|
57
|
+
*.db
|
|
58
|
+
*.sqlite
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Validate feature readiness and guide final acceptance steps.
|
|
3
|
+
scripts:
|
|
4
|
+
sh: spec-kitty agent feature accept --json {ARGS}
|
|
5
|
+
ps: spec-kitty agent --json {ARGS}
|
|
6
|
+
---
|
|
7
|
+
**Path reference rule:** When you mention directories or files, provide either the absolute path or a path relative to the project root (for example, `kitty-specs/<feature>/tasks/`). Never refer to a folder by name alone.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
*Path: [templates/commands/accept.md](templates/commands/accept.md)*
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## User Input
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
$ARGUMENTS
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
20
|
+
|
|
21
|
+
## Discovery (auto-detect with smart defaults)
|
|
22
|
+
|
|
23
|
+
**Goal:** Minimize user interaction by auto-detecting information from the environment.
|
|
24
|
+
|
|
25
|
+
### Auto-Detection Strategy
|
|
26
|
+
|
|
27
|
+
1. **Feature slug**:
|
|
28
|
+
- Run `git branch --show-current` to get current branch name
|
|
29
|
+
- If branch matches pattern `\d{3}-[a-z0-9-]+` (e.g., `001-privacy-cli`), use it as feature slug
|
|
30
|
+
- Only ask user if branch name doesn't match or if on `main`/`master`
|
|
31
|
+
|
|
32
|
+
2. **Acceptance mode**:
|
|
33
|
+
- **Default to `local`** (most common workflow)
|
|
34
|
+
- User can override by saying "use PR mode" or "checklist only"
|
|
35
|
+
- Only ask if user explicitly requests clarification
|
|
36
|
+
|
|
37
|
+
3. **Validation commands**:
|
|
38
|
+
- Search recent git log for test/build commands:
|
|
39
|
+
```bash
|
|
40
|
+
git log --oneline -20 | grep -iE "(test|build|check|cargo|npm|pytest|make)"
|
|
41
|
+
```
|
|
42
|
+
- Look for common patterns in project:
|
|
43
|
+
- Rust: `cargo test`, `cargo build --release`, `cargo check`
|
|
44
|
+
- Python: `pytest`, `python -m pytest`, `make test`
|
|
45
|
+
- Node: `npm test`, `npm run build`, `yarn test`
|
|
46
|
+
- Go: `go test ./...`, `go build`
|
|
47
|
+
- Check for CI config files (`.github/workflows/`, `.gitlab-ci.yml`) and extract test commands
|
|
48
|
+
- If found, report them and say "proceeding with these validation commands"
|
|
49
|
+
- If none found, proceed without validation commands (user can add later)
|
|
50
|
+
- **Never block on missing validation commands**
|
|
51
|
+
|
|
52
|
+
4. **Acceptance actor**:
|
|
53
|
+
- Always defaults to `__AGENT__` (current agent name)
|
|
54
|
+
- No need to ask or confirm
|
|
55
|
+
|
|
56
|
+
### Execution Flow
|
|
57
|
+
|
|
58
|
+
**Preferred flow (no user questions):**
|
|
59
|
+
```
|
|
60
|
+
1. Auto-detect feature slug from git branch
|
|
61
|
+
2. Use mode=local by default
|
|
62
|
+
3. Search for validation commands in git log/project
|
|
63
|
+
4. Proceed directly with acceptance
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Only ask the user if:**
|
|
67
|
+
- Feature slug cannot be auto-detected (e.g., on main branch)
|
|
68
|
+
- User explicitly provides conflicting information in $ARGUMENTS
|
|
69
|
+
- Auto-detection fails for technical reasons
|
|
70
|
+
|
|
71
|
+
**Present auto-detected values clearly:**
|
|
72
|
+
```
|
|
73
|
+
Running acceptance with auto-detected values:
|
|
74
|
+
- Feature: 001-privacy-compiler-cli (from git branch)
|
|
75
|
+
- Mode: local (default)
|
|
76
|
+
- Validation: cargo test --all, cargo build --release (from git log)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Never use `WAITING_FOR_ACCEPTANCE_INPUT` unless:**
|
|
80
|
+
- Feature slug detection fails AND user didn't provide one
|
|
81
|
+
- User explicitly asks a question that needs an answer
|
|
82
|
+
|
|
83
|
+
If user provides explicit values in $ARGUMENTS, those override auto-detected values.
|
|
84
|
+
|
|
85
|
+
## Execution Plan
|
|
86
|
+
|
|
87
|
+
1. **Auto-detect parameters** (run these commands silently):
|
|
88
|
+
```bash
|
|
89
|
+
# Detect feature slug
|
|
90
|
+
git branch --show-current
|
|
91
|
+
|
|
92
|
+
# Search for validation commands in recent commits
|
|
93
|
+
git log --oneline -20 | grep -iE "(test|build|check|cargo|npm|pytest|make)"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
2. **Determine final values** (using auto-detection + user overrides):
|
|
97
|
+
- Feature slug: From git branch (or user override from $ARGUMENTS)
|
|
98
|
+
- Mode: `local` (or user override: "pr"/"checklist")
|
|
99
|
+
- Validation commands: From git log search (or user-specified)
|
|
100
|
+
- Actor: `__AGENT__` (always)
|
|
101
|
+
|
|
102
|
+
3. **Present detected values to user** (brief confirmation):
|
|
103
|
+
```
|
|
104
|
+
Running acceptance for feature 001-privacy-cli (mode: local)
|
|
105
|
+
Validation: cargo test --all, cargo build --release
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
4. **Compile the acceptance options** into an argument list:
|
|
109
|
+
- Always include `--actor "__AGENT__"`.
|
|
110
|
+
- Append `--feature "<slug>"` (from detection or user input).
|
|
111
|
+
- Append `--mode <mode>` (default: `local`).
|
|
112
|
+
- Append `--test "<command>"` for each validation command found.
|
|
113
|
+
|
|
114
|
+
5. Run `{SCRIPT}` (the CLI wrapper) with the assembled arguments **and** `--json`.
|
|
115
|
+
|
|
116
|
+
6. Parse the JSON response. It contains:
|
|
117
|
+
- `summary.ok` (boolean) and other readiness details.
|
|
118
|
+
- `summary.outstanding` categories when issues remain.
|
|
119
|
+
- `instructions` (merge steps) and `cleanup_instructions`.
|
|
120
|
+
- `notes` (e.g., acceptance commit hash).
|
|
121
|
+
|
|
122
|
+
7. Present the outcome:
|
|
123
|
+
- If `summary.ok` is `false`, list each outstanding category with bullet points and advise the user to resolve them before retrying acceptance.
|
|
124
|
+
- If `summary.ok` is `true`, display:
|
|
125
|
+
- Acceptance timestamp, actor, and (if present) acceptance commit hash.
|
|
126
|
+
- Merge instructions and cleanup instructions as ordered steps.
|
|
127
|
+
- Validation commands executed (if any).
|
|
128
|
+
|
|
129
|
+
8. When the mode is `checklist`, make it clear no commits or merge instructions were produced.
|
|
130
|
+
|
|
131
|
+
## Output Requirements
|
|
132
|
+
|
|
133
|
+
- Summaries must be in plain text (no tables). Use short bullet lists for instructions.
|
|
134
|
+
- Surface outstanding issues before any congratulations or success messages.
|
|
135
|
+
- If the JSON payload includes warnings, surface them under an explicit **Warnings** section.
|
|
136
|
+
- Never fabricate results; only report what the JSON contains.
|
|
137
|
+
|
|
138
|
+
## Error Handling
|
|
139
|
+
|
|
140
|
+
- If the command fails or returns invalid JSON, report the failure and request user guidance (do not retry automatically).
|
|
141
|
+
- When outstanding issues exist, do **not** attempt to force acceptance—return the checklist and prompt the user to fix the blockers.
|