azclaude-copilot 0.4.12 → 0.4.13
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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +5 -5
- package/README.md +311 -50
- package/bin/cli.js +2 -2
- package/package.json +1 -1
- package/templates/CLAUDE.md +5 -1
- package/templates/agents/constitution-guard.md +121 -0
- package/templates/agents/milestone-builder.md +10 -5
- package/templates/agents/orchestrator.md +23 -0
- package/templates/agents/spec-reviewer.md +123 -0
- package/templates/capabilities/manifest.md +15 -0
- package/templates/commands/add.md +23 -0
- package/templates/commands/analyze.md +181 -0
- package/templates/commands/audit.md +12 -0
- package/templates/commands/blueprint.md +82 -2
- package/templates/commands/clarify.md +160 -0
- package/templates/commands/constitute.md +190 -0
- package/templates/commands/copilot.md +34 -12
- package/templates/commands/dream.md +32 -1
- package/templates/commands/evolve.md +22 -0
- package/templates/commands/fix.md +12 -0
- package/templates/commands/issues.md +168 -0
- package/templates/commands/refactor.md +12 -0
- package/templates/commands/setup.md +41 -0
- package/templates/commands/ship.md +19 -1
- package/templates/commands/spec.md +196 -0
- package/templates/commands/tasks.md +151 -0
- package/templates/hooks/post-tool-use.js +1 -1
- package/templates/skills/architecture-advisor/SKILL.md +15 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clarify
|
|
3
|
+
description: >
|
|
4
|
+
Resolve ambiguity in a feature request, spec, milestone, or task BEFORE any planning or coding.
|
|
5
|
+
Triggers on: "clarify this", "what do you mean by", "I'm not sure what to build", "vague spec",
|
|
6
|
+
"clarify the requirements", "before we plan", "let's get clear on", "help me define",
|
|
7
|
+
"what exactly should it do", "I need to think through", "unclear requirements",
|
|
8
|
+
"what are the acceptance criteria", "define the scope", "what's in scope", "what's out of scope",
|
|
9
|
+
"who is this for", "what does done look like", "edge cases for", "what should happen when",
|
|
10
|
+
"clarify before building", "let's clarify before we start".
|
|
11
|
+
NOT triggered by: "add X", "implement X", "build X" alone — those go to /add directly.
|
|
12
|
+
argument-hint: "[feature description, milestone text, or spec to clarify]"
|
|
13
|
+
disable-model-invocation: true
|
|
14
|
+
allowed-tools: Read, Bash, Glob, Grep
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# /clarify — Resolve Before Planning
|
|
18
|
+
|
|
19
|
+
$ARGUMENTS
|
|
20
|
+
|
|
21
|
+
**EnterPlanMode** — read and think only. No file modifications.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Purpose
|
|
26
|
+
|
|
27
|
+
Clarification runs BEFORE /blueprint and BEFORE /spec.
|
|
28
|
+
A vague input into /blueprint produces a vague plan. A vague plan produces wrong code.
|
|
29
|
+
This command produces a `.claude/specs/{slug}.md` with unambiguous, testable requirements.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Step 1: Parse Input
|
|
34
|
+
|
|
35
|
+
If $ARGUMENTS is a milestone from plan.md → read `.claude/plan.md` to find it.
|
|
36
|
+
If $ARGUMENTS is a feature description → use it directly.
|
|
37
|
+
If $ARGUMENTS is blank → use **AskUserQuestion**: "What should I help clarify?"
|
|
38
|
+
|
|
39
|
+
Extract from the input:
|
|
40
|
+
- The goal (what problem this solves, for whom)
|
|
41
|
+
- Anything already specified (concrete details)
|
|
42
|
+
- Anything ambiguous or missing
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Step 2: Project Context
|
|
47
|
+
|
|
48
|
+
Read existing context to ask informed questions:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Stack and domain
|
|
52
|
+
grep -i "domain:\|stack:\|scale:" CLAUDE.md 2>/dev/null | head -5
|
|
53
|
+
|
|
54
|
+
# Existing patterns similar to this feature
|
|
55
|
+
grep -ri "$ARGUMENTS" --include="*.ts" --include="*.py" --include="*.js" -l 2>/dev/null | head -5
|
|
56
|
+
|
|
57
|
+
# Current constitution (if exists)
|
|
58
|
+
cat .claude/constitution.md 2>/dev/null | head -20
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Step 3: Structured Interrogation
|
|
64
|
+
|
|
65
|
+
Ask ONLY the questions that are genuinely unresolved — maximum 5 questions at once.
|
|
66
|
+
|
|
67
|
+
Use **AskUserQuestion** with these categories (skip any already answered in $ARGUMENTS):
|
|
68
|
+
|
|
69
|
+
**Goal**
|
|
70
|
+
- What problem does this solve? Who experiences it?
|
|
71
|
+
- What does success look like from the user's perspective?
|
|
72
|
+
|
|
73
|
+
**Scope boundary**
|
|
74
|
+
- What is explicitly OUT of scope for this version?
|
|
75
|
+
- What's the minimal version that still solves the problem?
|
|
76
|
+
|
|
77
|
+
**Acceptance criteria**
|
|
78
|
+
- How will we know it's done? (list 2-3 concrete, testable criteria)
|
|
79
|
+
- What does a passing state look like vs. a failing state?
|
|
80
|
+
|
|
81
|
+
**Failure modes**
|
|
82
|
+
- What's the worst thing that could go wrong?
|
|
83
|
+
- What should happen when X fails? (fill in X from the feature)
|
|
84
|
+
|
|
85
|
+
**Constraints**
|
|
86
|
+
- Any performance, security, or backwards-compatibility requirements?
|
|
87
|
+
- Any existing code this must integrate with?
|
|
88
|
+
|
|
89
|
+
Do NOT ask about implementation details — only about behavior and requirements.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Step 4: Write the Clarified Spec
|
|
94
|
+
|
|
95
|
+
After answers received, generate a slug from $ARGUMENTS:
|
|
96
|
+
```bash
|
|
97
|
+
SLUG=$(echo "$ARGUMENTS" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9-' | cut -c1-40)
|
|
98
|
+
mkdir -p .claude/specs
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Write `.claude/specs/${SLUG}.md`:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
# Spec: {feature title}
|
|
105
|
+
clarified: {today's date}
|
|
106
|
+
status: ready-for-blueprint
|
|
107
|
+
|
|
108
|
+
## Goal
|
|
109
|
+
{who uses this and what problem it solves — 1-2 sentences}
|
|
110
|
+
|
|
111
|
+
## User Stories
|
|
112
|
+
- As a {user type}, I want to {action} so that {outcome}
|
|
113
|
+
- As a {user type}, I want to {action} so that {outcome}
|
|
114
|
+
|
|
115
|
+
## Acceptance Criteria
|
|
116
|
+
1. {concrete, testable — "given X, when Y, then Z" format}
|
|
117
|
+
2. {concrete, testable}
|
|
118
|
+
3. {concrete, testable}
|
|
119
|
+
|
|
120
|
+
## Out of Scope
|
|
121
|
+
- {explicitly excluded item}
|
|
122
|
+
- {explicitly excluded item}
|
|
123
|
+
|
|
124
|
+
## Failure Modes
|
|
125
|
+
- {what happens when X fails — expected behavior}
|
|
126
|
+
- {what happens when Y fails — expected behavior}
|
|
127
|
+
|
|
128
|
+
## Constraints
|
|
129
|
+
- {performance / security / compatibility requirement, or "none"}
|
|
130
|
+
|
|
131
|
+
## Open Questions
|
|
132
|
+
- {any remaining unknowns — low priority, answer before implementation if possible}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Step 5: Next Step
|
|
138
|
+
|
|
139
|
+
**ExitPlanMode**
|
|
140
|
+
|
|
141
|
+
Output:
|
|
142
|
+
```
|
|
143
|
+
Spec written: .claude/specs/{slug}.md
|
|
144
|
+
Acceptance criteria: N
|
|
145
|
+
Open questions: N (or "none")
|
|
146
|
+
|
|
147
|
+
Next: /blueprint .claude/specs/{slug}.md
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
If open questions remain → ask user to resolve them before /blueprint.
|
|
151
|
+
If no open questions → declare spec ready.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Completion Rule
|
|
156
|
+
|
|
157
|
+
Show: the spec file path.
|
|
158
|
+
Show: acceptance criteria count.
|
|
159
|
+
Show: any open questions.
|
|
160
|
+
Do not write any code during /clarify — ever.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: constitute
|
|
3
|
+
description: >
|
|
4
|
+
Write or update the project constitution — explicit ground rules that govern all AI behavior.
|
|
5
|
+
Distinct from CLAUDE.md (operational config). The constitution is human-authored governance.
|
|
6
|
+
Triggers on: "write a constitution", "set ground rules", "define project rules",
|
|
7
|
+
"what are the non-negotiables", "project principles", "project constraints",
|
|
8
|
+
"what should Claude never do", "define the definition of done", "coding standards",
|
|
9
|
+
"project-level rules", "forbidden patterns", "required patterns",
|
|
10
|
+
"project constitution", "set constraints", "governance rules",
|
|
11
|
+
"architectural principles", "project norms", "what are our standards",
|
|
12
|
+
"define our conventions", "constitution for this project", "write the rules".
|
|
13
|
+
argument-hint: "[blank to create interactively, or path to existing constitution to update]"
|
|
14
|
+
disable-model-invocation: true
|
|
15
|
+
allowed-tools: Read, Write, Bash, Glob, Grep
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# /constitute — Write the Project Constitution
|
|
19
|
+
|
|
20
|
+
$ARGUMENTS
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Purpose
|
|
25
|
+
|
|
26
|
+
The constitution is the highest-priority governance document in a project.
|
|
27
|
+
It is written by the **human**, not generated from code.
|
|
28
|
+
Every /add, /fix, /blueprint, and /copilot milestone checks it before implementing.
|
|
29
|
+
|
|
30
|
+
**Hierarchy:**
|
|
31
|
+
```
|
|
32
|
+
constitution.md ← human governance (this command)
|
|
33
|
+
CLAUDE.md ← operational config (/setup)
|
|
34
|
+
plan.md ← current work (/blueprint)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 1: Check Existing State
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Check if constitution already exists
|
|
43
|
+
cat .claude/constitution.md 2>/dev/null | head -40
|
|
44
|
+
|
|
45
|
+
# Read CLAUDE.md for current project identity
|
|
46
|
+
grep -i "domain:\|stack:\|scale:\|priority" CLAUDE.md 2>/dev/null | head -10
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If constitution exists → present it and ask: "Update existing, or rewrite from scratch?"
|
|
50
|
+
If creating new → proceed to Step 2.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Step 2: Guided Constitution Interview
|
|
55
|
+
|
|
56
|
+
Use **AskUserQuestion** — one group at a time. Do NOT ask all at once.
|
|
57
|
+
|
|
58
|
+
**Group 1: Non-negotiables**
|
|
59
|
+
- What must NEVER be done in this codebase? (e.g., no direct DB writes from controllers, no hardcoded credentials, no breaking API changes without versioning)
|
|
60
|
+
- What external libraries / frameworks are forbidden?
|
|
61
|
+
|
|
62
|
+
**Group 2: Required patterns**
|
|
63
|
+
- What patterns MUST always be used? (e.g., all state changes through events, all errors logged before thrown, all public APIs documented)
|
|
64
|
+
- What conventions are load-bearing? (change them and everything breaks)
|
|
65
|
+
|
|
66
|
+
**Group 3: Definition of Done**
|
|
67
|
+
- What does "done" mean for this project? (tests pass? PR review? deployed? docs updated?)
|
|
68
|
+
- What quality gates must every change pass?
|
|
69
|
+
|
|
70
|
+
**Group 4: Architectural commitments**
|
|
71
|
+
- What architectural decisions are already settled and not open for debate? (e.g., "we use PostgreSQL, not MongoDB", "all services are REST, not GraphQL")
|
|
72
|
+
- What is the source of truth for data? For auth? For state?
|
|
73
|
+
|
|
74
|
+
**Group 5: Scope and values**
|
|
75
|
+
- Who are the users and what do they value most? (performance? simplicity? reliability?)
|
|
76
|
+
- What should be optimized for when priorities conflict?
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Step 3: Write the Constitution
|
|
81
|
+
|
|
82
|
+
Write `.claude/constitution.md`:
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
# Project Constitution
|
|
86
|
+
project: {project name from CLAUDE.md}
|
|
87
|
+
created: {today's date}
|
|
88
|
+
last_updated: {today's date}
|
|
89
|
+
version: 1
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Non-Negotiables (Never Do This)
|
|
94
|
+
|
|
95
|
+
These rules are inviolable. No exception, no matter the deadline or pressure.
|
|
96
|
+
|
|
97
|
+
- {rule — specific and verifiable}
|
|
98
|
+
- {rule — specific and verifiable}
|
|
99
|
+
- {rule — specific and verifiable}
|
|
100
|
+
|
|
101
|
+
## Required Patterns (Always Do This)
|
|
102
|
+
|
|
103
|
+
These patterns must be used in all new code. Deviations require explicit approval.
|
|
104
|
+
|
|
105
|
+
- {pattern — specific and verifiable}
|
|
106
|
+
- {pattern — specific and verifiable}
|
|
107
|
+
|
|
108
|
+
## Forbidden Dependencies
|
|
109
|
+
|
|
110
|
+
Libraries, frameworks, or services that must never be introduced:
|
|
111
|
+
|
|
112
|
+
- {dependency — with reason}
|
|
113
|
+
|
|
114
|
+
## Architectural Commitments
|
|
115
|
+
|
|
116
|
+
Decisions already made. Not open for debate without a /debate session.
|
|
117
|
+
|
|
118
|
+
| Concern | Decision | Reason |
|
|
119
|
+
|---------|----------|--------|
|
|
120
|
+
| Database | {choice} | {reason} |
|
|
121
|
+
| Auth | {choice} | {reason} |
|
|
122
|
+
| API style | {choice} | {reason} |
|
|
123
|
+
| {other} | {choice} | {reason} |
|
|
124
|
+
|
|
125
|
+
## Definition of Done
|
|
126
|
+
|
|
127
|
+
A change is only "done" when ALL of the following are true:
|
|
128
|
+
|
|
129
|
+
- [ ] {criterion — e.g., "tests pass (npm test exits 0)"}
|
|
130
|
+
- [ ] {criterion — e.g., "PR review approved"}
|
|
131
|
+
- [ ] {criterion — e.g., "no new lint warnings"}
|
|
132
|
+
- [ ] {criterion — e.g., "relevant docs updated"}
|
|
133
|
+
|
|
134
|
+
## Priority Hierarchy
|
|
135
|
+
|
|
136
|
+
When requirements conflict, resolve in this order:
|
|
137
|
+
|
|
138
|
+
1. {highest priority — e.g., "Data integrity over performance"}
|
|
139
|
+
2. {second priority}
|
|
140
|
+
3. {third priority}
|
|
141
|
+
|
|
142
|
+
## User Values
|
|
143
|
+
|
|
144
|
+
Users of this project value (in order): {e.g., "reliability > speed > features"}
|
|
145
|
+
Optimise in this order when trade-offs arise.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
_This constitution governs all AI actions in this project.
|
|
150
|
+
Any command (/add, /fix, /copilot) must check this file before implementing._
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Step 4: Wire It Into the Workflow
|
|
156
|
+
|
|
157
|
+
After writing, update CLAUDE.md to reference the constitution:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
grep -q "constitution" CLAUDE.md && echo "already referenced" || echo "needs wiring"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
If not referenced → add to CLAUDE.md Rules section:
|
|
164
|
+
```
|
|
165
|
+
## Rules
|
|
166
|
+
...
|
|
167
|
+
N. **Constitution** — Read `.claude/constitution.md` before any implementation. Non-negotiables override all other instructions.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Completion Rule
|
|
173
|
+
|
|
174
|
+
Show:
|
|
175
|
+
1. Constitution file path: `.claude/constitution.md`
|
|
176
|
+
2. Count of non-negotiables
|
|
177
|
+
3. Count of required patterns
|
|
178
|
+
4. Definition of done criteria count
|
|
179
|
+
5. Whether CLAUDE.md was updated
|
|
180
|
+
|
|
181
|
+
Output:
|
|
182
|
+
```
|
|
183
|
+
Constitution written: .claude/constitution.md
|
|
184
|
+
Non-negotiables: N rules
|
|
185
|
+
Required patterns: N rules
|
|
186
|
+
Definition of done: N criteria
|
|
187
|
+
CLAUDE.md: updated / already referenced
|
|
188
|
+
|
|
189
|
+
Every /add, /fix, and /copilot milestone will now check this file.
|
|
190
|
+
```
|
|
@@ -49,17 +49,33 @@ Read these files (skip any that don't exist):
|
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
52
|
+
## Step 1b: Governance Check
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
[ -f .claude/constitution.md ] && echo "constitution=found" || echo "constitution=missing"
|
|
56
|
+
ls .claude/specs/*.md 2>/dev/null | head -5
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If constitution missing → note in goals.md: "No constitution — run /constitute to define project rules"
|
|
60
|
+
(Do NOT block execution — constitution is recommended, not required)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
52
64
|
## Step 2: Decide What To Do
|
|
53
65
|
|
|
54
66
|
Follow this decision tree in order:
|
|
55
67
|
|
|
56
68
|
1. **No CLAUDE.md filled?** → Run `/setup` with the intent from copilot-intent.md
|
|
57
|
-
2. **No plan.md?** → Run `/blueprint` to
|
|
58
|
-
3. **
|
|
59
|
-
4. **
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
2. **No plan.md but specs exist?** → Run `/blueprint .claude/specs/{latest-spec}` to derive plan from spec
|
|
70
|
+
3. **No plan.md, no specs?** → Run `/blueprint` to generate a milestone plan from intent
|
|
71
|
+
4. **Plan has incomplete milestones?** → Find the next one (respecting dependencies):
|
|
72
|
+
- If `constitution.md` exists → spawn `constitution-guard` agent with milestone details before implementing
|
|
73
|
+
- If constitution-guard returns VIOLATION → log to `blockers.md`, skip this milestone, continue to next
|
|
74
|
+
- If APPROVED (or no constitution) → implement the milestone
|
|
75
|
+
5. **3 milestones done since last /evolve?** → Run `/evolve` first, then continue
|
|
76
|
+
6. **All milestones done?** → Run `/analyze` then `/audit` on the full project
|
|
77
|
+
7. **Review passes?** → Run `/ship` and deploy
|
|
78
|
+
8. **Deploy succeeds?** → Write `COPILOT_COMPLETE` to goals.md, generate copilot-report.md
|
|
63
79
|
|
|
64
80
|
---
|
|
65
81
|
|
|
@@ -92,18 +108,24 @@ For each milestone in plan.md:
|
|
|
92
108
|
After every 3 completed milestones:
|
|
93
109
|
1. Run `/reflexes analyze` — detect patterns from tool-use observations, create/update reflexes
|
|
94
110
|
2. Run `/evolve` — scans git history for patterns, creates agents if evidence found
|
|
95
|
-
3.
|
|
96
|
-
|
|
97
|
-
|
|
111
|
+
3. Run `/analyze` — check for GHOST milestones (marked done but not implemented) and spec→plan drift
|
|
112
|
+
- If GHOST milestones found → set their status back to `pending` in plan.md, add back to queue
|
|
113
|
+
- If spec drift found → log gap to `.claude/memory/blockers.md` as a fix milestone
|
|
114
|
+
4. Check if CLAUDE.md conventions need updating
|
|
115
|
+
5. Re-read plan.md — re-evaluate remaining milestone priorities
|
|
116
|
+
6. If a blocked milestone can now be unblocked (new agents/context available) → retry it
|
|
98
117
|
|
|
99
118
|
---
|
|
100
119
|
|
|
101
120
|
## Step 5: Final Review
|
|
102
121
|
|
|
103
122
|
When all milestones show status `done` (or `blocked` with no unblock path):
|
|
104
|
-
1. Run `/
|
|
105
|
-
|
|
106
|
-
|
|
123
|
+
1. Run `/analyze` — verify all done milestones are actually implemented (no GHOSTs)
|
|
124
|
+
- If GHOST milestones found → re-open them, add as fix milestones, continue building
|
|
125
|
+
- If /analyze shows consistency ≥ 90% → proceed
|
|
126
|
+
2. Run `/audit` on the full project against copilot-intent.md
|
|
127
|
+
3. If review finds gaps → create fix milestones, add to plan.md, continue building
|
|
128
|
+
4. If review passes → proceed to ship
|
|
107
129
|
|
|
108
130
|
---
|
|
109
131
|
|
|
@@ -126,12 +126,43 @@ All ✓ required before printing "project ready."
|
|
|
126
126
|
|
|
127
127
|
---
|
|
128
128
|
|
|
129
|
+
## Phase 5: Spec-Driven Readiness
|
|
130
|
+
|
|
131
|
+
After quality gate passes, check and suggest the spec-driven workflow:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
[ -f .claude/constitution.md ] && echo "constitution=found" || echo "constitution=missing"
|
|
135
|
+
ls .claude/specs/*.md 2>/dev/null | head -3
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Always output this next-steps block:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
─── Spec-Driven Workflow: Next Steps ────────────────────
|
|
142
|
+
1. /constitute — define project ground rules (non-negotiables, required patterns,
|
|
143
|
+
definition of done). Copilot checks this before every milestone.
|
|
144
|
+
|
|
145
|
+
2. /spec [feature] — write a structured spec for your first feature.
|
|
146
|
+
Produces: user stories + acceptance criteria + out-of-scope.
|
|
147
|
+
Feeds directly into /blueprint for a better plan.
|
|
148
|
+
|
|
149
|
+
3. /clarify [spec] — resolve any open questions in the spec before planning.
|
|
150
|
+
|
|
151
|
+
4. /blueprint [spec] — derive a milestone plan from the spec.
|
|
152
|
+
spec-reviewer validates quality before planning starts.
|
|
153
|
+
|
|
154
|
+
5. /copilot — autonomous execution: spec → plan → build → test → ship.
|
|
155
|
+
─────────────────────────────────────────────────────────
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
129
160
|
## Completion Rule
|
|
130
161
|
|
|
131
162
|
Show:
|
|
132
163
|
1. The created `CLAUDE.md` (full content)
|
|
133
164
|
2. The created `goals.md` (full content)
|
|
134
165
|
3. The level checklist (what was built)
|
|
135
|
-
4.
|
|
166
|
+
4. The spec-driven next steps block (always — even for existing projects)
|
|
136
167
|
|
|
137
168
|
Do not say "project ready" without showing these four outputs.
|
|
@@ -225,6 +225,28 @@ This closes the loop: /evolve creates capability → orchestrator immediately re
|
|
|
225
225
|
|
|
226
226
|
---
|
|
227
227
|
|
|
228
|
+
## Step 7f: Spec and Plan Drift Analysis
|
|
229
|
+
|
|
230
|
+
After generating/updating skills and agents, check for documentation drift:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
ls .claude/plan.md .claude/specs/*.md 2>/dev/null
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
If plan.md exists → run `/analyze plan`:
|
|
237
|
+
- Identifies GHOST milestones (marked done but files missing)
|
|
238
|
+
- Surfaces dependency violations
|
|
239
|
+
|
|
240
|
+
Append drift findings to `ops/evolution-log.md`:
|
|
241
|
+
```
|
|
242
|
+
| {date} | DRIFT | {N ghost milestones} | {N unplanned capabilities} | {1-line summary} |
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
If GHOST milestones found → set their status back to `pending` in plan.md.
|
|
246
|
+
This closes a common drift loop: code gets deleted or renamed, plan.md still says done.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
228
250
|
## Step 8: Promote GENERAL Skills
|
|
229
251
|
|
|
230
252
|
For any fix tagged GENERAL in EVALUATE:
|
|
@@ -14,6 +14,18 @@ Load: shared/tdd.md + shared/completion-rule.md before starting.
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
## Pre-Flight: Constitution Check
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
[ -f .claude/constitution.md ] && echo "constitution=found" || echo "no constitution"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If found: read `## Non-Negotiables` before fixing.
|
|
24
|
+
The fix must not violate a non-negotiable — a "fix" that breaks a project rule is not a fix.
|
|
25
|
+
Flag any conflict explicitly before proceeding to Phase 1.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
17
29
|
## Pre-Flight Analysis (intelligent-dispatch)
|
|
18
30
|
|
|
19
31
|
Load `shared/intelligent-dispatch.md`.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: issues
|
|
3
|
+
description: >
|
|
4
|
+
Convert plan.md milestones to GitHub Issues, making copilot progress visible to the whole team.
|
|
5
|
+
Triggers on: "create issues", "push to GitHub issues", "create GitHub issues",
|
|
6
|
+
"open issues from plan", "sync to issues", "milestones to issues",
|
|
7
|
+
"make issues from plan", "track in GitHub", "create tickets", "push plan to issues",
|
|
8
|
+
"open tickets", "create GitHub tickets", "sync plan with issues",
|
|
9
|
+
"open issues for each milestone", "team visibility", "issue tracker",
|
|
10
|
+
"track progress in GitHub", "post to issues", "push milestones to GitHub",
|
|
11
|
+
"issues from milestones", "create an issue for each task".
|
|
12
|
+
Requires: gh CLI authenticated. Reads: .claude/plan.md.
|
|
13
|
+
argument-hint: "[blank for all pending milestones, or 'M{N}' for a specific milestone]"
|
|
14
|
+
disable-model-invocation: true
|
|
15
|
+
allowed-tools: Read, Bash, Glob, Grep
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# /issues — Convert Plan to GitHub Issues
|
|
19
|
+
|
|
20
|
+
$ARGUMENTS
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Purpose
|
|
25
|
+
|
|
26
|
+
After /blueprint produces plan.md, this command pushes each pending milestone
|
|
27
|
+
to GitHub as an issue — giving the team visibility into what copilot is building,
|
|
28
|
+
and creating a traceable link between plan and code.
|
|
29
|
+
|
|
30
|
+
When a milestone completes in /copilot, close the corresponding issue with the commit SHA.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Step 1: Pre-Flight Checks
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Verify gh CLI is available and authenticated
|
|
38
|
+
gh auth status 2>&1 | head -3
|
|
39
|
+
|
|
40
|
+
# Verify we're in a git repo with a remote
|
|
41
|
+
git remote get-url origin 2>/dev/null
|
|
42
|
+
|
|
43
|
+
# Verify plan.md exists
|
|
44
|
+
ls .claude/plan.md 2>/dev/null && echo "plan found" || echo "no plan — run /blueprint first"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If `gh` not found → output:
|
|
48
|
+
```
|
|
49
|
+
gh CLI not found. Install with: https://cli.github.com/
|
|
50
|
+
Then authenticate: gh auth login
|
|
51
|
+
```
|
|
52
|
+
Stop.
|
|
53
|
+
|
|
54
|
+
If no plan.md → output:
|
|
55
|
+
```
|
|
56
|
+
No plan.md found. Run /blueprint first to create a structured plan.
|
|
57
|
+
```
|
|
58
|
+
Stop.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Step 2: Extract Milestones
|
|
63
|
+
|
|
64
|
+
Read `.claude/plan.md`. Parse each milestone:
|
|
65
|
+
- ID (M1, M2, …)
|
|
66
|
+
- Title
|
|
67
|
+
- Status (`pending`, `in-progress`, `done`, `blocked`)
|
|
68
|
+
- Description / files / commit fields
|
|
69
|
+
- `Depends:` field
|
|
70
|
+
|
|
71
|
+
If $ARGUMENTS = `M{N}` → process only that milestone.
|
|
72
|
+
If $ARGUMENTS = blank → process all `pending` and `in-progress` milestones.
|
|
73
|
+
Skip `done` milestones (already shipped).
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Step 3: Check for Existing Issues
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Check if issues already exist for this plan
|
|
81
|
+
gh issue list --label "azclaude" --limit 50 --json number,title 2>/dev/null
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
For each milestone, check if an issue with the same title already exists.
|
|
85
|
+
If found → skip creation (do not duplicate), note the existing issue number.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Step 4: Create Issues
|
|
90
|
+
|
|
91
|
+
For each milestone to process (not already an issue):
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
gh issue create \
|
|
95
|
+
--title "M{N}: {milestone title}" \
|
|
96
|
+
--body "$(cat <<'BODY'
|
|
97
|
+
## Milestone M{N}
|
|
98
|
+
|
|
99
|
+
{milestone description from plan.md}
|
|
100
|
+
|
|
101
|
+
### Files Expected
|
|
102
|
+
{Files: field from milestone}
|
|
103
|
+
|
|
104
|
+
### Depends On
|
|
105
|
+
{Depends: field, or "none"}
|
|
106
|
+
|
|
107
|
+
### Commit Format
|
|
108
|
+
{Commit: field from milestone}
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
_Generated by azclaude /issues from .claude/plan.md_
|
|
112
|
+
_Track progress: this issue closes when the milestone is committed._
|
|
113
|
+
BODY
|
|
114
|
+
)" \
|
|
115
|
+
--label "azclaude" \
|
|
116
|
+
--label "copilot-milestone"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Store the returned issue URL.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Step 5: Write Issue Links to plan.md
|
|
124
|
+
|
|
125
|
+
After creating issues, append issue numbers back to plan.md milestones:
|
|
126
|
+
|
|
127
|
+
For each milestone that now has a GitHub issue, add:
|
|
128
|
+
```
|
|
129
|
+
Issue: #{number} https://github.com/{owner}/{repo}/issues/{number}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
This creates the plan→issue traceability link.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Step 6: Create Labels (if missing)
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Create labels if they don't exist yet
|
|
140
|
+
gh label create "azclaude" --color "0075ca" --description "Managed by azclaude copilot" 2>/dev/null || true
|
|
141
|
+
gh label create "copilot-milestone" --color "7057ff" --description "azclaude plan milestone" 2>/dev/null || true
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Completion Rule
|
|
147
|
+
|
|
148
|
+
Show:
|
|
149
|
+
```
|
|
150
|
+
GitHub Issues Created
|
|
151
|
+
═════════════════════
|
|
152
|
+
Repository: {owner/repo}
|
|
153
|
+
|
|
154
|
+
#N M1: {title} → {url}
|
|
155
|
+
#N M2: {title} → {url}
|
|
156
|
+
...
|
|
157
|
+
|
|
158
|
+
Skipped (already done): {count}
|
|
159
|
+
Skipped (already had issue): {count}
|
|
160
|
+
|
|
161
|
+
plan.md updated with issue links.
|
|
162
|
+
|
|
163
|
+
Team members can now track progress at:
|
|
164
|
+
https://github.com/{owner}/{repo}/issues?label=azclaude
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Do not create issues for `done` milestones.
|
|
168
|
+
Do not delete or close existing issues during /issues.
|