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,432 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create or update the project constitution through interactive phase-based discovery.
|
|
3
|
+
---
|
|
4
|
+
**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.
|
|
5
|
+
|
|
6
|
+
*Path: [templates/commands/constitution.md](templates/commands/constitution.md)*
|
|
7
|
+
|
|
8
|
+
## User Input
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
$ARGUMENTS
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## What This Command Does
|
|
19
|
+
|
|
20
|
+
This command creates or updates the **project constitution** through an interactive, phase-based discovery workflow.
|
|
21
|
+
|
|
22
|
+
**Location**: `.kittify/memory/constitution.md` (project root, not worktrees)
|
|
23
|
+
**Scope**: Project-wide principles that apply to ALL features
|
|
24
|
+
|
|
25
|
+
**Important**: The constitution is OPTIONAL. All spec-kitty commands work without it.
|
|
26
|
+
|
|
27
|
+
**Constitution Purpose**:
|
|
28
|
+
- Capture technical standards (languages, testing, deployment)
|
|
29
|
+
- Document code quality expectations (review process, quality gates)
|
|
30
|
+
- Record tribal knowledge (team conventions, lessons learned)
|
|
31
|
+
- Define governance (how the constitution changes, who enforces it)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Discovery Workflow
|
|
36
|
+
|
|
37
|
+
This command uses a **4-phase discovery process**:
|
|
38
|
+
|
|
39
|
+
1. **Phase 1: Technical Standards** (Recommended)
|
|
40
|
+
- Languages, frameworks, testing requirements
|
|
41
|
+
- Performance targets, deployment constraints
|
|
42
|
+
- ≈3-4 questions, creates a lean foundation
|
|
43
|
+
|
|
44
|
+
2. **Phase 2: Code Quality** (Optional)
|
|
45
|
+
- PR requirements, review checklist, quality gates
|
|
46
|
+
- Documentation standards
|
|
47
|
+
- ≈3-4 questions
|
|
48
|
+
|
|
49
|
+
3. **Phase 3: Tribal Knowledge** (Optional)
|
|
50
|
+
- Team conventions, lessons learned
|
|
51
|
+
- Historical decisions (optional)
|
|
52
|
+
- ≈2-4 questions
|
|
53
|
+
|
|
54
|
+
4. **Phase 4: Governance** (Optional)
|
|
55
|
+
- Amendment process, compliance validation
|
|
56
|
+
- Exception handling (optional)
|
|
57
|
+
- ≈2-3 questions
|
|
58
|
+
|
|
59
|
+
**Paths**:
|
|
60
|
+
- **Minimal** (≈1 page): Phase 1 only → ≈3-5 questions
|
|
61
|
+
- **Comprehensive** (≈2-3 pages): All phases → ≈8-12 questions
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Execution Outline
|
|
66
|
+
|
|
67
|
+
### Step 1: Initial Choice
|
|
68
|
+
|
|
69
|
+
Ask the user:
|
|
70
|
+
```
|
|
71
|
+
Do you want to establish a project constitution?
|
|
72
|
+
|
|
73
|
+
A) No, skip it - I don't need a formal constitution
|
|
74
|
+
B) Yes, minimal - Core technical standards only (≈1 page, 3-5 questions)
|
|
75
|
+
C) Yes, comprehensive - Full governance and tribal knowledge (≈2-3 pages, 8-12 questions)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Handle responses:
|
|
79
|
+
- **A (Skip)**: Create a minimal placeholder at `.kittify/memory/constitution.md`:
|
|
80
|
+
- Title + short note: "Constitution skipped - not required for spec-kitty usage. Run /spec-kitty.constitution anytime to create one."
|
|
81
|
+
- Exit successfully.
|
|
82
|
+
- **B (Minimal)**: Continue with Phase 1 only.
|
|
83
|
+
- **C (Comprehensive)**: Continue through all phases, asking whether to skip each optional phase.
|
|
84
|
+
|
|
85
|
+
### Step 2: Phase 1 - Technical Standards
|
|
86
|
+
|
|
87
|
+
Context:
|
|
88
|
+
```
|
|
89
|
+
Phase 1: Technical Standards
|
|
90
|
+
These are the non-negotiable technical requirements that all features must follow.
|
|
91
|
+
This phase is recommended for all projects.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Ask one question at a time:
|
|
95
|
+
|
|
96
|
+
**Q1: Languages and Frameworks**
|
|
97
|
+
```
|
|
98
|
+
What languages and frameworks are required for this project?
|
|
99
|
+
Examples:
|
|
100
|
+
- "Python 3.11+ with FastAPI for backend"
|
|
101
|
+
- "TypeScript 4.9+ with React 18 for frontend"
|
|
102
|
+
- "Rust 1.70+ with no external dependencies"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Q2: Testing Requirements**
|
|
106
|
+
```
|
|
107
|
+
What testing framework and coverage requirements?
|
|
108
|
+
Examples:
|
|
109
|
+
- "pytest with 80% line coverage, 100% for critical paths"
|
|
110
|
+
- "Jest with 90% coverage, unit + integration tests required"
|
|
111
|
+
- "cargo test, no specific coverage target but all features must have tests"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Q3: Performance and Scale Targets**
|
|
115
|
+
```
|
|
116
|
+
What are the performance and scale expectations?
|
|
117
|
+
Examples:
|
|
118
|
+
- "Handle 1000 requests/second at p95 < 200ms"
|
|
119
|
+
- "Support 10k concurrent users, 1M daily active users"
|
|
120
|
+
- "CLI operations complete in < 2 seconds"
|
|
121
|
+
- "N/A - performance not a primary concern"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Q4: Deployment and Constraints**
|
|
125
|
+
```
|
|
126
|
+
What are the deployment constraints or platform requirements?
|
|
127
|
+
Examples:
|
|
128
|
+
- "Docker-only, deployed to Kubernetes"
|
|
129
|
+
- "Must run on Ubuntu 20.04 LTS without external dependencies"
|
|
130
|
+
- "Cross-platform: Linux, macOS, Windows 10+"
|
|
131
|
+
- "N/A - no specific deployment constraints"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Step 3: Phase 2 - Code Quality (Optional)
|
|
135
|
+
|
|
136
|
+
Ask only if comprehensive path is selected:
|
|
137
|
+
```
|
|
138
|
+
Phase 2: Code Quality
|
|
139
|
+
Skip this if your team uses standard practices without special requirements.
|
|
140
|
+
|
|
141
|
+
Do you want to define code quality standards?
|
|
142
|
+
A) Yes, ask questions
|
|
143
|
+
B) No, skip this phase (use standard practices)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
If yes, ask one at a time:
|
|
147
|
+
|
|
148
|
+
**Q5: PR Requirements**
|
|
149
|
+
```
|
|
150
|
+
What are the requirements for pull requests?
|
|
151
|
+
Examples:
|
|
152
|
+
- "2 approvals required, 1 must be from core team"
|
|
153
|
+
- "1 approval required, PR must pass CI checks"
|
|
154
|
+
- "Self-merge allowed after CI passes for maintainers"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Q6: Code Review Checklist**
|
|
158
|
+
```
|
|
159
|
+
What should reviewers check during code review?
|
|
160
|
+
Examples:
|
|
161
|
+
- "Tests added, docstrings updated, follows PEP 8, no security issues"
|
|
162
|
+
- "Type annotations present, error handling robust, performance considered"
|
|
163
|
+
- "Standard review - correctness, clarity, maintainability"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Q7: Quality Gates**
|
|
167
|
+
```
|
|
168
|
+
What quality gates must pass before merging?
|
|
169
|
+
Examples:
|
|
170
|
+
- "All tests pass, coverage ≥80%, linter clean, security scan clean"
|
|
171
|
+
- "Tests pass, type checking passes, manual QA approved"
|
|
172
|
+
- "CI green, no merge conflicts, PR approved"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Q8: Documentation Standards**
|
|
176
|
+
```
|
|
177
|
+
What documentation is required?
|
|
178
|
+
Examples:
|
|
179
|
+
- "All public APIs must have docstrings + examples"
|
|
180
|
+
- "README updated for new features, ADRs for architectural decisions"
|
|
181
|
+
- "Inline comments for complex logic, keep docs up to date"
|
|
182
|
+
- "Minimal - code should be self-documenting"
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Step 4: Phase 3 - Tribal Knowledge (Optional)
|
|
186
|
+
|
|
187
|
+
Ask only if comprehensive path is selected:
|
|
188
|
+
```
|
|
189
|
+
Phase 3: Tribal Knowledge
|
|
190
|
+
Skip this for new projects or if team conventions are minimal.
|
|
191
|
+
|
|
192
|
+
Do you want to capture tribal knowledge?
|
|
193
|
+
A) Yes, ask questions
|
|
194
|
+
B) No, skip this phase
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
If yes, ask:
|
|
198
|
+
|
|
199
|
+
**Q9: Team Conventions**
|
|
200
|
+
```
|
|
201
|
+
What team conventions or coding styles should everyone follow?
|
|
202
|
+
Examples:
|
|
203
|
+
- "Use Result<T, E> for fallible operations, never unwrap() in prod"
|
|
204
|
+
- "Prefer composition over inheritance, keep classes small (<200 lines)"
|
|
205
|
+
- "Use feature flags for gradual rollouts, never merge half-finished features"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Q10: Lessons Learned**
|
|
209
|
+
```
|
|
210
|
+
What past mistakes or lessons learned should guide future work?
|
|
211
|
+
Examples:
|
|
212
|
+
- "Always version APIs from day 1"
|
|
213
|
+
- "Write integration tests first"
|
|
214
|
+
- "Keep dependencies minimal - every dependency is a liability"
|
|
215
|
+
- "N/A - no major lessons yet"
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Optional follow-up:
|
|
219
|
+
```
|
|
220
|
+
Do you want to document historical architectural decisions?
|
|
221
|
+
A) Yes
|
|
222
|
+
B) No
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Q11: Historical Decisions** (only if yes)
|
|
226
|
+
```
|
|
227
|
+
Any historical architectural decisions that should guide future work?
|
|
228
|
+
Examples:
|
|
229
|
+
- "Chose microservices for independent scaling"
|
|
230
|
+
- "Chose monorepo for atomic changes across services"
|
|
231
|
+
- "Chose SQLite for simplicity over PostgreSQL"
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Step 5: Phase 4 - Governance (Optional)
|
|
235
|
+
|
|
236
|
+
Ask only if comprehensive path is selected:
|
|
237
|
+
```
|
|
238
|
+
Phase 4: Governance
|
|
239
|
+
Skip this to use simple defaults.
|
|
240
|
+
|
|
241
|
+
Do you want to define governance process?
|
|
242
|
+
A) Yes, ask questions
|
|
243
|
+
B) No, skip this phase (use simple defaults)
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
If skipped, use defaults:
|
|
247
|
+
- Amendment: Any team member can propose changes via PR
|
|
248
|
+
- Compliance: Team validates during code review
|
|
249
|
+
- Exceptions: Discuss with team, document in PR
|
|
250
|
+
|
|
251
|
+
If yes, ask:
|
|
252
|
+
|
|
253
|
+
**Q12: Amendment Process**
|
|
254
|
+
```
|
|
255
|
+
How should the constitution be amended?
|
|
256
|
+
Examples:
|
|
257
|
+
- "PR with 2 approvals, announce in team chat, 1 week discussion"
|
|
258
|
+
- "Any maintainer can update via PR"
|
|
259
|
+
- "Quarterly review, team votes on changes"
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Q13: Compliance Validation**
|
|
263
|
+
```
|
|
264
|
+
Who validates that features comply with the constitution?
|
|
265
|
+
Examples:
|
|
266
|
+
- "Code reviewers check compliance, block merge if violated"
|
|
267
|
+
- "Team lead reviews architecture"
|
|
268
|
+
- "Self-managed - developers responsible"
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Optional follow-up:
|
|
272
|
+
```
|
|
273
|
+
Do you want to define exception handling?
|
|
274
|
+
A) Yes
|
|
275
|
+
B) No
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**Q14: Exception Handling** (only if yes)
|
|
279
|
+
```
|
|
280
|
+
How should exceptions to the constitution be handled?
|
|
281
|
+
Examples:
|
|
282
|
+
- "Document in ADR, require 3 approvals, set sunset date"
|
|
283
|
+
- "Case-by-case discussion, strong justification required"
|
|
284
|
+
- "Exceptions discouraged - update constitution instead"
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Step 6: Summary and Confirmation
|
|
288
|
+
|
|
289
|
+
Present a summary and ask for confirmation:
|
|
290
|
+
```
|
|
291
|
+
Constitution Summary
|
|
292
|
+
====================
|
|
293
|
+
|
|
294
|
+
You've completed [X] phases and answered [Y] questions.
|
|
295
|
+
Here's what will be written to .kittify/memory/constitution.md:
|
|
296
|
+
|
|
297
|
+
Technical Standards:
|
|
298
|
+
- Languages: [Q1]
|
|
299
|
+
- Testing: [Q2]
|
|
300
|
+
- Performance: [Q3]
|
|
301
|
+
- Deployment: [Q4]
|
|
302
|
+
|
|
303
|
+
[If Phase 2 completed]
|
|
304
|
+
Code Quality:
|
|
305
|
+
- PR Requirements: [Q5]
|
|
306
|
+
- Review Checklist: [Q6]
|
|
307
|
+
- Quality Gates: [Q7]
|
|
308
|
+
- Documentation: [Q8]
|
|
309
|
+
|
|
310
|
+
[If Phase 3 completed]
|
|
311
|
+
Tribal Knowledge:
|
|
312
|
+
- Conventions: [Q9]
|
|
313
|
+
- Lessons Learned: [Q10]
|
|
314
|
+
- Historical Decisions: [Q11 if present]
|
|
315
|
+
|
|
316
|
+
Governance: [Custom if Phase 4 completed, otherwise defaults]
|
|
317
|
+
|
|
318
|
+
Estimated length: ≈[50-80 lines minimal] or ≈[150-200 lines comprehensive]
|
|
319
|
+
|
|
320
|
+
Proceed with writing constitution?
|
|
321
|
+
A) Yes, write it
|
|
322
|
+
B) No, let me start over
|
|
323
|
+
C) Cancel, don't create constitution
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Handle responses:
|
|
327
|
+
- **A**: Write the constitution file.
|
|
328
|
+
- **B**: Restart from Step 1.
|
|
329
|
+
- **C**: Exit without writing.
|
|
330
|
+
|
|
331
|
+
### Step 7: Write Constitution File
|
|
332
|
+
|
|
333
|
+
Generate the constitution as Markdown:
|
|
334
|
+
|
|
335
|
+
```markdown
|
|
336
|
+
# [PROJECT_NAME] Constitution
|
|
337
|
+
|
|
338
|
+
> Auto-generated by spec-kitty constitution command
|
|
339
|
+
> Created: [YYYY-MM-DD]
|
|
340
|
+
> Version: 1.0.0
|
|
341
|
+
|
|
342
|
+
## Purpose
|
|
343
|
+
|
|
344
|
+
This constitution captures the technical standards, code quality expectations,
|
|
345
|
+
tribal knowledge, and governance rules for [PROJECT_NAME]. All features and
|
|
346
|
+
pull requests should align with these principles.
|
|
347
|
+
|
|
348
|
+
## Technical Standards
|
|
349
|
+
|
|
350
|
+
### Languages and Frameworks
|
|
351
|
+
[Q1]
|
|
352
|
+
|
|
353
|
+
### Testing Requirements
|
|
354
|
+
[Q2]
|
|
355
|
+
|
|
356
|
+
### Performance and Scale
|
|
357
|
+
[Q3]
|
|
358
|
+
|
|
359
|
+
### Deployment and Constraints
|
|
360
|
+
[Q4]
|
|
361
|
+
|
|
362
|
+
[If Phase 2 completed]
|
|
363
|
+
## Code Quality
|
|
364
|
+
|
|
365
|
+
### Pull Request Requirements
|
|
366
|
+
[Q5]
|
|
367
|
+
|
|
368
|
+
### Code Review Checklist
|
|
369
|
+
[Q6]
|
|
370
|
+
|
|
371
|
+
### Quality Gates
|
|
372
|
+
[Q7]
|
|
373
|
+
|
|
374
|
+
### Documentation Standards
|
|
375
|
+
[Q8]
|
|
376
|
+
|
|
377
|
+
[If Phase 3 completed]
|
|
378
|
+
## Tribal Knowledge
|
|
379
|
+
|
|
380
|
+
### Team Conventions
|
|
381
|
+
[Q9]
|
|
382
|
+
|
|
383
|
+
### Lessons Learned
|
|
384
|
+
[Q10]
|
|
385
|
+
|
|
386
|
+
[If Q11 present]
|
|
387
|
+
### Historical Decisions
|
|
388
|
+
[Q11]
|
|
389
|
+
|
|
390
|
+
## Governance
|
|
391
|
+
|
|
392
|
+
[If Phase 4 completed]
|
|
393
|
+
### Amendment Process
|
|
394
|
+
[Q12]
|
|
395
|
+
|
|
396
|
+
### Compliance Validation
|
|
397
|
+
[Q13]
|
|
398
|
+
|
|
399
|
+
[If Q14 present]
|
|
400
|
+
### Exception Handling
|
|
401
|
+
[Q14]
|
|
402
|
+
|
|
403
|
+
[If Phase 4 skipped, use defaults]
|
|
404
|
+
### Amendment Process
|
|
405
|
+
Any team member can propose amendments via pull request. Changes are discussed
|
|
406
|
+
and merged following standard PR review process.
|
|
407
|
+
|
|
408
|
+
### Compliance Validation
|
|
409
|
+
Code reviewers validate compliance during PR review. Constitution violations
|
|
410
|
+
should be flagged and addressed before merge.
|
|
411
|
+
|
|
412
|
+
### Exception Handling
|
|
413
|
+
Exceptions discussed case-by-case with team. Strong justification required.
|
|
414
|
+
Consider updating constitution if exceptions become common.
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Step 8: Success Message
|
|
418
|
+
|
|
419
|
+
After writing, provide:
|
|
420
|
+
- Location of the file
|
|
421
|
+
- Phases completed and questions answered
|
|
422
|
+
- Next steps (review, share with team, run /spec-kitty.plan)
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Required Behaviors
|
|
427
|
+
|
|
428
|
+
- Ask one question at a time.
|
|
429
|
+
- Offer skip options and explain when to skip.
|
|
430
|
+
- Keep responses concise and user-focused.
|
|
431
|
+
- Ensure the constitution stays lean (1-3 pages, not 10 pages).
|
|
432
|
+
- If user chooses to skip entirely, still create the minimal placeholder file and exit successfully.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Open the Spec Kitty dashboard in your browser.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Dashboard Access
|
|
6
|
+
|
|
7
|
+
This command helps you access the Spec Kitty dashboard that was started when you ran `spec-kitty init`.
|
|
8
|
+
|
|
9
|
+
## What to do
|
|
10
|
+
|
|
11
|
+
1. **Check if dashboard is running**: Look for the `.kittify/.dashboard` file which contains the dashboard URL and port.
|
|
12
|
+
|
|
13
|
+
2. **If dashboard file exists**:
|
|
14
|
+
- Read the URL from the first line of `.kittify/.dashboard`
|
|
15
|
+
- Display the URL to the user in a prominent, easy-to-copy format
|
|
16
|
+
- Attempt to open the URL in the user's default web browser using Python's `webbrowser` module
|
|
17
|
+
- If browser opening fails, show instructions on how to manually open it
|
|
18
|
+
|
|
19
|
+
3. **If dashboard file does not exist**:
|
|
20
|
+
- Inform the user that no dashboard is currently running
|
|
21
|
+
- Explain that they need to run `spec-kitty init` to start the dashboard
|
|
22
|
+
- Provide clear instructions
|
|
23
|
+
|
|
24
|
+
## Implementation
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
import webbrowser
|
|
28
|
+
import socket
|
|
29
|
+
from pathlib import Path
|
|
30
|
+
|
|
31
|
+
# Check for dashboard info file
|
|
32
|
+
dashboard_file = Path('.kittify/.dashboard')
|
|
33
|
+
|
|
34
|
+
if not dashboard_file.exists():
|
|
35
|
+
print("❌ No dashboard information found")
|
|
36
|
+
print()
|
|
37
|
+
print("To start the dashboard, run:")
|
|
38
|
+
print(" spec-kitty init .")
|
|
39
|
+
print()
|
|
40
|
+
else:
|
|
41
|
+
# Read dashboard URL
|
|
42
|
+
content = dashboard_file.read_text().strip().split('\n')
|
|
43
|
+
dashboard_url = content[0] if content else None
|
|
44
|
+
port_str = content[1] if len(content) > 1 else None
|
|
45
|
+
|
|
46
|
+
if not dashboard_url or not port_str:
|
|
47
|
+
print("❌ Dashboard file is invalid or empty")
|
|
48
|
+
print(" Try running: spec-kitty init .")
|
|
49
|
+
print()
|
|
50
|
+
else:
|
|
51
|
+
# Verify dashboard is actually running on this port
|
|
52
|
+
port = int(port_str)
|
|
53
|
+
is_running = False
|
|
54
|
+
try:
|
|
55
|
+
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
56
|
+
sock.settimeout(1)
|
|
57
|
+
result = sock.connect_ex(('127.0.0.1', port))
|
|
58
|
+
sock.close()
|
|
59
|
+
is_running = (result == 0)
|
|
60
|
+
except:
|
|
61
|
+
is_running = False
|
|
62
|
+
|
|
63
|
+
print()
|
|
64
|
+
print("Spec Kitty Dashboard")
|
|
65
|
+
print("=" * 60)
|
|
66
|
+
print()
|
|
67
|
+
print(f" URL: {dashboard_url}")
|
|
68
|
+
|
|
69
|
+
if not is_running:
|
|
70
|
+
print()
|
|
71
|
+
print(" ⚠️ Status: Dashboard appears to be stopped")
|
|
72
|
+
print(f" (Port {port} is not responding)")
|
|
73
|
+
else:
|
|
74
|
+
print()
|
|
75
|
+
print(f" ✅ Status: Running on port {port}")
|
|
76
|
+
|
|
77
|
+
print()
|
|
78
|
+
print("=" * 60)
|
|
79
|
+
print()
|
|
80
|
+
|
|
81
|
+
if is_running:
|
|
82
|
+
# Try to open in browser
|
|
83
|
+
try:
|
|
84
|
+
webbrowser.open(dashboard_url)
|
|
85
|
+
print("✅ Opening dashboard in your browser...")
|
|
86
|
+
print()
|
|
87
|
+
except Exception as e:
|
|
88
|
+
print("⚠️ Could not automatically open browser")
|
|
89
|
+
print(f" Please open this URL manually: {dashboard_url}")
|
|
90
|
+
print()
|
|
91
|
+
else:
|
|
92
|
+
print("💡 To start the dashboard, run: spec-kitty init .")
|
|
93
|
+
print()
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Success Criteria
|
|
97
|
+
|
|
98
|
+
- User sees the dashboard URL clearly displayed
|
|
99
|
+
- Browser opens automatically to the dashboard
|
|
100
|
+
- If browser doesn't open, user gets clear instructions
|
|
101
|
+
- Error messages are helpful and actionable
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create an isolated workspace (worktree) for implementing a specific work package.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## ⚠️ CRITICAL: Working Directory Requirement
|
|
6
|
+
|
|
7
|
+
**After running `spec-kitty implement WP##`, you MUST:**
|
|
8
|
+
|
|
9
|
+
1. **Run the cd command shown in the output** - e.g., `cd .worktrees/###-feature-WP##/`
|
|
10
|
+
2. **ALL file operations happen in this directory** - Read, Write, Edit tools must target files in the workspace
|
|
11
|
+
3. **NEVER write deliverable files to the main repository** - This is a critical workflow error
|
|
12
|
+
|
|
13
|
+
**Why this matters:**
|
|
14
|
+
- Each WP has an isolated worktree with its own branch
|
|
15
|
+
- Changes in main repository will NOT be seen by reviewers looking at the WP worktree
|
|
16
|
+
- Writing to main instead of the workspace causes review failures and merge conflicts
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
**IMPORTANT**: After running the command below, you'll see a LONG work package prompt (~1000+ lines).
|
|
21
|
+
|
|
22
|
+
**You MUST scroll to the BOTTOM** to see the completion command!
|
|
23
|
+
|
|
24
|
+
Run this command to get the work package prompt and implementation instructions:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
spec-kitty agent workflow implement $ARGUMENTS --agent <your-name>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**CRITICAL**: You MUST provide `--agent <your-name>` to track who is implementing!
|
|
31
|
+
|
|
32
|
+
If no WP ID is provided, it will automatically find the first work package with `lane: "planned"` and move it to "doing" for you.
|
|
33
|
+
|
|
34
|
+
**After implementation, scroll to the bottom and run**:
|
|
35
|
+
```bash
|
|
36
|
+
spec-kitty agent tasks move-task WP## --to for_review --note "Ready for review: <summary>"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**The Python script handles all file updates automatically - no manual editing required!**
|
|
40
|
+
|
|
41
|
+
**NOTE**: If `/spec-kitty.status` shows your WP in "doing" after you moved it to "for_review", don't panic - a reviewer may have moved it back (changes requested), or there's a sync delay. Focus on your WP.
|