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,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Open the Spec Kitty dashboard in your browser.
|
|
3
|
+
---
|
|
4
|
+
**⚠️ CRITICAL: Read the project's AGENTS.md for universal rules (paths, UTF-8 encoding, context management, quality expectations).**
|
|
5
|
+
|
|
6
|
+
**Finding AGENTS.md**: Look for `.kittify/AGENTS.md` in your current directory. If not found (e.g., in a worktree), find the main repo via `git worktree list --porcelain` (first "worktree" entry is the main repo) and read `.kittify/AGENTS.md` from there.
|
|
7
|
+
|
|
8
|
+
*Path: [templates/commands/dashboard.md](templates/commands/dashboard.md)*
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Context: Dashboard Overview
|
|
12
|
+
|
|
13
|
+
**What is the dashboard?**
|
|
14
|
+
A real-time, read-only web interface showing the health and status of all features in your project.
|
|
15
|
+
|
|
16
|
+
**Key characteristics**:
|
|
17
|
+
- ✅ Read-only (for viewing/monitoring only)
|
|
18
|
+
- ✅ Project-wide view (shows ALL features)
|
|
19
|
+
- ✅ Live updates (refreshes as you work)
|
|
20
|
+
- ✅ No configuration needed (just run the command)
|
|
21
|
+
|
|
22
|
+
**Run from**: Main repository root (dashboard automatically detects if you're in a worktree)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## When to Use Dashboard
|
|
27
|
+
|
|
28
|
+
- **Project overview**: See all features, their statuses, and progress
|
|
29
|
+
- **Debugging workflow**: Check if features are properly detected
|
|
30
|
+
- **Monitoring**: Track which features are in progress, review, or complete
|
|
31
|
+
- **Status reports**: Show stakeholders real-time feature status
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Workflow Context
|
|
36
|
+
|
|
37
|
+
**Where it fits**: This is a utility command, not part of the sequential workflow
|
|
38
|
+
|
|
39
|
+
**You can run this**:
|
|
40
|
+
- From main repository root
|
|
41
|
+
- From inside a feature worktree (dashboard still shows all projects)
|
|
42
|
+
- At any point during feature development
|
|
43
|
+
- Multiple times (each run can start/reuse the dashboard)
|
|
44
|
+
|
|
45
|
+
**What it shows**:
|
|
46
|
+
- All features and their branches
|
|
47
|
+
- Current status (in development, reviewed, accepted, merged)
|
|
48
|
+
- File integrity checks
|
|
49
|
+
- Worktree status
|
|
50
|
+
- Missing or problematic artifacts
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Dashboard Access
|
|
55
|
+
|
|
56
|
+
The dashboard shows ALL features across the project and runs from the **main repository**, not from individual feature worktrees.
|
|
57
|
+
|
|
58
|
+
## Important: Worktree Handling
|
|
59
|
+
|
|
60
|
+
**If you're in a feature worktree**, the dashboard file is in the main repo, not in your worktree.
|
|
61
|
+
|
|
62
|
+
The dashboard is project-wide (shows all features), so it must be accessed from the main repository location.
|
|
63
|
+
|
|
64
|
+
## Implementation
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
import webbrowser
|
|
68
|
+
import subprocess
|
|
69
|
+
import argparse
|
|
70
|
+
import sys
|
|
71
|
+
from pathlib import Path
|
|
72
|
+
|
|
73
|
+
from specify_cli.dashboard import ensure_dashboard_running, stop_dashboard
|
|
74
|
+
|
|
75
|
+
# CRITICAL: Find the main repository root, not worktree
|
|
76
|
+
current_dir = Path.cwd()
|
|
77
|
+
|
|
78
|
+
# Check if we're in a worktree
|
|
79
|
+
try:
|
|
80
|
+
# Get git worktree list to find main worktree
|
|
81
|
+
result = subprocess.run(
|
|
82
|
+
['git', 'worktree', 'list', '--porcelain'],
|
|
83
|
+
capture_output=True,
|
|
84
|
+
text=True,
|
|
85
|
+
check=False
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
if result.returncode == 0:
|
|
89
|
+
# Parse worktree list to find the main worktree
|
|
90
|
+
main_repo = None
|
|
91
|
+
for line in result.stdout.split('\n'):
|
|
92
|
+
if line.startswith('worktree '):
|
|
93
|
+
path = line.split('worktree ')[1]
|
|
94
|
+
# First worktree in list is usually main
|
|
95
|
+
if main_repo is None:
|
|
96
|
+
main_repo = Path(path)
|
|
97
|
+
break
|
|
98
|
+
|
|
99
|
+
if main_repo and main_repo != current_dir:
|
|
100
|
+
print(f"📍 Note: You're in a worktree. Dashboard is in main repo at {main_repo}")
|
|
101
|
+
project_root = main_repo
|
|
102
|
+
else:
|
|
103
|
+
project_root = current_dir
|
|
104
|
+
else:
|
|
105
|
+
# Not a git repo or git not available
|
|
106
|
+
project_root = current_dir
|
|
107
|
+
except Exception:
|
|
108
|
+
# Fallback to current directory
|
|
109
|
+
project_root = current_dir
|
|
110
|
+
|
|
111
|
+
# Parse optional CLI arguments
|
|
112
|
+
parser = argparse.ArgumentParser(add_help=False)
|
|
113
|
+
parser.add_argument("--port", type=int, help="Preferred port for the dashboard.")
|
|
114
|
+
parser.add_argument("--kill", action="store_true", help="Stop the dashboard for this project.")
|
|
115
|
+
args, _ = parser.parse_known_args()
|
|
116
|
+
|
|
117
|
+
if args.kill:
|
|
118
|
+
stopped, message = stop_dashboard(project_root)
|
|
119
|
+
if stopped:
|
|
120
|
+
print(f"✅ {message}")
|
|
121
|
+
else:
|
|
122
|
+
print(f"⚠️ {message}")
|
|
123
|
+
sys.exit(0)
|
|
124
|
+
|
|
125
|
+
if args.port is not None and (args.port <= 0 or args.port > 65535):
|
|
126
|
+
print("❌ Invalid port specified. Use a value between 1 and 65535.")
|
|
127
|
+
sys.exit(1)
|
|
128
|
+
|
|
129
|
+
# Ensure the dashboard is running for this project
|
|
130
|
+
try:
|
|
131
|
+
dashboard_url, port, started = ensure_dashboard_running(project_root, preferred_port=args.port)
|
|
132
|
+
except Exception as exc:
|
|
133
|
+
print("❌ Unable to start or locate the dashboard")
|
|
134
|
+
print(f" {exc}")
|
|
135
|
+
print()
|
|
136
|
+
print("To bootstrap it manually, run:")
|
|
137
|
+
print(f" cd {project_root}")
|
|
138
|
+
print(" spec-kitty init .")
|
|
139
|
+
print()
|
|
140
|
+
else:
|
|
141
|
+
print()
|
|
142
|
+
print("Spec Kitty Dashboard")
|
|
143
|
+
print("=" * 60)
|
|
144
|
+
print()
|
|
145
|
+
print(f" Project Root: {project_root}")
|
|
146
|
+
print(f" URL: {dashboard_url}")
|
|
147
|
+
print(f" Port: {port}")
|
|
148
|
+
print()
|
|
149
|
+
if started:
|
|
150
|
+
print(f" ✅ Status: Started new dashboard instance on port {port}")
|
|
151
|
+
else:
|
|
152
|
+
print(f" ✅ Status: Dashboard already running on port {port}")
|
|
153
|
+
if args.port is not None and args.port != port:
|
|
154
|
+
print(f" ⚠️ Requested port {args.port} was unavailable; using {port} instead.")
|
|
155
|
+
|
|
156
|
+
print()
|
|
157
|
+
print("=" * 60)
|
|
158
|
+
print()
|
|
159
|
+
|
|
160
|
+
try:
|
|
161
|
+
webbrowser.open(dashboard_url)
|
|
162
|
+
print("✅ Opening dashboard in your browser...")
|
|
163
|
+
print()
|
|
164
|
+
except Exception:
|
|
165
|
+
print("⚠️ Could not automatically open browser")
|
|
166
|
+
print(f" Please open this URL manually: {dashboard_url}")
|
|
167
|
+
print()
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Success Criteria
|
|
171
|
+
|
|
172
|
+
- User sees the dashboard URL clearly displayed
|
|
173
|
+
- Browser opens automatically to the dashboard
|
|
174
|
+
- If browser doesn't open, user gets clear instructions
|
|
175
|
+
- Error messages are helpful and actionable
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create an isolated workspace (worktree) for implementing a specific work package.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /spec-kitty.implement - Create Workspace for Work Package
|
|
6
|
+
|
|
7
|
+
**Version**: 0.11.0+
|
|
8
|
+
**Purpose**: Create an isolated workspace (git worktree) for implementing a specific work package.
|
|
9
|
+
|
|
10
|
+
## ⚠️ CRITICAL: Working Directory Requirement
|
|
11
|
+
|
|
12
|
+
**After running `spec-kitty implement WP##`, you MUST:**
|
|
13
|
+
|
|
14
|
+
1. **Run the cd command shown in the output** - e.g., `cd .worktrees/###-feature-WP##/`
|
|
15
|
+
2. **ALL file operations happen in this directory** - Read, Write, Edit tools must target files in the workspace
|
|
16
|
+
3. **NEVER write deliverable files to the main repository** - This is a critical workflow error
|
|
17
|
+
|
|
18
|
+
**Why this matters:**
|
|
19
|
+
- Each WP has an isolated worktree with its own branch
|
|
20
|
+
- Changes in main repository will NOT be seen by reviewers looking at the WP worktree
|
|
21
|
+
- Writing to main instead of the workspace causes review failures and merge conflicts
|
|
22
|
+
|
|
23
|
+
**Verify you're in the right directory:**
|
|
24
|
+
```bash
|
|
25
|
+
pwd
|
|
26
|
+
# Should show: /path/to/repo/.worktrees/###-feature-WP##/
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## CRITICAL: This is a TWO-STEP Command
|
|
32
|
+
|
|
33
|
+
**Step 1**: Get the WP prompt and implementation instructions
|
|
34
|
+
```bash
|
|
35
|
+
spec-kitty agent workflow implement WP## --agent __AGENT__
|
|
36
|
+
```
|
|
37
|
+
This displays the full WP prompt with detailed requirements and shows:
|
|
38
|
+
```
|
|
39
|
+
WHEN YOU'RE DONE:
|
|
40
|
+
================================================================================
|
|
41
|
+
✓ Implementation complete and tested:
|
|
42
|
+
spec-kitty agent tasks move-task WP## --to for_review --note "Ready for review"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Step 2**: Create the workspace (if needed) and implement according to the prompt
|
|
46
|
+
```bash
|
|
47
|
+
spec-kitty implement WP## # No dependencies (branches from main)
|
|
48
|
+
spec-kitty implement WP## --base WPXX # With dependencies (branches from base WP)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Completion Requirements
|
|
52
|
+
|
|
53
|
+
**Your work is NOT complete until**:
|
|
54
|
+
1. ✅ All subtasks in WP prompt are finished
|
|
55
|
+
2. ✅ All tests pass (if required)
|
|
56
|
+
3. ✅ Changes committed to the WP workspace
|
|
57
|
+
4. ✅ **WP moved to for_review lane**: `spec-kitty agent tasks move-task WP## --to for_review --note "Ready for review"`
|
|
58
|
+
|
|
59
|
+
**The WP file location determines status**:
|
|
60
|
+
- In `tasks/WP##-*.md` with `lane: "doing"` = IN PROGRESS (not done)
|
|
61
|
+
- Need to move to `for_review` lane when complete
|
|
62
|
+
|
|
63
|
+
## When to Use
|
|
64
|
+
|
|
65
|
+
After `/spec-kitty.tasks` generates work packages in the main repository:
|
|
66
|
+
- Planning artifacts (spec, plan, tasks) are already in main
|
|
67
|
+
- Run `spec-kitty agent workflow implement WP01 --agent __AGENT__` to get the full prompt
|
|
68
|
+
- Run `spec-kitty implement WP01` to create a workspace for the first WP
|
|
69
|
+
- Run `spec-kitty implement WP02 --base WP01` if WP02 depends on WP01
|
|
70
|
+
- Each WP gets its own isolated worktree in `.worktrees/###-feature-WP##/`
|
|
71
|
+
|
|
72
|
+
## Workflow
|
|
73
|
+
|
|
74
|
+
**Planning Phase** (main repo, no worktrees):
|
|
75
|
+
```
|
|
76
|
+
/spec-kitty.specify → Creates spec.md in main
|
|
77
|
+
/spec-kitty.plan → Creates plan.md in main
|
|
78
|
+
/spec-kitty.tasks → Creates tasks/*.md in main
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Implementation Phase** (creates worktrees on-demand):
|
|
82
|
+
```
|
|
83
|
+
spec-kitty implement WP01 → Creates .worktrees/###-feature-WP01/
|
|
84
|
+
spec-kitty implement WP02 --base WP01 → Creates .worktrees/###-feature-WP02/
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Examples
|
|
88
|
+
|
|
89
|
+
**Independent WP** (no dependencies):
|
|
90
|
+
```bash
|
|
91
|
+
spec-kitty implement WP01
|
|
92
|
+
# Creates: .worktrees/010-workspace-per-wp-WP01/
|
|
93
|
+
# Branches from: main
|
|
94
|
+
# Contains: Planning artifacts (spec, plan, tasks)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Dependent WP**:
|
|
98
|
+
```bash
|
|
99
|
+
spec-kitty implement WP02 --base WP01
|
|
100
|
+
# Creates: .worktrees/010-workspace-per-wp-WP02/
|
|
101
|
+
# Branches from: 010-workspace-per-wp-WP01 branch
|
|
102
|
+
# Contains: Planning artifacts + WP01's code changes
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Validation
|
|
106
|
+
|
|
107
|
+
The command validates:
|
|
108
|
+
- Base workspace exists (if --base specified)
|
|
109
|
+
- Suggests --base if WP has dependencies in frontmatter
|
|
110
|
+
- Errors if trying to branch from a non-existent base
|
|
111
|
+
|
|
112
|
+
## Parallel Development
|
|
113
|
+
|
|
114
|
+
Multiple agents can implement different WPs simultaneously:
|
|
115
|
+
```bash
|
|
116
|
+
# Agent A
|
|
117
|
+
spec-kitty implement WP01
|
|
118
|
+
|
|
119
|
+
# Agent B (in parallel)
|
|
120
|
+
spec-kitty implement WP03
|
|
121
|
+
|
|
122
|
+
# Both work in isolated worktrees without conflicts
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Dependencies
|
|
126
|
+
|
|
127
|
+
Work package dependencies are declared in frontmatter:
|
|
128
|
+
```yaml
|
|
129
|
+
dependencies: ["WP01"] # This WP depends on WP01
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The implement command reads this field and validates the --base flag matches.
|
|
133
|
+
|
|
134
|
+
## Complete Implementation Workflow
|
|
135
|
+
|
|
136
|
+
**ALWAYS follow this sequence**:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# 1. Get the full WP prompt and instructions
|
|
140
|
+
spec-kitty agent workflow implement WP## --agent __AGENT__
|
|
141
|
+
|
|
142
|
+
# 2. Read the "WHEN YOU'RE DONE" section at the top of the prompt
|
|
143
|
+
# It will show exactly what command to run when complete:
|
|
144
|
+
# spec-kitty agent tasks move-task WP## --to for_review --note "..."
|
|
145
|
+
|
|
146
|
+
# 3. Create workspace (if not exists)
|
|
147
|
+
spec-kitty implement WP## # Or with --base if dependencies
|
|
148
|
+
|
|
149
|
+
# 4. Navigate to workspace
|
|
150
|
+
cd .worktrees/###-feature-WP##/
|
|
151
|
+
|
|
152
|
+
# 5. Implement according to WP prompt
|
|
153
|
+
# ... write code, run tests, commit changes ...
|
|
154
|
+
|
|
155
|
+
# 6. Move to for_review (REQUIRED - not optional!)
|
|
156
|
+
spec-kitty agent tasks move-task WP## --to for_review --note "Ready for review"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**IMPORTANT**: Step 6 is MANDATORY. The WP is NOT complete until moved to `for_review` lane.
|
|
160
|
+
|
|
161
|
+
## Lane Status
|
|
162
|
+
|
|
163
|
+
Work packages move through lanes:
|
|
164
|
+
- `planned` → Initial state after `/spec-kitty.tasks`
|
|
165
|
+
- `doing` → Agent is implementing (automatically set by workflow command)
|
|
166
|
+
- `for_review` → Implementation complete, waiting for review ← **YOU MUST MOVE HERE**
|
|
167
|
+
- `done` → Review passed, WP complete
|
|
168
|
+
|
|
169
|
+
**Check current lane**:
|
|
170
|
+
```bash
|
|
171
|
+
grep "^lane:" kitty-specs/###-feature/tasks/WP##-*.md
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Troubleshooting
|
|
175
|
+
|
|
176
|
+
**Error: "Base workspace WP01 does not exist"**
|
|
177
|
+
- Solution: Implement WP01 first: `spec-kitty implement WP01`
|
|
178
|
+
|
|
179
|
+
**Error: "WP02 has dependencies. Use: spec-kitty implement WP02 --base WP01"**
|
|
180
|
+
- Solution: Add --base flag as suggested
|
|
181
|
+
|
|
182
|
+
**Warning: "Base branch has changed. Consider rebasing..."**
|
|
183
|
+
- Solution: Run suggested rebase command
|
|
184
|
+
|
|
185
|
+
**"I finished implementing but nothing happened"**
|
|
186
|
+
- Check: Did you move to for_review? `spec-kitty agent tasks move-task WP## --to for_review`
|
|
187
|
+
- The WP file must be moved to for_review lane for the workflow to continue
|
|
188
|
+
|
|
189
|
+
**"Status board shows 'doing' but I just moved to 'for_review'"**
|
|
190
|
+
- This is normal! Status is tracked in main branch. A reviewer may have already moved it back to "doing" (changes requested), or there's a sync delay. Don't panic - focus on your WP.
|