@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.
- package/README.md +124 -0
- package/bin/paw.js +82 -0
- package/dist/agents/PAW-Review.agent.md +86 -0
- package/dist/agents/PAW.agent.md +171 -0
- package/dist/skills/paw-code-research/SKILL.md +209 -0
- package/dist/skills/paw-docs-guidance/SKILL.md +163 -0
- package/dist/skills/paw-git-operations/SKILL.md +196 -0
- package/dist/skills/paw-impl-review/SKILL.md +178 -0
- package/dist/skills/paw-implement/SKILL.md +153 -0
- package/dist/skills/paw-init/SKILL.md +118 -0
- package/dist/skills/paw-plan-review/SKILL.md +117 -0
- package/dist/skills/paw-planning/SKILL.md +217 -0
- package/dist/skills/paw-pr/SKILL.md +157 -0
- package/dist/skills/paw-review-baseline/SKILL.md +268 -0
- package/dist/skills/paw-review-correlation/SKILL.md +307 -0
- package/dist/skills/paw-review-critic/SKILL.md +373 -0
- package/dist/skills/paw-review-feedback/SKILL.md +437 -0
- package/dist/skills/paw-review-gap/SKILL.md +639 -0
- package/dist/skills/paw-review-github/SKILL.md +336 -0
- package/dist/skills/paw-review-impact/SKILL.md +569 -0
- package/dist/skills/paw-review-response/SKILL.md +118 -0
- package/dist/skills/paw-review-understanding/SKILL.md +372 -0
- package/dist/skills/paw-review-workflow/SKILL.md +239 -0
- package/dist/skills/paw-spec/SKILL.md +257 -0
- package/dist/skills/paw-spec-research/SKILL.md +138 -0
- package/dist/skills/paw-spec-review/SKILL.md +101 -0
- package/dist/skills/paw-status/SKILL.md +160 -0
- package/dist/skills/paw-transition/SKILL.md +134 -0
- package/dist/skills/paw-work-shaping/SKILL.md +99 -0
- package/dist/skills/paw-workflow/SKILL.md +142 -0
- package/lib/commands/install.js +103 -0
- package/lib/commands/list.js +18 -0
- package/lib/commands/uninstall.js +95 -0
- package/lib/commands/upgrade.js +119 -0
- package/lib/manifest.js +42 -0
- package/lib/paths.js +42 -0
- package/lib/registry.js +41 -0
- package/package.json +40 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: paw-review-baseline
|
|
3
|
+
description: Analyzes the codebase at the PR's base commit to establish baseline understanding for review comparison.
|
|
4
|
+
metadata:
|
|
5
|
+
version: "0.0.1"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Baseline Research Activity Skill
|
|
9
|
+
|
|
10
|
+
Analyze the codebase **at the base commit** (before PR changes) to document how the system worked, what patterns existed, and what context informs understanding of the changes.
|
|
11
|
+
|
|
12
|
+
> **Reference**: Follow Core Review Principles from `paw-review-workflow` skill.
|
|
13
|
+
|
|
14
|
+
## CRITICAL: Baseline Only
|
|
15
|
+
|
|
16
|
+
**Your only job is to document the pre-change codebase as it existed.**
|
|
17
|
+
|
|
18
|
+
- DO NOT analyze the PR changes or compare before/after
|
|
19
|
+
- DO NOT suggest improvements or identify issues
|
|
20
|
+
- DO NOT critique the implementation
|
|
21
|
+
- ONLY describe what existed before: behavior, patterns, conventions, integration points
|
|
22
|
+
|
|
23
|
+
## Responsibilities
|
|
24
|
+
|
|
25
|
+
- Checkout base commit safely (with state restoration)
|
|
26
|
+
- Research how affected modules functioned before changes
|
|
27
|
+
- Document integration points and dependencies
|
|
28
|
+
- Identify patterns and conventions in affected areas
|
|
29
|
+
- Create CodeResearch.md with baseline understanding
|
|
30
|
+
|
|
31
|
+
## Non-Responsibilities
|
|
32
|
+
|
|
33
|
+
- PR change analysis or before/after comparison (understanding skill)
|
|
34
|
+
- Quality evaluation or recommendations (evaluation skills)
|
|
35
|
+
- Workflow orchestration (handled by workflow skill)
|
|
36
|
+
|
|
37
|
+
## Prerequisites
|
|
38
|
+
|
|
39
|
+
- ReviewContext.md must exist with base commit SHA
|
|
40
|
+
- ResearchQuestions.md should exist with research questions
|
|
41
|
+
|
|
42
|
+
## Multi-Repository Mode
|
|
43
|
+
|
|
44
|
+
When reviewing PRs across multiple repositories:
|
|
45
|
+
|
|
46
|
+
### Detection
|
|
47
|
+
|
|
48
|
+
Multi-repo mode activates when:
|
|
49
|
+
- Multiple PR URLs/numbers provided in input
|
|
50
|
+
- Multiple workspace folders open (detected via multiple `.git` directories)
|
|
51
|
+
- ReviewContext.md contains `related_prs` entries
|
|
52
|
+
|
|
53
|
+
### Per-Repository Processing
|
|
54
|
+
|
|
55
|
+
Process each repository's base commit independently:
|
|
56
|
+
|
|
57
|
+
1. **Iterate Repositories**: For each PR in the review set:
|
|
58
|
+
- Read its ReviewContext.md from `.paw/reviews/PR-<number>-<repo-slug>/`
|
|
59
|
+
- Extract base commit SHA and repository path
|
|
60
|
+
|
|
61
|
+
2. **Checkout and Research**: For each repository:
|
|
62
|
+
- Navigate to repository root
|
|
63
|
+
- Checkout base commit
|
|
64
|
+
- Conduct baseline research
|
|
65
|
+
- Create CodeResearch.md in that PR's artifact directory
|
|
66
|
+
- Restore original state before moving to next repository
|
|
67
|
+
|
|
68
|
+
3. **State Restoration**: Between repositories:
|
|
69
|
+
- Restore each repository to its original branch/HEAD
|
|
70
|
+
- Verify clean working state before proceeding
|
|
71
|
+
|
|
72
|
+
### Cross-Repository Pattern Identification
|
|
73
|
+
|
|
74
|
+
When analyzing multiple repositories, also document:
|
|
75
|
+
|
|
76
|
+
- **Shared Conventions**: Common patterns used across repos (naming, error handling, API styles)
|
|
77
|
+
- **Interface Contracts**: How repositories communicate (API schemas, shared types, event formats)
|
|
78
|
+
- **Dependency Relationships**: Which repo depends on which (import paths, package dependencies)
|
|
79
|
+
|
|
80
|
+
Add a "Cross-Repository Patterns" section to each CodeResearch.md noting patterns that appear across the repository set.
|
|
81
|
+
|
|
82
|
+
### Error Handling
|
|
83
|
+
|
|
84
|
+
If one repository fails:
|
|
85
|
+
- Document the failure in that PR's artifact directory
|
|
86
|
+
- Continue with remaining repositories
|
|
87
|
+
- Report partial completion status
|
|
88
|
+
|
|
89
|
+
## Execution Steps
|
|
90
|
+
|
|
91
|
+
### Step 1: Sync Remote State
|
|
92
|
+
|
|
93
|
+
**Desired End State**: The base commit SHA (from ReviewContext.md) is locally available.
|
|
94
|
+
|
|
95
|
+
1. Extract from ReviewContext.md: remote name, base branch, base commit SHA
|
|
96
|
+
2. Ensure the repository has the latest remote state for the base branch
|
|
97
|
+
3. Verify the base commit is reachable locally
|
|
98
|
+
4. If the commit cannot be reached, report the blocker with context
|
|
99
|
+
|
|
100
|
+
### Step 2: Checkout Base Commit
|
|
101
|
+
|
|
102
|
+
**Desired End State**: Working directory is at the base commit, with ability to restore original state.
|
|
103
|
+
|
|
104
|
+
1. Record current branch/HEAD for later restoration
|
|
105
|
+
2. Checkout the base commit
|
|
106
|
+
3. Confirm the working directory reflects the pre-change state
|
|
107
|
+
|
|
108
|
+
**CRITICAL**: All subsequent research must analyze code at this commit.
|
|
109
|
+
|
|
110
|
+
### Step 3: Read Research Questions
|
|
111
|
+
|
|
112
|
+
1. Read `ResearchQuestions.md`
|
|
113
|
+
2. Note list of changed files from ReviewContext.md
|
|
114
|
+
3. Identify modules/areas needing baseline documentation
|
|
115
|
+
|
|
116
|
+
### Step 4: Analyze Pre-Change Codebase
|
|
117
|
+
|
|
118
|
+
Focus on areas identified in research prompt:
|
|
119
|
+
|
|
120
|
+
**Behavioral Documentation**:
|
|
121
|
+
- How modules functioned before changes
|
|
122
|
+
- Entry points, data flows, contracts
|
|
123
|
+
- Error handling approaches
|
|
124
|
+
|
|
125
|
+
**Integration Mapping**:
|
|
126
|
+
- Components depending on changed modules
|
|
127
|
+
- External dependencies
|
|
128
|
+
- API contracts and interfaces
|
|
129
|
+
|
|
130
|
+
**Pattern Recognition**:
|
|
131
|
+
- Coding conventions in affected areas
|
|
132
|
+
- Testing patterns for similar components
|
|
133
|
+
- Documentation patterns
|
|
134
|
+
|
|
135
|
+
**Test Coverage Baseline**:
|
|
136
|
+
- Existing tests for affected areas
|
|
137
|
+
- Test patterns and utilities used
|
|
138
|
+
|
|
139
|
+
### Step 5: Create CodeResearch.md
|
|
140
|
+
|
|
141
|
+
Write to `.paw/reviews/<identifier>/CodeResearch.md`:
|
|
142
|
+
- YAML frontmatter with metadata
|
|
143
|
+
- Answer questions from research prompt
|
|
144
|
+
- Document behavioral understanding
|
|
145
|
+
- Include file:line references (at base commit)
|
|
146
|
+
- Use template structure below
|
|
147
|
+
|
|
148
|
+
### Step 6: Update ReviewContext.md
|
|
149
|
+
|
|
150
|
+
Add CodeResearch.md to Artifacts section to signal completion.
|
|
151
|
+
|
|
152
|
+
### Step 7: Restore Original State
|
|
153
|
+
|
|
154
|
+
**Desired End State**: Working directory returned to original branch, clean state confirmed.
|
|
155
|
+
|
|
156
|
+
## Validation Criteria
|
|
157
|
+
|
|
158
|
+
Before completing:
|
|
159
|
+
- [ ] Base commit verified reachable
|
|
160
|
+
- [ ] Research conducted at base commit (not current HEAD)
|
|
161
|
+
- [ ] Research questions answered
|
|
162
|
+
- [ ] Behavioral understanding documented (not implementation details)
|
|
163
|
+
- [ ] Patterns and conventions identified
|
|
164
|
+
- [ ] File:line references included
|
|
165
|
+
- [ ] CodeResearch.md saved with valid frontmatter
|
|
166
|
+
- [ ] ReviewContext.md updated
|
|
167
|
+
- [ ] Original state restored
|
|
168
|
+
|
|
169
|
+
## Completion Response
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
Activity complete.
|
|
173
|
+
Artifact saved: .paw/reviews/<identifier>/CodeResearch.md
|
|
174
|
+
Status: Success
|
|
175
|
+
Summary: Baseline documented at commit <sha> - [N] modules analyzed, [M] patterns identified.
|
|
176
|
+
|
|
177
|
+
Original branch restored: <original-branch>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## CodeResearch.md Template
|
|
183
|
+
|
|
184
|
+
```markdown
|
|
185
|
+
---
|
|
186
|
+
date: <YYYY-MM-DD HH:MM:SS TZ>
|
|
187
|
+
git_commit: <base commit SHA>
|
|
188
|
+
branch: <base branch>
|
|
189
|
+
repository: <repository name>
|
|
190
|
+
topic: "Baseline Analysis for <PR Title or Branch>"
|
|
191
|
+
tags: [review, baseline, pre-change]
|
|
192
|
+
status: complete
|
|
193
|
+
last_updated: <YYYY-MM-DD>
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
# Baseline Research: <PR Title or Branch>
|
|
197
|
+
|
|
198
|
+
**Date**: <timestamp>
|
|
199
|
+
**Base Commit**: <sha>
|
|
200
|
+
**Base Branch**: <base-branch>
|
|
201
|
+
**Repository**: <repository>
|
|
202
|
+
|
|
203
|
+
**Context**: Documents how the system worked **before** PR changes to inform specification derivation and impact evaluation.
|
|
204
|
+
|
|
205
|
+
## Research Questions
|
|
206
|
+
|
|
207
|
+
<Questions from ResearchQuestions.md>
|
|
208
|
+
|
|
209
|
+
## Summary
|
|
210
|
+
|
|
211
|
+
<High-level overview of pre-change system state>
|
|
212
|
+
|
|
213
|
+
## Baseline Behavior
|
|
214
|
+
|
|
215
|
+
### <Module/Area 1>
|
|
216
|
+
|
|
217
|
+
**How it worked before changes:**
|
|
218
|
+
- Description of behavior (`file.ext:line`)
|
|
219
|
+
- Key functions and responsibilities
|
|
220
|
+
- Data flow and transformations
|
|
221
|
+
- Error handling approach
|
|
222
|
+
|
|
223
|
+
**Integration points:**
|
|
224
|
+
- Components that depended on this (`file.ext:line`)
|
|
225
|
+
- External dependencies
|
|
226
|
+
- API contracts and interfaces
|
|
227
|
+
|
|
228
|
+
### <Module/Area 2>
|
|
229
|
+
|
|
230
|
+
...
|
|
231
|
+
|
|
232
|
+
## Patterns & Conventions
|
|
233
|
+
|
|
234
|
+
**Established patterns observed:**
|
|
235
|
+
- Naming conventions
|
|
236
|
+
- Code organization patterns
|
|
237
|
+
- Error handling patterns
|
|
238
|
+
- Testing patterns
|
|
239
|
+
|
|
240
|
+
**File references:**
|
|
241
|
+
- `path/to/file.py:123` - Example of pattern X
|
|
242
|
+
- `another/file.ts:45-67` - Example of pattern Y
|
|
243
|
+
|
|
244
|
+
## Test Coverage Baseline
|
|
245
|
+
|
|
246
|
+
**Existing tests for affected areas:**
|
|
247
|
+
- `test/path/file.test.ts` - What was tested
|
|
248
|
+
- Coverage level (if measurable)
|
|
249
|
+
- Test patterns and conventions
|
|
250
|
+
|
|
251
|
+
## Performance Context
|
|
252
|
+
|
|
253
|
+
<If relevant to changes>
|
|
254
|
+
- Hot paths identified
|
|
255
|
+
- Performance characteristics
|
|
256
|
+
- Resource usage patterns
|
|
257
|
+
|
|
258
|
+
## Documentation Context
|
|
259
|
+
|
|
260
|
+
**Relevant documentation:**
|
|
261
|
+
- README sections
|
|
262
|
+
- API documentation
|
|
263
|
+
- Inline comments and explanations
|
|
264
|
+
|
|
265
|
+
## Open Questions
|
|
266
|
+
|
|
267
|
+
<Areas that need clarification or couldn't be fully documented>
|
|
268
|
+
```
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: paw-review-correlation
|
|
3
|
+
description: Synthesizes findings across multiple PRs to identify cross-repository dependencies, interface mismatches, and coordination gaps.
|
|
4
|
+
metadata:
|
|
5
|
+
version: "0.0.1"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Cross-Repository Correlation Analysis Skill
|
|
9
|
+
|
|
10
|
+
Synthesize findings across multiple PRs to identify cross-repository dependencies, interface mismatches, and coordination gaps that wouldn't be visible when analyzing PRs in isolation.
|
|
11
|
+
|
|
12
|
+
> **Reference**: Follow Core Review Principles from `paw-review-workflow` skill.
|
|
13
|
+
|
|
14
|
+
## Applicability
|
|
15
|
+
|
|
16
|
+
This skill is **only invoked for multi-repository reviews**. Skip this activity when:
|
|
17
|
+
- Single PR is being reviewed
|
|
18
|
+
- All PRs are from the same repository
|
|
19
|
+
- No `related_prs` entries in ReviewContext.md
|
|
20
|
+
- Single workspace folder open with single PR
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
Verify these artifacts exist for **each** PR in the review set:
|
|
25
|
+
|
|
26
|
+
For each `PR-<number>-<repo-slug>/` directory in `.paw/reviews/`:
|
|
27
|
+
- `ReviewContext.md` (includes `related_prs` entries)
|
|
28
|
+
- `CodeResearch.md` (baseline understanding per repo)
|
|
29
|
+
- `DerivedSpec.md` (intent per PR)
|
|
30
|
+
- `ImpactAnalysis.md` (includes Cross-Repository Dependencies section)
|
|
31
|
+
- `GapAnalysis.md` (includes Cross-Repository Consistency findings)
|
|
32
|
+
|
|
33
|
+
If any artifact is missing, report blocked status—earlier stages must complete first.
|
|
34
|
+
|
|
35
|
+
## Core Responsibilities
|
|
36
|
+
|
|
37
|
+
- Identify shared interfaces between repositories (types, APIs, events, messages)
|
|
38
|
+
- Detect interface contract mismatches (producer changed, consumer not updated)
|
|
39
|
+
- Flag missing coordinated changes
|
|
40
|
+
- Document deployment/migration ordering requirements
|
|
41
|
+
- Surface cross-cutting concerns (auth, logging conventions consistency)
|
|
42
|
+
- Generate comprehensive `CrossRepoAnalysis.md` artifact
|
|
43
|
+
|
|
44
|
+
## Non-Responsibilities
|
|
45
|
+
|
|
46
|
+
- Generating review comments (handled by paw-review-feedback)
|
|
47
|
+
- Individual PR analysis (handled by impact/gap skills)
|
|
48
|
+
- Workflow orchestration (handled by workflow skill)
|
|
49
|
+
|
|
50
|
+
## Process Steps
|
|
51
|
+
|
|
52
|
+
### Step 1: Load All Per-Repo Artifacts
|
|
53
|
+
|
|
54
|
+
For each PR artifact directory:
|
|
55
|
+
1. Read `ImpactAnalysis.md` → extract Cross-Repository Dependencies section
|
|
56
|
+
2. Read `GapAnalysis.md` → extract Cross-Repository Consistency findings
|
|
57
|
+
3. Read `ReviewContext.md` → extract `related_prs` relationships
|
|
58
|
+
4. Read `DerivedSpec.md` → understand each PR's intent
|
|
59
|
+
|
|
60
|
+
### Step 2: Build Cross-Repo Dependency Graph
|
|
61
|
+
|
|
62
|
+
Construct a dependency graph showing:
|
|
63
|
+
|
|
64
|
+
**Repository Roles:**
|
|
65
|
+
- **Exporter**: Repository that defines/exports interfaces (APIs, types, events)
|
|
66
|
+
- **Consumer**: Repository that imports/uses those interfaces
|
|
67
|
+
|
|
68
|
+
**Dependency Types:**
|
|
69
|
+
- `type-export`: Shared TypeScript/flow types
|
|
70
|
+
- `api-endpoint`: REST/GraphQL endpoints
|
|
71
|
+
- `event-schema`: Message/event formats
|
|
72
|
+
- `package-export`: npm/pip package public interfaces
|
|
73
|
+
- `config-schema`: Shared configuration formats
|
|
74
|
+
|
|
75
|
+
**Output:**
|
|
76
|
+
```
|
|
77
|
+
Dependency Graph:
|
|
78
|
+
repo-a (API Server)
|
|
79
|
+
→ exports: UserProfile type, /api/users endpoint
|
|
80
|
+
repo-b (Frontend)
|
|
81
|
+
→ imports: UserProfile type from repo-a
|
|
82
|
+
→ calls: /api/users endpoint from repo-a
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Step 3: Identify Interface Contracts
|
|
86
|
+
|
|
87
|
+
For each identified dependency:
|
|
88
|
+
|
|
89
|
+
**Extract Contract Details:**
|
|
90
|
+
- Interface name and type (type, endpoint, event, etc.)
|
|
91
|
+
- Defined in: file:line reference in exporter repo
|
|
92
|
+
- Consumed in: file:line reference(s) in consumer repo(s)
|
|
93
|
+
- Current state: Document what the interface looks like in each repo
|
|
94
|
+
|
|
95
|
+
**Interface Categories:**
|
|
96
|
+
- **Shared Types**: Type definitions, interfaces, schemas
|
|
97
|
+
- **API Endpoints**: Request/response shapes, URL paths
|
|
98
|
+
- **Event Schemas**: Message formats, event payloads
|
|
99
|
+
- **Package Exports**: Public API from shared packages
|
|
100
|
+
|
|
101
|
+
### Step 4: Detect Interface Mismatches
|
|
102
|
+
|
|
103
|
+
For each interface contract, check:
|
|
104
|
+
|
|
105
|
+
**Mismatch Types:**
|
|
106
|
+
- **Shape Mismatch**: Fields added/removed/renamed that consumer doesn't handle
|
|
107
|
+
- **Type Incompatibility**: Changed types that break consumer usage
|
|
108
|
+
- **Missing Update**: Producer changed interface but consumer not updated
|
|
109
|
+
- **Version Drift**: Different versions of shared dependency
|
|
110
|
+
|
|
111
|
+
**Severity Assignment:**
|
|
112
|
+
- **Must**: Breaking change that will cause runtime errors
|
|
113
|
+
- **Should**: Change that may cause unexpected behavior
|
|
114
|
+
- **Could**: Inconsistency that adds technical debt
|
|
115
|
+
|
|
116
|
+
### Step 5: Analyze Deployment Dependencies
|
|
117
|
+
|
|
118
|
+
Determine deployment ordering:
|
|
119
|
+
|
|
120
|
+
**Analysis Questions:**
|
|
121
|
+
1. Which repo must deploy first for changes to work?
|
|
122
|
+
2. Are there database migrations that must run before code deployment?
|
|
123
|
+
3. Are feature flags needed to coordinate the rollout?
|
|
124
|
+
4. Can repos deploy independently or must they deploy together?
|
|
125
|
+
|
|
126
|
+
**Deployment Patterns:**
|
|
127
|
+
- **Sequential**: repo-a must deploy before repo-b
|
|
128
|
+
- **Coordinated**: Both must deploy within same window
|
|
129
|
+
- **Independent**: Can deploy in any order
|
|
130
|
+
- **Feature-flagged**: Deploy both, enable via flag
|
|
131
|
+
|
|
132
|
+
### Step 6: Generate CrossRepoAnalysis.md
|
|
133
|
+
|
|
134
|
+
Create comprehensive analysis artifact in the **primary** repository's artifact directory.
|
|
135
|
+
|
|
136
|
+
Primary repository determination:
|
|
137
|
+
- Repository with the "upstream" changes (exporter)
|
|
138
|
+
- If unclear, use the first PR's repository
|
|
139
|
+
|
|
140
|
+
## CrossRepoAnalysis.md Template
|
|
141
|
+
|
|
142
|
+
```markdown
|
|
143
|
+
---
|
|
144
|
+
date: <ISO-8601 timestamp>
|
|
145
|
+
repositories: [owner/repo-a, owner/repo-b]
|
|
146
|
+
prs: [PR-123, PR-456]
|
|
147
|
+
topic: "Cross-Repository Correlation Analysis"
|
|
148
|
+
tags: [cross-repo, correlation, dependencies]
|
|
149
|
+
status: complete
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
# Cross-Repository Correlation Analysis
|
|
153
|
+
|
|
154
|
+
## Repository Relationship
|
|
155
|
+
|
|
156
|
+
| Repository | Role | PRs | Primary |
|
|
157
|
+
|------------|------|-----|---------|
|
|
158
|
+
| owner/repo-a | API Server (exports) | PR-123 | ✓ |
|
|
159
|
+
| owner/repo-b | Client (imports) | PR-456 | |
|
|
160
|
+
|
|
161
|
+
## Dependency Graph
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
owner/repo-a
|
|
165
|
+
└─ exports ─→ owner/repo-b
|
|
166
|
+
- UserProfile type
|
|
167
|
+
- /api/users endpoint
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Shared Interfaces
|
|
171
|
+
|
|
172
|
+
### Interface: `UserProfile` Type
|
|
173
|
+
|
|
174
|
+
- **Type**: type-export
|
|
175
|
+
- **Defined in**: [repo-a/src/types/user.ts:15-25](repo-a/src/types/user.ts#L15-L25)
|
|
176
|
+
- **Consumed in**: [repo-b/src/api/client.ts:8](repo-b/src/api/client.ts#L8)
|
|
177
|
+
- **Status**: ⚠ Mismatch
|
|
178
|
+
|
|
179
|
+
**Current State:**
|
|
180
|
+
- repo-a adds `lastLogin: Date` field at line 22
|
|
181
|
+
- repo-b imports UserProfile but doesn't handle `lastLogin`
|
|
182
|
+
|
|
183
|
+
### Interface: `/api/users` Endpoint
|
|
184
|
+
|
|
185
|
+
- **Type**: api-endpoint
|
|
186
|
+
- **Defined in**: [repo-a/src/routes/users.ts:45-80](repo-a/src/routes/users.ts#L45-L80)
|
|
187
|
+
- **Consumed in**: [repo-b/src/services/userService.ts:33](repo-b/src/services/userService.ts#L33)
|
|
188
|
+
- **Status**: ✓ Aligned
|
|
189
|
+
|
|
190
|
+
## Cross-Repository Gaps
|
|
191
|
+
|
|
192
|
+
### Gap: Missing Consumer Update for `lastLogin` Field
|
|
193
|
+
|
|
194
|
+
- **Severity**: Must
|
|
195
|
+
- **Affects**: repo-b (consumer)
|
|
196
|
+
- **Issue**: repo-a adds `lastLogin` field to UserProfile, but repo-b doesn't handle it
|
|
197
|
+
- **Evidence**:
|
|
198
|
+
- Added: [repo-a/src/types/user.ts:22](repo-a/src/types/user.ts#L22) - `lastLogin: Date`
|
|
199
|
+
- Missing: [repo-b/src/api/client.ts](repo-b/src/api/client.ts) - no handling for new field
|
|
200
|
+
- **Recommendation**: Update repo-b to consume or explicitly ignore the new field
|
|
201
|
+
- **Cross-Reference**: (See PR-456-repo-b for consumer update needed)
|
|
202
|
+
|
|
203
|
+
### Gap: [Title]
|
|
204
|
+
|
|
205
|
+
- **Severity**: Should|Could
|
|
206
|
+
- **Affects**: [repository]
|
|
207
|
+
- **Issue**: [description]
|
|
208
|
+
- **Evidence**:
|
|
209
|
+
- [file:line references]
|
|
210
|
+
- **Recommendation**: [specific guidance]
|
|
211
|
+
|
|
212
|
+
## Deployment Considerations
|
|
213
|
+
|
|
214
|
+
### Recommended Deployment Order
|
|
215
|
+
|
|
216
|
+
1. **First**: owner/repo-a (PR-123)
|
|
217
|
+
- Reason: Provides new field that repo-b will consume
|
|
218
|
+
- Prerequisites: None
|
|
219
|
+
|
|
220
|
+
2. **Second**: owner/repo-b (PR-456)
|
|
221
|
+
- Reason: Consumes new field from repo-a
|
|
222
|
+
- Prerequisites: repo-a deployed
|
|
223
|
+
|
|
224
|
+
### Deployment Strategy
|
|
225
|
+
|
|
226
|
+
- **Pattern**: Sequential
|
|
227
|
+
- **Window**: Deploy repo-a, verify, then deploy repo-b
|
|
228
|
+
- **Rollback**: If repo-b deployment fails, repo-a can remain (backward compatible)
|
|
229
|
+
|
|
230
|
+
### Feature Flag Coordination
|
|
231
|
+
|
|
232
|
+
- No feature flag coordination required for this change set
|
|
233
|
+
|
|
234
|
+
*OR*
|
|
235
|
+
|
|
236
|
+
- **Flag Name**: `enable_last_login_display`
|
|
237
|
+
- **repos Affected**: repo-a (API), repo-b (UI)
|
|
238
|
+
- **Rollout**: Enable flag after both repos deployed
|
|
239
|
+
|
|
240
|
+
### Migration Requirements
|
|
241
|
+
|
|
242
|
+
- [ ] No database migrations required
|
|
243
|
+
- [ ] No data backfill required
|
|
244
|
+
|
|
245
|
+
*OR*
|
|
246
|
+
|
|
247
|
+
- **Migration**: repo-a requires migration `add_last_login_column`
|
|
248
|
+
- **Order**: Run migration before deploying repo-a code
|
|
249
|
+
- **Reversibility**: Migration is reversible via `remove_last_login_column`
|
|
250
|
+
|
|
251
|
+
## Summary
|
|
252
|
+
|
|
253
|
+
| Metric | Count |
|
|
254
|
+
|--------|-------|
|
|
255
|
+
| Interface contracts analyzed | X |
|
|
256
|
+
| Mismatches found | Y |
|
|
257
|
+
| Must-address gaps | Z |
|
|
258
|
+
| Should-consider gaps | W |
|
|
259
|
+
|
|
260
|
+
**Recommended Deployment Order**: repo-a → repo-b
|
|
261
|
+
|
|
262
|
+
**Key Findings**:
|
|
263
|
+
1. [Most critical cross-repo issue]
|
|
264
|
+
2. [Second most critical issue]
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Validation Checklist
|
|
268
|
+
|
|
269
|
+
Before marking complete:
|
|
270
|
+
- [ ] All per-repo artifacts loaded (ImpactAnalysis.md, GapAnalysis.md for each PR)
|
|
271
|
+
- [ ] Dependency graph includes all identified dependencies
|
|
272
|
+
- [ ] All shared interfaces documented with file:line references
|
|
273
|
+
- [ ] All mismatches have severity assigned (Must/Should/Could)
|
|
274
|
+
- [ ] Deployment order is actionable (not just "be careful")
|
|
275
|
+
- [ ] CrossRepoAnalysis.md written to primary repo's artifact directory
|
|
276
|
+
- [ ] Cross-references use notation: `(See PR-<number>-<repo-slug> for...)`
|
|
277
|
+
|
|
278
|
+
## Error Handling
|
|
279
|
+
|
|
280
|
+
### Partial Artifact Availability
|
|
281
|
+
|
|
282
|
+
If some repositories have artifacts but others don't:
|
|
283
|
+
1. Document which repos have complete artifacts
|
|
284
|
+
2. Proceed with correlation for available repos
|
|
285
|
+
3. Note limitations: "Correlation limited to repos X and Y; repo Z artifacts incomplete"
|
|
286
|
+
|
|
287
|
+
### Unidentifiable Dependencies
|
|
288
|
+
|
|
289
|
+
If dependency direction is unclear:
|
|
290
|
+
1. Document both possibilities
|
|
291
|
+
2. Flag for human review: "Dependency direction unclear—verify during review"
|
|
292
|
+
|
|
293
|
+
### No Cross-Repo Dependencies Found
|
|
294
|
+
|
|
295
|
+
If analysis finds no shared interfaces:
|
|
296
|
+
1. Document the analysis was performed
|
|
297
|
+
2. Note: "No shared interfaces identified between repositories"
|
|
298
|
+
3. Include brief explanation of what was checked
|
|
299
|
+
4. CrossRepoAnalysis.md still generated (documents that analysis was done)
|
|
300
|
+
|
|
301
|
+
## Completion
|
|
302
|
+
|
|
303
|
+
Report:
|
|
304
|
+
- Artifact path: `.paw/reviews/<primary-identifier>/CrossRepoAnalysis.md`
|
|
305
|
+
- Interface contracts analyzed count
|
|
306
|
+
- Mismatches found count
|
|
307
|
+
- Recommended deployment order summary
|