@paw-workflow/cli 0.0.1

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.
Files changed (38) hide show
  1. package/README.md +124 -0
  2. package/bin/paw.js +82 -0
  3. package/dist/agents/PAW-Review.agent.md +86 -0
  4. package/dist/agents/PAW.agent.md +171 -0
  5. package/dist/skills/paw-code-research/SKILL.md +209 -0
  6. package/dist/skills/paw-docs-guidance/SKILL.md +163 -0
  7. package/dist/skills/paw-git-operations/SKILL.md +196 -0
  8. package/dist/skills/paw-impl-review/SKILL.md +178 -0
  9. package/dist/skills/paw-implement/SKILL.md +153 -0
  10. package/dist/skills/paw-init/SKILL.md +118 -0
  11. package/dist/skills/paw-plan-review/SKILL.md +117 -0
  12. package/dist/skills/paw-planning/SKILL.md +217 -0
  13. package/dist/skills/paw-pr/SKILL.md +157 -0
  14. package/dist/skills/paw-review-baseline/SKILL.md +268 -0
  15. package/dist/skills/paw-review-correlation/SKILL.md +307 -0
  16. package/dist/skills/paw-review-critic/SKILL.md +373 -0
  17. package/dist/skills/paw-review-feedback/SKILL.md +437 -0
  18. package/dist/skills/paw-review-gap/SKILL.md +639 -0
  19. package/dist/skills/paw-review-github/SKILL.md +336 -0
  20. package/dist/skills/paw-review-impact/SKILL.md +569 -0
  21. package/dist/skills/paw-review-response/SKILL.md +118 -0
  22. package/dist/skills/paw-review-understanding/SKILL.md +372 -0
  23. package/dist/skills/paw-review-workflow/SKILL.md +239 -0
  24. package/dist/skills/paw-spec/SKILL.md +257 -0
  25. package/dist/skills/paw-spec-research/SKILL.md +138 -0
  26. package/dist/skills/paw-spec-review/SKILL.md +101 -0
  27. package/dist/skills/paw-status/SKILL.md +160 -0
  28. package/dist/skills/paw-transition/SKILL.md +134 -0
  29. package/dist/skills/paw-work-shaping/SKILL.md +99 -0
  30. package/dist/skills/paw-workflow/SKILL.md +142 -0
  31. package/lib/commands/install.js +103 -0
  32. package/lib/commands/list.js +18 -0
  33. package/lib/commands/uninstall.js +95 -0
  34. package/lib/commands/upgrade.js +119 -0
  35. package/lib/manifest.js +42 -0
  36. package/lib/paths.js +42 -0
  37. package/lib/registry.js +41 -0
  38. package/package.json +40 -0
