@rt-tools/agent-kit 0.33.1 → 0.35.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 +14 -13
- package/assets/agents/goal-critic.md +76 -0
- package/assets/agents/product-strategist.md +95 -0
- package/assets/agents/qa-engineer.md +3 -0
- package/assets/checks/check-specs.mjs +11 -2
- package/assets/checks/rt-kit-checks.config.mjs +6 -0
- package/assets/checks/spec-common.mjs +6 -3
- package/assets/checks/spec-scenarios.mjs +9 -1
- package/assets/checks/task-new.github.mjs +6 -0
- package/assets/defaults/project.sh +49 -81
- package/assets/defaults/push.sh +100 -0
- package/assets/docs/GLOSSARY.md +4 -0
- package/assets/hooks/browser-guard-device-id.sh +1 -0
- package/assets/hooks/browser-guard-no-asking.sh +1 -0
- package/assets/hooks/browser-guard-no-listing.sh +1 -0
- package/assets/hooks/browser-guard-no-other-drivers.sh +7 -3
- package/assets/hooks/browser-guard-require-select.sh +1 -0
- package/assets/hooks/claim-guard.sh +7 -6
- package/assets/hooks/dev-server-guard.sh +1 -0
- package/assets/hooks/dispatch.sh +56 -3
- package/assets/hooks/docs-guard.sh +1 -0
- package/assets/hooks/end-conversation-guard.sh +1 -0
- package/assets/hooks/epic-stop-guard.sh +1 -0
- package/assets/hooks/exam-guard.sh +6 -1
- package/assets/hooks/git-guard-delivery-body.sh +25 -3
- package/assets/hooks/git-guard-delivery-draft.sh +23 -0
- package/assets/hooks/git-guard-delivery-folder.sh +38 -1
- package/assets/hooks/git-guard-delivery-pipeline.sh +99 -0
- package/assets/hooks/git-guard-delivery-signature.sh +19 -0
- package/assets/hooks/git-guard-delivery.sh +15 -19
- package/assets/hooks/git-guard-discard.sh +1 -0
- package/assets/hooks/git-guard-main.sh +18 -4
- package/assets/hooks/git-guard-no-verify.sh +1 -0
- package/assets/hooks/git-guard-push-ahead.sh +98 -0
- package/assets/hooks/git-guard-push-marks.sh +99 -0
- package/assets/hooks/git-guard-push-tests.sh +102 -83
- package/assets/hooks/grill-gate.sh +1 -0
- package/assets/hooks/guard-note.sh +11 -3
- package/assets/hooks/handover-mark.sh +37 -0
- package/assets/hooks/metric-marks.sh +233 -0
- package/assets/hooks/metric-send-start.sh +38 -0
- package/assets/hooks/observe.sh +103 -0
- package/assets/hooks/owner-corrections.sh +36 -0
- package/assets/hooks/pre-push.sh +113 -0
- package/assets/hooks/prose-style-guard.sh +1 -0
- package/assets/hooks/pull-outcomes.sh +59 -0
- package/assets/hooks/push-set.sh +160 -0
- package/assets/hooks/push-sign.sh +433 -0
- package/assets/hooks/qa-dataid-guard.sh +1 -0
- package/assets/hooks/rerun-guard.sh +15 -6
- package/assets/hooks/reuse-first-guard.sh +1 -0
- package/assets/hooks/role-calls.sh +120 -0
- package/assets/hooks/rule-source-guard.sh +16 -0
- package/assets/hooks/skill-gate.sh +11 -0
- package/assets/hooks/task-flow-draft-guard.sh +1 -0
- package/assets/hooks/task-flow-guard.sh +1 -0
- package/assets/hooks/tree-assignment-guard.sh +1 -0
- package/assets/hooks/turn-exit-epic.sh +24 -0
- package/assets/hooks/turn-exit-guard.sh +3 -23
- package/assets/hooks/turn-exit-patterns.sh +4 -3
- package/assets/hooks/turn-exit-verdict.sh +18 -1
- package/assets/hooks/waiting-turn-guard.sh +3 -1
- package/assets/hooks/window-fill-guard.sh +1 -0
- package/assets/hooks/work-start-guard.sh +1 -0
- package/assets/hooks/write-targets.sh +21 -0
- package/assets/patterns/git-workflow-commit.azure.md +5 -3
- package/assets/patterns/git-workflow-commit.github.md +16 -3
- package/assets/patterns/git-workflow-commit.gitlab.md +5 -3
- package/assets/patterns/git-workflow-pr-body.github.md +20 -3
- package/assets/patterns/git-workflow-pr.azure.md +30 -0
- package/assets/patterns/git-workflow-pr.github.md +57 -1
- package/assets/patterns/git-workflow-pr.gitlab.md +33 -0
- package/assets/patterns/mockups-measure.needs-mockups.md +19 -3
- package/assets/patterns/task-flow-close.md +32 -22
- package/assets/patterns/task-flow-cycle.md +72 -0
- package/assets/patterns/task-flow-start.md +3 -3
- package/assets/rules/browser-verification.md +4 -0
- package/assets/rules/deploy-flow.azure.md +5 -0
- package/assets/rules/deploy-flow.github.md +5 -0
- package/assets/rules/deploy-flow.gitlab.md +5 -0
- package/assets/rules/git-workflow.azure.md +15 -0
- package/assets/rules/git-workflow.github.md +15 -0
- package/assets/rules/git-workflow.gitlab.md +15 -0
- package/assets/rules/mockups.needs-mockups.md +13 -5
- package/assets/rules/task-flow.md +31 -25
- package/assets/samples/tasks/_template/plan.md +8 -0
- package/assets/skills/interface-review-annotate.needs-mockups.md +142 -0
- package/assets/skills/interface-review-icons.needs-app.md +136 -0
- package/assets/skills/interface-review-motion-states.needs-app.md +230 -0
- package/assets/skills/interface-review-motion.needs-app.md +209 -0
- package/assets/skills/interface-review-performance.needs-app.md +110 -0
- package/assets/skills/interface-review-principles.needs-app.md +263 -0
- package/assets/skills/interface-review-surfaces.needs-app.md +249 -0
- package/assets/skills/interface-review.needs-app.md +199 -0
- package/assets/skills/write-a-skill.md +16 -3
- package/assets/templates/postmortem.md +2 -0
- package/assets/workflows/feature.js +33 -5
- package/assets/workflows/plan.js +71 -4
- package/bin/agent-kit.d.ts.map +1 -1
- package/bin/agent-kit.js +28 -0
- package/bin/agent-kit.js.map +1 -1
- package/lib/cargo.d.ts +35 -0
- package/lib/cargo.d.ts.map +1 -1
- package/lib/cargo.js +76 -0
- package/lib/cargo.js.map +1 -1
- package/lib/commands.d.ts +9 -0
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +32 -19
- package/lib/commands.js.map +1 -1
- package/lib/config.d.ts +5 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +1 -0
- package/lib/config.js.map +1 -1
- package/lib/file-lock.d.ts +4 -0
- package/lib/file-lock.d.ts.map +1 -0
- package/lib/file-lock.js +23 -0
- package/lib/file-lock.js.map +1 -0
- package/lib/metric-lines.d.ts +20 -0
- package/lib/metric-lines.d.ts.map +1 -0
- package/lib/metric-lines.js +117 -0
- package/lib/metric-lines.js.map +1 -0
- package/lib/metric-send-mark.d.ts +52 -0
- package/lib/metric-send-mark.d.ts.map +1 -0
- package/lib/metric-send-mark.js +69 -0
- package/lib/metric-send-mark.js.map +1 -0
- package/lib/metric-send.d.ts +18 -0
- package/lib/metric-send.d.ts.map +1 -0
- package/lib/metric-send.js +226 -0
- package/lib/metric-send.js.map +1 -0
- package/lib/metric-usage.d.ts +34 -0
- package/lib/metric-usage.d.ts.map +1 -0
- package/lib/metric-usage.js +111 -0
- package/lib/metric-usage.js.map +1 -0
- package/lib/metrics.d.ts +92 -0
- package/lib/metrics.d.ts.map +1 -0
- package/lib/metrics.js +263 -0
- package/lib/metrics.js.map +1 -0
- package/lib/observations-cargo.d.ts +2 -0
- package/lib/observations-cargo.d.ts.map +1 -1
- package/lib/observations-cargo.js +1 -1
- package/lib/observations-cargo.js.map +1 -1
- package/lib/observations.d.ts +22 -2
- package/lib/observations.d.ts.map +1 -1
- package/lib/observations.js +40 -13
- package/lib/observations.js.map +1 -1
- package/lib/outcomes.d.ts +89 -0
- package/lib/outcomes.d.ts.map +1 -0
- package/lib/outcomes.js +274 -0
- package/lib/outcomes.js.map +1 -0
- package/lib/ship.js +1 -1
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.js +7 -1
- package/lib/shipment.js.map +1 -1
- package/lib/snapshot.d.ts +2 -0
- package/lib/snapshot.d.ts.map +1 -1
- package/lib/snapshot.js +6 -0
- package/lib/snapshot.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: interface-review-surfaces
|
|
3
|
+
description: Surface recipes for an interface review: concentric radii, optical alignment, shadows instead of depth borders, image outlines, with CSS and Tailwind code. Load when such a finding is worded or fixed. The rules are in interface-review-principles.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Surfaces
|
|
7
|
+
|
|
8
|
+
Border radius, optical alignment, shadows, and image outlines.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- A finding of `interface-review` is about nested radii, an off-center icon, a border used for
|
|
13
|
+
depth or an image edge, and the fix needs code.
|
|
14
|
+
|
|
15
|
+
## Concentric Border Radius
|
|
16
|
+
|
|
17
|
+
When nesting rounded elements, the outer radius must equal the inner radius plus the padding between
|
|
18
|
+
them:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
outerRadius = innerRadius + padding
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This rule is most useful when nested surfaces are close together. If padding is larger than `24px`,
|
|
25
|
+
treat the layers as separate surfaces and choose each radius independently instead of forcing strict
|
|
26
|
+
concentric math.
|
|
27
|
+
|
|
28
|
+
### Example
|
|
29
|
+
|
|
30
|
+
```css
|
|
31
|
+
/* Good: concentric radii */
|
|
32
|
+
.card {
|
|
33
|
+
border-radius: 20px; /* 12 + 8 */
|
|
34
|
+
padding: 8px;
|
|
35
|
+
}
|
|
36
|
+
.card-inner {
|
|
37
|
+
border-radius: 12px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Bad: same radius on both */
|
|
41
|
+
.card {
|
|
42
|
+
border-radius: 12px;
|
|
43
|
+
padding: 8px;
|
|
44
|
+
}
|
|
45
|
+
.card-inner {
|
|
46
|
+
border-radius: 12px;
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Tailwind Example
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
// Good: outer radius accounts for padding
|
|
54
|
+
<div className="rounded-2xl p-2"> {/* 16px radius, 8px padding */}
|
|
55
|
+
<div className="rounded-lg"> {/* 8px radius = 16 - 8 ✓ */}
|
|
56
|
+
...
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
// Bad: same radius on both
|
|
61
|
+
<div className="rounded-xl p-2">
|
|
62
|
+
<div className="rounded-xl"> {/* same radius, looks off */}
|
|
63
|
+
...
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Mismatched border radii on closely nested surfaces is a common source of visual tension. Calculate
|
|
69
|
+
concentrically when the layers share a visible, even inset; preserve an established component token
|
|
70
|
+
when the layers are independent or the padding is intentionally asymmetric.
|
|
71
|
+
|
|
72
|
+
## Optical Alignment
|
|
73
|
+
|
|
74
|
+
When geometric centering looks off, align optically instead.
|
|
75
|
+
|
|
76
|
+
### Buttons with Text + Icon
|
|
77
|
+
|
|
78
|
+
When an icon makes otherwise symmetric padding look unbalanced, use slightly less padding on the
|
|
79
|
+
icon side. A useful starting point is: `icon-side padding = text-side padding - 2px`.
|
|
80
|
+
|
|
81
|
+
```css
|
|
82
|
+
/* Good: less padding on icon side */
|
|
83
|
+
.button-with-icon {
|
|
84
|
+
padding-inline-start: 16px;
|
|
85
|
+
padding-inline-end: 14px; /* trailing icon side = text side - 2px */
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Bad: equal padding looks like icon is pushed too far right */
|
|
89
|
+
.button-with-icon {
|
|
90
|
+
padding-inline: 16px;
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
// Tailwind
|
|
96
|
+
<button className="ps-4 pe-3.5 flex items-center gap-2">
|
|
97
|
+
<span>Continue</span>
|
|
98
|
+
<ArrowRightIcon />
|
|
99
|
+
</button>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Play Button Triangles
|
|
103
|
+
|
|
104
|
+
Play icons are triangular and their geometric center is not their visual center. Shift slightly
|
|
105
|
+
right:
|
|
106
|
+
|
|
107
|
+
```css
|
|
108
|
+
/* Good: optically centered */
|
|
109
|
+
.play-button svg {
|
|
110
|
+
transform: translateX(2px); /* physical correction to the glyph itself */
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Bad: geometrically centered but looks off */
|
|
114
|
+
.play-button svg {
|
|
115
|
+
/* no adjustment */
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Asymmetric Icons (Stars, Arrows, Carets)
|
|
120
|
+
|
|
121
|
+
Some icons have uneven visual weight. The best fix is adjusting the SVG directly so no extra
|
|
122
|
+
margin/padding is needed in the component code.
|
|
123
|
+
|
|
124
|
+
```tsx
|
|
125
|
+
// Best: fix in the SVG itself
|
|
126
|
+
// Adjust the viewBox or path to visually center the icon
|
|
127
|
+
|
|
128
|
+
// Fallback: adjust with margin
|
|
129
|
+
<span className="translate-x-px">
|
|
130
|
+
<StarIcon />
|
|
131
|
+
</span>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Shadows Instead of Borders
|
|
135
|
+
|
|
136
|
+
For **buttons, cards, and containers** that use a border for depth or elevation, prefer replacing it
|
|
137
|
+
with a subtle `box-shadow`. Shadows adapt to any background since they use transparency; solid
|
|
138
|
+
borders don't. This also helps when using images or multiple colors as backgrounds: solid border
|
|
139
|
+
colors don't work well on backgrounds other than the ones they were designed for.
|
|
140
|
+
|
|
141
|
+
**Do not apply this to dividers** (`border-b`, `border-t`, side borders) or any border whose purpose
|
|
142
|
+
is layout separation rather than element depth. Those should stay as borders.
|
|
143
|
+
|
|
144
|
+
### Shadow as Border (Light Mode)
|
|
145
|
+
|
|
146
|
+
The shadow is comprised of three layers. The first acts as a 1px border ring, the second adds subtle
|
|
147
|
+
lift, and the third provides ambient depth:
|
|
148
|
+
|
|
149
|
+
```css
|
|
150
|
+
:root {
|
|
151
|
+
--shadow-border:
|
|
152
|
+
0px 0px 0px 1px oklch(0 0 0 / 0.06),
|
|
153
|
+
0px 1px 2px -1px oklch(0 0 0 / 0.06),
|
|
154
|
+
0px 2px 4px 0px oklch(0 0 0 / 0.04);
|
|
155
|
+
--shadow-border-hover:
|
|
156
|
+
0px 0px 0px 1px oklch(0 0 0 / 0.08),
|
|
157
|
+
0px 1px 2px -1px oklch(0 0 0 / 0.08),
|
|
158
|
+
0px 2px 4px 0px oklch(0 0 0 / 0.06);
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Shadow as Border (Dark Mode)
|
|
163
|
+
|
|
164
|
+
In dark mode, simplify to a single white ring, since layered depth shadows aren't visible on dark
|
|
165
|
+
backgrounds:
|
|
166
|
+
|
|
167
|
+
```css
|
|
168
|
+
/* Dark mode: adapt to whatever setup the project uses
|
|
169
|
+
(prefers-color-scheme, class, data attribute, etc.) */
|
|
170
|
+
--shadow-border: 0 0 0 1px oklch(1 0 0 / 0.08);
|
|
171
|
+
--shadow-border-hover: 0 0 0 1px oklch(1 0 0 / 0.13);
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Usage with Hover Transition
|
|
175
|
+
|
|
176
|
+
Apply the variable and add `transition-[box-shadow]` for a smooth hover:
|
|
177
|
+
|
|
178
|
+
```css
|
|
179
|
+
.card {
|
|
180
|
+
box-shadow: var(--shadow-border);
|
|
181
|
+
transition-property: box-shadow;
|
|
182
|
+
transition-duration: 150ms;
|
|
183
|
+
transition-timing-function: ease-out;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.card:hover {
|
|
187
|
+
box-shadow: var(--shadow-border-hover);
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### When to Use Shadows vs. Borders
|
|
192
|
+
|
|
193
|
+
| Use shadows | Use borders |
|
|
194
|
+
| --- | --- |
|
|
195
|
+
| Cards, containers with depth | Dividers between list items |
|
|
196
|
+
| Buttons with bordered styles | Table cell boundaries |
|
|
197
|
+
| Elevated elements (dropdowns, modals) | Form input outlines (for accessibility) |
|
|
198
|
+
| Elements on varied backgrounds | Hairline separators in dense UI |
|
|
199
|
+
| Hover/focus states for lift effect | |
|
|
200
|
+
|
|
201
|
+
## Image Outlines
|
|
202
|
+
|
|
203
|
+
Add a subtle `1px` outline with low opacity to images. This creates consistent depth, especially in
|
|
204
|
+
design systems where other elements use borders or shadows.
|
|
205
|
+
|
|
206
|
+
### Color rules (non-negotiable)
|
|
207
|
+
|
|
208
|
+
- **Light mode**: pure black, `oklch(0 0 0 / 0.1)`.
|
|
209
|
+
- **Dark mode**: pure white, `oklch(1 0 0 / 0.1)`.
|
|
210
|
+
- Never use a near-black or near-white from the project palette (e.g. slate-900, zinc-900,
|
|
211
|
+
`#0a0a0a`, `#111827`, `#f5f5f7`). Tinted outlines pick up the surrounding surface color and read
|
|
212
|
+
as dirt on the image edge.
|
|
213
|
+
- Never match the outline to the project's accent or ink color. The outline is a neutral separator,
|
|
214
|
+
not a themed element.
|
|
215
|
+
|
|
216
|
+
### Light Mode
|
|
217
|
+
|
|
218
|
+
```css
|
|
219
|
+
img {
|
|
220
|
+
outline: 1px solid oklch(0 0 0 / 0.1);
|
|
221
|
+
outline-offset: -1px; /* draw the ring just inside the image edge */
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Dark Mode
|
|
226
|
+
|
|
227
|
+
```css
|
|
228
|
+
img {
|
|
229
|
+
outline: 1px solid oklch(1 0 0 / 0.1);
|
|
230
|
+
outline-offset: -1px;
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Tailwind with Dark Mode
|
|
235
|
+
|
|
236
|
+
```tsx
|
|
237
|
+
<img
|
|
238
|
+
className="outline outline-1 -outline-offset-1 outline-black/10 dark:outline-white/10"
|
|
239
|
+
src={src}
|
|
240
|
+
alt={alt}
|
|
241
|
+
/>
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Use `outline-black/10` and `outline-white/10` specifically, not `outline-slate-*`, `outline-zinc-*`,
|
|
245
|
+
`outline-neutral-*`, or any tinted scale.
|
|
246
|
+
|
|
247
|
+
**Why outline instead of border?** `outline` never affects layout (no added width or height at any
|
|
248
|
+
offset), and `outline-offset: -1px` draws the ring just inside the image edge so it hugs the corner
|
|
249
|
+
radius instead of sitting outside it.
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: interface-review
|
|
3
|
+
description: Reviews an interface as one system: accessibility, layout, writing, typography and polish, in that order, into one ranked findings table and one verdict. Load when asked to review or audit a screen, a flow, a component or a Figma frame. The domain rules are in interface-review-principles.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review the interface as one system
|
|
7
|
+
|
|
8
|
+
A strong interface is not five independent audits stapled together. Position and spacing carry
|
|
9
|
+
hierarchy before a word is read, the words themselves do the explaining, type makes them legible,
|
|
10
|
+
and polish is what makes the result feel deliberate rather than assembled. Review the whole
|
|
11
|
+
experience, then consolidate into one prioritized verdict.
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- A screen, a flow, a feature or a whole repository is to be reviewed from the side of the person
|
|
16
|
+
who uses it.
|
|
17
|
+
- A Figma frame is to be reviewed and annotated with the findings.
|
|
18
|
+
- Findings of an interface review are to be implemented — then the consolidated report is the
|
|
19
|
+
change scope.
|
|
20
|
+
|
|
21
|
+
The principles each finding is judged by are in `interface-review-principles`. The cards on a Figma
|
|
22
|
+
frame are in `interface-review-annotate`; it is laid out only in a tree with mockups. Recipes:
|
|
23
|
+
surfaces — `interface-review-surfaces`, entrances and exits — `interface-review-motion`, icon swaps,
|
|
24
|
+
press feedback and page load — `interface-review-motion-states`, icons — `interface-review-icons`,
|
|
25
|
+
transitions and compositing — `interface-review-performance`.
|
|
26
|
+
|
|
27
|
+
## How to look
|
|
28
|
+
|
|
29
|
+
When reviewing, slow the interface down. Walk it as a keyboard-only user first — every flow must
|
|
30
|
+
complete without a mouse. Read the page instead of scanning the code: squint to check the hierarchy
|
|
31
|
+
holds, read one full paragraph for comfort, resize the viewport to catch bad wrapping and truncation
|
|
32
|
+
at real content lengths. Replay motion at 10% speed in the browser's Animations panel and walk every
|
|
33
|
+
state: hover, focus, active, loading, empty. What feels off at 10% speed is what's subtly wrong at
|
|
34
|
+
full speed.
|
|
35
|
+
|
|
36
|
+
**Match the project's styling system.** Before writing any fix, check how the codebase styles
|
|
37
|
+
things and express every change in that system: Tailwind utilities in a Tailwind project, plain
|
|
38
|
+
declarations in CSS, CSS Modules, styled-components or StyleX. Preserve the project's component
|
|
39
|
+
library, tokens, and density, and its established motion language except where a principle in
|
|
40
|
+
`interface-review-principles` prescribes an exact interaction pattern. Never introduce a second styling approach just to apply a
|
|
41
|
+
fix.
|
|
42
|
+
|
|
43
|
+
Treat numeric values as starting points for interfaces without an established density or spacing
|
|
44
|
+
system. Preserve deliberate platform chrome, compact professional tools, and project tokens when
|
|
45
|
+
they remain usable under hit-area, zoom, localization, and viewport stress tests.
|
|
46
|
+
|
|
47
|
+
Color notation, palette construction, and gamut are out of scope; this skill measures and reports
|
|
48
|
+
contrast but does not repaint the project.
|
|
49
|
+
|
|
50
|
+
## How to run a review
|
|
51
|
+
|
|
52
|
+
### Resolve scope and mode first
|
|
53
|
+
|
|
54
|
+
Infer the screen, flow, feature, or repository scope from the request and current workspace. State
|
|
55
|
+
the resolved scope in the output. Use `full` when no mode is supplied.
|
|
56
|
+
|
|
57
|
+
| Mode | Coverage | Finding cap |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| `quick` | Primary user path and highest-traffic states; report only `HIGH` and `MEDIUM` issues | 5 |
|
|
60
|
+
| `full` | Entire requested scope across all five domains, including empty, loading, error, and narrow-width states when present | 15 |
|
|
61
|
+
|
|
62
|
+
If the requested scope is too large to inspect credibly, narrow it to the highest-traffic complete
|
|
63
|
+
flow and state the boundary. Never imply uninspected surfaces were reviewed.
|
|
64
|
+
|
|
65
|
+
### Recon before judgment
|
|
66
|
+
|
|
67
|
+
Identify the framework, styling system, component library, design tokens, supported viewports, and
|
|
68
|
+
available preview or test commands. For copy, inspect nearby interface text, the product's
|
|
69
|
+
terminology, localization conventions, and any voice or content style guide before proposing a
|
|
70
|
+
change.
|
|
71
|
+
|
|
72
|
+
### Review in this order
|
|
73
|
+
|
|
74
|
+
Foundational failures must not be hidden by polish:
|
|
75
|
+
|
|
76
|
+
1. Accessibility
|
|
77
|
+
2. Layout
|
|
78
|
+
3. Writing
|
|
79
|
+
4. Typography
|
|
80
|
+
5. UI polish
|
|
81
|
+
|
|
82
|
+
When two domains appear to cover the same issue, assign it to the one that owns the underlying rule
|
|
83
|
+
and mention secondary effects in the **Why** cell. Report it once.
|
|
84
|
+
|
|
85
|
+
### Require evidence
|
|
86
|
+
|
|
87
|
+
Every finding cites `path/to/file:line` and shows the current implementation. If the review
|
|
88
|
+
artifact has no source files, cite the exact screen and component. Do not report a code-level
|
|
89
|
+
finding from visual appearance alone, or a visual finding from source code alone when runtime
|
|
90
|
+
behavior determines the result.
|
|
91
|
+
|
|
92
|
+
### Review without mutating by default
|
|
93
|
+
|
|
94
|
+
Treat a review request as read-only. Do not edit source code unless the user also asks to implement
|
|
95
|
+
the findings. When implementation is requested, preserve the consolidated report as the change
|
|
96
|
+
scope and re-run the relevant verification afterward.
|
|
97
|
+
|
|
98
|
+
## Review Output Format
|
|
99
|
+
|
|
100
|
+
Always use the following sections.
|
|
101
|
+
|
|
102
|
+
### Scope and Coverage
|
|
103
|
+
|
|
104
|
+
State the mode, exact scope, stack and styling conventions, and any review boundary. Then show
|
|
105
|
+
coverage:
|
|
106
|
+
|
|
107
|
+
| Domain | Evidence inspected | Result |
|
|
108
|
+
| --- | --- | --- |
|
|
109
|
+
| Accessibility | Files, components, states, or checks | Findings count or `Clear` |
|
|
110
|
+
|
|
111
|
+
Include all five domains. `Clear` means inspected with no actionable finding; `Not reviewed` must
|
|
112
|
+
explain why.
|
|
113
|
+
|
|
114
|
+
### Findings
|
|
115
|
+
|
|
116
|
+
Use one table ordered by severity, then reach and payoff:
|
|
117
|
+
|
|
118
|
+
| # | Severity | Domain | Location | Before | After | Why |
|
|
119
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
120
|
+
| 1 | HIGH | Accessibility | `src/Dialog.tsx:42` | `<button><XIcon /></button>` | Add `aria-label="Close"` and hide the icon from the accessibility tree | The icon-only control has no accessible name |
|
|
121
|
+
|
|
122
|
+
Severity is one shared scale:
|
|
123
|
+
|
|
124
|
+
- `HIGH`: blocks a task, misleads the user, hides content or controls, causes data-loss risk, or
|
|
125
|
+
creates a repeated systemic failure.
|
|
126
|
+
- `MEDIUM`: meaningfully harms comprehension, efficiency, adaptability, or consistency.
|
|
127
|
+
- `LOW`: isolated polish with limited task impact. Include only in `full` mode.
|
|
128
|
+
|
|
129
|
+
Within a severity, rank by reach and payoff. A token or shared-component fix outranks the same
|
|
130
|
+
symptom in one leaf component.
|
|
131
|
+
|
|
132
|
+
Each row is one root cause: list every confirmed location in the same row rather than producing a
|
|
133
|
+
row per occurrence. Respect the mode's finding cap, and never pad the report to reach it. If there
|
|
134
|
+
are no findings, omit the table and state "No actionable interface findings."
|
|
135
|
+
|
|
136
|
+
### Annotate the frame
|
|
137
|
+
|
|
138
|
+
Every row in the findings table also lands on the canvas as a card. Where the tree has
|
|
139
|
+
`interface-review-annotate` laid out, the card shape and placement are there. If the file is view-only or the user asked for the report only, output the table alone and say the
|
|
140
|
+
frame was not annotated.
|
|
141
|
+
|
|
142
|
+
### Considered but Rejected
|
|
143
|
+
|
|
144
|
+
Record candidates considered but deliberately rejected. A candidate is rejected when the principle in
|
|
145
|
+
`interface-review-principles` permits the current implementation, evidence is insufficient, the project convention is
|
|
146
|
+
intentional, or the proposed change would add complexity without user benefit.
|
|
147
|
+
|
|
148
|
+
Include 1–3 candidates in `quick` mode and 2–5 in `full` mode:
|
|
149
|
+
|
|
150
|
+
| Location | Candidate | Rejected because |
|
|
151
|
+
| --- | --- | --- |
|
|
152
|
+
| `src/Card.tsx:28` | Increase the shadow | Existing depth matches the shared surface token; changing one card would reduce consistency |
|
|
153
|
+
|
|
154
|
+
These are real candidates inspected during the review, not invented filler. If the scope genuinely
|
|
155
|
+
contains fewer borderline candidates, include the ones that exist and say so.
|
|
156
|
+
|
|
157
|
+
### Verification
|
|
158
|
+
|
|
159
|
+
Run safe, relevant checks available in the project. Inspect the rendered interface when runtime
|
|
160
|
+
behavior or visual judgment matters. List each check or interaction, the exact command or steps,
|
|
161
|
+
and the observed result. Separate checks that passed from checks marked **Not verified**; never
|
|
162
|
+
convert a verification gap into a finding.
|
|
163
|
+
|
|
164
|
+
### Verdict
|
|
165
|
+
|
|
166
|
+
End with exactly one:
|
|
167
|
+
|
|
168
|
+
- `Block` — one or more `HIGH` findings remain.
|
|
169
|
+
- `Needs changes` — only `MEDIUM` or `LOW` findings remain.
|
|
170
|
+
- `Approve` — no actionable findings remain and the claimed coverage was verified.
|
|
171
|
+
|
|
172
|
+
## Common Mistakes
|
|
173
|
+
|
|
174
|
+
| Mistake | Fix |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| `outline: none` to remove the focus ring | Style `:focus-visible` instead; mouse clicks won't show it |
|
|
177
|
+
| `<div onClick>` for a button or link | `<button>` for actions, `<a href>` for navigation |
|
|
178
|
+
| Placeholder used as the only label | Add a visible `<label for>`; placeholders disappear on input |
|
|
179
|
+
| Positive `tabindex` to fix focus order | Fix the DOM order; only use `0` and `-1` |
|
|
180
|
+
| `aria-hidden="true"` on a focusable element | Remove it or make the element non-focusable |
|
|
181
|
+
| Submit disabled until the form is valid | Keep it enabled; validate on submit and focus the first error |
|
|
182
|
+
| Separator line where spacing would do | Remove the line, double the gap between groups |
|
|
183
|
+
| `margin-left` / `padding-right` in a localizable layout | `margin-inline-start` / `padding-inline-end` |
|
|
184
|
+
| Breakpoints at 768/1024 because they're the defaults | Break where the content actually stops fitting |
|
|
185
|
+
| Fixed-width text container sized to one language | `max-width` + wrapping; test pseudo-localization and representative locales |
|
|
186
|
+
| `OK` / `Yes` confirming a destructive dialog | Repeat the consequence: "Delete project" |
|
|
187
|
+
| "Click here" or bare "Learn more" link | Describe the destination: "Read the billing docs" |
|
|
188
|
+
| "Oops! Something went wrong." | Say what to do, next to the failing field |
|
|
189
|
+
| "Save Changes" beside "Discard changes" | One capitalization policy per element type |
|
|
190
|
+
| Hard-coded one-off font sizes | Use the type scale |
|
|
191
|
+
| `line-height: 24px` on scalable text | Unitless value (`1.5`) |
|
|
192
|
+
| Full-width paragraphs | Cap around 60–75 characters per line |
|
|
193
|
+
| Numbers cause layout shift | `tabular-nums` |
|
|
194
|
+
| Truncated text with no way to read it | Tooltip or expanded view for the full value |
|
|
195
|
+
| Inputs below `16px` zoom on iOS | `text-base sm:text-sm` |
|
|
196
|
+
| Six disconnected domain reports | Consolidate into one ranked findings table |
|
|
197
|
+
| Visual claim inferred only from source | Inspect the rendered state or mark it not verified |
|
|
198
|
+
| Review silently edits code | Stay read-only unless implementation was requested |
|
|
199
|
+
| "Approve" with pending actionable findings | Use `Needs changes` or `Block` |
|
|
@@ -30,6 +30,16 @@ third case, and only it is here.
|
|
|
30
30
|
3. **Show the owner.** A skill acts on all future sessions, and creating it silently is not
|
|
31
31
|
allowed.
|
|
32
32
|
|
|
33
|
+
## When the owner hands over the text
|
|
34
|
+
|
|
35
|
+
A text the owner wrote is carried, not rewritten. Before the first split it lands whole in the
|
|
36
|
+
task folder: a request cut with `[…]` leaves nothing to compare against. Headings keep their case
|
|
37
|
+
and wording, sentences their words, code samples stay whole. What the shape of a skill forces —
|
|
38
|
+
the declaration, "When to use", a link in place of "above" — goes into a list of deviations, one
|
|
39
|
+
line each. Before the first commit a script compares every heading and paragraph of the source
|
|
40
|
+
with the skill files and prints what is missing or changed. A size limit the text does not fit
|
|
41
|
+
splits the text into files, never shortens it.
|
|
42
|
+
|
|
33
43
|
## What is in the file
|
|
34
44
|
|
|
35
45
|
```
|
|
@@ -49,8 +59,9 @@ not. It stands in the system prompt next to the descriptions of all the others,
|
|
|
49
59
|
goes by them.
|
|
50
60
|
|
|
51
61
|
It answers two questions: what the skill gives and when to load it. Write in the third person,
|
|
52
|
-
up to
|
|
53
|
-
what is not in it and where to look for that.
|
|
62
|
+
up to three hundred characters: the first sentence — what it does, the second — "Load when…", the
|
|
63
|
+
third — what is not in it and where to look for that. Where the tree has the descriptions check
|
|
64
|
+
laid out, it refuses a longer declaration.
|
|
54
65
|
|
|
55
66
|
```
|
|
56
67
|
✓ Creating a new skill — one with no law above it. Load when asked to create, write or
|
|
@@ -104,7 +115,9 @@ link deeper than one level is not followed at all.
|
|
|
104
115
|
- [ ] not one line repeats the neighbouring skill;
|
|
105
116
|
- [ ] nothing that goes stale by itself: versions, numbers, dates;
|
|
106
117
|
- [ ] at least one ready-made sample, not only an explanation;
|
|
107
|
-
- [ ] links go one level deep, no deeper
|
|
118
|
+
- [ ] links go one level deep, no deeper;
|
|
119
|
+
- [ ] where the tree has the descriptions check laid out, it is green before the first commit,
|
|
120
|
+
not only before the push.
|
|
108
121
|
|
|
109
122
|
## So that the skill gets loaded
|
|
110
123
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
<date>. <One line: where the work was going and how far it got.>
|
|
4
4
|
|
|
5
|
+
**Resource:** <the resource of the package the miss is about, by its identifier, such as `rules/testing.md`>
|
|
6
|
+
|
|
5
7
|
## What happened
|
|
6
8
|
|
|
7
9
|
<What the executor did and in what way it was wrong. Without appraisals: the mechanism is
|
|
@@ -7,13 +7,16 @@ export const meta = {
|
|
|
7
7
|
{ title: 'Implementation', detail: 'one step at a time — the working tree is shared by all' },
|
|
8
8
|
{ title: 'Check', detail: 'QA as a fan: tests, build, browser, adversarial review' },
|
|
9
9
|
{ title: 'Acceptance', detail: 'the PM checks what was done against the original request' },
|
|
10
|
+
{ title: 'Points', detail: 'the signs of the points are run, and the miss is proved or refuted' },
|
|
11
|
+
{ title: 'Goal', detail: 'the critic compares the result with the original request' },
|
|
10
12
|
],
|
|
11
13
|
};
|
|
12
14
|
|
|
13
|
-
// The
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
// The grill is required alongside the task: without the owner's words the Goal phase has nothing to
|
|
16
|
+
// compare the result with, and a string call would spend the whole run to learn that at the end.
|
|
17
|
+
const task = args?.task ?? '';
|
|
18
|
+
if (!task || !args?.grill) {
|
|
19
|
+
throw new Error('A task and the grill are needed: pass { task, grill } in args');
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
const PLAN = {
|
|
@@ -131,4 +134,29 @@ const verdict = await agent(
|
|
|
131
134
|
{ agentType: 'project-manager', label: 'acceptance', phase: 'Acceptance' }
|
|
132
135
|
);
|
|
133
136
|
|
|
134
|
-
|
|
137
|
+
phase('Points');
|
|
138
|
+
// A role a session has not registered costs this phase, not the done work above it.
|
|
139
|
+
let points = null;
|
|
140
|
+
try {
|
|
141
|
+
points = await agent(
|
|
142
|
+
`The user's original request:\n\n${task}\n\nWhat was done:\n${done.join('\n')}\n\n` +
|
|
143
|
+
`This is the review mode. Read the points in the task plan and the epic plan, run the sign of each ` +
|
|
144
|
+
`and try to prove the miss.`,
|
|
145
|
+
{ agentType: 'product-strategist', label: 'points', phase: 'Points' }
|
|
146
|
+
);
|
|
147
|
+
} catch (error) {
|
|
148
|
+
log(`Points: the role did not run: ${error.message}`);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
phase('Goal');
|
|
152
|
+
// The critic gets the request and nothing the pipeline wrote about the work: that is its whole value.
|
|
153
|
+
// A run without it ends in a failure and not in a result that looks judged.
|
|
154
|
+
// Only the grill holds a quote: the task string is the session's wording.
|
|
155
|
+
const goal = await agent(
|
|
156
|
+
`The owner's words are the quoted request in \`${args.grill}\`; read that section only.\n\n` +
|
|
157
|
+
`This is the result mode. The result is the working tree and its diff against the base ` +
|
|
158
|
+
`branch. Try to prove the goal is not met.`,
|
|
159
|
+
{ agentType: 'goal-critic', label: 'goal', phase: 'Goal' }
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
return { plan, done, findings, blockers, verdict, points, goal };
|
package/assets/workflows/plan.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export const meta = {
|
|
2
2
|
name: 'plan',
|
|
3
|
-
description: 'After the grill with the owner: whether the work is needed, the product agreement, its adversarial review and the implementation plan',
|
|
3
|
+
description: 'After the grill with the owner: whether the work is needed, whether it reaches its points, the product agreement, its adversarial review and the implementation plan',
|
|
4
4
|
whenToUse: 'The grill of the owner\'s request is closed, the task folder is created, the code is not written yet',
|
|
5
5
|
phases: [
|
|
6
6
|
{ title: 'Need', detail: 'what the work gives and what is dropped from it' },
|
|
7
|
+
{ title: 'Points', detail: 'where the product stands, the point of the work and the milestone' },
|
|
7
8
|
{ title: 'Agreement', detail: 'the feature spec in proposed/ from the grill' },
|
|
8
9
|
{ title: 'Critique', detail: 'what is left unsaid in the agreement' },
|
|
9
10
|
{ title: 'Plan', detail: 'stages with readiness signs and the split into tasks' },
|
|
11
|
+
{ title: 'Goal', detail: 'the critic compares the plan with the owner\'s words' },
|
|
10
12
|
],
|
|
11
13
|
};
|
|
12
14
|
|
|
@@ -32,6 +34,34 @@ const WORTH = {
|
|
|
32
34
|
},
|
|
33
35
|
};
|
|
34
36
|
|
|
37
|
+
const POINTS = {
|
|
38
|
+
type: 'object',
|
|
39
|
+
additionalProperties: false,
|
|
40
|
+
required: ['verdict', 'passport', 'pointA', 'point', 'sign', 'milestone', 'misses'],
|
|
41
|
+
properties: {
|
|
42
|
+
verdict: { type: 'string', enum: ['reaches', 'longer route', 'does not reach'] },
|
|
43
|
+
passport: { type: 'string', description: 'the product passport, five to seven lines' },
|
|
44
|
+
pointA: { type: 'string', description: 'point A: where the product stands now' },
|
|
45
|
+
point: { type: 'string', description: 'the change a person will see after this work' },
|
|
46
|
+
sign: { type: 'string', description: 'what shows the point is reached, and who sees it' },
|
|
47
|
+
milestone: { type: 'string', description: 'point G: the milestone of the epic; empty for work outside an epic' },
|
|
48
|
+
misses: {
|
|
49
|
+
type: 'array',
|
|
50
|
+
description: 'the proved misses of the route',
|
|
51
|
+
items: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
additionalProperties: false,
|
|
54
|
+
required: ['miss', 'proof', 'step'],
|
|
55
|
+
properties: {
|
|
56
|
+
miss: { type: 'string' },
|
|
57
|
+
proof: { type: 'string', description: 'what proves it, with its source' },
|
|
58
|
+
step: { type: 'string', description: 'the shortest step that closes it, and its cost' },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
35
65
|
const DRAFT = {
|
|
36
66
|
type: 'object',
|
|
37
67
|
additionalProperties: false,
|
|
@@ -75,11 +105,13 @@ const PLAN = {
|
|
|
75
105
|
items: {
|
|
76
106
|
type: 'object',
|
|
77
107
|
additionalProperties: false,
|
|
78
|
-
required: ['title', 'slug', 'why'],
|
|
108
|
+
required: ['title', 'slug', 'why', 'point', 'sign'],
|
|
79
109
|
properties: {
|
|
80
110
|
title: { type: 'string' },
|
|
81
111
|
slug: { type: 'string' },
|
|
82
112
|
why: { type: 'string', description: 'why this is rolled back separately' },
|
|
113
|
+
point: { type: 'string', description: 'the change a person will see after this task' },
|
|
114
|
+
sign: { type: 'string', description: 'what shows the point is reached, and who sees it' },
|
|
83
115
|
},
|
|
84
116
|
},
|
|
85
117
|
},
|
|
@@ -115,11 +147,33 @@ if (worth.verdict === 'postpone') {
|
|
|
115
147
|
return { worth, stopped: 'the analyst proposed to postpone — the decision is the owner\'s' };
|
|
116
148
|
}
|
|
117
149
|
|
|
150
|
+
phase('Points');
|
|
151
|
+
// The role advises and stops nothing: whether work goes on is the owner's decision, and they read
|
|
152
|
+
// the misses in the result. A role that is missing or returned nothing costs the phase, not the
|
|
153
|
+
// pipeline: a session registers roles when it starts, so a new role is unknown to an older session.
|
|
154
|
+
let points = null;
|
|
155
|
+
try {
|
|
156
|
+
points = await agent(
|
|
157
|
+
`The grill of the owner's request — \`${grill}\`. Read it in full, together with the epic plan when ` +
|
|
158
|
+
`the work has one.\n\n` +
|
|
159
|
+
`Dropped from the work: ${worth.drop.join('; ') || '— nothing'}.\n\n` +
|
|
160
|
+
`This is the planning mode. Name where the product stands, the point this work must reach and ` +
|
|
161
|
+
`the milestone of the epic, and try to prove that the route misses them.`,
|
|
162
|
+
{ agentType: 'product-strategist', label: 'points', schema: POINTS }
|
|
163
|
+
);
|
|
164
|
+
} catch (error) {
|
|
165
|
+
log(`Points: the role did not run: ${error.message}`);
|
|
166
|
+
}
|
|
167
|
+
const misses = points?.misses ?? [];
|
|
168
|
+
const missesText = misses.map((m) => `- ${m.miss}: ${m.step}`).join('\n') || '— none';
|
|
169
|
+
log(`Points: ${points?.verdict ?? 'no reply'}; misses: ${misses.length}`);
|
|
170
|
+
|
|
118
171
|
phase('Agreement');
|
|
119
172
|
const draft = await agent(
|
|
120
173
|
`The grill of the owner's request — \`${grill}\`. Read it in full and write the product agreement ` +
|
|
121
174
|
`from it: \`docs/specs/<домен>/proposed/<фича>/\`.\n\n` +
|
|
122
175
|
`Dropped from the work: ${worth.drop.join('; ') || '— nothing'}.\n\n` +
|
|
176
|
+
`Proved misses of the route:\n${missesText}\n\n` +
|
|
123
177
|
`Gaps that the grill does not close — do not guess them, return them as a list.`,
|
|
124
178
|
{ agentType: 'spec-writer', label: 'agreement', schema: DRAFT }
|
|
125
179
|
);
|
|
@@ -138,13 +192,26 @@ phase('Plan');
|
|
|
138
192
|
const plan = await agent(
|
|
139
193
|
`The grill of the owner's request — \`${grill}\`, the agreement — \`${draft.path}\`.\n\n` +
|
|
140
194
|
`Findings of the adversarial review:\n${critique.findings.map((f) => `- ${f.what} (${f.where})`).join('\n') || '— none'}\n\n` +
|
|
195
|
+
`Point A: ${points?.pointA || '— not named'}.\nThe milestone of the epic: ${points?.milestone || '— none'}.\n` +
|
|
196
|
+
`Proved misses of the route:\n${missesText}\n\n` +
|
|
141
197
|
`Assemble the implementation plan: stages with boundaries and a checkable readiness sign for each. ` +
|
|
142
198
|
`Say separately how many tasks the work splits into: what splits is what would have to be rolled back ` +
|
|
143
|
-
`separately, not what is merely large. One task is the usual case
|
|
199
|
+
`separately, not what is merely large. One task is the usual case. Name the point and the sign of ` +
|
|
200
|
+
`each task, so that the tasks add up to the milestone.`,
|
|
144
201
|
{ agentType: 'project-manager', label: 'plan', schema: PLAN }
|
|
145
202
|
);
|
|
146
203
|
log(`Plan: tasks: ${plan.tasks.length}, stages: ${plan.steps.length}`);
|
|
147
204
|
|
|
205
|
+
phase('Goal');
|
|
206
|
+
// The critic is the check that does not stand on what the session wrote, so a run without it ends
|
|
207
|
+
// in a failure and not in a plan that looks judged. A resumed run keeps the phases above.
|
|
208
|
+
const goal = await agent(
|
|
209
|
+
`The owner's words are the quoted request in \`${grill}\`; read that section only.\n\n` +
|
|
210
|
+
`The plan under review:\n${JSON.stringify(plan, null, 1)}\n\n` +
|
|
211
|
+
`This is the plan mode. Try to prove the plan does not lead to what the owner asked for.`,
|
|
212
|
+
{ agentType: 'goal-critic', label: 'goal', phase: 'Goal' }
|
|
213
|
+
);
|
|
214
|
+
|
|
148
215
|
// Nothing is written to disk from here: the plan and the gaps go to the owner, and `plan.md`
|
|
149
216
|
// is written by the main agent — only it asks the owner questions.
|
|
150
|
-
return { worth, draft, critique: critique.findings, plan };
|
|
217
|
+
return { worth, points, draft, critique: critique.findings, plan, goal };
|