@paw-workflow/cli 0.0.1 → 0.0.4
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 +2 -2
- package/dist/agents/PAW-Review.agent.md +5 -5
- package/dist/agents/PAW.agent.md +25 -6
- package/dist/skills/paw-code-research/SKILL.md +1 -1
- package/dist/skills/paw-docs-guidance/SKILL.md +1 -1
- package/dist/skills/paw-final-review/SKILL.md +212 -0
- package/dist/skills/paw-git-operations/SKILL.md +1 -1
- package/dist/skills/paw-impl-review/SKILL.md +1 -1
- package/dist/skills/paw-implement/SKILL.md +11 -1
- package/dist/skills/paw-init/SKILL.md +21 -3
- package/dist/skills/paw-plan-review/SKILL.md +1 -1
- package/dist/skills/paw-planning/SKILL.md +6 -1
- package/dist/skills/paw-pr/SKILL.md +7 -6
- package/dist/skills/paw-review-baseline/SKILL.md +1 -1
- package/dist/skills/paw-review-correlation/SKILL.md +1 -1
- package/dist/skills/paw-review-critic/SKILL.md +1 -1
- package/dist/skills/paw-review-feedback/SKILL.md +1 -1
- package/dist/skills/paw-review-gap/SKILL.md +1 -1
- package/dist/skills/paw-review-github/SKILL.md +1 -1
- package/dist/skills/paw-review-impact/SKILL.md +1 -1
- package/dist/skills/paw-review-response/SKILL.md +1 -1
- package/dist/skills/paw-review-understanding/SKILL.md +6 -4
- package/dist/skills/paw-review-workflow/SKILL.md +3 -3
- package/dist/skills/paw-rewind/SKILL.md +182 -0
- package/dist/skills/paw-spec/SKILL.md +1 -1
- package/dist/skills/paw-spec-research/SKILL.md +1 -1
- package/dist/skills/paw-spec-review/SKILL.md +1 -1
- package/dist/skills/paw-status/SKILL.md +23 -4
- package/dist/skills/paw-transition/SKILL.md +52 -9
- package/dist/skills/paw-work-shaping/SKILL.md +1 -1
- package/dist/skills/paw-workflow/SKILL.md +14 -3
- package/lib/commands/install.js +19 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,8 +53,8 @@ paw uninstall --force # Skip confirmation prompt
|
|
|
53
53
|
|
|
54
54
|
## What Gets Installed
|
|
55
55
|
|
|
56
|
-
- **Agents**: PAW workflow orchestrators (`PAW.agent.md`, `PAW
|
|
57
|
-
- **Skills**:
|
|
56
|
+
- **Agents**: PAW workflow orchestrators (`PAW.agent.md`, `PAW Review.agent.md`)
|
|
57
|
+
- **Skills**: Activity and utility skills for specification, planning, implementation, and review workflows
|
|
58
58
|
|
|
59
59
|
Files are installed to:
|
|
60
60
|
- `~/.copilot/agents/` - Agent files
|
|
@@ -9,7 +9,7 @@ You execute the PAW Review workflow by loading the workflow skill and following
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Load the `paw-review-workflow` skill to understand orchestration, principles, and artifact structure. If the skill fails to load, report the error and stop.
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
## Context Detection
|
|
@@ -42,9 +42,9 @@ When cross-repository conditions are detected:
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
Discover available review skills
|
|
46
|
-
- Receives the skill
|
|
47
|
-
-
|
|
45
|
+
Discover available review skills (`paw-review-*`) from the skills catalog, then execute each activity by delegating to a separate agent session. Each delegated agent:
|
|
46
|
+
- Receives the skill name, PR context, and artifact path
|
|
47
|
+
- Loads and executes the specified skill
|
|
48
48
|
- Returns a completion status with artifact confirmation
|
|
49
49
|
|
|
50
50
|
|
|
@@ -83,4 +83,4 @@ If any stage fails, report the error to the user and seek guidance on how to pro
|
|
|
83
83
|
- Load skills before executing workflow logic
|
|
84
84
|
- Human authority over all posted feedback
|
|
85
85
|
|
|
86
|
-
<!-- @paw-workflow/cli v0.0.
|
|
86
|
+
<!-- @paw-workflow/cli v0.0.4 -->
|
package/dist/agents/PAW.agent.md
CHANGED
|
@@ -20,8 +20,11 @@ On first request, identify work context from environment (current branch, `.paw/
|
|
|
20
20
|
| paw-planning | paw-plan-review | NO |
|
|
21
21
|
| paw-plan-review (passes) | Planning PR (prs strategy) | NO |
|
|
22
22
|
| Planning PR created | paw-transition → paw-implement | NO |
|
|
23
|
-
| paw-impl-review (passes) | Push & Phase PR (prs strategy) | NO |
|
|
24
|
-
|
|
|
23
|
+
| paw-impl-review (passes, more phases) | Push & Phase PR (prs strategy) | NO |
|
|
24
|
+
| paw-impl-review (passes, last phase, review enabled) | paw-final-review | NO |
|
|
25
|
+
| paw-impl-review (passes, last phase, review disabled) | paw-pr | Per Review Policy |
|
|
26
|
+
| paw-final-review | paw-pr | NO |
|
|
27
|
+
| Phase PR created | paw-transition → paw-implement (next) or paw-final-review or paw-pr | NO |
|
|
25
28
|
|
|
26
29
|
**Skippable = NO**: Execute immediately without pausing or asking for confirmation.
|
|
27
30
|
|
|
@@ -39,6 +42,8 @@ Stage boundaries:
|
|
|
39
42
|
- Planning PR created (PRs strategy)
|
|
40
43
|
- Phase PR created (PRs strategy) or push complete (local strategy)
|
|
41
44
|
- All phases complete
|
|
45
|
+
- paw-final-review complete
|
|
46
|
+
- paw-pr complete (Final PR created)
|
|
42
47
|
|
|
43
48
|
The transition skill returns `pause_at_milestone`. If `true`, STOP and wait for user. This is how milestone pauses happen—without the transition call, you will skip pauses.
|
|
44
49
|
|
|
@@ -76,14 +81,26 @@ Use TODOs to externalize workflow steps.
|
|
|
76
81
|
**Core rule**: After completing ANY activity, determine if you're at a stage boundary (see Stage Boundary Rule). If yes, delegate to `paw-transition` before doing anything else.
|
|
77
82
|
|
|
78
83
|
**Transition response handling**:
|
|
79
|
-
- `pause_at_milestone`: If `true`, PAUSE and wait for user confirmation
|
|
84
|
+
- `pause_at_milestone`: If `true`, PAUSE and wait for user confirmation. Applies at every phase boundary, including before entering candidate promotion and after each promoted phase.
|
|
80
85
|
- `artifact_tracking`: Pass to next activity (if `disabled`, don't stage `.paw/` files)
|
|
81
86
|
- `preflight`: Report blocker if not `passed`
|
|
87
|
+
- `promotion_pending`: If `true` **and not paused**, run Candidate Promotion Flow (see below)
|
|
82
88
|
|
|
83
89
|
|
|
84
90
|
- `session_action`: Ignored in CLI (single-session mode)
|
|
85
91
|
|
|
86
92
|
|
|
93
|
+
### Candidate Promotion Flow
|
|
94
|
+
|
|
95
|
+
When `paw-transition` returns `promotion_pending = true` with a `candidates` list:
|
|
96
|
+
|
|
97
|
+
1. Present each candidate to user with options: **Promote**, **Skip**, **Defer**
|
|
98
|
+
2. For each decision:
|
|
99
|
+
- **Promote**: Update candidate to `- [x] [promoted] <desc>` in ImplementationPlan.md. Run `paw-code-research` + `paw-planning` to elaborate into a full phase, then follow standard mandatory transitions (plan-review → implement → impl-review). If research reveals infeasibility, update to `- [x] [not feasible] <desc>` and continue with remaining candidates. User may request a lightweight promote (skip plan-review) for trivial changes.
|
|
100
|
+
- **Skip**: Update candidate to `- [x] [skipped] <desc>` in ImplementationPlan.md
|
|
101
|
+
- **Defer**: Update candidate to `- [x] [deferred] <desc>` in ImplementationPlan.md
|
|
102
|
+
3. After all candidates resolved: proceed to `paw-pr`
|
|
103
|
+
|
|
87
104
|
## Before Yielding Control
|
|
88
105
|
|
|
89
106
|
When **stopping work or pausing the workflow**, verify:
|
|
@@ -126,8 +143,8 @@ When pausing at a milestone, provide:
|
|
|
126
143
|
## Hybrid Execution Model
|
|
127
144
|
|
|
128
145
|
**Direct execution** (load skill, execute in this session):
|
|
129
|
-
- `paw-spec`, `paw-planning`, `paw-implement`, `paw-pr`
|
|
130
|
-
- `paw-init`, `paw-status`, `paw-work-shaping`
|
|
146
|
+
- `paw-spec`, `paw-planning`, `paw-implement`, `paw-pr`, `paw-final-review`
|
|
147
|
+
- `paw-init`, `paw-status`, `paw-work-shaping`, `paw-rewind`
|
|
131
148
|
|
|
132
149
|
**Subagent delegation** (delegate via `runSubagent`):
|
|
133
150
|
- `paw-spec-research`, `paw-code-research`, `paw-spec-review`, `paw-plan-review`, `paw-impl-review`
|
|
@@ -138,6 +155,7 @@ When pausing at a milestone, provide:
|
|
|
138
155
|
- After Planning PR created: **Delegate to `paw-transition`** (this is a stage boundary)
|
|
139
156
|
- After `paw-impl-review` returns PASS: Load `paw-git-operations`, push/create PR
|
|
140
157
|
- After Phase PR created or push complete: **Delegate to `paw-transition`** (this is a stage boundary)
|
|
158
|
+
- After `paw-final-review` completes: **Delegate to `paw-transition`** (this is a stage boundary)
|
|
141
159
|
- After any review subagent: Check result, handle accordingly, then `paw-transition` if at stage boundary
|
|
142
160
|
|
|
143
161
|
### Work Shaping Detection
|
|
@@ -163,9 +181,10 @@ For each user request:
|
|
|
163
181
|
- PR comment responses → `paw-review-response`
|
|
164
182
|
- Documentation conventions → `paw-docs-guidance`
|
|
165
183
|
- Status/help → `paw-status`
|
|
184
|
+
- Workflow rollback → `paw-rewind`
|
|
166
185
|
|
|
167
186
|
## Error Handling
|
|
168
187
|
|
|
169
188
|
If any activity fails, report the error to the user and seek guidance.
|
|
170
189
|
|
|
171
|
-
<!-- @paw-workflow/cli v0.0.
|
|
190
|
+
<!-- @paw-workflow/cli v0.0.4 -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-code-research
|
|
3
3
|
description: Code research activity skill for PAW workflow. Documents implementation details with file:line references, discovers documentation infrastructure, and creates CodeResearch.md artifact.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Code Research
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-docs-guidance
|
|
3
3
|
description: Documentation conventions for PAW implementation workflow. Provides Docs.md template structure, include/exclude guidelines, and project documentation update patterns.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Documentation Guidance
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: paw-final-review
|
|
3
|
+
description: Pre-PR review activity skill for PAW workflow. Reviews implementation against spec before Final PR creation with configurable multi-model or single-model execution.
|
|
4
|
+
metadata:
|
|
5
|
+
version: "0.0.4"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Final Agent Review
|
|
9
|
+
|
|
10
|
+
> **Execution Context**: This skill runs **directly** in the PAW session (not a subagent), preserving user interactivity for apply/skip/discuss decisions.
|
|
11
|
+
|
|
12
|
+
Automated review step that runs after all implementation phases complete, before Final PR creation. Examines the full implementation diff against specification to catch issues before external review.
|
|
13
|
+
|
|
14
|
+
## Capabilities
|
|
15
|
+
|
|
16
|
+
- Review implementation against spec for correctness, patterns, and issues
|
|
17
|
+
- Multi-model parallel review with synthesis (CLI only)
|
|
18
|
+
- Single-model review (CLI and VS Code)
|
|
19
|
+
- Interactive or auto-apply resolution modes
|
|
20
|
+
- Generate review artifacts in `.paw/work/<work-id>/reviews/`
|
|
21
|
+
|
|
22
|
+
## Procedure
|
|
23
|
+
|
|
24
|
+
### Step 1: Read Configuration
|
|
25
|
+
|
|
26
|
+
Read WorkflowContext.md for:
|
|
27
|
+
- Work ID and target branch
|
|
28
|
+
- `Final Review Mode`: `single-model` | `multi-model`
|
|
29
|
+
- `Final Review Interactive`: `true` | `false`
|
|
30
|
+
- `Final Review Models`: comma-separated model names (for multi-model)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
If mode is `multi-model`, parse the models list. Default: `latest GPT, latest Gemini, latest Claude Opus`.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Step 2: Gather Review Context
|
|
38
|
+
|
|
39
|
+
**Required context**:
|
|
40
|
+
- Full diff of implementation changes (target branch vs base branch)
|
|
41
|
+
- Spec.md requirements and success criteria
|
|
42
|
+
- ImplementationPlan.md phases and scope
|
|
43
|
+
- CodeResearch.md patterns and conventions
|
|
44
|
+
|
|
45
|
+
**Generate diff**:
|
|
46
|
+
```bash
|
|
47
|
+
git diff <base-branch>...<target-branch>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Step 3: Create Reviews Directory
|
|
51
|
+
|
|
52
|
+
Create `.paw/work/<work-id>/reviews/` if it doesn't exist.
|
|
53
|
+
Create `.paw/work/<work-id>/reviews/.gitignore` with content `*` (if not already present).
|
|
54
|
+
|
|
55
|
+
### Review Prompt (shared)
|
|
56
|
+
|
|
57
|
+
Use this prompt for all review executions (single-model or each multi-model subagent):
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Review this implementation against the specification. Be critical and thorough.
|
|
61
|
+
|
|
62
|
+
## Specification
|
|
63
|
+
[Include Spec.md content]
|
|
64
|
+
|
|
65
|
+
## Implementation Diff
|
|
66
|
+
[Include full diff]
|
|
67
|
+
|
|
68
|
+
## Codebase Patterns
|
|
69
|
+
[Include relevant patterns from CodeResearch.md]
|
|
70
|
+
|
|
71
|
+
## Review Criteria
|
|
72
|
+
1. **Correctness**: Do changes implement all spec requirements? Any gaps?
|
|
73
|
+
2. **Pattern Consistency**: Does implementation follow established codebase patterns?
|
|
74
|
+
3. **Bugs and Issues**: Logic errors, edge cases, race conditions, error handling gaps
|
|
75
|
+
4. **Token Efficiency**: For prompts/skills, opportunities to reduce verbosity
|
|
76
|
+
5. **Documentation**: Missing or outdated documentation
|
|
77
|
+
|
|
78
|
+
For each finding, provide:
|
|
79
|
+
- Issue description
|
|
80
|
+
- Current code/text
|
|
81
|
+
- Proposed fix
|
|
82
|
+
- Severity: must-fix | should-fix | consider
|
|
83
|
+
|
|
84
|
+
Write findings in structured markdown.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Step 4: Execute Review (CLI)
|
|
89
|
+
|
|
90
|
+
**If single-model mode**:
|
|
91
|
+
- Execute review using the prompt above
|
|
92
|
+
- Save to `REVIEW.md`
|
|
93
|
+
|
|
94
|
+
**If multi-model mode**:
|
|
95
|
+
|
|
96
|
+
First, resolve model intents to actual model names (e.g., "latest GPT" → current GPT model).
|
|
97
|
+
|
|
98
|
+
**If Interactive = true**: Present the resolved models for confirmation:
|
|
99
|
+
```
|
|
100
|
+
About to run multi-model review with:
|
|
101
|
+
- [resolved model 1]
|
|
102
|
+
- [resolved model 2]
|
|
103
|
+
- [resolved model 3]
|
|
104
|
+
|
|
105
|
+
Proceed with these models, or specify different ones?
|
|
106
|
+
```
|
|
107
|
+
Allow user to confirm or provide alternative model list.
|
|
108
|
+
|
|
109
|
+
Then spawn parallel subagents using `task` tool with `model` parameter for each model. Each subagent receives the review prompt above. Save per-model reviews to `REVIEW-{MODEL}.md`.
|
|
110
|
+
|
|
111
|
+
**After multi-model reviews complete**, generate synthesis.
|
|
112
|
+
|
|
113
|
+
**Important**: If any findings involve interface changes, API modifications, or data flow updates, populate the Verification Checklist with specific components that need coordinated updates. This prevents half-fixes where only one side of an interface is updated.
|
|
114
|
+
|
|
115
|
+
**REVIEW-SYNTHESIS.md structure**:
|
|
116
|
+
```markdown
|
|
117
|
+
# Review Synthesis
|
|
118
|
+
|
|
119
|
+
**Date**: [date]
|
|
120
|
+
**Reviewers**: [model list]
|
|
121
|
+
**Changes**: [branch/diff reference]
|
|
122
|
+
|
|
123
|
+
## Consensus Issues (All Models Agree)
|
|
124
|
+
[Highest priority - all models flagged these]
|
|
125
|
+
|
|
126
|
+
## Partial Agreement (2+ Models)
|
|
127
|
+
[High priority - multiple models flagged]
|
|
128
|
+
|
|
129
|
+
## Single-Model Insights
|
|
130
|
+
[Unique findings worth considering]
|
|
131
|
+
|
|
132
|
+
## Verification Checklist
|
|
133
|
+
[Populate with specific touchpoints for interface/data-flow changes]
|
|
134
|
+
- [ ] [Component A] updated
|
|
135
|
+
- [ ] [Component B] updated
|
|
136
|
+
- [ ] Data flows end-to-end from [source] → [target]
|
|
137
|
+
|
|
138
|
+
## Priority Actions
|
|
139
|
+
### Must Fix
|
|
140
|
+
[Critical issues]
|
|
141
|
+
|
|
142
|
+
### Should Fix
|
|
143
|
+
[High-value improvements]
|
|
144
|
+
|
|
145
|
+
### Consider
|
|
146
|
+
[Nice-to-haves]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### Step 5: Resolution
|
|
153
|
+
|
|
154
|
+
**If no findings**: Report clean review and proceed.
|
|
155
|
+
|
|
156
|
+
**If Interactive = true**:
|
|
157
|
+
|
|
158
|
+
Present each finding to user:
|
|
159
|
+
```
|
|
160
|
+
## Finding #N: [Title]
|
|
161
|
+
|
|
162
|
+
**Severity**: [must-fix | should-fix | consider]
|
|
163
|
+
**Issue**: [Description]
|
|
164
|
+
|
|
165
|
+
**Current**:
|
|
166
|
+
[Show current code/text]
|
|
167
|
+
|
|
168
|
+
**Proposed**:
|
|
169
|
+
[Show proposed change]
|
|
170
|
+
|
|
171
|
+
**My Opinion**: [Rationale]
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
**Your call**: apply, skip, or discuss?
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Track status for each finding:
|
|
179
|
+
- `applied` - Change made to codebase
|
|
180
|
+
- `skipped` - User chose not to apply
|
|
181
|
+
- `discussed` - Modified based on discussion, then applied or skipped
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
For multi-model mode, process synthesis first (consensus → partial → single-model). Track cross-finding duplicates to avoid re-presenting already-addressed issues.
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
**If Interactive = false**:
|
|
188
|
+
|
|
189
|
+
Auto-apply all findings marked `must-fix` and `should-fix`. Skip `consider` items. Report what was applied.
|
|
190
|
+
|
|
191
|
+
### Step 6: Completion
|
|
192
|
+
|
|
193
|
+
**Report back**:
|
|
194
|
+
- Total findings count
|
|
195
|
+
- Applied / skipped / discussed counts
|
|
196
|
+
- Summary of key changes made
|
|
197
|
+
- Review artifacts location
|
|
198
|
+
- Status: `complete` (ready for paw-pr)
|
|
199
|
+
|
|
200
|
+
**Edge cases**:
|
|
201
|
+
- Empty diff → Report "no implementation changes to review", proceed to paw-pr
|
|
202
|
+
- All findings skipped → Proceed to paw-pr (user's choice respected)
|
|
203
|
+
|
|
204
|
+
## Review Artifacts
|
|
205
|
+
|
|
206
|
+
| Mode | Files Created |
|
|
207
|
+
|------|---------------|
|
|
208
|
+
| single-model | `REVIEW.md` |
|
|
209
|
+
| multi-model | `REVIEW-{MODEL}.md` per model, `REVIEW-SYNTHESIS.md` |
|
|
210
|
+
|
|
211
|
+
Location: `.paw/work/<work-id>/reviews/`
|
|
212
|
+
All files gitignored via `.gitignore` with `*` pattern.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-implement
|
|
3
3
|
description: Implementation activity skill for PAW workflow. Executes plan phases with code changes, documentation phases, and PR review comment handling. One phase per invocation.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Implementation
|
|
@@ -29,6 +29,7 @@ Execute implementation plan phases by making code changes, running verification,
|
|
|
29
29
|
- Execute documentation phases (create/update Docs.md, update project documentation)
|
|
30
30
|
- Address PR review comments on implementation work (load `paw-review-response` for mechanics)
|
|
31
31
|
- Handle non-linear requests (e.g., "adjust implementation to match updated spec") when delegated by PAW agent
|
|
32
|
+
- Capture phase candidates mid-implementation for later elaboration
|
|
32
33
|
|
|
33
34
|
## Role: Forward Momentum
|
|
34
35
|
|
|
@@ -128,6 +129,15 @@ If the plan has existing checkmarks:
|
|
|
128
129
|
- Limit edits to sections affected by current phase
|
|
129
130
|
- Re-running same phase should produce no additional plan changes
|
|
130
131
|
|
|
132
|
+
### Capturing Phase Candidates
|
|
133
|
+
|
|
134
|
+
When related work surfaces during implementation (e.g., "this would be cleaner if we also refactored X"):
|
|
135
|
+
1. If `## Phase Candidates` section missing, create it after `## Phase Status`
|
|
136
|
+
2. Append `- [ ] Brief description of potential work`
|
|
137
|
+
3. Continue current phase immediately—no context-switch
|
|
138
|
+
|
|
139
|
+
Candidates are elaborated into full phases later via the promotion flow in `paw-transition`.
|
|
140
|
+
|
|
131
141
|
## Quality Checklist
|
|
132
142
|
|
|
133
143
|
### Initial Phase Implementation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-init
|
|
3
3
|
description: Bootstrap skill for PAW workflow initialization. Creates WorkflowContext.md, directory structure, and git branch. Runs before workflow skill is loaded.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# PAW Initialization
|
|
@@ -25,6 +25,7 @@ Bootstrap skill that initializes the PAW workflow directory structure. This runs
|
|
|
25
25
|
|
|
26
26
|
| Parameter | Required | Default | Values |
|
|
27
27
|
|-----------|----------|---------|--------|
|
|
28
|
+
| `base_branch` | No | `main` | branch name |
|
|
28
29
|
| `target_branch` | No | auto-derive from work ID | branch name |
|
|
29
30
|
| `workflow_mode` | No | `full` | `full`, `minimal`, `custom` |
|
|
30
31
|
| `review_strategy` | No | `prs` (`local` if minimal) | `prs`, `local` |
|
|
@@ -34,13 +35,18 @@ Bootstrap skill that initializes the PAW workflow directory structure. This runs
|
|
|
34
35
|
| `issue_url` | No | none | URL |
|
|
35
36
|
| `custom_instructions` | Conditional | — | text (required if `workflow_mode` is `custom`) |
|
|
36
37
|
| `work_description` | No | none | text |
|
|
38
|
+
| `final_agent_review` | No | `enabled` | `enabled`, `disabled` |
|
|
39
|
+
| `final_review_mode` | No | `multi-model` | `single-model`, `multi-model` |
|
|
40
|
+
| `final_review_interactive` | No | `true` | boolean |
|
|
41
|
+
| `final_review_models` | No | `latest GPT, latest Gemini, latest Claude Opus` | comma-separated model names or intents |
|
|
37
42
|
|
|
38
43
|
### Handling Missing Parameters
|
|
39
44
|
|
|
40
45
|
When parameters are not provided:
|
|
41
46
|
1. Apply defaults from the table above
|
|
42
|
-
2.
|
|
43
|
-
3.
|
|
47
|
+
2. Check user-level defaults in `copilot-instructions.md` or `AGENTS.md` (these override table defaults)
|
|
48
|
+
3. **Present configuration summary** and ask for confirmation before proceeding
|
|
49
|
+
4. If user requests changes, update values and re-confirm
|
|
44
50
|
|
|
45
51
|
This mirrors the VS Code command flow which prompts sequentially but allows skipping with defaults.
|
|
46
52
|
|
|
@@ -77,11 +83,16 @@ Created at `.paw/work/<work-id>/WorkflowContext.md` with all input parameters:
|
|
|
77
83
|
|
|
78
84
|
Work Title: <generated_work_title>
|
|
79
85
|
Work ID: <generated_work_id>
|
|
86
|
+
Base Branch: <base_branch>
|
|
80
87
|
Target Branch: <target_branch>
|
|
81
88
|
Workflow Mode: <workflow_mode>
|
|
82
89
|
Review Strategy: <review_strategy>
|
|
83
90
|
Review Policy: <review_policy>
|
|
84
91
|
Session Policy: <session_policy>
|
|
92
|
+
Final Agent Review: <final_agent_review>
|
|
93
|
+
Final Review Mode: <final_review_mode>
|
|
94
|
+
Final Review Interactive: <final_review_interactive>
|
|
95
|
+
Final Review Models: <final_review_models>
|
|
85
96
|
Custom Workflow Instructions: <custom_instructions or "none">
|
|
86
97
|
Initial Prompt: <work_description or "none">
|
|
87
98
|
Issue URL: <issue_url or "none">
|
|
@@ -93,6 +104,13 @@ Additional Inputs: none
|
|
|
93
104
|
### Git Branch
|
|
94
105
|
> Branch creation and checkout follows `paw-git-operations` patterns.
|
|
95
106
|
|
|
107
|
+
**Branch creation sequence** (REQUIRED):
|
|
108
|
+
1. Checkout base branch: `git checkout <base_branch>`
|
|
109
|
+
2. Update base: `git pull origin <base_branch> --ff-only`
|
|
110
|
+
3. Create feature branch: `git checkout -b <target_branch>`
|
|
111
|
+
|
|
112
|
+
Never create feature branch from current HEAD without explicit checkout of base.
|
|
113
|
+
|
|
96
114
|
- Target branch exists and is checked out
|
|
97
115
|
- If explicit branch provided: use as-is (prompt if exists)
|
|
98
116
|
- If auto-derive: `feature/<work-id>`
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-plan-review
|
|
3
3
|
description: Plan review activity skill for PAW workflow. Reviews implementation plans for feasibility, completeness, and spec alignment before implementation proceeds.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Plan Review
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-planning
|
|
3
3
|
description: Implementation planning activity skill for PAW workflow. Creates phased implementation plans with clear success criteria, documentation phase planning, and strategic architectural descriptions.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Implementation Planning
|
|
@@ -97,6 +97,10 @@ Save to: `.paw/work/<work-id>/ImplementationPlan.md`
|
|
|
97
97
|
- [ ] **Phase 2: [Name]** - [Objective]
|
|
98
98
|
- [ ] **Phase N: Documentation** - [If warranted]
|
|
99
99
|
|
|
100
|
+
## Phase Candidates
|
|
101
|
+
<!-- Lightweight capture of potential phases identified during implementation.
|
|
102
|
+
Add one-liner descriptions here; elaborate into full phases later via promotion. -->
|
|
103
|
+
|
|
100
104
|
---
|
|
101
105
|
|
|
102
106
|
## Phase 1: [Name]
|
|
@@ -190,6 +194,7 @@ When revising based on paw-plan-review feedback:
|
|
|
190
194
|
- [ ] Code blocks absent or limited to <10 lines for architectural concepts
|
|
191
195
|
- [ ] Documentation phase included (or explicitly omitted with reason)
|
|
192
196
|
- [ ] Phase Status exists with checkbox phases and one-sentence objectives
|
|
197
|
+
- [ ] Phase Candidates section present (may be empty initially)
|
|
193
198
|
|
|
194
199
|
## Completion Response
|
|
195
200
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: paw-pr
|
|
3
|
-
description: Final PR activity skill for PAW workflow. Creates comprehensive final PR to
|
|
3
|
+
description: Final PR activity skill for PAW workflow. Creates comprehensive final PR to base branch with pre-flight validation, scaled descriptions, and merge guidance.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Final PR
|
|
9
9
|
|
|
10
10
|
> **Execution Context**: This skill runs **directly** in the PAW session (not a subagent), allowing user interaction for PR description and final checks.
|
|
11
11
|
|
|
12
|
-
Create the final PR merging all implementation work to
|
|
12
|
+
Create the final PR merging all implementation work to the base branch (from WorkflowContext.md) after pre-flight validation.
|
|
13
13
|
|
|
14
14
|
> **Reference**: Follow Core Implementation Principles from `paw-workflow` skill.
|
|
15
15
|
|
|
@@ -30,6 +30,7 @@ Before creating the PR, verify and report status. Block on failures unless user
|
|
|
30
30
|
- All phases in ImplementationPlan.md marked complete
|
|
31
31
|
- All phase PRs merged (prs strategy) or commits pushed (local strategy)
|
|
32
32
|
- Target branch exists with implementation commits
|
|
33
|
+
- No unresolved phase candidates (`- [ ]` items in `## Phase Candidates`)
|
|
33
34
|
|
|
34
35
|
**Artifacts Exist** (check existence per Workflow Mode):
|
|
35
36
|
- CodeResearch.md (required: all modes)
|
|
@@ -39,7 +40,7 @@ Before creating the PR, verify and report status. Block on failures unless user
|
|
|
39
40
|
- Docs.md (required: full mode; optional: minimal/custom)
|
|
40
41
|
|
|
41
42
|
**Branch Status**:
|
|
42
|
-
- Target branch up to date with base branch (main)
|
|
43
|
+
- Target branch up to date with base branch (from WorkflowContext.md, defaults to `main`)
|
|
43
44
|
- No merge conflicts
|
|
44
45
|
|
|
45
46
|
**Build/Tests**:
|
|
@@ -117,8 +118,8 @@ When no intermediate PRs:
|
|
|
117
118
|
## PR Creation
|
|
118
119
|
|
|
119
120
|
**Final PR context requirements**:
|
|
120
|
-
- Source: `<target_branch>`
|
|
121
|
-
- Target:
|
|
121
|
+
- Source: `<target_branch>` (from WorkflowContext.md)
|
|
122
|
+
- Target: `<base_branch>` (from WorkflowContext.md, defaults to `main`)
|
|
122
123
|
- Title format: `[<Work Title>] <description>`
|
|
123
124
|
- Body: Scaled description per formats above
|
|
124
125
|
- Issue linking: Include Issue URL from WorkflowContext.md
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-review-correlation
|
|
3
3
|
description: Synthesizes findings across multiple PRs to identify cross-repository dependencies, interface mismatches, and coordination gaps.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Cross-Repository Correlation Analysis Skill
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-review-feedback
|
|
3
3
|
description: Transforms gap analysis findings into structured review comments with comprehensive rationale. Handles both initial draft generation and critique response iteration.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# PAW Review Feedback Skill
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-review-response
|
|
3
3
|
description: Shared PR review comment response mechanics for PAW activity skills. Provides TODO workflow, commit patterns, and reply format for addressing reviewer feedback.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Review Response
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-review-understanding
|
|
3
3
|
description: Analyzes PR changes to create ReviewContext.md and DerivedSpec.md artifacts. Handles both initial analysis and resumption after baseline research.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Understanding Activity Skill
|
|
@@ -91,9 +91,11 @@ related_prs:
|
|
|
91
91
|
- **GitHub**: Use GitHub tools to retrieve PR details (number, title, author, state, description, labels, reviewers, CI status, changed files)
|
|
92
92
|
- **Non-GitHub**: Use git to determine commits and changed files between base and head
|
|
93
93
|
|
|
94
|
-
3. **Resolve Base Commit
|
|
95
|
-
-
|
|
96
|
-
-
|
|
94
|
+
3. **Resolve Base Commit**:
|
|
95
|
+
- **GitHub**: Use `base.sha` from PR metadata (GitHub returns the merge-base)
|
|
96
|
+
- **Non-GitHub**: Run `git merge-base <head-branch> origin/<base-branch>` to find common ancestor
|
|
97
|
+
- **CRITICAL**: The base commit must be the merge-base (common ancestor), NOT the current tip of the base branch. Using the tip causes files added to main after branching to appear as "deletions."
|
|
98
|
+
- Record in ReviewContext.md: `Base Commit: <sha>` and `Base Commit Source: github-api | merge-base`
|
|
97
99
|
|
|
98
100
|
4. **Create ReviewContext.md**:
|
|
99
101
|
- Write to `.paw/reviews/<identifier>/ReviewContext.md`
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-review-workflow
|
|
3
3
|
description: Orchestrates the PAW Review workflow, coordinating activity skills to analyze PRs and generate comprehensive review feedback.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# PAW Review Workflow Skill
|
|
@@ -71,11 +71,11 @@ Activity skills are executed via delegated agent sessions.
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
1.
|
|
74
|
+
1. Load the skill by name (e.g., `paw-review-understanding`)
|
|
75
75
|
2. Read and internalize the skill instructions
|
|
76
76
|
3. Only then begin executing the activity
|
|
77
77
|
|
|
78
|
-
**Delegation prompt must include**: "First
|
|
78
|
+
**Delegation prompt must include**: "First load the `paw-review-<skill-name>` skill, then execute the activity."
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
### Response Format
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: paw-rewind
|
|
3
|
+
description: Workflow rewind utility skill for PAW workflow. Rolls back workflow state to a previous stage or phase with safeguards and user confirmation.
|
|
4
|
+
metadata:
|
|
5
|
+
version: "0.0.4"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Workflow Rewind
|
|
9
|
+
|
|
10
|
+
> **Execution Context**: This skill runs **directly** in the PAW session (not a subagent)—requires user interaction for confirmation prompts.
|
|
11
|
+
|
|
12
|
+
Roll back workflow state to a previous stage or phase. Handles safeguard checks, action preview, and git reset upon user confirmation.
|
|
13
|
+
|
|
14
|
+
> **Reference**: Follow Core Implementation Principles from `paw-workflow` skill.
|
|
15
|
+
|
|
16
|
+
## Capabilities
|
|
17
|
+
|
|
18
|
+
- Parse rewind target from natural language (spec, planning, phase N, start)
|
|
19
|
+
- Detect current workflow state using `paw-status` patterns
|
|
20
|
+
- Identify target commit for rewind point
|
|
21
|
+
- Check safeguards (uncommitted changes, unpushed commits, orphaned PRs)
|
|
22
|
+
- Present itemized action preview grouped by category
|
|
23
|
+
- Execute rewind via git reset on user confirmation
|
|
24
|
+
- Close orphaned PRs (PRs strategy) with explanatory comment
|
|
25
|
+
|
|
26
|
+
## Rewind Targets
|
|
27
|
+
|
|
28
|
+
| Target | Description | Resets to |
|
|
29
|
+
|--------|-------------|-----------|
|
|
30
|
+
| `start` | Reset to initialization | After WorkflowContext.md created |
|
|
31
|
+
| `spec` | Reset to post-specification | After Spec.md created (full mode only) |
|
|
32
|
+
| `planning` | Reset to post-research | After CodeResearch.md created |
|
|
33
|
+
| `phase N` | Reset to post-phase N | After Phase N completed |
|
|
34
|
+
|
|
35
|
+
**Target aliases**: "go back to spec", "rewind to planning", "reset to phase 2", "roll back to start"
|
|
36
|
+
|
|
37
|
+
## Procedure
|
|
38
|
+
|
|
39
|
+
### 1. Parse Rewind Target
|
|
40
|
+
|
|
41
|
+
Map user request to target:
|
|
42
|
+
- "spec", "specification" → `spec`
|
|
43
|
+
- "planning", "plan", "research" → `planning`
|
|
44
|
+
- "phase 1", "phase one", "p1" → `phase 1`
|
|
45
|
+
- "start", "beginning", "init" → `start`
|
|
46
|
+
|
|
47
|
+
If target unclear, ask user to clarify with available options.
|
|
48
|
+
|
|
49
|
+
### 2. Validate Target
|
|
50
|
+
|
|
51
|
+
Check target is reachable from current state:
|
|
52
|
+
- `spec` requires full mode (minimal mode has no spec stage)
|
|
53
|
+
- `phase N` requires ImplementationPlan.md with at least N phases
|
|
54
|
+
- Target must be before current stage (can't rewind forward)
|
|
55
|
+
|
|
56
|
+
If invalid, report error with available rewind targets.
|
|
57
|
+
|
|
58
|
+
### 3. Detect Current State
|
|
59
|
+
|
|
60
|
+
Use `paw-status` patterns to determine:
|
|
61
|
+
- WorkflowContext.md for configuration (mode, strategy)
|
|
62
|
+
- Current stage from artifact existence
|
|
63
|
+
- Phase progress from ImplementationPlan.md
|
|
64
|
+
- Git branch and status
|
|
65
|
+
|
|
66
|
+
### 4. Identify Target Commit
|
|
67
|
+
|
|
68
|
+
Find the commit representing the rewind point:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Find commit where artifact was added
|
|
72
|
+
git log --oneline --diff-filter=A -- .paw/work/<work-id>/<artifact> | head -1
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
| Target | Artifact to search |
|
|
76
|
+
|--------|-------------------|
|
|
77
|
+
| `start` | WorkflowContext.md |
|
|
78
|
+
| `spec` | Spec.md |
|
|
79
|
+
| `planning` | CodeResearch.md |
|
|
80
|
+
| `phase N` | Search for phase completion commit message pattern |
|
|
81
|
+
|
|
82
|
+
For phase targets, search commit messages:
|
|
83
|
+
```bash
|
|
84
|
+
git log --oneline --grep="Phase N" --grep="phase N" | head -1
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If target commit not found, report error with available recovery options.
|
|
88
|
+
|
|
89
|
+
### 5. Safeguard Checks
|
|
90
|
+
|
|
91
|
+
Before any destructive action, check and warn about:
|
|
92
|
+
|
|
93
|
+
**Uncommitted changes**:
|
|
94
|
+
```bash
|
|
95
|
+
git status --porcelain
|
|
96
|
+
```
|
|
97
|
+
If non-empty, list files and require confirmation.
|
|
98
|
+
|
|
99
|
+
**Unpushed commits**:
|
|
100
|
+
```bash
|
|
101
|
+
git rev-list @{u}..HEAD --count
|
|
102
|
+
```
|
|
103
|
+
If upstream not set, treat as 0 unpushed. If > 0, report count and require confirmation.
|
|
104
|
+
|
|
105
|
+
**Orphaned PRs** (PRs strategy only):
|
|
106
|
+
Query PRs with head branches matching `<target>_phase*` patterns that would be orphaned by rewind. List PR numbers/URLs.
|
|
107
|
+
|
|
108
|
+
### 6. Action Preview
|
|
109
|
+
|
|
110
|
+
Present itemized preview grouped by category:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Rewind to: planning (after CodeResearch.md)
|
|
114
|
+
Target commit: abc1234
|
|
115
|
+
|
|
116
|
+
Actions to be performed:
|
|
117
|
+
|
|
118
|
+
📁 Git Reset:
|
|
119
|
+
- Reset to commit abc1234
|
|
120
|
+
- Removes: ImplementationPlan.md, all phase changes
|
|
121
|
+
|
|
122
|
+
🔗 PRs to Close (PRs strategy):
|
|
123
|
+
- #42: [Feature] Phase 1 implementation
|
|
124
|
+
- #43: [Feature] Phase 2 implementation
|
|
125
|
+
|
|
126
|
+
⚠️ Warnings:
|
|
127
|
+
- 3 uncommitted files will be discarded
|
|
128
|
+
- 5 unpushed commits will be removed
|
|
129
|
+
|
|
130
|
+
Continue with rewind? [yes/no]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 7. Execute Rewind
|
|
134
|
+
|
|
135
|
+
On user confirmation:
|
|
136
|
+
|
|
137
|
+
1. **Close orphaned PRs** (PRs strategy):
|
|
138
|
+
- Close each PR with comment: "Workflow rewound to {target}. This PR is no longer applicable."
|
|
139
|
+
- If close fails, prompt user to close manually with direct link
|
|
140
|
+
|
|
141
|
+
2. **Git reset**:
|
|
142
|
+
```bash
|
|
143
|
+
git reset --hard <target-commit>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
3. **Report completion**:
|
|
147
|
+
- What was reverted
|
|
148
|
+
- Current state after rewind
|
|
149
|
+
- Recommended next step
|
|
150
|
+
|
|
151
|
+
### 8. Cancellation
|
|
152
|
+
|
|
153
|
+
If user declines confirmation:
|
|
154
|
+
- Report "Rewind cancelled. No changes made."
|
|
155
|
+
- Workflow continues at current state
|
|
156
|
+
|
|
157
|
+
## Edge Cases
|
|
158
|
+
|
|
159
|
+
**Already at target**: Report "Already at {target} stage. No rewind needed." and exit.
|
|
160
|
+
|
|
161
|
+
**Minimal mode + spec target**: Report error: "Spec stage not available in minimal workflow mode. Available targets: planning, start"
|
|
162
|
+
|
|
163
|
+
**No commit found**: Report error with manual recovery guidance: "Could not identify target commit. You may need to manually reset using `git log` to find the appropriate commit."
|
|
164
|
+
|
|
165
|
+
**PR close fails**: Prompt user: "Could not close PR #42 automatically. Please close manually: {url}"
|
|
166
|
+
|
|
167
|
+
## Guardrails
|
|
168
|
+
|
|
169
|
+
- Never execute destructive operations without explicit user confirmation
|
|
170
|
+
- Never rewind without showing action preview first
|
|
171
|
+
- Never assume commit exists—always verify
|
|
172
|
+
- Never modify files outside of git reset operation
|
|
173
|
+
- Be idempotent: cancelled rewind leaves state unchanged
|
|
174
|
+
|
|
175
|
+
## Completion Response
|
|
176
|
+
|
|
177
|
+
Report:
|
|
178
|
+
- Rewind status (completed/cancelled/error)
|
|
179
|
+
- If completed: target reached, commit hash, files reverted
|
|
180
|
+
- Current workflow stage after rewind
|
|
181
|
+
- Recommended next action
|
|
182
|
+
- Any manual steps required (e.g., PRs to close manually)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-spec
|
|
3
3
|
description: Specification activity skill for PAW workflow. Converts issue/brief into structured feature specification with user stories, requirements, and success criteria.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Specification
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-status
|
|
3
3
|
description: Workflow status activity skill for PAW workflow. Diagnoses workflow state, recommends next steps, explains PAW process, and optionally posts updates to Issues/PRs.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Workflow Status
|
|
@@ -35,9 +35,18 @@ Check `.paw/work/<work-id>/` for:
|
|
|
35
35
|
- CodeResearch.md (research stage)
|
|
36
36
|
- ImplementationPlan.md (planning stage)
|
|
37
37
|
- Docs.md (documentation if separate from implementation)
|
|
38
|
+
- `reviews/` directory (Final Agent Review artifacts)
|
|
38
39
|
|
|
39
40
|
Note existence vs intentionally skipped (minimal mode skips Spec/Docs).
|
|
40
41
|
|
|
42
|
+
### Configuration Detection
|
|
43
|
+
|
|
44
|
+
Read WorkflowContext.md for:
|
|
45
|
+
- Workflow Mode, Review Strategy, Review Policy
|
|
46
|
+
- Final Agent Review: `enabled` | `disabled`
|
|
47
|
+
- Final Review Mode: `single-model` | `multi-model`
|
|
48
|
+
- Final Review Interactive: `true` | `false`
|
|
49
|
+
|
|
41
50
|
### Phase Counting
|
|
42
51
|
|
|
43
52
|
Parse ImplementationPlan.md with regex: `^## Phase \d+:`
|
|
@@ -45,6 +54,12 @@ Parse ImplementationPlan.md with regex: `^## Phase \d+:`
|
|
|
45
54
|
- Report: "Phase N of M" or "Phase N (plan shows M phases total)"
|
|
46
55
|
- Never assume total—always verify
|
|
47
56
|
|
|
57
|
+
### Phase Candidates
|
|
58
|
+
|
|
59
|
+
Check `## Phase Candidates` section in ImplementationPlan.md:
|
|
60
|
+
- Count unresolved (`- [ ]`), promoted (`[promoted]`), skipped (`[skipped]`), deferred (`[deferred]`), not feasible (`[not feasible]`)
|
|
61
|
+
- If unresolved exist after last phase: report "N phase candidates pending review"
|
|
62
|
+
|
|
48
63
|
### Git Status
|
|
49
64
|
|
|
50
65
|
Determine:
|
|
@@ -80,15 +95,18 @@ Map state to guidance:
|
|
|
80
95
|
| CodeResearch.md exists, no Plan | "Create plan: `plan`" |
|
|
81
96
|
| Plan exists, no phase work | "Begin Phase 1: `implement`" |
|
|
82
97
|
| Phase N complete, Phase N+1 exists | "Continue Phase N+1: `implement`" |
|
|
83
|
-
| All complete | "
|
|
98
|
+
| All phases complete, review enabled, no reviews/ | "Run final review: `final-review`" |
|
|
99
|
+
| All phases complete, reviews/ exists | "Create final PR: `pr`" |
|
|
100
|
+
| All phases complete, review disabled | "Create final PR: `pr`" |
|
|
101
|
+
| All complete + unresolved candidates | "Review phase candidates before PR" |
|
|
84
102
|
|
|
85
103
|
## Workflow Mode Behavior
|
|
86
104
|
|
|
87
105
|
### Full Mode
|
|
88
|
-
Expect: Spec → Spec Research (optional) → Code Research → Plan → Implementation (multi-phase) →
|
|
106
|
+
Expect: Spec → Spec Research (optional) → Code Research → Plan → Implementation (multi-phase, including Documentation phase) → Final Review (if enabled) → Final PR
|
|
89
107
|
|
|
90
108
|
### Minimal Mode
|
|
91
|
-
Expect: Code Research → Plan → Implementation (
|
|
109
|
+
Expect: Code Research → Plan → Implementation (including Documentation phase) → Final Review (if enabled) → Final PR
|
|
92
110
|
Skips: Spec, Spec Research (local strategy enforced)
|
|
93
111
|
|
|
94
112
|
### Custom Mode
|
|
@@ -139,6 +157,7 @@ For "How do I start?", explain:
|
|
|
139
157
|
Synthesize findings into sections:
|
|
140
158
|
- **Artifacts**: Existence and status
|
|
141
159
|
- **Phases**: Current progress (N of M)
|
|
160
|
+
- **Phase Candidates**: Pending/resolved candidate counts (if any exist)
|
|
142
161
|
- **Branch & Git**: Current state, divergence
|
|
143
162
|
- **PRs**: Open/merged status, review comments
|
|
144
163
|
- **Next Actions**: Recommended commands
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-transition
|
|
3
3
|
description: Workflow transition gate for PAW. Handles stage boundaries, session policy, preflight checks, and next activity determination.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Workflow Transition
|
|
@@ -30,6 +30,8 @@ Read WorkflowContext.md to determine:
|
|
|
30
30
|
- Review Policy (`always` | `milestones` | `planning-only` | `never`)
|
|
31
31
|
- If missing, check for legacy `Handoff Mode:` field and map: `manual`→`always`, `semi-auto`→`milestones`, `auto`→`never`
|
|
32
32
|
- If neither present, default to `milestones`
|
|
33
|
+
- Final Agent Review (`enabled` | `disabled`)
|
|
34
|
+
- If missing, default to `enabled`
|
|
33
35
|
|
|
34
36
|
Identify last completed activity from TODOs or artifacts.
|
|
35
37
|
|
|
@@ -43,27 +45,51 @@ Use the Mandatory Transitions table:
|
|
|
43
45
|
| paw-implement (any phase) | paw-impl-review | NO |
|
|
44
46
|
| paw-spec | paw-spec-review | NO |
|
|
45
47
|
| paw-planning | paw-plan-review | NO |
|
|
46
|
-
| paw-impl-review (passes) | paw-implement (next phase)
|
|
48
|
+
| paw-impl-review (passes, more phases) | paw-implement (next phase) | NO |
|
|
49
|
+
| paw-impl-review (passes, last phase, review enabled) | paw-final-review | NO |
|
|
50
|
+
| paw-impl-review (passes, last phase, review disabled) | paw-pr | Per Review Policy |
|
|
51
|
+
| paw-final-review | paw-pr | NO |
|
|
47
52
|
|
|
48
53
|
**Skippable = NO**: Add activity TODO and execute immediately after transition completes.
|
|
49
54
|
|
|
55
|
+
### Step 2.5: Candidate Promotion Check
|
|
56
|
+
|
|
57
|
+
When next activity would be `paw-pr` (all planned phases complete), check for phase candidates:
|
|
58
|
+
|
|
59
|
+
1. Read ImplementationPlan.md `## Phase Candidates` section
|
|
60
|
+
2. Count **unresolved** candidates: `- [ ]` items WITHOUT terminal tags (`[skipped]`, `[deferred]`, `[not feasible]`)
|
|
61
|
+
3. If unresolved candidates exist: set `promotion_pending = true` and extract candidate descriptions
|
|
62
|
+
4. Otherwise: set `promotion_pending = false`
|
|
63
|
+
|
|
64
|
+
If `promotion_pending = true`, return candidates in structured output. PAW orchestrator handles user interaction.
|
|
65
|
+
|
|
50
66
|
### Step 3: Check Stage Boundary and Milestone Pause
|
|
51
67
|
|
|
52
68
|
**Stage boundaries** occur when moving between these stages:
|
|
53
69
|
- spec-review passes → code-research
|
|
54
70
|
- plan-review passes → implement (Phase 1)
|
|
55
71
|
- phase N complete → phase N+1
|
|
56
|
-
- all phases complete → final-pr
|
|
72
|
+
- all phases complete → paw-final-review (if enabled) or paw-pr (if disabled)
|
|
73
|
+
- paw-final-review complete → paw-pr
|
|
74
|
+
- paw-pr complete → workflow complete
|
|
75
|
+
|
|
76
|
+
**Stage-to-milestone mapping** (determines which milestone is reached at each boundary):
|
|
57
77
|
|
|
58
|
-
|
|
78
|
+
| Stage Boundary | Milestone Reached |
|
|
79
|
+
|----------------|-------------------|
|
|
80
|
+
| spec-review passes | Spec.md complete |
|
|
81
|
+
| plan-review passes | ImplementationPlan.md complete |
|
|
82
|
+
| phase N complete (not last) | Phase completion |
|
|
83
|
+
| all phases complete | Phase completion (last phase) |
|
|
84
|
+
| paw-final-review complete | Final Review complete |
|
|
85
|
+
| paw-pr complete | Final PR |
|
|
59
86
|
|
|
60
87
|
**Determine pause_at_milestone**:
|
|
61
|
-
- If
|
|
88
|
+
- If Review Policy ∈ {`always`, `milestones`}: pause at ALL milestones
|
|
62
89
|
- If Review Policy = `planning-only`:
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
- If Review Policy = `never`:
|
|
66
|
-
- If not at a milestone: set `pause_at_milestone = false`
|
|
90
|
+
- Spec.md, ImplementationPlan.md, Final PR: `pause_at_milestone = true`
|
|
91
|
+
- Phase completion (including last phase): `pause_at_milestone = false`
|
|
92
|
+
- If Review Policy = `never`: `pause_at_milestone = false`
|
|
67
93
|
|
|
68
94
|
**Determine session_action**:
|
|
69
95
|
- If crossing a stage boundary AND Session Policy = `per-stage`: set `session_action = new_session`
|
|
@@ -86,8 +112,13 @@ Before the next activity can start, verify:
|
|
|
86
112
|
**For paw-code-research**:
|
|
87
113
|
- [ ] Spec.md exists (unless minimal mode)
|
|
88
114
|
|
|
115
|
+
**For paw-final-review**:
|
|
116
|
+
- [ ] All implementation phases complete
|
|
117
|
+
- [ ] On target branch (local strategy) or phase branches merged (prs strategy)
|
|
118
|
+
|
|
89
119
|
**For paw-pr**:
|
|
90
120
|
- [ ] All phases complete
|
|
121
|
+
- [ ] paw-final-review complete (if enabled) or skipped (if disabled)
|
|
91
122
|
- [ ] On target branch or ready to merge
|
|
92
123
|
|
|
93
124
|
**Artifact Tracking Check** (for all activities):
|
|
@@ -116,6 +147,8 @@ TRANSITION RESULT:
|
|
|
116
147
|
- preflight: [passed | blocked: <reason>]
|
|
117
148
|
- work_id: [current work ID]
|
|
118
149
|
- inline_instruction: [for new_session only: resume hint]
|
|
150
|
+
- promotion_pending: [true | false] (only when next would be paw-pr)
|
|
151
|
+
- candidates: [list of unresolved candidate descriptions] (only if promotion_pending)
|
|
119
152
|
```
|
|
120
153
|
|
|
121
154
|
**If pause_at_milestone = true**: The PAW agent must PAUSE and wait for user confirmation before proceeding.
|
|
@@ -126,6 +159,16 @@ TRANSITION RESULT:
|
|
|
126
159
|
|
|
127
160
|
Mark the `paw-transition` TODO complete after returning this output.
|
|
128
161
|
|
|
162
|
+
## Candidate Resolution Markers
|
|
163
|
+
|
|
164
|
+
Terminal markers used in Step 2.5 to identify resolved candidates:
|
|
165
|
+
- `- [x] [promoted] <desc>` — Elaborated into a full phase
|
|
166
|
+
- `- [x] [skipped] <desc>` — User chose not to pursue
|
|
167
|
+
- `- [x] [deferred] <desc>` — Future work outside current workflow
|
|
168
|
+
- `- [x] [not feasible] <desc>` — Code research revealed infeasibility
|
|
169
|
+
|
|
170
|
+
Unresolved: `- [ ]` items without terminal tags. Empty section or all-resolved → `promotion_pending = false`.
|
|
171
|
+
|
|
129
172
|
## Guardrails
|
|
130
173
|
|
|
131
174
|
- Do NOT skip the stage boundary check (Step 3)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-work-shaping
|
|
3
3
|
description: Interactive pre-spec ideation utility skill. Agent-led Q&A to progressively clarify vague ideas, research codebase context, and produce structured WorkShaping.md artifact.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Work Shaping
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: paw-workflow
|
|
3
3
|
description: Reference documentation for PAW multi-phase implementation workflows. Provides activity tables, artifact structure, stage guidance, and PR routing patterns. Workflow enforcement rules are in PAW.agent.md.
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.0.
|
|
5
|
+
version: "0.0.4"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# PAW Implementation Workflow Skill
|
|
@@ -66,6 +66,7 @@ Humans have final authority over all workflow decisions:
|
|
|
66
66
|
| `paw-plan-review` | Review plan for feasibility, spec alignment | Review feedback |
|
|
67
67
|
| `paw-implement` | Execute plan phases, make code changes | Code files, Docs.md |
|
|
68
68
|
| `paw-impl-review` | Review implementation quality, return verdict | Review feedback |
|
|
69
|
+
| `paw-final-review` | Pre-PR review with multi-model or single-model | REVIEW*.md in reviews/ |
|
|
69
70
|
| `paw-pr` | Pre-flight validation, create final PR | Final PR |
|
|
70
71
|
|
|
71
72
|
**Note**: Phase PR creation is handled by PAW agent (using `paw-git-operations`) after `paw-impl-review` passes.
|
|
@@ -85,7 +86,11 @@ All implementation artifacts are stored in a consistent directory structure:
|
|
|
85
86
|
├── CodeResearch.md # Implementation details with file:line refs
|
|
86
87
|
├── ImplementationPlan.md # Phased implementation plan
|
|
87
88
|
├── Docs.md # Technical documentation (created during final implementation phase)
|
|
88
|
-
|
|
89
|
+
├── prompts/ # Generated prompt files (optional)
|
|
90
|
+
└── reviews/ # Final Agent Review artifacts (gitignored)
|
|
91
|
+
├── REVIEW.md # Single-model review
|
|
92
|
+
├── REVIEW-{MODEL}.md # Per-model reviews (multi-model)
|
|
93
|
+
└── REVIEW-SYNTHESIS.md # Synthesis (multi-model)
|
|
89
94
|
```
|
|
90
95
|
|
|
91
96
|
**Work ID Derivation**: Normalized from Work Title, lowercase with hyphens (e.g., "Auth System" → "auth-system").
|
|
@@ -110,8 +115,14 @@ Per phase in ImplementationPlan.md:
|
|
|
110
115
|
2. `paw-impl-review`: Review changes (returns verdict)
|
|
111
116
|
3. Phase PR created (PRs strategy) or push (local strategy)
|
|
112
117
|
|
|
118
|
+
**Phase Candidates**: During implementation, new ideas can be captured in the `## Phase Candidates` section of ImplementationPlan.md. When all planned phases complete, `paw-transition` returns `promotion_pending = true` if unresolved candidates exist. The orchestrator presents each candidate to the user with options: Promote (elaborate into a full phase), Skip, or Defer. Terminal markers (`[promoted]`, `[skipped]`, `[deferred]`, `[not feasible]`) resolve candidates.
|
|
119
|
+
|
|
113
120
|
Final phase typically includes documentation (Docs.md, README, CHANGELOG).
|
|
114
121
|
|
|
122
|
+
### Final Review Stage (if enabled)
|
|
123
|
+
1. `paw-final-review`: Review full implementation against spec
|
|
124
|
+
2. Interactive: apply/skip/discuss findings; Non-interactive: auto-apply
|
|
125
|
+
|
|
115
126
|
### Finalization Stage
|
|
116
127
|
1. `paw-pr`: Pre-flight validation, create final PR
|
|
117
128
|
|
|
@@ -127,7 +138,7 @@ Load `paw-review-response` utility skill for comment mechanics.
|
|
|
127
138
|
|
|
128
139
|
## Execution Model
|
|
129
140
|
|
|
130
|
-
**Direct execution**: `paw-spec`, `paw-planning`, `paw-implement`, `paw-pr`, `paw-init`, `paw-status`, `paw-work-shaping`
|
|
141
|
+
**Direct execution**: `paw-spec`, `paw-planning`, `paw-implement`, `paw-final-review`, `paw-pr`, `paw-init`, `paw-status`, `paw-work-shaping`
|
|
131
142
|
|
|
132
143
|
**Subagent delegation**: `paw-spec-research`, `paw-code-research`, `paw-spec-review`, `paw-plan-review`, `paw-impl-review`
|
|
133
144
|
|
package/lib/commands/install.js
CHANGED
|
@@ -98,6 +98,23 @@ export async function installCommand(target, flags = {}) {
|
|
|
98
98
|
const skillCount = readdirSync(distSkillsDir, { withFileTypes: true })
|
|
99
99
|
.filter(e => e.isDirectory()).length;
|
|
100
100
|
|
|
101
|
-
console.log(`\
|
|
102
|
-
|
|
101
|
+
console.log(`\n✓ Installed ${agentCount} agents and ${skillCount} skills to ~/.copilot/`);
|
|
102
|
+
|
|
103
|
+
if (!hasExistingFiles) {
|
|
104
|
+
console.log(`
|
|
105
|
+
🚀 Quick Start
|
|
106
|
+
Start a workflow: copilot --agent PAW
|
|
107
|
+
Review a PR: copilot --agent PAW-Review
|
|
108
|
+
Or use /agent inside any copilot session to switch agents.
|
|
109
|
+
|
|
110
|
+
💡 Try saying:
|
|
111
|
+
"I want to add a feature for..."
|
|
112
|
+
"Help me refactor the auth module"
|
|
113
|
+
"Review PR #100" (with PAW-Review agent)
|
|
114
|
+
|
|
115
|
+
📦 Manage your installation:
|
|
116
|
+
npx @paw-workflow/cli list Show installed version
|
|
117
|
+
npx @paw-workflow/cli upgrade Check for updates
|
|
118
|
+
npx @paw-workflow/cli uninstall Cleanly remove PAW`);
|
|
119
|
+
}
|
|
103
120
|
}
|