package/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # @paw-workflow/cli
2
+
3
+ CLI installer for [Phased Agent Workflow (PAW)](https://github.com/lossyrob/phased-agent-workflow) agents and skills.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npx @paw-workflow/cli install copilot
9
+ ```
10
+
11
+ This installs PAW agents and skills to your GitHub Copilot CLI configuration directory (`~/.copilot/`).
12
+
13
+ ## Commands
14
+
15
+ ### install
16
+
17
+ Install PAW agents and skills to a target environment.
18
+
19
+ ```bash
20
+ paw install copilot
21
+ paw install copilot --force # Skip confirmation prompts
22
+ ```
23
+
24
+ ### list
25
+
26
+ Show installed version and components.
27
+
28
+ ```bash
29
+ paw list
30
+ ```
31
+
32
+ ### upgrade
33
+
34
+ Check for updates and upgrade to the latest version.
35
+
36
+ ```bash
37
+ paw upgrade
38
+ ```
39
+
40
+ ### uninstall
41
+
42
+ Remove all PAW agents and skills.
43
+
44
+ ```bash
45
+ paw uninstall
46
+ paw uninstall --force # Skip confirmation prompt
47
+ ```
48
+
49
+ ## Requirements
50
+
51
+ - Node.js 18.0.0 or later
52
+ - [GitHub Copilot CLI](https://docs.github.com/en/copilot/using-github-copilot/using-github-copilot-in-the-command-line)
53
+
54
+ ## What Gets Installed
55
+
56
+ - **Agents**: PAW workflow orchestrators (`PAW.agent.md`, `PAW-Review.agent.md`)
57
+ - **Skills**: 26 activity skills for specification, planning, implementation, and review workflows
58
+
59
+ Files are installed to:
60
+ - `~/.copilot/agents/` - Agent files
61
+ - `~/.copilot/skills/` - Skill directories
62
+
63
+ A manifest is written to `~/.paw/copilot-cli/manifest.json` to track installed files.
64
+
65
+ ## License
66
+
67
+ MIT
68
+
69
+ ## Development
70
+
71
+ ### Setup
72
+
73
+ ```bash
74
+ cd cli
75
+ npm install
76
+ ```
77
+
78
+ ### Build
79
+
80
+ Build the distribution (processes conditionals, injects version metadata):
81
+
82
+ ```bash
83
+ npm run build
84
+ ```
85
+
86
+ This creates `dist/` with processed agents and skills.
87
+
88
+ ### Test locally
89
+
90
+ Run the CLI directly without installing:
91
+
92
+ ```bash
93
+ # Show help
94
+ node bin/paw.js --help
95
+
96
+ # Install to Copilot CLI (from local build)
97
+ node bin/paw.js install copilot
98
+
99
+ # List installed version
100
+ node bin/paw.js list
101
+ ```
102
+
103
+ ### Run tests
104
+
105
+ ```bash
106
+ npm test
107
+ ```
108
+
109
+ ### Lint
110
+
111
+ ```bash
112
+ npm run lint
113
+ ```
114
+
115
+ ### Publishing
116
+
117
+ Publishing is automated via GitHub Actions on tag push:
118
+
119
+ ```bash
120
+ git tag cli-v0.0.1
121
+ git push origin cli-v0.0.1
122
+ ```
123
+
124
+ Requires `NPM_TOKEN` secret configured in the repository.
package/bin/paw.js ADDED
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { installCommand } from '../lib/commands/install.js';
4
+ import { listCommand } from '../lib/commands/list.js';
5
+ import { uninstallCommand } from '../lib/commands/uninstall.js';
6
+ import { upgradeCommand } from '../lib/commands/upgrade.js';
7
+
8
+ const VERSION = '0.0.1';
9
+
10
+ const HELP = `
11
+ paw - Phased Agent Workflow CLI
12
+
13
+ Usage: paw <command> [options]
14
+
15
+ Commands:
16
+ install <target> Install PAW agents and skills
17
+ upgrade Check for updates and upgrade
18
+ list Show installed version and components
19
+ uninstall Remove PAW agents and skills
20
+
21
+ Options:
22
+ --help, -h Show this help message
23
+ --version, -v Show version number
24
+ --force, -f Skip confirmation prompts
25
+
26
+ Examples:
27
+ paw install copilot Install to GitHub Copilot CLI
28
+ paw list Show installation status
29
+ paw upgrade Upgrade to latest version
30
+ paw uninstall Remove all PAW files
31
+ `;
32
+
33
+ async function main() {
34
+ const args = process.argv.slice(2);
35
+
36
+ if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
37
+ console.log(HELP);
38
+ process.exit(0);
39
+ }
40
+
41
+ if (args.includes('--version') || args.includes('-v')) {
42
+ console.log(VERSION);
43
+ process.exit(0);
44
+ }
45
+
46
+ const command = args[0];
47
+ const flags = {
48
+ force: args.includes('--force') || args.includes('-f'),
49
+ };
50
+
51
+ try {
52
+ switch (command) {
53
+ case 'install': {
54
+ const target = args[1];
55
+ if (!target) {
56
+ console.error('Error: install requires a target (e.g., "copilot")');
57
+ process.exit(1);
58
+ }
59
+ await installCommand(target, flags);
60
+ break;
61
+ }
62
+ case 'upgrade':
63
+ await upgradeCommand(flags);
64
+ break;
65
+ case 'list':
66
+ await listCommand();
67
+ break;
68
+ case 'uninstall':
69
+ await uninstallCommand(flags);
70
+ break;
71
+ default:
72
+ console.error(`Unknown command: ${command}`);
73
+ console.log(HELP);
74
+ process.exit(1);
75
+ }
76
+ } catch (error) {
77
+ console.error(`Error: ${error.message}`);
78
+ process.exit(1);
79
+ }
80
+ }
81
+
82
+ main();
@@ -0,0 +1,86 @@
1
+ ---
2
+ description: 'PAW Review - Executes the PAW Review workflow'
3
+ ---
4
+ # PAW Review Agent
5
+
6
+ You execute the PAW Review workflow by loading the workflow skill and following its orchestration. The workflow analyzes pull requests through three stages (Understanding, Evaluation, Output) using delegated agents for context-intensive work.
7
+
8
+ ## Initialization
9
+
10
+
11
+
12
+ Read the `skills/paw-review-workflow/SKILL.md` file to understand orchestration, principles, and artifact structure. If the file cannot be read, report the error and stop.
13
+
14
+
15
+ ## Context Detection
16
+
17
+ Identify the review target:
18
+ - **GitHub PR**: Extract from URL or number provided by user
19
+ - **Local branch**: Use current branch, prompt for base if needed
20
+
21
+ ### Multi-Repository Detection Triggers
22
+
23
+ A cross-repository review is detected when ANY of:
24
+ 1. **Multiple PR URLs/numbers**: User provides 2+ PRs (e.g., `PR-123 PR-456` or URLs from different repos)
25
+ 2. **Multi-root workspace**: Multiple workspace folders open in VS Code (check via file system—multiple `.git` directories)
26
+ 3. **Cross-repo PR links**: PR references contain repositories with different owner/repo paths
27
+
28
+ When multi-repo detected, use artifact naming scheme: `PR-<number>-<repo-slug>/`
29
+ - Example: `PR-123-my-api/`, `PR-456-my-frontend/`
30
+ - Repo-slug derivation: Last segment of repo name, lowercase, special chars removed
31
+
32
+ ## Multi-Repository Support
33
+
34
+ When cross-repository conditions are detected:
35
+ 1. Identify which repositories have changes
36
+ 2. Determine the primary repository (where changes originate)
37
+ 3. For each repository, run the workflow stages independently
38
+ 4. In the Output stage, correlate findings across repositories
39
+ 5. Note cross-repo dependencies in the review comments
40
+
41
+ ## Skill-Based Execution
42
+
43
+
44
+
45
+ Discover available review skills from `skills/paw-review-*/SKILL.md` directories, then execute each activity by delegating to a separate agent session. Each delegated agent:
46
+ - Receives the skill file path, PR context, and artifact path
47
+ - Reads and executes the specified skill
48
+ - Returns a completion status with artifact confirmation
49
+
50
+
51
+ Execute stages in sequence with artifact verification between stages:
52
+ 1. **Understanding**: Context gathering, baseline research, specification derivation
53
+ 2. **Evaluation**: Impact analysis, gap identification, cross-repo correlation (if multi-repo)
54
+ 3. **Output**: Feedback generation, critique iteration, GitHub posting
55
+
56
+ ### Output Stage Flow
57
+
58
+ The Output stage uses an iterative feedback-critique pattern:
59
+ 1. **paw-review-feedback (Initial)**: Generate draft comments in ReviewComments.md
60
+ 2. **paw-review-critic**: Assess each comment, add Include/Modify/Skip recommendations
61
+ 3. **paw-review-feedback (Critique Response)**: Update comments based on critique, add `**Final**:` markers
62
+ 4. **paw-review-github**: Post only finalized comments to GitHub pending review
63
+
64
+ This flow ensures:
65
+ - Critique insights improve posted comments before they reach GitHub
66
+ - Low-value comments can be filtered out (Skip) before posting
67
+ - Full comment history preserved in ReviewComments.md (original → assessment → updated → posted)
68
+
69
+ The workflow skill documents the specific sequence including the Understanding stage's resume pattern for baseline research.
70
+
71
+ ## Human Control Point
72
+
73
+ Pending GitHub reviews are created but NEVER auto-submitted. Human reviewers make final decisions on all feedback.
74
+
75
+ ## Error Handling
76
+
77
+ If any stage fails, report the error to the user and seek guidance on how to proceed.
78
+
79
+ ## Guardrails
80
+
81
+ - Evidence-based only—no fabrication or speculation
82
+ - All claims require file:line citations
83
+ - Load skills before executing workflow logic
84
+ - Human authority over all posted feedback
85
+
86
+ <!-- @paw-workflow/cli v0.0.1 -->
@@ -0,0 +1,171 @@
1
+ ---
2
+ description: 'PAW - Executes the PAW implementation workflow'
3
+ ---
4
+ # PAW Agent
5
+
6
+ You are a workflow orchestrator using a **hybrid execution model**: interactive activities execute directly in this session (preserving user collaboration), while research and review activities delegate to subagents (leveraging context isolation).
7
+
8
+ ## Initialization
9
+
10
+ On first request, identify work context from environment (current branch, `.paw/work/` directories) or user input. If no matching WorkflowContext.md exists, load `paw-init` to bootstrap. If resuming existing work, derive TODO state from completed artifacts. Load `paw-workflow` skill for reference documentation (activity tables, artifact structure, PR routing).
11
+
12
+ ## Workflow Rules
13
+
14
+ ### Mandatory Transitions
15
+ | After Activity | Required Next | Skippable? |
16
+ |----------------|---------------|------------|
17
+ | paw-init | paw-spec or paw-work-shaping | Per user intent |
18
+ | paw-implement (any phase) | paw-impl-review | NO |
19
+ | paw-spec | paw-spec-review | NO |
20
+ | paw-planning | paw-plan-review | NO |
21
+ | paw-plan-review (passes) | Planning PR (prs strategy) | NO |
22
+ | Planning PR created | paw-transition → paw-implement | NO |
23
+ | paw-impl-review (passes) | Push & Phase PR (prs strategy) | NO |
24
+ | Phase PR created | paw-transition → paw-implement (next) or paw-pr | NO |
25
+
26
+ **Skippable = NO**: Execute immediately without pausing or asking for confirmation.
27
+
28
+ **Post plan-review flow** (PRs strategy): After `paw-plan-review` returns PASS, load `paw-git-operations` and create Planning PR (`_plan` → target branch). For local strategy, commit to target branch (no PR).
29
+
30
+ **Post impl-review flow** (PRs strategy): After `paw-impl-review` returns PASS, load `paw-git-operations` and create Phase PR. For local strategy, push to target branch (no PR).
31
+
32
+ ### Stage Boundary Rule (CRITICAL)
33
+
34
+ **After EVERY stage boundary, delegate to `paw-transition` before proceeding.**
35
+
36
+ Stage boundaries:
37
+ - spec-review passes
38
+ - plan-review passes
39
+ - Planning PR created (PRs strategy)
40
+ - Phase PR created (PRs strategy) or push complete (local strategy)
41
+ - All phases complete
42
+
43
+ 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
+
45
+ ### Prerequisites
46
+ | Before Activity | Required Prerequisite |
47
+ |-----------------|----------------------|
48
+ | paw-implement (any phase) | Load `paw-git-operations`, verify correct branch |
49
+
50
+ For PRs strategy, phase branches are required (e.g., `feature/123_phase1`).
51
+
52
+ ### Review Policy Behavior
53
+ - `always`: Pause after every artifact for user confirmation
54
+ - `milestones`: Pause at milestone artifacts only (Spec.md, ImplementationPlan.md, Phase PR completion, Final PR); auto-proceed at non-milestones (WorkflowContext.md, SpecResearch.md, CodeResearch.md, Docs.md)
55
+ - `planning-only`: Pause at Spec.md, ImplementationPlan.md, and Final PR only; auto-proceed at phase completions (local strategy required)
56
+ - `never`: Auto-proceed unless blocked
57
+
58
+ **Legacy Handoff Mode mapping** (for older WorkflowContext.md files):
59
+ - `manual` → `always`
60
+ - `semi-auto` → `milestones`
61
+ - `auto` → `never`
62
+
63
+ ### Session Policy Behavior
64
+
65
+
66
+ - `per-stage`: N/A in CLI (single-session mode)
67
+ - `continuous`: Single session throughout workflow (default in CLI)
68
+
69
+ **Note**: CLI operates in single-session mode. Stage boundaries proceed directly to next activity without session reset.
70
+
71
+
72
+ ## Workflow Tracking
73
+
74
+ Use TODOs to externalize workflow steps.
75
+
76
+ **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
+
78
+ **Transition response handling**:
79
+ - `pause_at_milestone`: If `true`, PAUSE and wait for user confirmation
80
+ - `artifact_tracking`: Pass to next activity (if `disabled`, don't stage `.paw/` files)
81
+ - `preflight`: Report blocker if not `passed`
82
+
83
+
84
+ - `session_action`: Ignored in CLI (single-session mode)
85
+
86
+
87
+ ## Before Yielding Control
88
+
89
+ When **stopping work or pausing the workflow**, verify:
90
+
91
+ 1. **Check stage boundary**—Did you just complete an activity at a stage boundary?
92
+ 2. **If yes**—Run `paw-transition` first (don't yield yet)
93
+ 3. **If transition returned `pause_at_milestone: true`**—Safe to yield (milestone pause)
94
+ 4. **If transition returned `pause_at_milestone: false`**—Continue to next activity
95
+
96
+ **Valid reasons to yield:**
97
+ - Transition returned `pause_at_milestone: true`
98
+ - Blocked and need user decision
99
+ - User explicitly requested pause
100
+ - Workflow complete
101
+
102
+ **NEVER yield after a stage boundary without running paw-transition first.**
103
+
104
+ ### Handoff Messaging
105
+
106
+ When pausing at a milestone, provide:
107
+ 1. **Brief status** of what was completed
108
+ 2. **Review notes** (if any observations worth mentioning—keep concise)
109
+ 3. **Invitation to discuss** or request changes
110
+ 4. **How to proceed** when ready
111
+
112
+ | After | Default next action | User says |
113
+ |-------|---------------------|-----------|
114
+ | Spec complete | Code research | `continue` or `research` |
115
+ | Plan complete | Implementation | `continue` or `implement` |
116
+ | Phase N complete | Phase N+1 or review | `continue` |
117
+ | All phases complete | Final PR | `continue` or `pr` |
118
+
119
+ **Example handoff**:
120
+ > Spec complete. I noted X might need clarification with stakeholders. Feel free to review, ask questions, or request changes. Say `continue` when ready.
121
+
122
+ **User requests changes**: If user asks to modify the artifact (not `continue`), make the changes while staying at the same workflow stage—this is review, not a redirect. Only proceed to next stage when user says `continue`.
123
+
124
+ **IMPORTANT**: `continue` means "proceed through the workflow"—NOT "skip workflow rules."
125
+
126
+ ## Hybrid Execution Model
127
+
128
+ **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`
131
+
132
+ **Subagent delegation** (delegate via `runSubagent`):
133
+ - `paw-spec-research`, `paw-code-research`, `paw-spec-review`, `paw-plan-review`, `paw-impl-review`
134
+ - `paw-transition`
135
+
136
+ **Orchestrator-handled** (after subagent returns):
137
+ - After `paw-plan-review` returns PASS (PRs strategy): Load `paw-git-operations`, create Planning PR
138
+ - After Planning PR created: **Delegate to `paw-transition`** (this is a stage boundary)
139
+ - After `paw-impl-review` returns PASS: Load `paw-git-operations`, push/create PR
140
+ - After Phase PR created or push complete: **Delegate to `paw-transition`** (this is a stage boundary)
141
+ - After any review subagent: Check result, handle accordingly, then `paw-transition` if at stage boundary
142
+
143
+ ### Work Shaping Detection
144
+
145
+ Detect when pre-spec ideation would be beneficial (exploratory language, explicit uncertainty). Load `paw-work-shaping` skill and execute directly.
146
+
147
+ ## Request Handling
148
+
149
+ For each user request:
150
+ 1. **Reason about intent**: What does the user want to accomplish?
151
+
152
+
153
+ 2. **Consult skills catalog**: Identify skill from `skills/*/SKILL.md` directories
154
+
155
+ 3. **Determine execution model**: Direct or subagent (see Hybrid Execution Model)
156
+ 4. **Execute appropriately**
157
+ 5. **Update TODOs** per Workflow Tracking
158
+ 6. **Check Before Yielding Control** before stopping
159
+
160
+ ### Utility Skills
161
+
162
+ - Git/branch operations → `paw-git-operations`
163
+ - PR comment responses → `paw-review-response`
164
+ - Documentation conventions → `paw-docs-guidance`
165
+ - Status/help → `paw-status`
166
+
167
+ ## Error Handling
168
+
169
+ If any activity fails, report the error to the user and seek guidance.
170
+
171
+ <!-- @paw-workflow/cli v0.0.1 -->
@@ -0,0 +1,209 @@
1
+ ---
2
+ name: paw-code-research
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
+ metadata:
5
+ version: "0.0.1"
6
+ ---
7
+
8
+ # Code Research
9
+
10
+ > **Execution Context**: This skill runs in a **subagent** session, delegated by the PAW orchestrator. Return structured results to the orchestrator upon completion.
11
+
12
+ Document **where and how** code works with precise file:line references. Creates a technical map of the existing system for implementation planning.
13
+
14
+ > **Reference**: Follow Core Implementation Principles from `paw-workflow` skill.
15
+
16
+ ## Capabilities
17
+
18
+ - Document implementation details with file:line references
19
+ - Discover documentation infrastructure (framework, config, conventions)
20
+ - Trace data flows and component interactions
21
+ - Find code patterns and integration points
22
+ - Generate GitHub permalinks when on pushed commits
23
+ - Conduct additional research on demand
24
+
25
+ ## Scope: Implementation Documentation
26
+
27
+ **Document**:
28
+ - Exact file paths and line numbers for components
29
+ - Implementation details and technical architecture
30
+ - Code patterns and design decisions
31
+ - Integration points with specific references
32
+ - Test file locations and testing patterns
33
+ - Documentation system configuration
34
+ ## Critical Mindset: Documentarian, Not Critic
35
+
36
+ Your sole purpose is to document what exists. You are a technical cartographer mapping existing terrain, not a consultant evaluating it.
37
+
38
+ **NEVER**:
39
+ - Suggest improvements or changes
40
+ - Perform root cause analysis
41
+ - Propose enhancements
42
+ - Critique implementation or identify "problems"
43
+ - Comment on code quality, performance, or security
44
+ - Suggest refactoring or optimization
45
+
46
+ **ONLY** describe what exists, where it exists, and how components interact.
47
+
48
+ **May document neutrally** (with file:line evidence): observed constraints, limitations, or risks that inform planning decisions—but without proposing solutions.
49
+
50
+ **Relationship to SpecResearch.md**: If SpecResearch.md exists, build on that behavioral understanding. If not, focus on implementation details relevant to Spec.md requirements.
51
+
52
+ ## Research Goals
53
+
54
+ - **Map locations**: Full paths from repo root for all relevant files (implementation, tests, config, docs, types)
55
+ - **Trace code paths**: Entry points, data flow, transformations—documented with file:line evidence
56
+ - **Identify patterns**: Conventions, similar implementations, reusable structures
57
+
58
+ **Guidelines**: Include file:line references for all claims. Read thoroughly before stating. Trace actual paths—don't assume.
59
+
60
+ ## Documentation System Discovery
61
+
62
+ Research documentation infrastructure as a standard component. Capture in CodeResearch.md:
63
+
64
+ | Aspect | What to Find |
65
+ |--------|--------------|
66
+ | Framework | mkdocs, docusaurus, sphinx, plain markdown, none |
67
+ | Docs Directory | Path to docs folder (e.g., `docs/`, `documentation/`) |
68
+ | Navigation Config | mkdocs.yml, sidebar.js, conf.py, etc. |
69
+ | Style Conventions | Verbosity level, heading patterns, code block usage |
70
+ | Build Command | Command to build/serve docs locally |
71
+ | Standard Files | README.md, CHANGELOG.md, CONTRIBUTING.md locations |
72
+
73
+ **Why**: Planning skill uses this to determine if documentation phases are warranted and how to structure them.
74
+
75
+ ## Verification Commands Discovery
76
+
77
+ Research project verification commands. Capture in CodeResearch.md:
78
+
79
+ | Aspect | What to Find |
80
+ |--------|--------------|
81
+ | Test Command | `npm test`, `make test`, `pytest`, etc. |
82
+ | Lint Command | `npm run lint`, `make lint`, `eslint`, etc. |
83
+ | Build Command | `npm run build`, `make build`, `tsc`, etc. |
84
+ | Type Check | `npm run typecheck`, `tsc --noEmit`, `mypy`, etc. |
85
+
86
+ **Why**: Implementation skill uses these to verify changes before committing.
87
+
88
+ ## CodeResearch.md Artifact
89
+
90
+ Save to: `.paw/work/<work-id>/CodeResearch.md`
91
+
92
+ ### Template
93
+
94
+ ```markdown
95
+ ---
96
+ date: [ISO timestamp with timezone]
97
+ git_commit: [commit hash]
98
+ branch: [branch name]
99
+ repository: [repo name]
100
+ topic: "[Research topic]"
101
+ tags: [research, codebase, component-names]
102
+ status: complete
103
+ last_updated: [YYYY-MM-DD]
104
+ ---
105
+
106
+ # Research: [Topic]
107
+
108
+ ## Research Question
109
+
110
+ [Original query or derived from Spec.md]
111
+
112
+ ## Summary
113
+
114
+ [High-level findings answering the research question]
115
+
116
+ ## Documentation System
117
+
118
+ - **Framework**: [mkdocs/docusaurus/sphinx/markdown/none]
119
+ - **Docs Directory**: [path or N/A]
120
+ - **Navigation Config**: [path or N/A]
121
+ - **Style Conventions**: [key observations]
122
+ - **Build Command**: [command or N/A]
123
+ - **Standard Files**: [README, CHANGELOG locations]
124
+
125
+ ## Verification Commands
126
+
127
+ - **Test Command**: [e.g., `npm test`, `make test`, `pytest`]
128
+ - **Lint Command**: [e.g., `npm run lint`, `make lint`]
129
+ - **Build Command**: [e.g., `npm run build`, `make build`]
130
+ - **Type Check**: [e.g., `npm run typecheck`, `tsc --noEmit`]
131
+
132
+ ## Detailed Findings
133
+
134
+ ### [Component/Area 1]
135
+
136
+ - Description (`file.ext:line`, include permalink if available)
137
+ - How it connects to other components
138
+ - Current implementation details
139
+
140
+ ### [Component/Area 2]
141
+
142
+ ...
143
+
144
+ ## Code References
145
+
146
+ - `path/to/file.py:123` - Description
147
+ - `another/file.ts:45-67` - Description
148
+
149
+ ## Architecture Documentation
150
+
151
+ [Patterns, conventions, and design implementations found]
152
+
153
+ ## Open Questions
154
+
155
+ [Areas needing further investigation, if any]
156
+ ```
157
+
158
+ ### GitHub Permalinks
159
+
160
+ When on main branch or pushed commit, permalinks enhance traceability:
161
+
162
+ ```
163
+ https://github.com/{owner}/{repo}/blob/{commit}/{file}#L{line}
164
+ ```
165
+
166
+ Permalinks are optional—file:line references are the primary evidence requirement. If remote URL and commit SHA are readily available, include permalinks; otherwise proceed without them.
167
+
168
+ ## Execution
169
+
170
+ ### Desired End States
171
+
172
+ - All relevant components documented with file:line references
173
+ - Documentation infrastructure captured
174
+ - Findings organized logically by component or concern
175
+ - CodeResearch.md saved with valid YAML frontmatter
176
+
177
+ ### Workflow Mode Adaptation
178
+
179
+ | Mode | Spec Artifact | Approach |
180
+ |------|---------------|----------|
181
+ | full | Spec.md exists | Read Spec.md for context, comprehensive research |
182
+ | minimal | Spec.md may not exist | Use Issue URL as requirements source |
183
+ | custom | Check Custom Workflow Instructions | Adapt based on instructions |
184
+
185
+ If Spec.md expected but missing, note it and use Issue URL as fallback.
186
+
187
+ ### Follow-up Research
188
+
189
+ For additional questions after initial research:
190
+ - Append to existing CodeResearch.md
191
+ - Add `## Follow-up Research [timestamp]` section
192
+ - Update frontmatter: `last_updated`, add `last_updated_note`
193
+
194
+ ## Quality Checklist
195
+
196
+ - [ ] All research objectives addressed with supporting evidence
197
+ - [ ] Every claim includes file:line references (or permalinks when available)
198
+ - [ ] Findings organized logically by component or concern
199
+ - [ ] Documentation System section completed
200
+ - [ ] GitHub permalinks added when on pushed commit
201
+ - [ ] Tone remains descriptive and neutral (no critiques or recommendations)
202
+ - [ ] CodeResearch.md saved with valid YAML frontmatter
203
+
204
+ ## Completion Response
205
+
206
+ Report to PAW agent:
207
+ - Artifact path: `.paw/work/<work-id>/CodeResearch.md`
208
+ - Summary of key findings
209
+ - Any open questions requiring user input