pi-feature-dev 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -9
- package/package.json +1 -1
- package/skills/prototype/LOGIC.md +73 -0
- package/skills/prototype/SKILL.md +47 -0
- package/skills/prototype/UI.md +114 -0
- package/skills/prototype/agents/openai.yaml +4 -0
- package/skills/visual-recap/SKILL.md +112 -0
- package/skills/visual-recap/agents/openai.yaml +4 -0
package/README.md
CHANGED
|
@@ -42,6 +42,16 @@ into concrete work without losing the creator's taste, feeling, or human focus.
|
|
|
42
42
|
It applies to creative technical and everyday work, while staying out of
|
|
43
43
|
factual, mechanical, exact, or fully specified tasks.
|
|
44
44
|
|
|
45
|
+
The `prototype` skill builds disposable logic or UI experiments that answer one
|
|
46
|
+
design question before production implementation. It follows the current
|
|
47
|
+
project and adapts its handoff, preview, task, and source-control steps to the
|
|
48
|
+
capabilities of the current agent environment.
|
|
49
|
+
|
|
50
|
+
The `visual-recap` skill turns a plan or completed non-trivial change into an
|
|
51
|
+
evidence-backed visual review aid. It helps a reviewer see the outcome, affected
|
|
52
|
+
system parts, risk, and the best place to inspect first. It adapts to the current
|
|
53
|
+
host agent, uses Mermaid for portable diagrams, and keeps an inline fallback.
|
|
54
|
+
|
|
45
55
|
## Install
|
|
46
56
|
|
|
47
57
|
```
|
|
@@ -78,16 +88,18 @@ No companion package is required. Optional Pi packages can improve specific part
|
|
|
78
88
|
|
|
79
89
|
## Credits
|
|
80
90
|
|
|
81
|
-
The original
|
|
82
|
-
|
|
91
|
+
The original skills and workflows that informed these portable versions came
|
|
92
|
+
from:
|
|
83
93
|
|
|
84
94
|
- [umputun/cc-thingz](https://github.com/umputun/cc-thingz)
|
|
85
95
|
- [anthropics/claude-code feature-dev plugin](https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev)
|
|
86
96
|
- [mattpocock/skills batch-grill-me and domain-modeling skills](https://github.com/mattpocock/skills)
|
|
97
|
+
- [mattpocock/skills prototype](https://github.com/mattpocock/skills/tree/main/skills/engineering/prototype)
|
|
87
98
|
- [danyuchn/asd-ste100-skill](https://github.com/danyuchn/asd-ste100-skill)
|
|
88
99
|
- [AminBlg/SimpleEnglish](https://github.com/AminBlg/SimpleEnglish/tree/main/skills/simple-english)
|
|
89
100
|
- [ayghri/i-have-adhd](https://github.com/ayghri/i-have-adhd)
|
|
90
101
|
- [bish-x/creator-vibe](https://github.com/bish-x/creator-vibe)
|
|
102
|
+
- [kentcdodds/kcd-skills visual-recap](https://github.com/kentcdodds/kcd-skills/tree/main/skills/visual-recap)
|
|
91
103
|
|
|
92
104
|
## Usage
|
|
93
105
|
|
|
@@ -109,6 +121,18 @@ Carry an incomplete creative brief into the work itself:
|
|
|
109
121
|
/skill:creator-vibe Make this onboarding feel calm, capable, and unmistakably ours.
|
|
110
122
|
```
|
|
111
123
|
|
|
124
|
+
Create a visual review aid for a plan or completed change:
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
/skill:visual-recap Show the architecture impact of the current change.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Build a disposable prototype to answer one design question:
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
/skill:prototype Compare three structurally different settings-page layouts.
|
|
134
|
+
```
|
|
135
|
+
|
|
112
136
|
The files under `skills/*/SKILL.md` are portable Markdown and can be adapted for
|
|
113
137
|
other agent environments.
|
|
114
138
|
|
|
@@ -213,14 +237,22 @@ pi-feature-dev/
|
|
|
213
237
|
├── plan-review/
|
|
214
238
|
│ ├── agents/openai.yaml
|
|
215
239
|
│ └── SKILL.md
|
|
216
|
-
|
|
240
|
+
├── prototype/
|
|
241
|
+
│ ├── agents/openai.yaml
|
|
242
|
+
│ ├── LOGIC.md
|
|
243
|
+
│ ├── UI.md
|
|
244
|
+
│ └── SKILL.md
|
|
245
|
+
├── ste/
|
|
246
|
+
│ ├── agents/openai.yaml
|
|
247
|
+
│ ├── references/
|
|
248
|
+
│ │ ├── before-after.md
|
|
249
|
+
│ │ ├── checklist.md
|
|
250
|
+
│ │ ├── use-cases.md
|
|
251
|
+
│ │ └── writing-rules.md
|
|
252
|
+
│ ├── README.md
|
|
253
|
+
│ └── SKILL.md
|
|
254
|
+
└── visual-recap/
|
|
217
255
|
├── agents/openai.yaml
|
|
218
|
-
├── references/
|
|
219
|
-
│ ├── before-after.md
|
|
220
|
-
│ ├── checklist.md
|
|
221
|
-
│ ├── use-cases.md
|
|
222
|
-
│ └── writing-rules.md
|
|
223
|
-
├── README.md
|
|
224
256
|
└── SKILL.md
|
|
225
257
|
```
|
|
226
258
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Logic Prototype
|
|
2
|
+
|
|
3
|
+
A single, self-contained HTML file — a **shareable demo** — that lets anyone drive a state model by clicking buttons. Use this when the question is about **business logic, state transitions, or data shape** — the kind of thing that looks reasonable on paper but only feels wrong once you push it through real cases.
|
|
4
|
+
|
|
5
|
+
Because the file has nothing to install, a designer, product manager, or domain expert can drive it directly. Use domain language, not implementation language.
|
|
6
|
+
|
|
7
|
+
## When this is the right shape
|
|
8
|
+
|
|
9
|
+
- "I'm not sure if this state machine handles the edge case where X then Y."
|
|
10
|
+
- "Does this data model actually let me represent the case where..."
|
|
11
|
+
- "I want to feel out what the API should look like before writing it."
|
|
12
|
+
- Anything where someone wants to **press buttons and watch state change**.
|
|
13
|
+
|
|
14
|
+
If the question is "what should this look like" — wrong branch. Use [UI.md](UI.md).
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### 1. State the question
|
|
19
|
+
|
|
20
|
+
Before writing code, identify the state model, the question, and the evidence that will answer it. Put this information in a visible introduction, not only in a comment. A returning user must be able to understand the experiment without the earlier conversation.
|
|
21
|
+
|
|
22
|
+
### 2. Isolate the logic in a portable module
|
|
23
|
+
|
|
24
|
+
Put the logic that answers the question in one `<script>` block. Keep it in a small, pure module. The page is disposable. Treat the module as evidence for a later production implementation, not as production-ready code.
|
|
25
|
+
|
|
26
|
+
The right shape depends on the question:
|
|
27
|
+
|
|
28
|
+
- **A pure reducer** — `(state, action) => state`. Good when actions are discrete events and state is a single value.
|
|
29
|
+
- **A state machine** — explicit states and transitions. Good when "which actions are even legal right now" is part of the question.
|
|
30
|
+
- **A small set of pure functions** over a plain data type. Good when there's no implicit current state — just transformations.
|
|
31
|
+
- **A class or module with a clear method surface** when the logic genuinely owns ongoing internal state.
|
|
32
|
+
|
|
33
|
+
Pick the shape that fits the question. Do not pick a shape only because it is easy to connect to the page. Keep the logic independent of the DOM: the page calls the logic, and the logic never calls the page. Reimplement or harden validated logic under the production project's normal standards.
|
|
34
|
+
|
|
35
|
+
### 3. Build the shareable HTML file
|
|
36
|
+
|
|
37
|
+
One file, plain HTML/CSS/JS — no framework, no bundler, no server, everything inline so it opens by double-click and survives being emailed around. Anyone should be able to run it by opening it.
|
|
38
|
+
|
|
39
|
+
Write it for a non-developer. Every label is in **domain language**, not code — buttons and state read like the business, not the reducer. Explain in plain words what's happening.
|
|
40
|
+
|
|
41
|
+
Lay it out with a clean hierarchy, top to bottom:
|
|
42
|
+
|
|
43
|
+
1. **Title and one-line explanation** of what this demo lets you explore (the question from step 1).
|
|
44
|
+
2. **Current state** — the full relevant state, rendered as a readable panel (labeled fields, not a raw JSON dump), re-rendered after every click so the change is visible. Where it helps a non-developer follow, call out what just changed.
|
|
45
|
+
3. **Free-play buttons** — one button per action, always available, so anyone can poke at the model in any order. Each click dispatches its action and re-renders the state.
|
|
46
|
+
4. **Guided walkthroughs** — a set of **scenarios**, one per tab. Each tab holds a short plain-language description of the scenario — the situation it sets up and what to watch for — and underneath it, the ordered **buttons to press** for that scenario. Each step is a real button: clicking it performs that action and moves to the next step. Starting a walkthrough resets to a known initial state so the scenario runs the same way every time.
|
|
47
|
+
|
|
48
|
+
Choose scenarios that demonstrate the awkward cases — the happy path, a tricky edge case, an attempt at something that should be illegal — the ones hard to reason about on paper.
|
|
49
|
+
|
|
50
|
+
Keep it beautiful but restrained: clean typography, generous spacing, one accent color. No animations, no gimmicks — nothing that competes with the state and the buttons.
|
|
51
|
+
|
|
52
|
+
### 4. Verify the prototype
|
|
53
|
+
|
|
54
|
+
Open the file when the current environment supports local previews. Otherwise, provide its exact path and tell the user to open it in a browser.
|
|
55
|
+
|
|
56
|
+
Run the happy path, one difficult edge case, and one illegal or rejected action. Confirm that each action updates the visible state. Confirm that reopening the file resets the state.
|
|
57
|
+
|
|
58
|
+
### 5. Hand it over
|
|
59
|
+
|
|
60
|
+
Give the user the file and name the walkthroughs. Invite feedback about impossible states, surprising transitions, and missing actions. Add a scenario only when it helps answer the original question.
|
|
61
|
+
|
|
62
|
+
### 6. Capture the answer and the prototype
|
|
63
|
+
|
|
64
|
+
When the prototype answers its question, record the verdict and evidence as [SKILL.md](SKILL.md) describes. Use the validated reducer, machine, or function set as input to the production implementation. Do not promote the HTML shell directly.
|
|
65
|
+
|
|
66
|
+
## Anti-patterns
|
|
67
|
+
|
|
68
|
+
- **Don't add a production test suite to the disposable shell.** Validate it by running the scenarios that answer the question.
|
|
69
|
+
- **Don't wire it to the real database.** Use in-memory state unless the question is specifically about persistence.
|
|
70
|
+
- **Don't generalize.** No "what if we wanted to support X later." The prototype answers one question.
|
|
71
|
+
- **Don't blur the logic and the page together.** If the pure module references the DOM, `document`, or button handlers, it's no longer liftable. Keep the page as a thin shell over a pure module.
|
|
72
|
+
- **Don't reach for a framework, bundler, or server.** One file the recipient double-clicks; a React app or a dev server defeats "shareable".
|
|
73
|
+
- **Don't ship the HTML shell into production.** The page is optimized for manual exploration. Carry the validated decision into production code and tests.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prototype
|
|
3
|
+
description: Build disposable code to answer one product or engineering design question. Use when the user wants to validate logic, state transitions, a data model, or API behavior, or compare structurally different UI directions before production implementation. Adapt to the current repository and agent environment. Do not require a specific model, coding agent, tool, browser, task runner, version-control host, or issue tracker.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prototype
|
|
7
|
+
|
|
8
|
+
A prototype is **disposable code that answers one question**. The question determines the artifact.
|
|
9
|
+
|
|
10
|
+
## Pick a branch
|
|
11
|
+
|
|
12
|
+
Identify the question from the user's request and the surrounding code. Then read the matching branch before writing code:
|
|
13
|
+
|
|
14
|
+
- **"Does this logic or state model feel right?"** → [LOGIC.md](LOGIC.md). Build one shareable HTML file. Let a non-developer drive difficult cases with free-play actions and guided walkthroughs.
|
|
15
|
+
- **"What should this look like?"** → [UI.md](UI.md). Build several structurally different UI variants on one route. Make them switchable through a URL search parameter and a floating control.
|
|
16
|
+
|
|
17
|
+
The branches produce different artifacts. If the choice is genuinely ambiguous, ask one focused question. If interaction is unavailable, infer from the surrounding code: use Logic for a backend module and UI for a page or component. State the assumption in the prototype.
|
|
18
|
+
|
|
19
|
+
## Define success before coding
|
|
20
|
+
|
|
21
|
+
State these points before you edit files:
|
|
22
|
+
|
|
23
|
+
- the single question;
|
|
24
|
+
- the evidence that will answer it;
|
|
25
|
+
- the shortest way to run or open the artifact;
|
|
26
|
+
- the production boundary that the prototype must not cross.
|
|
27
|
+
|
|
28
|
+
Stop expanding the prototype when it can answer the question. Do not turn it into an alternative implementation project.
|
|
29
|
+
|
|
30
|
+
## Adapt to the current environment
|
|
31
|
+
|
|
32
|
+
- Follow project instructions, file layout, routing, framework, and styling conventions.
|
|
33
|
+
- Use only capabilities that the current agent environment provides.
|
|
34
|
+
- Open or render the prototype when a browser or preview tool is available. Otherwise, provide the exact file path, command, or route.
|
|
35
|
+
- Use the project's normal planning and progress mechanism when one exists. Otherwise, keep a short checklist in the conversation.
|
|
36
|
+
- Do not require Git, a hosted repository, an issue tracker, or an external service. Use them only when the current workflow already authorizes them.
|
|
37
|
+
|
|
38
|
+
## Rules that apply to both
|
|
39
|
+
|
|
40
|
+
1. **Mark it as disposable.** Put the prototype near the module or page it explores. Use `prototype` in the file, route, or directory name. Follow existing routing conventions.
|
|
41
|
+
2. **Make it easy to run.** Prefer one existing project command for a UI prototype. Make a logic prototype a self-contained HTML file when possible.
|
|
42
|
+
3. **Keep state in memory by default.** If the question requires persistence, use an isolated scratch store. Mark it clearly as disposable. Never use production data.
|
|
43
|
+
4. **Skip production polish.** Add only the error handling needed to keep the prototype runnable. Do not add speculative abstractions or production tests for the disposable shell.
|
|
44
|
+
5. **Expose relevant state.** After each logic action or UI variant switch, render the state that helps answer the question.
|
|
45
|
+
6. **Protect production behavior.** Keep real mutations and production data outside the experiment. If the prototype uses an existing route, gate all prototype rendering so production ignores it.
|
|
46
|
+
7. **Hand over an exact entry point.** Give the user the file path, command, route, and variant keys or scenarios. Open the artifact when the environment supports it.
|
|
47
|
+
8. **Record the answer.** Record the question, verdict, and evidence in the current workflow. Preserve the prototype on a temporary branch or other archive only when requested or already authorized. Keep the main branch focused on the validated production decision.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# UI Prototype
|
|
2
|
+
|
|
3
|
+
Generate **several structurally different UI variants** on one route. Let the user switch variants with a floating bottom control. The user can choose one direction or combine specific parts, then discard the experiment.
|
|
4
|
+
|
|
5
|
+
If the question is about logic/state rather than what something looks like — wrong branch. Use [LOGIC.md](LOGIC.md).
|
|
6
|
+
|
|
7
|
+
## When this is the right shape
|
|
8
|
+
|
|
9
|
+
- "What should this page look like?"
|
|
10
|
+
- "I want to see a few options for this dashboard before committing."
|
|
11
|
+
- "Try a different layout for the settings screen."
|
|
12
|
+
- Any time the user would otherwise spend a day picking between three vague mockups in their head.
|
|
13
|
+
|
|
14
|
+
## Choose the host shape
|
|
15
|
+
|
|
16
|
+
A UI prototype is easier to judge beside the real application shell, data shape, and information density. Prefer an existing host page. Create a new route only when no suitable page exists.
|
|
17
|
+
|
|
18
|
+
### Sub-shape A — adjustment to an existing page (preferred)
|
|
19
|
+
|
|
20
|
+
The route already exists. Render variants **on the same route** behind a `?variant=` URL search parameter. Keep existing parameters and authorization. Use approved non-production data or representative fixtures. Change only the rendered subtree.
|
|
21
|
+
|
|
22
|
+
If the prototype is for something that doesn't yet have a page but *would naturally live inside one* (a new section of the dashboard, a new card on the settings screen, a new step in an existing flow) — that's still sub-shape A. Mount the variants inside the host page.
|
|
23
|
+
|
|
24
|
+
### Sub-shape B — a new page (last resort)
|
|
25
|
+
|
|
26
|
+
Only use this when the thing being prototyped genuinely has no existing page to live inside — e.g. an entirely new top-level surface, or a flow that can't be embedded anywhere sensible.
|
|
27
|
+
|
|
28
|
+
Create a **disposable route** with the project's routing convention. Do not invent a new top-level structure. Include `prototype` in the path or file name. Use the same `?variant=` pattern.
|
|
29
|
+
|
|
30
|
+
Before committing to sub-shape B, sanity-check: is there really no existing page this could be embedded in? An empty route hides design problems that a populated one would expose.
|
|
31
|
+
|
|
32
|
+
In both sub-shapes the floating bottom bar is identical.
|
|
33
|
+
|
|
34
|
+
## Process
|
|
35
|
+
|
|
36
|
+
### 1. State the question and pick N
|
|
37
|
+
|
|
38
|
+
Default to **3 variants**. More than 5 stops being radically different and starts being noise — cap there.
|
|
39
|
+
|
|
40
|
+
Write the question and plan in one line near the prototype or in a top-of-file comment:
|
|
41
|
+
|
|
42
|
+
> "Three variants of the settings page, switchable via `?variant=`, on the existing `/settings` route."
|
|
43
|
+
|
|
44
|
+
Also state what difference the user should compare between the variants.
|
|
45
|
+
|
|
46
|
+
### 2. Generate radically different variants
|
|
47
|
+
|
|
48
|
+
Draft each variant. Hold each one to:
|
|
49
|
+
|
|
50
|
+
- The page's purpose and the data it has access to.
|
|
51
|
+
- The project's component library / styling system (TailwindCSS, shadcn, MUI, plain CSS, whatever).
|
|
52
|
+
- A clear exported component name, e.g. `VariantA`, `VariantB`, `VariantC`.
|
|
53
|
+
|
|
54
|
+
Variants must be **structurally different** — different layout, different information hierarchy, different primary affordance, not just different colors. Three slightly-tweaked card grids isn't a UI prototype, it's wallpaper. If two drafts come out too similar, redo one with explicit "do not use a card grid" guidance.
|
|
55
|
+
|
|
56
|
+
### 3. Wire them together
|
|
57
|
+
|
|
58
|
+
Create a single switcher component on the route:
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
// pseudo-code — adapt to the project's framework
|
|
62
|
+
const variant = searchParams.get('variant') ?? 'A';
|
|
63
|
+
return (
|
|
64
|
+
<>
|
|
65
|
+
{variant === 'A' && <VariantA {...data} />}
|
|
66
|
+
{variant === 'B' && <VariantB {...data} />}
|
|
67
|
+
{variant === 'C' && <VariantC {...data} />}
|
|
68
|
+
<PrototypeSwitcher variants={['A','B','C']} current={variant} />
|
|
69
|
+
</>
|
|
70
|
+
);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For sub-shape A (existing page): keep approved non-production data fetching above the switcher. Change only the rendered subtree.
|
|
74
|
+
|
|
75
|
+
For sub-shape B (new page): the disposable route under `/prototype/<name>` mounts the same switcher.
|
|
76
|
+
|
|
77
|
+
### 4. Build the floating switcher
|
|
78
|
+
|
|
79
|
+
A small fixed-position bar at the bottom-center of the screen with three pieces:
|
|
80
|
+
|
|
81
|
+
- **Left arrow** — cycles to the previous variant (wraps around).
|
|
82
|
+
- **Variant label** — shows the current variant key and, if the variant exports a name, that name too. e.g. `B — Sidebar layout`.
|
|
83
|
+
- **Right arrow** — cycles forward (wraps around).
|
|
84
|
+
|
|
85
|
+
Behavior:
|
|
86
|
+
|
|
87
|
+
- Clicking an arrow updates the URL search param (use the framework's router — `router.replace` on Next, `navigate` on React Router, etc) so the variant is shareable and reload-stable.
|
|
88
|
+
- Keyboard: `←` and `→` arrow keys also cycle. Don't intercept arrow keys when an `<input>`, `<textarea>`, or `[contenteditable]` is focused.
|
|
89
|
+
- Visually distinct from the page (e.g. high-contrast pill, subtle shadow) so it's obviously not part of the design being evaluated.
|
|
90
|
+
- Disable the complete prototype path in production. Use the project's existing development or feature guard. The production route must ignore the variant parameter.
|
|
91
|
+
|
|
92
|
+
Keep the switcher close to the prototype. Reuse an existing prototype control when one exists. Do not add a shared abstraction for one experiment.
|
|
93
|
+
|
|
94
|
+
### 5. Verify and hand it over
|
|
95
|
+
|
|
96
|
+
Run the project's focused build, type check, or route check when one is available. Open every variant when preview tools are available. Confirm that the URL preserves the selection and that keyboard controls do not intercept text input.
|
|
97
|
+
|
|
98
|
+
Give the user the command, route, and `?variant=` keys. If the current environment cannot open the UI, say so and provide the exact manual steps.
|
|
99
|
+
|
|
100
|
+
### 6. Capture the answer and clean up
|
|
101
|
+
|
|
102
|
+
When a variant wins, record which parts won and why. Then follow the capture rules in [SKILL.md](SKILL.md). Implement the decision under normal production standards. Remove the prototype from the main branch when the current workflow authorizes cleanup:
|
|
103
|
+
|
|
104
|
+
- **Sub-shape A** — fold the winner into the existing page; drop the losing variants and the switcher from main.
|
|
105
|
+
- **Sub-shape B** — promote the winning variant to a real route; drop the disposable route and the switcher from main.
|
|
106
|
+
|
|
107
|
+
If the current workflow preserves prototypes, archive the full variant set outside the main branch. Otherwise, ask before deleting the files. Do not leave losing variants or the switcher in production code.
|
|
108
|
+
|
|
109
|
+
## Anti-patterns
|
|
110
|
+
|
|
111
|
+
- **Variants that differ only in color or copy.** That's a tweak, not a prototype. Real variants disagree about structure.
|
|
112
|
+
- **Sharing too much code between variants.** A shared `<Header>` is fine; a shared `<Layout>` defeats the point. Each variant should be free to throw out the layout.
|
|
113
|
+
- **Wiring variants to real mutations.** Read-only prototypes are fine. If a variant needs to mutate, point it at a stub — the question is "what should this look like", not "does the backend work".
|
|
114
|
+
- **Promoting the prototype directly to production.** The variant code was written under prototype constraints (no tests, minimal error handling). Rewrite it properly when you fold it in.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: visual-recap
|
|
3
|
+
description: Create evidence-backed visual recaps of planned or completed non-trivial changes. Use after planning or completing non-trivial work when a visual review aid would reduce review effort, or when the user asks for a visual recap, visual plan, change map, system overview, architecture impact, before/after view, or scannable review aid. Adapt the result to the current Host Agent without requiring a specific tool, service, version-control host, or output format.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Visual Recap
|
|
7
|
+
|
|
8
|
+
Help a reviewer understand a non-trivial change and choose where to inspect first.
|
|
9
|
+
|
|
10
|
+
A useful recap answers these questions in less than one minute:
|
|
11
|
+
|
|
12
|
+
- What outcome changes?
|
|
13
|
+
- Which system parts and relationships are affected?
|
|
14
|
+
- What path should the reviewer trace?
|
|
15
|
+
- Where is the risk or evidence gap?
|
|
16
|
+
|
|
17
|
+
The recap supplements the plan, source, change set, and normal review. It does not replace them.
|
|
18
|
+
|
|
19
|
+
## Choose the Mode
|
|
20
|
+
|
|
21
|
+
- **Plan**: Show intended work against the current system. Label assumptions, open decisions, and unverified paths.
|
|
22
|
+
- **Recap**: Show what the current change set does. Rebuild the recap from current evidence.
|
|
23
|
+
|
|
24
|
+
State the mode. If a plan and an implementation both exist, use Recap. Add a short plan-versus-actual view only when they differ.
|
|
25
|
+
|
|
26
|
+
## Ground the Recap
|
|
27
|
+
|
|
28
|
+
Use the smallest sufficient set of project evidence:
|
|
29
|
+
|
|
30
|
+
1. Follow the instructions and context that the **Host Agent** already supplied.
|
|
31
|
+
2. Look for project-local `CONTEXT-MAP.md` and `CONTEXT.md` files. Use `CONTEXT-MAP.md` for bounded-context locations and relationships. Use the relevant `CONTEXT.md` files for canonical domain terms. Link to each file that informed the recap.
|
|
32
|
+
3. Use existing architecture documents, diagrams, ownership maps, and decision records when they cover the affected area.
|
|
33
|
+
4. In Plan mode, inspect the current implementation and the proposed plan or requirements.
|
|
34
|
+
5. In Recap mode, inspect the actual change set, affected source, and validation results. Use a source-control comparison when available, but do not require one version-control system.
|
|
35
|
+
|
|
36
|
+
A `CONTEXT.md` glossary supplies language, not architecture or path ownership. Do not create or update context files for this recap.
|
|
37
|
+
|
|
38
|
+
Use session memory to find evidence, not to prove a claim. Label facts when the distinction matters:
|
|
39
|
+
|
|
40
|
+
- **documented**: defined by canonical project material;
|
|
41
|
+
- **observed**: present in the current implementation or change set;
|
|
42
|
+
- **planned**: intended but not implemented;
|
|
43
|
+
- **inferred**: derived from source boundaries or behavior;
|
|
44
|
+
- **unknown**: not verified.
|
|
45
|
+
|
|
46
|
+
## Tell the Review Story
|
|
47
|
+
|
|
48
|
+
1. Start with the user or system outcome. Do not start with a file list.
|
|
49
|
+
2. Choose affected units at one useful altitude. Use bounded contexts, surfaces, services, modules, data stores, or the project's own vocabulary.
|
|
50
|
+
3. Show the shortest path that explains the change. Include only affected units and the immediate neighbors needed for context.
|
|
51
|
+
4. Rank one to three review hotspots. Point to the edge, invariant, contract, or evidence gap that needs attention.
|
|
52
|
+
5. Attach compact evidence to each important claim.
|
|
53
|
+
|
|
54
|
+
If no architecture map exists, infer a local map from the source. Label the map as inferred. Do not present it as a permanent project taxonomy.
|
|
55
|
+
|
|
56
|
+
Mark the change shape for each affected unit:
|
|
57
|
+
|
|
58
|
+
- **uses**: Connects or configures existing behavior without changing its contract.
|
|
59
|
+
- **changes**: Changes behavior, state, shape, or a contract.
|
|
60
|
+
- **adds/removes**: Creates or removes a meaningful boundary, capability, data shape, or external surface.
|
|
61
|
+
|
|
62
|
+
Assess risk separately from change shape. Risk tells the reviewer how much attention the change needs.
|
|
63
|
+
|
|
64
|
+
| Risk | Use when |
|
|
65
|
+
|---|---|
|
|
66
|
+
| **Low** | The change is bounded and reversible. It changes no known contract or invariant. Validation is strong. |
|
|
67
|
+
| **Medium** | The change alters behavior or an internal contract in a bounded area, or validation has a meaningful gap. |
|
|
68
|
+
| **High** | The change affects security, privacy, persisted data, public compatibility, critical invariants, concurrency, or broad cross-system behavior. Also use High when a large blast radius has weak evidence. |
|
|
69
|
+
|
|
70
|
+
State why the overall risk has that level. A new unit is not automatically high risk. A small authentication or data edit is not automatically low risk.
|
|
71
|
+
|
|
72
|
+
## Choose the Smallest Useful Visual
|
|
73
|
+
|
|
74
|
+
Match the visual to the review question:
|
|
75
|
+
|
|
76
|
+
- Use a Mermaid flowchart for relationships and blast radius.
|
|
77
|
+
- Use a Mermaid sequence or state diagram for behavior that crosses several steps or states.
|
|
78
|
+
- Use a table for exact mappings or classifications.
|
|
79
|
+
- Use a side-by-side view for before and after.
|
|
80
|
+
- Use interaction only when it helps the reviewer trace a path, inspect evidence, or compare states.
|
|
81
|
+
|
|
82
|
+
Skip the diagram when one obvious relationship or a short table explains the change better.
|
|
83
|
+
|
|
84
|
+
Use Mermaid as the default portable diagram format. It is an output representation, not a required tool. Let the current **Host Agent** render it with its native interface. Use a richer interactive surface only when it saves review effort.
|
|
85
|
+
|
|
86
|
+
If the current interface does not render Mermaid, use a compact ASCII-art diagram as the first fallback. Use a Markdown table and short relationship list only when ASCII would be harder to scan or cannot express the relationship clearly.
|
|
87
|
+
|
|
88
|
+
Do not require or name a product-specific tool. Do not add a dependency, deployment, or standalone application only to render the recap.
|
|
89
|
+
|
|
90
|
+
Always provide a concise inline summary. It must preserve the outcome, affected units, risk, review hotspots, and evidence links.
|
|
91
|
+
|
|
92
|
+
## Compose the Result
|
|
93
|
+
|
|
94
|
+
Include:
|
|
95
|
+
|
|
96
|
+
1. **Headline**: mode, scope, outcome, overall risk, and the reason for that risk.
|
|
97
|
+
2. **Impact view**: affected units, change shape, and the path between them.
|
|
98
|
+
3. **Review first**: one to three ranked hotspots.
|
|
99
|
+
4. **Evidence**: links or pointers to relevant context, source, documents, comparisons, and checks.
|
|
100
|
+
5. **Gaps**: planned, inferred, unknown, or unverified claims that could change the conclusion.
|
|
101
|
+
|
|
102
|
+
Add a change flow, before-and-after view, plan-versus-actual view, or open decisions only when it reduces review effort.
|
|
103
|
+
|
|
104
|
+
Keep the overview on one screen when possible. Put supporting detail behind expansion or below the overview. Use direct labels. Do not rely on color alone. Do not include empty sections or the whole system graph.
|
|
105
|
+
|
|
106
|
+
## Deliver and Update
|
|
107
|
+
|
|
108
|
+
Present the recap in the current conversation by default. Save it to a plan, document, change request, or other artifact only when the user asks or the current workflow defines that destination.
|
|
109
|
+
|
|
110
|
+
When a recap already exists, revise it instead of adding a conflicting copy. Preserve unrelated content.
|
|
111
|
+
|
|
112
|
+
Before delivery, confirm that the recap tells the reviewer what to inspect first and why. If the visual does not reduce review effort, simplify it.
|