@odarino/haren 1.4.0 → 1.7.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/CHANGELOG.md +18 -0
- package/LICENSE +1 -1
- package/README.md +108 -9
- package/content/agents/architect.md +1 -1
- package/content/agents/developer.md +4 -3
- package/content/agents/planner.md +3 -1
- package/content/agents/reviewer.md +2 -0
- package/content/skills/audit-workspace/SKILL.md +2 -1
- package/content/skills/collect-components/SKILL.md +81 -0
- package/content/skills/decompose/SKILL.md +10 -16
- package/content/skills/discover/SKILL.md +6 -2
- package/content/skills/discover/blueprint.md +1 -0
- package/content/skills/discover/explore.md +1 -0
- package/content/skills/discover/inherit.md +1 -0
- package/content/skills/discover/migration.md +38 -0
- package/content/skills/evaluate/SKILL.md +24 -0
- package/content/skills/extract/SKILL.md +43 -0
- package/content/skills/generate-mockup/SKILL.md +41 -5
- package/content/skills/ideate/SKILL.md +2 -0
- package/content/skills/implement/SKILL.md +20 -11
- package/content/skills/plan/SKILL.md +57 -9
- package/content/skills/read-context/SKILL.md +12 -1
- package/content/skills/resolve-next-id/SKILL.md +9 -1
- package/content/skills/ui-review/SKILL.md +64 -0
- package/content/skills/update-tracking/SKILL.md +11 -1
- package/content/skills/validate-artifact/SKILL.md +34 -0
- package/content/skills/visual-companion/SKILL.md +285 -0
- package/content/templates/checklist.md +26 -0
- package/content/templates/component-catalog.md +41 -0
- package/content/templates/design.md +15 -0
- package/content/templates/deviation-log.md +13 -0
- package/content/templates/legacy-semantics.md +11 -0
- package/content/templates/parity-evidence.md +32 -0
- package/content/templates/unit-map.md +20 -0
- package/content/templates/unit-spec.md +43 -0
- package/dist/index.js +2681 -120
- package/package.json +4 -3
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: visual-companion
|
|
3
|
+
description: Show mockups, layout options and diagrams in a browser tab and read the user's clicks
|
|
4
|
+
type: utility
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Visual Companion
|
|
8
|
+
|
|
9
|
+
The visual companion is a local browser tab. It shows mockups, layout options and diagrams. The user clicks an option, and you read the click on your next turn.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Decide for each question, not for each session. The test: **does the user understand this better when they see it?**
|
|
14
|
+
|
|
15
|
+
**Use the browser** when the content is visual:
|
|
16
|
+
|
|
17
|
+
- **UI mockups**: wireframes, layouts, navigation structures, component designs
|
|
18
|
+
- **Layout comparisons**: two layouts, two color schemes, two design directions
|
|
19
|
+
- **Diagrams**: system components, data flow, state machines, flowcharts
|
|
20
|
+
- **Side-by-side views**: a mockup next to a screenshot, before and after
|
|
21
|
+
- **Design polish**: look and feel, spacing, visual hierarchy
|
|
22
|
+
|
|
23
|
+
**Use the terminal** when the content is text or a table:
|
|
24
|
+
|
|
25
|
+
- **Requirements and scope questions**: "what does X mean?", "which features are in scope?"
|
|
26
|
+
- **Conceptual A/B/C choices**: approaches that you describe in words
|
|
27
|
+
- **Tradeoffs**: pros and cons, comparison tables
|
|
28
|
+
- **Technical decisions**: API design, data model, architecture
|
|
29
|
+
- **Clarifying questions**: the answer is words, not a visual preference
|
|
30
|
+
|
|
31
|
+
A question about a UI topic is not automatically a visual question. "What kind of wizard do you want?" is conceptual. Use the terminal. "Which of these wizard layouts is better?" is visual. Use the browser.
|
|
32
|
+
|
|
33
|
+
## Mode
|
|
34
|
+
|
|
35
|
+
Read `ui.mockups` in `manifest.yaml`.
|
|
36
|
+
|
|
37
|
+
- `ascii`: never use the browser. Use ASCII wireframes (see generate-mockup/).
|
|
38
|
+
- `artifact`: do not start the companion. Use a Claude Artifact page (see "Artifact mode" in generate-mockup/).
|
|
39
|
+
- `browser`: use the browser for visual questions. Do not ask first.
|
|
40
|
+
- `ask`: at the first visual question in a session, send the offer as its own message, with nothing else:
|
|
41
|
+
|
|
42
|
+
use the offer in the generate-mockup skill ("Ask the user"). It lists ASCII, Claude Artifact and the browser tab.
|
|
43
|
+
|
|
44
|
+
## How It Works
|
|
45
|
+
|
|
46
|
+
The companion server watches a folder for HTML files. It shows the newest file in the browser. You write HTML into `screen_dir`. The user sees it and clicks to select options. The server writes the clicks to `state_dir/events`. You read that file on your next turn.
|
|
47
|
+
|
|
48
|
+
**Content fragments vs full documents:** If your file starts with `<!DOCTYPE` or `<html`, the server sends it as it is (it only adds the helper script). Otherwise, the server puts your content in the frame template: header, theme CSS, connection status and click handling. **Write content fragments by default.** Write a full document only when you need full control of the page.
|
|
49
|
+
|
|
50
|
+
## Start
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
haren companion start --open
|
|
54
|
+
|
|
55
|
+
# Prints: {"type":"server-started","port":52341,
|
|
56
|
+
# "url":"http://localhost:52341/?key=ab12...",
|
|
57
|
+
# "screen_dir":"<haren>/.companion/12345-1706000000/content",
|
|
58
|
+
# "state_dir":"<haren>/.companion/12345-1706000000/state"}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
1. Save `screen_dir` and `state_dir` from the output.
|
|
62
|
+
2. Give the user the full URL from the `url` field. With `--open`, the browser opens itself, but headless or remote setups need the URL.
|
|
63
|
+
|
|
64
|
+
**Caution:** the URL contains a session key (`?key=...`). The server rejects requests without the key. Always give the complete URL. Never strip the query string. Never give a bare `http://host:port`.
|
|
65
|
+
|
|
66
|
+
If the companion runs already, `haren companion start` uses the same session again. It ignores extra flags (for example `--port`) and prints a warning. To find the connection data later, run `haren companion status`, or read `state_dir/server-info`.
|
|
67
|
+
|
|
68
|
+
**Windows, and hosts that stop background processes:** run `haren companion start --open --foreground` in a background shell (for example `run_in_background: true` on the Bash tool). The process must stay alive across turns.
|
|
69
|
+
|
|
70
|
+
If the browser cannot reach the URL (remote or container setups), bind a different host:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
haren companion start --open --host 0.0.0.0 --url-host localhost
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Other options: `--port <n>`, `--idle-timeout-minutes <n>`.
|
|
77
|
+
|
|
78
|
+
The server watches the agent process that started it (the owner). When the owner exits, the server does not stop at once. It starts a grace period of 10 minutes. The server stops with reason `owner-exited` only when all of these are true:
|
|
79
|
+
|
|
80
|
+
- The owner is gone.
|
|
81
|
+
- No browser tab is connected.
|
|
82
|
+
- No request came in during the grace period.
|
|
83
|
+
|
|
84
|
+
A print-mode agent (for example `claude -p`) exits after each turn. The URL stays valid for the grace period, so the user can review the screen. With `--open` in a print-mode run, the browser tab stays connected. The server keeps running until the user closes the tab. Then the grace period applies. To stop it at once, run `haren companion stop`. To change the grace period, add `--owner-grace-minutes <n>` (a positive integer). A restart uses the same value again.
|
|
85
|
+
|
|
86
|
+
If the owner check is wrong, or the server must outlive the agent, add `--no-owner-watch`. Then only the idle timeout and `haren companion stop` stop it.
|
|
87
|
+
|
|
88
|
+
## The Loop
|
|
89
|
+
|
|
90
|
+
1. **Check the server**: run `haren companion status` before every push. Exit 0 means it runs. If it stopped, run `haren companion start --open`. It restarts the same session with the same URL, key, port, `screen_dir` and `state_dir`. The open tab connects again, and you do not need to send a new URL. If the CLI prints "port changed, give the user the new URL", the old port was busy. Then give the user the new URL.
|
|
91
|
+
2. **Write the screen**: write a new HTML file in `screen_dir` with your file tool. Do not use cat or a heredoc. Write each screen with the file-write tool under a new file name. Do not copy a file with cp -p or a clone: the server picks the newest file by modification time.
|
|
92
|
+
- Use a semantic name: `layout.html`, `visual-style.html`, `navigation.html`.
|
|
93
|
+
- Never use a file name again. For a new version, write `layout-v2.html`, `layout-v3.html`.
|
|
94
|
+
3. **Tell the user and end the turn**:
|
|
95
|
+
- Give the URL again (at every step).
|
|
96
|
+
- Give a short summary of the screen, for example "Showing 3 layout options for the dashboard".
|
|
97
|
+
- Ask the user to answer in the terminal: "Look at the options and tell me what you think. Click an option to select it."
|
|
98
|
+
- End your turn.
|
|
99
|
+
4. **On the next turn**: read `state_dir/events` if it exists. It is JSONL. The last click is usually the choice. If the file does not exist, the user did not click. Merge the clicks with the terminal message. The terminal message is the primary feedback.
|
|
100
|
+
5. **Iterate or advance**: if the feedback changes the screen, write a new version file. Go to the next question only when the user accepts the current step.
|
|
101
|
+
6. **Go back to the terminal**: when the next step is text, push `waiting.html` (or `waiting-2.html`) to remove the old content:
|
|
102
|
+
|
|
103
|
+
```html
|
|
104
|
+
<div style="display:flex;align-items:center;justify-content:center;min-height:60vh"><p class="subtitle">Continuing in terminal...</p></div>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Durable Record
|
|
108
|
+
|
|
109
|
+
The browser screens are temporary. Always write the chosen option as an ASCII wireframe into the artifact too (`design.md` in plan, the review file in evaluate). Record the choice and the reason. The artifact is the record, not the screen.
|
|
110
|
+
|
|
111
|
+
## Minimal Example
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<h2>Which layout works better?</h2>
|
|
115
|
+
<p class="subtitle">Think about readability and visual hierarchy</p>
|
|
116
|
+
|
|
117
|
+
<div class="options">
|
|
118
|
+
<div class="option" data-choice="a" onclick="toggleSelect(this)">
|
|
119
|
+
<div class="letter">A</div>
|
|
120
|
+
<div class="content">
|
|
121
|
+
<h3>Single column</h3>
|
|
122
|
+
<p>One focused column of content</p>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="option" data-choice="b" onclick="toggleSelect(this)">
|
|
126
|
+
<div class="letter">B</div>
|
|
127
|
+
<div class="content">
|
|
128
|
+
<h3>Two columns</h3>
|
|
129
|
+
<p>Sidebar navigation with main content</p>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
You do not need `<html>`, CSS or `<script>` tags. The server adds them.
|
|
136
|
+
|
|
137
|
+
## CSS Classes
|
|
138
|
+
|
|
139
|
+
The frame template gives these classes.
|
|
140
|
+
|
|
141
|
+
### Options (A/B/C choices)
|
|
142
|
+
|
|
143
|
+
```html
|
|
144
|
+
<div class="options">
|
|
145
|
+
<div class="option" data-choice="a" onclick="toggleSelect(this)">
|
|
146
|
+
<div class="letter">A</div>
|
|
147
|
+
<div class="content"><h3>Title</h3><p>Description</p></div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Multi-select:** add `data-multiselect` to the container. Each click then toggles one item.
|
|
153
|
+
|
|
154
|
+
```html
|
|
155
|
+
<div class="options" data-multiselect>
|
|
156
|
+
<!-- same option markup -->
|
|
157
|
+
</div>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Cards (visual designs)
|
|
161
|
+
|
|
162
|
+
```html
|
|
163
|
+
<div class="cards">
|
|
164
|
+
<div class="card" data-choice="design1" onclick="toggleSelect(this)">
|
|
165
|
+
<div class="card-image"><!-- mockup content --></div>
|
|
166
|
+
<div class="card-body"><h3>Name</h3><p>Description</p></div>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Mockup container
|
|
172
|
+
|
|
173
|
+
```html
|
|
174
|
+
<div class="mockup">
|
|
175
|
+
<div class="mockup-header">Preview: Dashboard layout</div>
|
|
176
|
+
<div class="mockup-body"><!-- mockup HTML --></div>
|
|
177
|
+
</div>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Split view (side by side)
|
|
181
|
+
|
|
182
|
+
```html
|
|
183
|
+
<div class="split">
|
|
184
|
+
<div class="mockup"><!-- left --></div>
|
|
185
|
+
<div class="mockup"><!-- right --></div>
|
|
186
|
+
</div>
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Pros and cons
|
|
190
|
+
|
|
191
|
+
```html
|
|
192
|
+
<div class="pros-cons">
|
|
193
|
+
<div class="pros"><h4>Pros</h4><ul><li>Benefit</li></ul></div>
|
|
194
|
+
<div class="cons"><h4>Cons</h4><ul><li>Drawback</li></ul></div>
|
|
195
|
+
</div>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Mock elements (wireframe parts)
|
|
199
|
+
|
|
200
|
+
```html
|
|
201
|
+
<div class="mock-nav">Logo | Home | Orders | Settings</div>
|
|
202
|
+
<div style="display: flex;">
|
|
203
|
+
<div class="mock-sidebar">Navigation</div>
|
|
204
|
+
<div class="mock-content">Main content area</div>
|
|
205
|
+
</div>
|
|
206
|
+
<button class="mock-button">Action</button>
|
|
207
|
+
<input class="mock-input" placeholder="Input field">
|
|
208
|
+
<div class="placeholder">Placeholder area</div>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Compare (mockup next to screenshot, with a verdict)
|
|
212
|
+
|
|
213
|
+
Use this in evaluate to compare the approved mockup with a screenshot of the built screen.
|
|
214
|
+
|
|
215
|
+
```html
|
|
216
|
+
<h2>Does the built screen match the mockup?</h2>
|
|
217
|
+
<div class="compare">
|
|
218
|
+
<div class="pane"><div class="label">Mockup</div><!-- mockup HTML --></div>
|
|
219
|
+
<div class="pane"><div class="label">Screenshot</div><img src="/files/orders-list.png" alt="Built orders list"></div>
|
|
220
|
+
</div>
|
|
221
|
+
<div class="verdict">
|
|
222
|
+
<button class="pass" data-choice="pass" onclick="toggleSelect(this)">Pass</button>
|
|
223
|
+
<button class="fail" data-choice="fail" onclick="toggleSelect(this)">Fail</button>
|
|
224
|
+
</div>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Findings (review results by severity)
|
|
228
|
+
|
|
229
|
+
Use this to show ui-review/ results.
|
|
230
|
+
|
|
231
|
+
```html
|
|
232
|
+
<h2>UI review: Orders list</h2>
|
|
233
|
+
<ul class="findings">
|
|
234
|
+
<li class="blocker"><strong>UR-1 blocker</strong>: no error state when the load fails</li>
|
|
235
|
+
<li class="major"><strong>UR-2 major</strong>: the filter input has no label</li>
|
|
236
|
+
<li class="minor"><strong>UR-3 minor</strong>: the page title and menu item use different words</li>
|
|
237
|
+
</ul>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Text and sections
|
|
241
|
+
|
|
242
|
+
- `h2`: page title
|
|
243
|
+
- `h3`: section heading
|
|
244
|
+
- `.subtitle`: secondary text below the title
|
|
245
|
+
- `.section`: content block with a bottom margin
|
|
246
|
+
- `.label`: small uppercase label
|
|
247
|
+
|
|
248
|
+
## Events Format
|
|
249
|
+
|
|
250
|
+
The `text` field is a short label: the option heading, or the letter and the title, or the first 200 characters of the text.
|
|
251
|
+
|
|
252
|
+
The server writes the user's clicks to `state_dir/events`, one JSON object for each line. The server clears the file when a new screen appears.
|
|
253
|
+
|
|
254
|
+
```jsonl
|
|
255
|
+
{"type":"click","choice":"a","text":"Option A - Single column","timestamp":1706000101}
|
|
256
|
+
{"type":"click","choice":"b","text":"Option B - Two columns","timestamp":1706000115}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
`timestamp` is in unix seconds. The full list shows the path of the user. The last click is usually the final choice. Many clicks between options can show doubt. Ask about it.
|
|
260
|
+
|
|
261
|
+
## Design Tips
|
|
262
|
+
|
|
263
|
+
- **Show 2-4 options** on each screen.
|
|
264
|
+
- **Match the fidelity to the question**: wireframes for layout, more detail for polish questions.
|
|
265
|
+
- **Explain the question on each page**: write "Which layout is easier to scan?", not only "Pick one".
|
|
266
|
+
- **Use real content when it matters**: placeholder text can hide design problems.
|
|
267
|
+
- **Iterate before you advance**: if the feedback changes the screen, write a new version.
|
|
268
|
+
|
|
269
|
+
## File Naming
|
|
270
|
+
|
|
271
|
+
- Use semantic names: `layout.html`, `visual-style.html`.
|
|
272
|
+
- Never use a file name again. Each screen is a new file.
|
|
273
|
+
- For versions, add a suffix: `layout-v2.html`, `layout-v3.html`.
|
|
274
|
+
- The server shows the newest file by modification time.
|
|
275
|
+
- A restart of a stopped session moves the screens older than the stop to `content/archive/<epoch>/`. A screen written after the stop stays current. The server does not show archived screens.
|
|
276
|
+
|
|
277
|
+
## Cleanup
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
haren companion stop
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
The screen files stay in `<haren>/.companion/` for reference.
|
|
284
|
+
|
|
285
|
+
Adapted from the superpowers visual companion (MIT).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
module: {module name}
|
|
3
|
+
date: {date}
|
|
4
|
+
tasks: {path of tasks.md}
|
|
5
|
+
owner: Dev
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Implementation Checklist: {module name}
|
|
9
|
+
|
|
10
|
+
The developer ticks each item before the code commit of the task. The reviewer checks each ticked item against the code. An item that is not ticked and has no reason is a finding.
|
|
11
|
+
|
|
12
|
+
Tick an item only after you verify it in the code or a test run. If the code differs from the item, keep it unticked and add `— changed: {what and why}`. To skip an item, keep it unticked and add `— skipped: {reason}`.
|
|
13
|
+
|
|
14
|
+
## Task 1: {title}
|
|
15
|
+
|
|
16
|
+
- [ ] Tests: {test file and the cases to cover, from the acceptance criteria of STORY-NNN}
|
|
17
|
+
- [ ] Reuse: {catalog entries or `## Existing Code` items to use, for example `Button`, `NotificationService.send`}. No new copy of them
|
|
18
|
+
- [ ] Files: {files to create or modify, from tasks.md}
|
|
19
|
+
- [ ] Contract: {interface, API shape or schema that must match the spec}
|
|
20
|
+
- [ ] Edge cases: {error, empty and permission cases from the spec}
|
|
21
|
+
- [ ] UI states (screens only): {loading, empty, error, matches the chosen mockup}
|
|
22
|
+
- [ ] Quality: lint, type check and the full test suite pass
|
|
23
|
+
- [ ] {project-specific item, for example i18n keys, audit log, migration rollback}
|
|
24
|
+
|
|
25
|
+
## Task 2: {title}
|
|
26
|
+
...
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Component Catalog
|
|
3
|
+
updated: {date}
|
|
4
|
+
last_scan: {full | incremental <repoKey>@<sha>, ...}
|
|
5
|
+
owner: Dev
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Component Catalog
|
|
9
|
+
|
|
10
|
+
Common UI components, shared services and shared functions of the target repos. The collect-components skill updates this file. The plan skill reads it before the reuse inventory.
|
|
11
|
+
|
|
12
|
+
## UI Components
|
|
13
|
+
|
|
14
|
+
### {Name}
|
|
15
|
+
- **Kind:** UI component
|
|
16
|
+
- **Path:** `{repoKey}:{file}:{line}`
|
|
17
|
+
- **API:** {props, variants, states}
|
|
18
|
+
- **Use for:** {when to pick this}
|
|
19
|
+
- **Used by:** {modules}
|
|
20
|
+
- **Sketch:**
|
|
21
|
+
```
|
|
22
|
+
{ASCII sketch, 8 lines or fewer}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Shared Services
|
|
26
|
+
|
|
27
|
+
### {Name}
|
|
28
|
+
- **Kind:** Shared service
|
|
29
|
+
- **Path:** `{repoKey}:{file}:{line}`
|
|
30
|
+
- **API:** {public methods, side effects, tables it writes}
|
|
31
|
+
- **Use for:** {when to pick this}
|
|
32
|
+
- **Used by:** {modules}
|
|
33
|
+
|
|
34
|
+
## Shared Functions
|
|
35
|
+
|
|
36
|
+
### {Name}
|
|
37
|
+
- **Kind:** Shared function
|
|
38
|
+
- **Path:** `{repoKey}:{file}:{line}`
|
|
39
|
+
- **API:** {signature → return}
|
|
40
|
+
- **Use for:** {when to pick this}
|
|
41
|
+
- **Used by:** {modules}
|
|
@@ -11,6 +11,14 @@ date: {date}
|
|
|
11
11
|
## Data Model
|
|
12
12
|
{Database schemas, key data structures}
|
|
13
13
|
|
|
14
|
+
## Existing Code
|
|
15
|
+
<!-- Required. Search ALL target repos, not only the module's own package. -->
|
|
16
|
+
<!-- One row for each table the module writes and each side effect it triggers (notification, mail, file, external call, audit log). -->
|
|
17
|
+
|
|
18
|
+
| Table / side effect | Existing writer or caller (file:line) | Verdict | Note |
|
|
19
|
+
|---------------------|---------------------------------------|---------|------|
|
|
20
|
+
| {table or effect} | {path:line, or "none found: <search command>"} | reuse / extend / supersede / duplicate (justify) | {why} |
|
|
21
|
+
|
|
14
22
|
## Key Decisions
|
|
15
23
|
|
|
16
24
|
| Decision | Choice | Alternatives Considered | Rationale |
|
|
@@ -21,6 +29,7 @@ date: {date}
|
|
|
21
29
|
|
|
22
30
|
### Screen: {screen name}
|
|
23
31
|
**Chosen:** option {A|B|C}
|
|
32
|
+
**Mockup page:** {url} (Claude Artifact, private) <!-- only in artifact mode -->
|
|
24
33
|
|
|
25
34
|
```
|
|
26
35
|
{ASCII wireframe of the chosen option}
|
|
@@ -30,6 +39,12 @@ date: {date}
|
|
|
30
39
|
|--------|-----------|--------|
|
|
31
40
|
| A | {one line} | chosen / rejected: {reason} |
|
|
32
41
|
|
|
42
|
+
## UI Review
|
|
43
|
+
<!-- Only if the module adds or changes screens. Use the ui-review skill. Severity: blocker | major | minor. A blocker needs a fix or "accepted by user". -->
|
|
44
|
+
|
|
45
|
+
| ID | Screen | Heuristic | Severity | Finding | Fix |
|
|
46
|
+
|----|--------|-----------|----------|---------|-----|
|
|
47
|
+
|
|
33
48
|
## File Structure
|
|
34
49
|
```
|
|
35
50
|
{planned file layout in target repo}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: deviation-log
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Deviation Log
|
|
6
|
+
|
|
7
|
+
Never delete a row. Revoke it.
|
|
8
|
+
|
|
9
|
+
Status is `approved` or `revoked`.
|
|
10
|
+
|
|
11
|
+
| ID | Unit | Legacy behavior | Target behavior | Reason | Approved by | Date | Status |
|
|
12
|
+
|----|------|-----------------|-----------------|--------|-------------|------|--------|
|
|
13
|
+
| DEV-001 | SCR_A001 | {legacy behavior} | {target behavior} | {reason} | {approver} | {date} | approved |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: legacy-semantics
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Legacy Semantics
|
|
6
|
+
|
|
7
|
+
The rulebook of source-platform traps. Read it before you write a unit spec.
|
|
8
|
+
|
|
9
|
+
| Rule ID | Platform behavior | Wrong reading | Correct reading | Found by |
|
|
10
|
+
|---------|-------------------|---------------|-----------------|----------|
|
|
11
|
+
| LS-001 | {what the platform does} | {the reading that looks right} | {the correct reading} | {unit or person} |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
unit: {SCR_A001}
|
|
3
|
+
difference: {one line about the difference}
|
|
4
|
+
verdict: {matches-legacy | target-bug | approved-deviation}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Parity Evidence: {SCR_A001}
|
|
8
|
+
|
|
9
|
+
## Environment
|
|
10
|
+
The user, tenant and locale must be equal on both sides.
|
|
11
|
+
|
|
12
|
+
| Side | User | Tenant | Locale |
|
|
13
|
+
|------|------|--------|--------|
|
|
14
|
+
| Legacy | {user} | {tenant} | {locale} |
|
|
15
|
+
| Target | {user} | {tenant} | {locale} |
|
|
16
|
+
|
|
17
|
+
## Steps
|
|
18
|
+
1. {step}
|
|
19
|
+
|
|
20
|
+
## Legacy result
|
|
21
|
+
{What the legacy system showed.}
|
|
22
|
+
|
|
23
|
+
## Target result
|
|
24
|
+
{What the target system showed.}
|
|
25
|
+
|
|
26
|
+
## Evidence
|
|
27
|
+
- Screenshots: {paths}
|
|
28
|
+
- Network: {request and response}
|
|
29
|
+
- SQL: {query and rows, for example from ORDER_TBL}
|
|
30
|
+
|
|
31
|
+
## Verdict
|
|
32
|
+
{matches-legacy | target-bug | approved-deviation}. {If approved-deviation, give the DEV-ID.}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: unit-map
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Unit Map
|
|
6
|
+
|
|
7
|
+
Generated by `haren migrate inventory`. Edit only the Module column.
|
|
8
|
+
|
|
9
|
+
| Unit | Parent | Family | Title | Module |
|
|
10
|
+
|------|--------|--------|-------|--------|
|
|
11
|
+
| SCR_A001 | - | {family} | {title} | {module} |
|
|
12
|
+
| SCR_A001_P1 | SCR_A001 | {family} | {title} | {module} |
|
|
13
|
+
|
|
14
|
+
## Shared components
|
|
15
|
+
|
|
16
|
+
A re-run of `haren migrate inventory` writes the unit table again and keeps this section.
|
|
17
|
+
|
|
18
|
+
| Component | Used by units | Module |
|
|
19
|
+
|-----------|---------------|--------|
|
|
20
|
+
| {ORDER_TBL or a shared routine} | SCR_A001, SCR_A002 | {module} |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
unit: {SCR_A001}
|
|
3
|
+
module: {module}
|
|
4
|
+
source: {legacy path of the unit}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Unit Spec: {SCR_A001}
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
{What the user does on this unit. One paragraph.}
|
|
11
|
+
|
|
12
|
+
## Fields
|
|
13
|
+
| Field | Type | Required | Default | Validation |
|
|
14
|
+
|-------|------|----------|---------|------------|
|
|
15
|
+
|
|
16
|
+
## Bindings
|
|
17
|
+
| Binding | Source (table.column or query) | Read or write |
|
|
18
|
+
|---------|-------------------------------|---------------|
|
|
19
|
+
|
|
20
|
+
## Writes
|
|
21
|
+
| Table | Operation | Condition |
|
|
22
|
+
|-------|-----------|-----------|
|
|
23
|
+
| {ORDER_TBL} | insert | {when} |
|
|
24
|
+
|
|
25
|
+
Side effects (notification, mail, file, external API, audit log, numbering):
|
|
26
|
+
- {side effect}
|
|
27
|
+
|
|
28
|
+
## Behavior
|
|
29
|
+
1. {event} → {result}
|
|
30
|
+
|
|
31
|
+
## Legacy traps
|
|
32
|
+
- {Rule ID from `artifacts/01-research/legacy-semantics.md`}: {how it applies here}
|
|
33
|
+
|
|
34
|
+
## Parity checklist
|
|
35
|
+
- [ ] {observable behavior to compare on legacy and target}
|
|
36
|
+
|
|
37
|
+
## Manual gate
|
|
38
|
+
Use this section only when the workspace has no adapter gate.
|
|
39
|
+
|
|
40
|
+
- [ ] Every binding is covered in the spec
|
|
41
|
+
- [ ] Every write is covered in the spec
|
|
42
|
+
- Reviewer: {name}
|
|
43
|
+
- Date: {date}
|