sdd-agent-pack 1.0.0
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.
- package/README.md +128 -0
- package/assets/config/agent.config.json +20 -0
- package/assets/docs/workflow.md +48 -0
- package/assets/hooks/README.md +50 -0
- package/assets/hooks/hooks.json +10 -0
- package/assets/hooks/pre-implementation.sh +60 -0
- package/assets/hooks/stop-hook.sh +52 -0
- package/assets/prompts/epic-prompt.md +12 -0
- package/assets/skills/sdd-completion/SKILL.md +29 -0
- package/assets/skills/sdd-context/SKILL.md +32 -0
- package/assets/skills/sdd-epic-workflow/SKILL.md +34 -0
- package/assets/skills/sdd-implementation/SKILL.md +30 -0
- package/assets/skills/sdd-testing/SKILL.md +36 -0
- package/assets/templates/constitution.md +16 -0
- package/assets/templates/tasks.md +24 -0
- package/dist/commands/doctor.d.ts +6 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +54 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/help.d.ts +6 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +41 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +70 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/status.d.ts +6 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +51 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/uninstall.d.ts +6 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +49 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +6 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +45 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/console.d.ts +12 -0
- package/dist/utils/console.d.ts.map +1 -0
- package/dist/utils/console.js +13 -0
- package/dist/utils/console.js.map +1 -0
- package/dist/utils/installer.d.ts +27 -0
- package/dist/utils/installer.d.ts.map +1 -0
- package/dist/utils/installer.js +190 -0
- package/dist/utils/installer.js.map +1 -0
- package/dist/utils/repo.d.ts +10 -0
- package/dist/utils/repo.d.ts.map +1 -0
- package/dist/utils/repo.js +31 -0
- package/dist/utils/repo.js.map +1 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# SDD Agent Pack
|
|
2
|
+
|
|
3
|
+
Lightweight installer for SDD (Software Driven Development) workflow assets into application repositories.
|
|
4
|
+
|
|
5
|
+
SDD Agent Pack installs the instructions, skills, hooks, prompts, templates, and supporting files that AI coding agents need to follow the SDD workflow in your project.
|
|
6
|
+
|
|
7
|
+
## How It Works
|
|
8
|
+
|
|
9
|
+
1. **Install** — Run `sdd-agent-pack init` in your application repository
|
|
10
|
+
2. **Define** — Create `tasks.md` with your epics and tasks, and design documents in `specs/`
|
|
11
|
+
3. **Implement** — An AI agent reads your SDD documents and implements epics systematically
|
|
12
|
+
|
|
13
|
+
The AI coding agent itself is the execution engine. SDD Agent Pack provides the instructions and controls that guide the agent.
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### Prerequisites
|
|
18
|
+
|
|
19
|
+
- **Node.js 18+** — The installer requires Node.js (not Python)
|
|
20
|
+
- **Git** — Your project must be a Git repository
|
|
21
|
+
- **An SDD project** — With `tasks.md` and `specs/` documents
|
|
22
|
+
|
|
23
|
+
### Install in your project
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx sdd-agent-pack init
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This creates `.sdd-agent-pack/` in your project with all the assets AI agents need.
|
|
30
|
+
|
|
31
|
+
### What gets installed
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
.sdd-agent-pack/
|
|
35
|
+
├── skills/ — OpenHands microagents for the SDD workflow
|
|
36
|
+
├── prompts/ — Workflow prompts
|
|
37
|
+
├── hooks/ — Quality enforcement hooks
|
|
38
|
+
├── docs/ — Workflow documentation
|
|
39
|
+
├── templates/ — SDD document templates (tasks.md, constitution.md)
|
|
40
|
+
└── config/ — Agent configuration
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
AGENTS.md is also updated with a managed SDD Agent Pack section.
|
|
44
|
+
|
|
45
|
+
### Commands
|
|
46
|
+
|
|
47
|
+
| Command | Description |
|
|
48
|
+
|---------|-------------|
|
|
49
|
+
| `init` | Install SDD Agent Pack in the current repository |
|
|
50
|
+
| `update` | Update SDD Agent Pack assets |
|
|
51
|
+
| `uninstall` | Remove SDD Agent Pack assets safely |
|
|
52
|
+
| `doctor` | Validate installation and environment |
|
|
53
|
+
| `status` | Show installation status |
|
|
54
|
+
| `help` | Show all commands |
|
|
55
|
+
|
|
56
|
+
## Why SDD Agent Pack?
|
|
57
|
+
|
|
58
|
+
SDD Agent Pack replaces the previous `sdd-autopilot` runtime application. Instead of a Python-based autonomous orchestrator that managed LLM calls, providers, and execution loops, this is a **lightweight installer** that equips AI agents with the instructions they need.
|
|
59
|
+
|
|
60
|
+
### What changed
|
|
61
|
+
|
|
62
|
+
| Old (sdd-autopilot) | New (SDD Agent Pack) |
|
|
63
|
+
|---------------------|---------------------|
|
|
64
|
+
| Python/uv runtime | Node.js/TypeScript CLI |
|
|
65
|
+
| Autonomous orchestrator | Repository installer |
|
|
66
|
+
| LLM provider management | Agent instruction files |
|
|
67
|
+
| API key management | Not needed (agent handles this) |
|
|
68
|
+
| Budget tracking | Not needed (agent handles this) |
|
|
69
|
+
| Custom slash commands | Standard agent workflow |
|
|
70
|
+
|
|
71
|
+
## Documentation
|
|
72
|
+
|
|
73
|
+
- [Workflow](.sdd-agent-pack/docs/workflow.md) — SDD workflow documentation (after install)
|
|
74
|
+
- [SDD Agent Pack Spec](specs/sdd-agent-pack_spec.md) — Project specification
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
MIT
|
|
79
|
+
```
|
|
80
|
+
1. Define epics and tasks in tasks.md
|
|
81
|
+
2. Run /autopilot-prepare in Copilot Chat (first time only)
|
|
82
|
+
3. Run /autopilot-start in Copilot Chat
|
|
83
|
+
4. Copilot implements each epic, runs tests, and advances autonomously
|
|
84
|
+
5. Repeat runs of /autopilot-start continue until all epics are complete
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Frontmatter Schema
|
|
88
|
+
|
|
89
|
+
Tasks and state are tracked in `tasks.md` frontmatter:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
---
|
|
93
|
+
autopilot:
|
|
94
|
+
initialized: true
|
|
95
|
+
epics:
|
|
96
|
+
- id: EPIC-001
|
|
97
|
+
title: Authentication
|
|
98
|
+
status: pending
|
|
99
|
+
completion_notes:
|
|
100
|
+
implemented: ["OAuth login"]
|
|
101
|
+
files_created: ["src/auth/login.py"]
|
|
102
|
+
tests_added: ["tests/test_auth.py"]
|
|
103
|
+
architectural_decisions: ["Centralized session management"]
|
|
104
|
+
future_context: ["User Management depends on auth state"]
|
|
105
|
+
tasks:
|
|
106
|
+
- title: Implement login
|
|
107
|
+
status: pending
|
|
108
|
+
---
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Key Principles
|
|
112
|
+
|
|
113
|
+
- **tasks.md frontmatter is the single source of truth** — No separate database or state store
|
|
114
|
+
- **Copilot does implementation** — Autopilot only tracks state and runs tests
|
|
115
|
+
- **Test enforcement gates completion** — Epics cannot be marked complete until all tests pass
|
|
116
|
+
- **Completion notes are project memory** — Every epic must have completion notes
|
|
117
|
+
- **Keep it simple** — No alternate planning artifacts or duplicate SDD documents
|
|
118
|
+
|
|
119
|
+
## Documentation
|
|
120
|
+
|
|
121
|
+
- [Copilot Autopilot](docs/copilot-autopilot.md) — Architecture, workflow, frontmatter schema, epic lifecycle, commands
|
|
122
|
+
- [Copilot Hooks](docs/copilot-hooks.md) — Hook architecture, workflow, capabilities and limitations
|
|
123
|
+
- [Architecture](docs/architecture.md) — System architecture and design
|
|
124
|
+
- [User Guide](docs/user-guide.md) — Complete user documentation
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
MIT
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sdd_agent_pack": {
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"workflow": "sdd",
|
|
5
|
+
"required_documents": [
|
|
6
|
+
"AGENTS.md",
|
|
7
|
+
"constitution.md",
|
|
8
|
+
"plan.md",
|
|
9
|
+
"tasks.md"
|
|
10
|
+
],
|
|
11
|
+
"required_directories": [
|
|
12
|
+
"specs"
|
|
13
|
+
],
|
|
14
|
+
"completion_requirements": {
|
|
15
|
+
"tests_must_pass": true,
|
|
16
|
+
"completion_notes_required": true,
|
|
17
|
+
"tasks_md_must_be_updated": true
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# SDD Agent Pack — Workflow Documentation
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
SDD Agent Pack installs the Software Driven Development (SDD) workflow into your repository. It provides the instructions, skills, hooks, and templates that AI agents use to implement features systematically.
|
|
6
|
+
|
|
7
|
+
## How It Works
|
|
8
|
+
|
|
9
|
+
1. Define epics and tasks in `tasks.md`
|
|
10
|
+
2. Create design documents in `specs/`
|
|
11
|
+
3. Use an AI agent to implement epics following the SDD workflow
|
|
12
|
+
4. The agent reads SDD documents, implements code, creates tests, and verifies completion
|
|
13
|
+
|
|
14
|
+
## Key Files
|
|
15
|
+
|
|
16
|
+
| File | Purpose |
|
|
17
|
+
|------|---------|
|
|
18
|
+
| `AGENTS.md` | Agent instructions and workflow |
|
|
19
|
+
| `constitution.md` | Core principles and governance |
|
|
20
|
+
| `plan.md` | Implementation plan |
|
|
21
|
+
| `tasks.md` | Epic and task tracking |
|
|
22
|
+
| `specs/` | Design and architecture documents |
|
|
23
|
+
| `.sdd-agent-pack/` | Agent pack assets (skills, hooks, prompts) |
|
|
24
|
+
|
|
25
|
+
## Agent Workflow
|
|
26
|
+
|
|
27
|
+
When you ask an agent to implement epics:
|
|
28
|
+
|
|
29
|
+
1. The agent discovers all SDD documentation
|
|
30
|
+
2. Identifies the next incomplete epic
|
|
31
|
+
3. Reads the relevant specification
|
|
32
|
+
4. Implements the code
|
|
33
|
+
5. Creates and runs tests
|
|
34
|
+
6. Updates tasks.md with completion notes
|
|
35
|
+
7. Moves to the next epic
|
|
36
|
+
|
|
37
|
+
## OpenHands Integration
|
|
38
|
+
|
|
39
|
+
This project supports OpenHands via:
|
|
40
|
+
- **Repository customization**: Instructions in AGENTS.md and SDD documents
|
|
41
|
+
- **Hooks**: Quality enforcement in `.sdd-agent-pack/hooks/`
|
|
42
|
+
- **Skills**: Microagents in `.sdd-agent-pack/skills/`
|
|
43
|
+
|
|
44
|
+
## References
|
|
45
|
+
|
|
46
|
+
- [OpenHands Repository Customization](https://docs.openhands.dev/openhands/usage/customization/repository)
|
|
47
|
+
- [OpenHands Hooks](https://docs.openhands.dev/openhands/usage/customization/hooks)
|
|
48
|
+
- [OpenHands Microagents](https://docs.openhands.dev/usage/prompting/microagents-overview)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# SDD Agent Pack Hooks
|
|
2
|
+
|
|
3
|
+
These hooks provide quality enforcement for the SDD workflow in OpenHands.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
1. Create `.openhands/` in your repository root:
|
|
8
|
+
```bash
|
|
9
|
+
mkdir -p .openhands/hooks
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
2. Copy the hooks.json template:
|
|
13
|
+
```bash
|
|
14
|
+
cp .sdd-agent-pack/hooks/hooks.json .openhands/hooks.json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
3. Make hook scripts executable:
|
|
18
|
+
```bash
|
|
19
|
+
chmod +x .sdd-agent-pack/hooks/*.sh
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
4. Commit:
|
|
23
|
+
```bash
|
|
24
|
+
git add .openhands/hooks.json
|
|
25
|
+
git commit -m "Add OpenHands SDD quality hooks"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Available Hooks
|
|
29
|
+
|
|
30
|
+
| File | Type | Purpose |
|
|
31
|
+
|------|------|---------|
|
|
32
|
+
| `stop-hook.sh` | Stop | Prevents completion if tests fail or SDD criteria not met |
|
|
33
|
+
| `pre-implementation.sh` | Pre-implementation | Validates context before starting work |
|
|
34
|
+
|
|
35
|
+
## How Stop Hook Works
|
|
36
|
+
|
|
37
|
+
When OpenHands tries to finish a task:
|
|
38
|
+
1. Checks if `tasks.md` exists (SDD project detection)
|
|
39
|
+
2. Runs the project's test suite (npm test, pytest, cargo test, etc.)
|
|
40
|
+
3. If tests fail, returns `decision: deny` with the reason
|
|
41
|
+
4. The agent must fix the issues before it can finish
|
|
42
|
+
|
|
43
|
+
## Requirements
|
|
44
|
+
|
|
45
|
+
- OpenHands (Cloud, CLI, or local GUI)
|
|
46
|
+
- Hook scripts must be executable (`chmod +x`)
|
|
47
|
+
|
|
48
|
+
## Reference
|
|
49
|
+
|
|
50
|
+
- [OpenHands Hooks Documentation](https://docs.openhands.dev/openhands/usage/customization/hooks)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# OpenHands Stop Hook — SDD Quality Gate
|
|
3
|
+
#
|
|
4
|
+
# Installed by SDD Agent Pack. Prevents the agent from finishing if quality
|
|
5
|
+
# criteria are not met. This hook runs when OpenHands tries to finish a task.
|
|
6
|
+
#
|
|
7
|
+
# Exit 0 = allow completion
|
|
8
|
+
# Exit 2 = deny completion (with JSON reason on stdout)
|
|
9
|
+
#
|
|
10
|
+
# To activate, link from .openhands/hooks.json:
|
|
11
|
+
# ```json
|
|
12
|
+
# {
|
|
13
|
+
# "stop": [
|
|
14
|
+
# {
|
|
15
|
+
# "matcher": "*",
|
|
16
|
+
# "hooks": [
|
|
17
|
+
# { "command": ".sdd-agent-pack/hooks/stop-hook.sh", "timeout": 120 }
|
|
18
|
+
# ]
|
|
19
|
+
# }
|
|
20
|
+
# ]
|
|
21
|
+
# }
|
|
22
|
+
# ```
|
|
23
|
+
|
|
24
|
+
cd "${OPENHANDS_PROJECT_DIR:-$PWD}"
|
|
25
|
+
|
|
26
|
+
# 1. Check for tasks.md (SDD project detection)
|
|
27
|
+
if [ ! -f tasks.md ]; then
|
|
28
|
+
echo '{"decision": "allow", "reason": "No tasks.md found — SDD workflow not detected."}'
|
|
29
|
+
exit 0
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# 2. Run tests if test command is available
|
|
33
|
+
if [ -f package.json ]; then
|
|
34
|
+
if grep -q '"test"' package.json 2>/dev/null; then
|
|
35
|
+
if ! npm test 2>&1; then
|
|
36
|
+
echo '{"decision": "deny", "reason": "Tests failed. Fix all failures before marking complete."}'
|
|
37
|
+
exit 2
|
|
38
|
+
fi
|
|
39
|
+
fi
|
|
40
|
+
elif [ -f pytest.ini ] || grep -q 'pytest' pyproject.toml 2>/dev/null; then
|
|
41
|
+
if ! python -m pytest 2>&1; then
|
|
42
|
+
echo '{"decision": "deny", "reason": "Tests failed. Fix all failures before marking complete."}'
|
|
43
|
+
exit 2
|
|
44
|
+
fi
|
|
45
|
+
elif [ -f Cargo.toml ]; then
|
|
46
|
+
if ! cargo test 2>&1; then
|
|
47
|
+
echo '{"decision": "deny", "reason": "Tests failed. Fix all failures before marking complete."}'
|
|
48
|
+
exit 2
|
|
49
|
+
fi
|
|
50
|
+
elif [ -f Makefile ]; then
|
|
51
|
+
if grep -q "^test:" Makefile 2>/dev/null; then
|
|
52
|
+
if ! make test 2>&1; then
|
|
53
|
+
echo '{"decision": "deny", "reason": "Tests failed. Fix all failures before marking complete."}'
|
|
54
|
+
exit 2
|
|
55
|
+
fi
|
|
56
|
+
fi
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# All checks passed
|
|
60
|
+
exit 0
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# OpenHands Stop Hook — SDD Quality Gate
|
|
3
|
+
#
|
|
4
|
+
# Prevents the agent from finishing if quality criteria are not met.
|
|
5
|
+
# Install by adding to .openhands/hooks.json:
|
|
6
|
+
#
|
|
7
|
+
# {
|
|
8
|
+
# "stop": [
|
|
9
|
+
# {
|
|
10
|
+
# "matcher": "*",
|
|
11
|
+
# "hooks": [
|
|
12
|
+
# { "command": ".sdd-agent-pack/hooks/stop-hook.sh", "timeout": 120 }
|
|
13
|
+
# ]
|
|
14
|
+
# }
|
|
15
|
+
# ]
|
|
16
|
+
# }
|
|
17
|
+
|
|
18
|
+
cd "${OPENHANDS_PROJECT_DIR:-$PWD}"
|
|
19
|
+
|
|
20
|
+
# 1. Check for tasks.md
|
|
21
|
+
if [ ! -f tasks.md ]; then
|
|
22
|
+
echo '{"decision": "allow", "reason": "No tasks.md found — SDD workflow not detected."}'
|
|
23
|
+
exit 0
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# 2. Run tests if a test command is available
|
|
27
|
+
if grep -q '"test"' package.json 2>/dev/null; then
|
|
28
|
+
if ! npm test 2>&1; then
|
|
29
|
+
echo '{"decision": "deny", "reason": "Tests failed. Fix all test failures before marking complete."}'
|
|
30
|
+
exit 2
|
|
31
|
+
fi
|
|
32
|
+
elif [ -f pytest.ini ] || [ -f pyproject.toml ]; then
|
|
33
|
+
if ! python -m pytest 2>&1; then
|
|
34
|
+
echo '{"decision": "deny", "reason": "Tests failed. Fix all test failures before marking complete."}'
|
|
35
|
+
exit 2
|
|
36
|
+
fi
|
|
37
|
+
elif [ -f Cargo.toml ]; then
|
|
38
|
+
if ! cargo test 2>&1; then
|
|
39
|
+
echo '{"decision": "deny", "reason": "Tests failed. Fix all test failures before marking complete."}'
|
|
40
|
+
exit 2
|
|
41
|
+
fi
|
|
42
|
+
elif [ -f Makefile ]; then
|
|
43
|
+
if grep -q "^test:" Makefile 2>/dev/null; then
|
|
44
|
+
if ! make test 2>&1; then
|
|
45
|
+
echo '{"decision": "deny", "reason": "Tests failed. Fix all test failures before marking complete."}'
|
|
46
|
+
exit 2
|
|
47
|
+
fi
|
|
48
|
+
fi
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
# All checks passed
|
|
52
|
+
exit 0
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Implement the next incomplete epic from tasks.md using the SDD workflow.
|
|
2
|
+
|
|
3
|
+
Follow these steps:
|
|
4
|
+
1. Read all SDD documentation (AGENTS.md, constitution.md, plan.md, specs/, tasks.md)
|
|
5
|
+
2. Identify the first incomplete epic
|
|
6
|
+
3. Read the epic specification
|
|
7
|
+
4. Implement the code
|
|
8
|
+
5. Create tests
|
|
9
|
+
6. Run tests
|
|
10
|
+
7. Fix any failures
|
|
11
|
+
8. Update tasks.md with completion notes
|
|
12
|
+
9. Continue to the next epic
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-completion
|
|
3
|
+
description: Verify epic completion criteria are met
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Completion
|
|
7
|
+
|
|
8
|
+
This skill validates that an epic is fully complete before marking it done.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
Before an epic can be marked complete:
|
|
13
|
+
|
|
14
|
+
1. **Verify implementation** — All requirements from the spec are implemented.
|
|
15
|
+
|
|
16
|
+
2. **Check tests** — All tests pass (run the test suite).
|
|
17
|
+
|
|
18
|
+
3. **Verify completion notes** — The epic in tasks.md must have:
|
|
19
|
+
- `implemented` — List of features implemented
|
|
20
|
+
- `files_created` — New files added
|
|
21
|
+
- `files_modified` — Existing files changed
|
|
22
|
+
- `tests_added` — Test files created/updated
|
|
23
|
+
- `architectural_decisions` — Key decisions made
|
|
24
|
+
- `anti_regression_notes` — What to watch for in the future
|
|
25
|
+
- `future_context` — What the next epic needs to know
|
|
26
|
+
|
|
27
|
+
4. **Update tasks.md** — Mark the epic complete and add completion notes.
|
|
28
|
+
|
|
29
|
+
5. **Do not skip steps** — Incomplete epics cause technical debt.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-context
|
|
3
|
+
description: Discover and load SDD workflow context from the repository
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Context Discovery
|
|
7
|
+
|
|
8
|
+
This skill guides the agent to discover all relevant SDD documentation before starting work.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
When asked to implement SDD epics, first discover the full context:
|
|
13
|
+
|
|
14
|
+
1. **Find SDD documents** — Search the repository for:
|
|
15
|
+
- `AGENTS.md` — Agent instructions
|
|
16
|
+
- `constitution.md` — Core principles and governance
|
|
17
|
+
- `plan.md` — Implementation plan
|
|
18
|
+
- `tasks.md` — Epic and task tracking
|
|
19
|
+
- `specs/` directory — Design documents (filename varies)
|
|
20
|
+
- `.sdd-agent-pack/` — Agent pack assets
|
|
21
|
+
|
|
22
|
+
2. **Read all documents** — Do not skip any. Each contains critical context.
|
|
23
|
+
|
|
24
|
+
3. **Follow deep references** — SDD documents cross-reference each other. Follow those links.
|
|
25
|
+
|
|
26
|
+
4. **Build context** — Understand:
|
|
27
|
+
- What is being built
|
|
28
|
+
- Current epic state from tasks.md
|
|
29
|
+
- Architecture decisions from specs/
|
|
30
|
+
- Coding conventions
|
|
31
|
+
|
|
32
|
+
5. **Report findings** — Summarize the context before implementation.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-epic-workflow
|
|
3
|
+
description: Full epic implementation workflow from context to completion
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Epic Workflow
|
|
7
|
+
|
|
8
|
+
This skill orchestrates the complete epic lifecycle.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
When asked "Implement all remaining epics in tasks.md using the SDD Agent Pack workflow":
|
|
13
|
+
|
|
14
|
+
1. **Read all SDD documentation** — AGENTS.md, constitution.md, plan.md, tasks.md, specs/.
|
|
15
|
+
|
|
16
|
+
2. **Identify the next incomplete epic** — The first epic in tasks.md with status `pending`.
|
|
17
|
+
|
|
18
|
+
3. **Read all referenced documentation** — Follow deep references between documents.
|
|
19
|
+
|
|
20
|
+
4. **Implement only that epic** — Focus on one epic at a time.
|
|
21
|
+
|
|
22
|
+
5. **Create missing tests** — Every implementation must include tests.
|
|
23
|
+
|
|
24
|
+
6. **Run tests** — Execute the project test suite.
|
|
25
|
+
|
|
26
|
+
7. **Fix failures** — Iterate until all tests pass.
|
|
27
|
+
|
|
28
|
+
8. **Update tasks.md** — Mark the epic complete with completion notes.
|
|
29
|
+
|
|
30
|
+
9. **Add anti-regression notes** — Document what to watch for.
|
|
31
|
+
|
|
32
|
+
10. **Move to the next incomplete epic** — Continue until all epics are complete.
|
|
33
|
+
|
|
34
|
+
**Do not stop after one epic.** Continue through all epics.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-implementation
|
|
3
|
+
description: Implement features following SDD specifications
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Implementation
|
|
7
|
+
|
|
8
|
+
This skill guides feature implementation following SDD specifications.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
When implementing an epic from tasks.md:
|
|
13
|
+
|
|
14
|
+
1. **Read the epic specification** — Find the matching section in specs/ or the design document.
|
|
15
|
+
|
|
16
|
+
2. **Understand requirements** — Confirm what the epic asks for before writing code.
|
|
17
|
+
|
|
18
|
+
3. **Follow architecture** — Adhere to the architecture decisions in SDD documents.
|
|
19
|
+
|
|
20
|
+
4. **Implement incrementally**:
|
|
21
|
+
- Create necessary files and directories
|
|
22
|
+
- Follow existing code patterns and conventions
|
|
23
|
+
- Keep changes focused on the current epic
|
|
24
|
+
- Do not implement future epics
|
|
25
|
+
|
|
26
|
+
5. **Document as you go** — Add comments for non-obvious decisions.
|
|
27
|
+
|
|
28
|
+
6. **Do not modify tasks.md** — The agent or user updates tasks.md separately.
|
|
29
|
+
|
|
30
|
+
7. **Create tests** — Every implementation must include tests (see sdd-testing skill).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdd-testing
|
|
3
|
+
description: Create and run tests for implemented features
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDD Testing
|
|
7
|
+
|
|
8
|
+
This skill guides test creation and validation for SDD implementations.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
After implementing an epic:
|
|
13
|
+
|
|
14
|
+
1. **Create tests** — Every implementation must include tests:
|
|
15
|
+
- Unit tests for individual functions/classes
|
|
16
|
+
- Integration tests for feature workflows
|
|
17
|
+
- Edge cases and error handling
|
|
18
|
+
|
|
19
|
+
2. **Follow project test conventions** — Use the project's existing test framework and patterns.
|
|
20
|
+
|
|
21
|
+
3. **Run tests** — Execute the test suite:
|
|
22
|
+
```bash
|
|
23
|
+
npm test
|
|
24
|
+
# or
|
|
25
|
+
pytest
|
|
26
|
+
# or the project's test command
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
4. **Fix failures** — If tests fail:
|
|
30
|
+
- Diagnose the root cause
|
|
31
|
+
- Fix the code (not the tests)
|
|
32
|
+
- Re-run until all pass
|
|
33
|
+
|
|
34
|
+
5. **Do not skip tests** — Tests must pass before an epic can be marked complete.
|
|
35
|
+
|
|
36
|
+
6. **Do not modify existing passing tests** — If existing tests break, fix your implementation.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Constitution
|
|
2
|
+
|
|
3
|
+
Core principles and governance for this project.
|
|
4
|
+
|
|
5
|
+
## Principles
|
|
6
|
+
|
|
7
|
+
1. **Documentation first** — All significant decisions are documented in SDD specs.
|
|
8
|
+
2. **Tests gate completion** — Features are not complete until tests pass.
|
|
9
|
+
3. **Incremental delivery** — Work is delivered in focused epics.
|
|
10
|
+
4. **Completion notes** — Every epic documents what was built and why.
|
|
11
|
+
|
|
12
|
+
## Governance
|
|
13
|
+
|
|
14
|
+
- specs/ contains design and architecture documents
|
|
15
|
+
- tasks.md tracks epic state and progress
|
|
16
|
+
- AGENTS.md defines agent behavior
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Tasks
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
SDD tasks.md — The single source of truth for epic progression.
|
|
5
|
+
|
|
6
|
+
Frontmatter tracks epic state. The AI agent reads and updates this file.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Epic EPIC-001 — [Epic Title]
|
|
12
|
+
|
|
13
|
+
### Description
|
|
14
|
+
Brief description of what this epic achieves.
|
|
15
|
+
|
|
16
|
+
### Requirements
|
|
17
|
+
- [ ] Requirement 1
|
|
18
|
+
- [ ] Requirement 2
|
|
19
|
+
- [ ] Requirement 3
|
|
20
|
+
|
|
21
|
+
### Tasks
|
|
22
|
+
- [ ] Task 1
|
|
23
|
+
- [ ] Task 2
|
|
24
|
+
- [ ] Task 3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,aAAa,SA8CtB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* doctor command — Validate SDD Agent Pack installation and environment.
|
|
3
|
+
*/
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
import { detectRepoRoot, isGitRepository, detectExistingInstallation } from '../utils/repo.js';
|
|
6
|
+
import { validateInstallation } from '../utils/installer.js';
|
|
7
|
+
import { term } from '../utils/console.js';
|
|
8
|
+
export const doctorCommand = new Command('doctor')
|
|
9
|
+
.description('Validate SDD Agent Pack installation and environment')
|
|
10
|
+
.action(async () => {
|
|
11
|
+
term.log('\n━━━ SDD Agent Pack Doctor ━━━\n');
|
|
12
|
+
let allGood = true;
|
|
13
|
+
// Check Git
|
|
14
|
+
const repoRoot = detectRepoRoot();
|
|
15
|
+
if (!repoRoot) {
|
|
16
|
+
term.error('✗ Not inside a Git repository');
|
|
17
|
+
allGood = false;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
term.success('✓ Inside a Git repository');
|
|
21
|
+
}
|
|
22
|
+
if (repoRoot && !isGitRepository(repoRoot)) {
|
|
23
|
+
term.error('✗ Not a valid Git repository');
|
|
24
|
+
allGood = false;
|
|
25
|
+
}
|
|
26
|
+
// Check installation
|
|
27
|
+
if (repoRoot) {
|
|
28
|
+
const installed = detectExistingInstallation(repoRoot);
|
|
29
|
+
if (!installed) {
|
|
30
|
+
term.warn('⚠ SDD Agent Pack is not installed');
|
|
31
|
+
term.log(' Run "sdd-agent-pack init" to install');
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
term.success('✓ SDD Agent Pack is installed');
|
|
35
|
+
const valid = await validateInstallation(repoRoot);
|
|
36
|
+
if (valid) {
|
|
37
|
+
term.success('✓ Installation structure is valid');
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
term.error('✗ Installation structure is incomplete');
|
|
41
|
+
allGood = false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
term.log('');
|
|
46
|
+
if (allGood) {
|
|
47
|
+
term.success('✓ All checks passed');
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
term.error('✗ Some checks failed');
|
|
51
|
+
}
|
|
52
|
+
term.log('');
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=doctor.js.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