ramstack 0.1.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/LICENSE +21 -0
- package/README.md +44 -0
- package/agents/comment-sicko.md +32 -0
- package/agents/poteto-agent.md +9 -0
- package/cli/rstack.mjs +539 -0
- package/package.json +29 -0
- package/skills/architect/README.md +25 -0
- package/skills/architect/SKILL.md +83 -0
- package/skills/architect/agents/openai.yaml +5 -0
- package/skills/architect/references/design-red-flags.md +33 -0
- package/skills/architect/references/rationale-template.md +35 -0
- package/skills/architect/references/runner-prompt.md +20 -0
- package/skills/arena/README.md +21 -0
- package/skills/arena/SKILL.md +71 -0
- package/skills/arena/agents/openai.yaml +5 -0
- package/skills/automate-me/README.md +21 -0
- package/skills/automate-me/SKILL.md +109 -0
- package/skills/automate-me/agents/openai.yaml +5 -0
- package/skills/blast-radius/README.md +21 -0
- package/skills/blast-radius/SKILL.md +50 -0
- package/skills/blast-radius/agents/openai.yaml +5 -0
- package/skills/bro/README.md +16 -0
- package/skills/bro/SKILL.md +7 -0
- package/skills/bro/agents/openai.yaml +5 -0
- package/skills/create-verification-skill/README.md +22 -0
- package/skills/create-verification-skill/SKILL.md +44 -0
- package/skills/create-verification-skill/agents/openai.yaml +5 -0
- package/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/skills/figure-it-out/README.md +22 -0
- package/skills/figure-it-out/SKILL.md +55 -0
- package/skills/figure-it-out/agents/openai.yaml +5 -0
- package/skills/how/README.md +25 -0
- package/skills/how/SKILL.md +134 -0
- package/skills/how/agents/openai.yaml +3 -0
- package/skills/how/references/critic-prompt.md +59 -0
- package/skills/how/references/critique-rubric.md +58 -0
- package/skills/how/references/explainer-prompt.md +55 -0
- package/skills/how/references/explorer-prompt.md +52 -0
- package/skills/interrogate/README.md +21 -0
- package/skills/interrogate/SKILL.md +112 -0
- package/skills/interrogate/agents/openai.yaml +5 -0
- package/skills/interrogate/references/code-quality-review.md +47 -0
- package/skills/interrogate/references/lead-judgment.md +58 -0
- package/skills/interrogate/references/reviewer-prompt.md +72 -0
- package/skills/interrogate/references/rubric.md +77 -0
- package/skills/maintain-verification-skill/README.md +21 -0
- package/skills/maintain-verification-skill/SKILL.md +39 -0
- package/skills/maintain-verification-skill/agents/openai.yaml +5 -0
- package/skills/no-comments/README.md +22 -0
- package/skills/no-comments/SKILL.md +24 -0
- package/skills/no-comments/agents/openai.yaml +5 -0
- package/skills/poteto-mode/README.md +26 -0
- package/skills/poteto-mode/SKILL.md +140 -0
- package/skills/poteto-mode/agents/openai.yaml +5 -0
- package/skills/poteto-mode/playbooks/authoring-a-skill.md +13 -0
- package/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/skills/poteto-mode/playbooks/autopilot-full.md +13 -0
- package/skills/poteto-mode/playbooks/autopilot-stack.md +16 -0
- package/skills/poteto-mode/playbooks/babysit.md +27 -0
- package/skills/poteto-mode/playbooks/bug-fix.md +17 -0
- package/skills/poteto-mode/playbooks/eval.md +27 -0
- package/skills/poteto-mode/playbooks/feature.md +21 -0
- package/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/skills/poteto-mode/playbooks/multi-phase-plan.md +3 -0
- package/skills/poteto-mode/playbooks/opening-a-pr.md +11 -0
- package/skills/poteto-mode/playbooks/orchestrate.md +113 -0
- package/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/skills/poteto-mode/playbooks/perf-issue.md +24 -0
- package/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/skills/poteto-mode/playbooks/session-pickup.md +13 -0
- package/skills/poteto-mode/playbooks/shipping.md +20 -0
- package/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -0
- package/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/skills/poteto-mode/references/plan.md +105 -0
- package/skills/poteto-mode/scripts/bootstrap.ts +62 -0
- package/skills/poteto-mode/scripts/bun.lock +67 -0
- package/skills/poteto-mode/scripts/orch/orch.test.ts +634 -0
- package/skills/poteto-mode/scripts/orch/orch.ts +578 -0
- package/skills/poteto-mode/scripts/orch/store.ts +1607 -0
- package/skills/poteto-mode/scripts/package.json +16 -0
- package/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
- package/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
- package/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +118 -0
- package/skills/poteto-mode/scripts/watch-pr/github.test.ts +306 -0
- package/skills/poteto-mode/scripts/watch-pr/github.ts +699 -0
- package/skills/poteto-mode/scripts/watch-pr/policy.test.ts +420 -0
- package/skills/poteto-mode/scripts/watch-pr/policy.ts +832 -0
- package/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
- package/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
- package/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
- package/skills/poteto-mode/scripts/watch-pr/types.ts +401 -0
- package/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
- package/skills/poteto-mode/scripts/worktree-audit.sh +86 -0
- package/skills/principle-boundary-discipline/README.md +17 -0
- package/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/skills/principle-boundary-discipline/agents/openai.yaml +5 -0
- package/skills/principle-build-the-lever/README.md +17 -0
- package/skills/principle-build-the-lever/SKILL.md +23 -0
- package/skills/principle-build-the-lever/agents/openai.yaml +5 -0
- package/skills/principle-encode-lessons-in-structure/README.md +17 -0
- package/skills/principle-encode-lessons-in-structure/SKILL.md +31 -0
- package/skills/principle-encode-lessons-in-structure/agents/openai.yaml +5 -0
- package/skills/principle-exhaust-the-design-space/README.md +17 -0
- package/skills/principle-exhaust-the-design-space/SKILL.md +21 -0
- package/skills/principle-exhaust-the-design-space/agents/openai.yaml +5 -0
- package/skills/principle-experience-first/README.md +17 -0
- package/skills/principle-experience-first/SKILL.md +19 -0
- package/skills/principle-experience-first/agents/openai.yaml +5 -0
- package/skills/principle-fix-root-causes/README.md +17 -0
- package/skills/principle-fix-root-causes/SKILL.md +23 -0
- package/skills/principle-fix-root-causes/agents/openai.yaml +5 -0
- package/skills/principle-foundational-thinking/README.md +17 -0
- package/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/skills/principle-foundational-thinking/agents/openai.yaml +5 -0
- package/skills/principle-guard-the-context-window/README.md +17 -0
- package/skills/principle-guard-the-context-window/SKILL.md +17 -0
- package/skills/principle-guard-the-context-window/agents/openai.yaml +5 -0
- package/skills/principle-laziness-protocol/README.md +17 -0
- package/skills/principle-laziness-protocol/SKILL.md +18 -0
- package/skills/principle-laziness-protocol/agents/openai.yaml +5 -0
- package/skills/principle-make-operations-idempotent/README.md +17 -0
- package/skills/principle-make-operations-idempotent/SKILL.md +24 -0
- package/skills/principle-make-operations-idempotent/agents/openai.yaml +5 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/README.md +17 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/agents/openai.yaml +5 -0
- package/skills/principle-minimize-reader-load/README.md +17 -0
- package/skills/principle-minimize-reader-load/SKILL.md +23 -0
- package/skills/principle-minimize-reader-load/agents/openai.yaml +5 -0
- package/skills/principle-model-the-domain/README.md +17 -0
- package/skills/principle-model-the-domain/SKILL.md +26 -0
- package/skills/principle-model-the-domain/agents/openai.yaml +5 -0
- package/skills/principle-never-block-on-the-human/README.md +16 -0
- package/skills/principle-never-block-on-the-human/SKILL.md +23 -0
- package/skills/principle-never-block-on-the-human/agents/openai.yaml +5 -0
- package/skills/principle-outcome-oriented-execution/README.md +16 -0
- package/skills/principle-outcome-oriented-execution/SKILL.md +22 -0
- package/skills/principle-outcome-oriented-execution/agents/openai.yaml +5 -0
- package/skills/principle-prove-it-works/README.md +18 -0
- package/skills/principle-prove-it-works/SKILL.md +33 -0
- package/skills/principle-prove-it-works/agents/openai.yaml +5 -0
- package/skills/principle-redesign-from-first-principles/README.md +16 -0
- package/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/skills/principle-redesign-from-first-principles/agents/openai.yaml +5 -0
- package/skills/principle-separate-before-serializing-shared-state/README.md +16 -0
- package/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/skills/principle-separate-before-serializing-shared-state/agents/openai.yaml +5 -0
- package/skills/principle-sequence-verifiable-units/README.md +18 -0
- package/skills/principle-sequence-verifiable-units/SKILL.md +22 -0
- package/skills/principle-sequence-verifiable-units/agents/openai.yaml +5 -0
- package/skills/principle-subtract-before-you-add/README.md +17 -0
- package/skills/principle-subtract-before-you-add/SKILL.md +22 -0
- package/skills/principle-subtract-before-you-add/agents/openai.yaml +5 -0
- package/skills/principle-type-system-discipline/README.md +19 -0
- package/skills/principle-type-system-discipline/SKILL.md +31 -0
- package/skills/principle-type-system-discipline/agents/openai.yaml +5 -0
- package/skills/recall/README.md +23 -0
- package/skills/recall/SKILL.md +35 -0
- package/skills/recall/agents/openai.yaml +5 -0
- package/skills/reflect/README.md +24 -0
- package/skills/reflect/SKILL.md +77 -0
- package/skills/reflect/agents/openai.yaml +5 -0
- package/skills/reflect/references/divergent-reviewer.md +43 -0
- package/skills/reflect/references/judgment-reviewer.md +42 -0
- package/skills/reflect/references/synthesizer.md +56 -0
- package/skills/reflect/references/tooling-reviewer.md +57 -0
- package/skills/setup-rstack/README.md +25 -0
- package/skills/setup-rstack/SKILL.md +81 -0
- package/skills/setup-rstack/agents/openai.yaml +3 -0
- package/skills/show-me-your-work/README.md +23 -0
- package/skills/show-me-your-work/SKILL.md +82 -0
- package/skills/show-me-your-work/agents/openai.yaml +5 -0
- package/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/skills/show-me-your-work/scripts/log.sh +40 -0
- package/skills/swarm/README.md +21 -0
- package/skills/swarm/SKILL.md +46 -0
- package/skills/swarm/agents/openai.yaml +5 -0
- package/skills/tdd/README.md +21 -0
- package/skills/tdd/SKILL.md +44 -0
- package/skills/tdd/agents/openai.yaml +5 -0
- package/skills/teach/README.md +22 -0
- package/skills/teach/SKILL.md +21 -0
- package/skills/teach/agents/openai.yaml +5 -0
- package/skills/technical-writing/README.md +23 -0
- package/skills/technical-writing/SKILL.md +130 -0
- package/skills/technical-writing/agents/openai.yaml +5 -0
- package/skills/typescript-best-practices/README.md +22 -0
- package/skills/typescript-best-practices/SKILL.md +28 -0
- package/skills/typescript-best-practices/agents/openai.yaml +3 -0
- package/skills/typescript-best-practices/references/patterns.md +292 -0
- package/skills/unslop/README.md +21 -0
- package/skills/unslop/SKILL.md +80 -0
- package/skills/unslop/agents/openai.yaml +3 -0
- package/skills/why/README.md +26 -0
- package/skills/why/SKILL.md +229 -0
- package/skills/why/agents/openai.yaml +3 -0
- package/skills/why/references/epistemics.md +144 -0
- package/skills/why/references/investigator-prompt.md +103 -0
- package/skills/why/references/source-playbook.md +17 -0
- package/skills/why/references/sources/code-archaeology.md +88 -0
- package/skills/why/references/sources/databricks.md +70 -0
- package/skills/why/references/sources/datadog.md +99 -0
- package/skills/why/references/sources/incident-postmortem.md +15 -0
- package/skills/why/references/sources/linear.md +48 -0
- package/skills/why/references/sources/notion.md +55 -0
- package/skills/why/references/sources/sentry.md +100 -0
- package/skills/why/references/sources/slack.md +54 -0
- package/skills/why/references/synthesizer-prompt.md +135 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-verification-skill
|
|
3
|
+
description: "Generate a project-local verification skill that drives your app the way a user does — any language, framework, or platform. Use for /create-verification-skill, \"make a control skill for this repo\", or when a project has no scripted way to prove UI/CLI/service behavior."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Create a verification skill
|
|
8
|
+
|
|
9
|
+
Every serious project needs a scripted way to drive the real app and prove behavior: launch it, exercise a feature the way a user would, and capture evidence. This skill generates that as a project-local skill (`.claude/skills/verify-<app>/`) tailored to the repo. You write the generator's output for the next agent, not for a human: it will be read cold, mid-task, by an agent that has never seen the app.
|
|
10
|
+
|
|
11
|
+
## 1. Interview the repo, not the user
|
|
12
|
+
|
|
13
|
+
Answer these from the codebase and only ask the user what you cannot observe:
|
|
14
|
+
|
|
15
|
+
- **Surface:** what does a user actually touch? A web UI, a CLI/TUI, a desktop app, an API, a mobile app, a library? A repo can have several; pick the primary one and note the rest.
|
|
16
|
+
- **Run:** how does the app start locally? Prefer the repo's own documented dev command (package scripts, Makefile, README quickstart). Note ports, env vars, seed data, auth.
|
|
17
|
+
- **Drive:** how can an agent interact with it programmatically? Existing harnesses first — Playwright/Cypress specs, expect scripts, PTY helpers, curl-able endpoints, a debug port. Only then pick a generic recipe: browser/CDP for web and Electron, a tmux/PTY harness for CLI/TUI, plain HTTP for services.
|
|
18
|
+
- **Observe:** what evidence can be captured? Screenshots, terminal transcripts, response bodies, logs, exit codes, DB state.
|
|
19
|
+
- **Isolate:** can two instances run side by side (ports, data dirs, profiles)? If not, say so in the generated skill: refusing to double-drive a shared instance beats corrupting the user's session.
|
|
20
|
+
|
|
21
|
+
If the checkout doesn't build or start as-is, fix that first (or report it precisely) before generating; a skill written against a broken base teaches wrong steps. When an irrelevant missing asset blocks startup (a static dir the API never serves, a sample config), the generated skill may create it, clearly marked as verification scaffolding, and remove it in cleanup.
|
|
22
|
+
|
|
23
|
+
## 2. Generate the skill
|
|
24
|
+
|
|
25
|
+
Write `.agents/skills/verify-<app>/SKILL.md` when the team uses Codex or pi (Claude Code picks it up too via a repo-local symlink: `ln -s ../../.agents/skills/verify-<app> .claude/skills/verify-<app>`), or `.claude/skills/verify-<app>/SKILL.md` for a Claude-Code-only team. YAML frontmatter (`name: verify-<app>` and a `description` that names the app, the surface, and when to reach for it — without frontmatter the skill never registers) and these sections, each grounded in what the interview actually found (no placeholders left):
|
|
26
|
+
|
|
27
|
+
- **Launch:** the exact command that starts the app for verification, and how to tell it's ready (a log line, a port answering, a prompt). Include teardown. For a short-lived CLI or TUI there is no server to keep alive: launch means build the binary (or install deps) once, then start each drive in its own isolated PTY or tmux session.
|
|
28
|
+
- **Doctor:** one read-only check that answers "is this instance worth driving?" — process up, right version/build, port owned by us, auth valid. An agent runs this first whenever anything looks off.
|
|
29
|
+
- **Drive:** the harness recipe with real selectors/commands from this repo, not examples. Prefer stable handles (ARIA labels, data attributes, prompt strings, route paths) over coordinates and tab order.
|
|
30
|
+
- **Evidence:** what to capture for a proof and where it goes. State the proof standards: exercise the real user path, not internal setters or test-only endpoints; capture the action and the resulting state, not just the final screen; verify side effects (files written, rows inserted, messages sent) alongside what's visible; mocks only where a production boundary already isolates the external system. When the safe path is a dry-run or test mode, verify what it actually skips by observing (files, network, git refs) rather than trusting its name: some dry-runs still touch the network or open a browser.
|
|
31
|
+
- **Cleanup:** how to tear down instances the run created. Never kill by process name; kill what you started. Cleanup removes instances and scratch state, never the evidence: proof artifacts survive the teardown, in a location the skill names.
|
|
32
|
+
- **Helpers:** any script the skill ships is executable and its invocation is shown in the skill body. A helper the reader has to reverse-engineer is not a helper.
|
|
33
|
+
|
|
34
|
+
## 3. Seed the feature map
|
|
35
|
+
|
|
36
|
+
Create `features/README.md` in the same skill directory plus one file per user-facing feature you can identify (aim for the top 3-5 to start, from routes, commands, menus, or docs). Follow the shape in [`references/feature-map-example/`](references/feature-map-example/), with a README index and one file per feature. Each file answers, from the user's point of view: what the feature is, how to reach it, how to drive it with the harness, and what observable end state proves it works. The four H2s are `Sub-features`, `How to get to it (user POV)`, `Driving it with <harness>`, and `Gotchas`. The map is the repo's maintained verification source; a proof that drives one convenient entry point is incomplete when the map lists others.
|
|
37
|
+
|
|
38
|
+
## 4. Prove the generated skill before handing it over
|
|
39
|
+
|
|
40
|
+
Run its own instructions end to end once: launch, doctor, drive ONE mapped feature (one is enough; the map exists so later runs can cover the rest), capture evidence, clean up. After cleanup, confirm the evidence still exists at the named location — a cleanup that eats the proof fails this step. Fix what fails, and run the generated cleanup after every failed iteration too, so broken attempts don't strand processes and ports. A generated skill that was never executed is a draft, not a deliverable.
|
|
41
|
+
|
|
42
|
+
## 5. Offer the maintenance loop
|
|
43
|
+
|
|
44
|
+
Point the user at `/maintain-verification-skill` for keeping the map honest as the app changes. Suggest a cadence only if they ask.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Notes verification map
|
|
2
|
+
|
|
3
|
+
This directory is the maintained source for verifying the user-facing behavior of Notes. Read the index before driving the app, then use the matching feature file as the recipe.
|
|
4
|
+
|
|
5
|
+
## Baseline preconditions
|
|
6
|
+
|
|
7
|
+
- Launch Notes at `http://127.0.0.1:4173` with a disposable data directory.
|
|
8
|
+
- Set `NOTES_DATA_DIR=/tmp/notes-verify-$RUN_ID` so concurrent runs do not share state.
|
|
9
|
+
- Seed notes titled `Quarterly plan` and `Grocery list`.
|
|
10
|
+
- Put `control-notes` and the `notes` CLI on `PATH`.
|
|
11
|
+
- Run `control-notes doctor` and require the expected URL, data directory, and build revision.
|
|
12
|
+
- Never drive an instance that was not started by this verification run.
|
|
13
|
+
|
|
14
|
+
## Driving conventions
|
|
15
|
+
|
|
16
|
+
- Start every recipe from the baseline state unless its preconditions say otherwise.
|
|
17
|
+
- Prefer ARIA roles and accessible names over CSS selectors or DOM position.
|
|
18
|
+
- Treat every command as literal. Keep quoted names and flags unchanged.
|
|
19
|
+
- Run browser actions through `control-notes browser`.
|
|
20
|
+
- Run terminal actions through `control-notes cli -- <command>`.
|
|
21
|
+
- Restore seeded data after a mutation. Do not remove proof artifacts during cleanup.
|
|
22
|
+
|
|
23
|
+
## Proof and skip reporting
|
|
24
|
+
|
|
25
|
+
- Capture the user action and the resulting state, not only the final screen.
|
|
26
|
+
- UI proof includes an ARIA snapshot and a screenshot with the app identity visible.
|
|
27
|
+
- CLI proof includes the command, stdout, stderr, and exit code.
|
|
28
|
+
- Mutation proof includes a read-only second view of the stored value.
|
|
29
|
+
- Record the feature ID and entry point used with every artifact.
|
|
30
|
+
- Report an unreachable path with the attempted command and the unmet precondition.
|
|
31
|
+
- Do not report a skipped entry point as verified through a different path.
|
|
32
|
+
|
|
33
|
+
## Feature entry contract
|
|
34
|
+
|
|
35
|
+
Each feature file starts with an H1 title and one paragraph describing the user-visible behavior. It then uses exactly four H2 sections in this order.
|
|
36
|
+
|
|
37
|
+
1. `Sub-features` lists short IDs with one line for each behavior.
|
|
38
|
+
2. `How to get to it (user POV)` lists every user entry point.
|
|
39
|
+
3. `Driving it with <harness>` starts with `Preconditions:` and uses labeled bullets that pair each user action with an exact command and observable result.
|
|
40
|
+
4. `Gotchas` lists traps that can waste or invalidate a verification run.
|
|
41
|
+
|
|
42
|
+
Keep implementation details out of the map. Name only user paths, stable handles, required state, commands, and observable proof.
|
|
43
|
+
|
|
44
|
+
## Features
|
|
45
|
+
|
|
46
|
+
- [Create a note](./create-note.md) covers browser and CLI creation, cancellation, persistence, and cleanup.
|
|
47
|
+
- [Search notes](./search.md) covers toolbar, keyboard, and CLI search with matching, empty, and clear states.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Create a note
|
|
2
|
+
|
|
3
|
+
Create note lets a user save a titled note from the browser or CLI, cancel an unfinished draft, and confirm the saved note from a second user-facing view.
|
|
4
|
+
|
|
5
|
+
## Sub-features
|
|
6
|
+
|
|
7
|
+
- `create-open` opens a blank editor from each browser entry point.
|
|
8
|
+
- `create-save` persists a title and body.
|
|
9
|
+
- `create-cancel` discards an unfinished browser draft.
|
|
10
|
+
- `create-cli` creates the same note shape from the terminal.
|
|
11
|
+
|
|
12
|
+
## How to get to it (user POV)
|
|
13
|
+
|
|
14
|
+
- Choose the `New note` button in the browser toolbar.
|
|
15
|
+
- Press `n` in the browser while focus is outside an editable field.
|
|
16
|
+
- Run `notes create --title <title> --body <body>` in a terminal.
|
|
17
|
+
|
|
18
|
+
## Driving it with control-notes
|
|
19
|
+
|
|
20
|
+
Preconditions:
|
|
21
|
+
|
|
22
|
+
- Notes is healthy at `http://127.0.0.1:4173`.
|
|
23
|
+
- No note is titled `Release checklist`.
|
|
24
|
+
- `control-notes doctor` reports the expected URL and disposable data directory.
|
|
25
|
+
|
|
26
|
+
- **Open editor.** Choose `New note`. Run `control-notes browser click --role button --name "New note"`. A form named `Note editor` appears with focus in the `Title` textbox.
|
|
27
|
+
- **Enter content.** Type the title and body. Run `control-notes browser fill --role textbox --name "Title" --value "Release checklist"` and `control-notes browser fill --role textbox --name "Body" --value "Tag and publish"`. The `Save note` button becomes enabled.
|
|
28
|
+
- **Save note.** Choose `Save note`. Run `control-notes browser click --role button --name "Save note"`. A status named `Note saved` appears and the heading reads `Release checklist`.
|
|
29
|
+
- **Confirm persistence.** Return to the note list and reopen the note. Run `control-notes browser click --role link --name "All notes"` and `control-notes browser click --role link --name "Release checklist"`. The editor shows both saved values.
|
|
30
|
+
- **Cancel draft.** Open a new note, enter `Discard me`, and choose `Cancel`. Run `control-notes browser click --role button --name "New note"`, `control-notes browser fill --role textbox --name "Title" --value "Discard me"`, and `control-notes browser click --role button --name "Cancel"`. The note list returns and has no `Discard me` link.
|
|
31
|
+
- **CLI entry.** Create a second note. Run `control-notes cli -- notes create --title "CLI note" --body "Created from terminal" --format json`. Exit code `0` and stdout contain the new note ID and title.
|
|
32
|
+
- **Proof.** Reopen both saved notes from `All notes`. Run `control-notes browser snapshot --aria --path artifacts/create-note/list.aria.txt` and `control-notes browser screenshot --path artifacts/create-note/list.png`. The artifacts show `Release checklist` and `CLI note`.
|
|
33
|
+
|
|
34
|
+
## Gotchas
|
|
35
|
+
|
|
36
|
+
- Pressing `n` while a textbox has focus types the character instead of opening a new editor.
|
|
37
|
+
- Titles are trimmed on save. Assert the rendered title, not the draft input value.
|
|
38
|
+
- A save status alone is insufficient proof. Reopen the note from the list.
|
|
39
|
+
- Remove `Release checklist` and `CLI note` during fixture cleanup, but retain their proof artifacts.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Search notes
|
|
2
|
+
|
|
3
|
+
Search lets a user find notes by title or body text, inspect a matching note, and distinguish no matches from an unavailable search.
|
|
4
|
+
|
|
5
|
+
## Sub-features
|
|
6
|
+
|
|
7
|
+
- `search-open` opens search from each supported browser entry point.
|
|
8
|
+
- `search-match` returns title and body matches without changing note data.
|
|
9
|
+
- `search-open-result` opens a result in the note editor.
|
|
10
|
+
- `search-empty` shows a complete empty state for a query with no matches.
|
|
11
|
+
- `search-clear` removes the query and restores the recent-notes view.
|
|
12
|
+
- `search-cli` returns the same matching notes from the terminal.
|
|
13
|
+
|
|
14
|
+
## How to get to it (user POV)
|
|
15
|
+
|
|
16
|
+
- Choose the `Search` button in the browser toolbar.
|
|
17
|
+
- Press `/` in the browser while focus is outside an editable field.
|
|
18
|
+
- Run `notes search <query>` in a terminal.
|
|
19
|
+
|
|
20
|
+
## Driving it with control-notes
|
|
21
|
+
|
|
22
|
+
Preconditions:
|
|
23
|
+
|
|
24
|
+
- Notes is healthy at `http://127.0.0.1:4173`.
|
|
25
|
+
- The disposable data directory contains `Quarterly plan` with body text `Draft budget`.
|
|
26
|
+
- `control-notes doctor` reports the expected URL and data directory.
|
|
27
|
+
|
|
28
|
+
- **Toolbar entry.** Choose the `Search` button. Run `control-notes browser click --role button --name "Search"`. A dialog named `Search notes` appears with focus in its searchbox.
|
|
29
|
+
- **Keyboard entry.** Close the dialog, focus the page, and press `/`. Run `control-notes browser press --key "/"`. The same dialog appears and the page does not insert a slash.
|
|
30
|
+
- **Title match.** Type `quarterly`. Run `control-notes browser fill --role searchbox --name "Search notes" --value "quarterly"`. The `Search results` list contains `Quarterly plan` and does not contain `Grocery list`.
|
|
31
|
+
- **Body match.** Replace the query with `budget`. Run `control-notes browser fill --role searchbox --name "Search notes" --value "budget"`. The result `Quarterly plan` remains visible with a body-match excerpt.
|
|
32
|
+
- **Open result.** Choose `Quarterly plan`. Run `control-notes browser click --role link --name "Quarterly plan"`. The dialog closes and the editor heading reads `Quarterly plan`.
|
|
33
|
+
- **Empty state.** Reopen search and enter `volcano`. Run `control-notes browser fill --role searchbox --name "Search notes" --value "volcano"`. A status named `No matching notes` appears after search completes.
|
|
34
|
+
- **Clear query.** Choose `Clear search`. Run `control-notes browser click --role button --name "Clear search"`. The searchbox is empty and the `Recent notes` region replaces the result list.
|
|
35
|
+
- **CLI match.** Search from the terminal. Run `control-notes cli -- notes search "quarterly" --format json`. Exit code `0` and stdout contain one object whose title is `Quarterly plan`.
|
|
36
|
+
- **CLI miss.** Search for an absent value. Run `control-notes cli -- notes search "volcano" --format json`. Exit code `0` and stdout are `[]`.
|
|
37
|
+
- **Proof.** Capture the populated result state. Run `control-notes browser snapshot --aria --path artifacts/search/results.aria.txt` and `control-notes browser screenshot --path artifacts/search/results.png`. Both artifacts identify Notes, the query, and `Quarterly plan`.
|
|
38
|
+
|
|
39
|
+
## Gotchas
|
|
40
|
+
|
|
41
|
+
- Pressing `/` while the editor or searchbox has focus inserts text instead of opening search.
|
|
42
|
+
- Results update after a short debounce. Wait for the results list or empty status, not a fixed sleep.
|
|
43
|
+
- Archived notes are excluded unless the user enables `Include archived`.
|
|
44
|
+
- The CLI defaults to human-readable output. Use `--format json` for stable assertions.
|
|
45
|
+
- Opening a result changes browser state. Reopen search before proving another query.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Figure it out
|
|
2
|
+
|
|
3
|
+
Design an auditable playbook when no narrower one fits.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- `/figure-it-out` or "figure it out"
|
|
8
|
+
- A large migration or ambitious multi-part change
|
|
9
|
+
- Work a human reviews after stepping away
|
|
10
|
+
- When no narrower playbook (bug fix, feature, perf issue) applies
|
|
11
|
+
|
|
12
|
+
## What it produces
|
|
13
|
+
|
|
14
|
+
A bespoke workflow with phases, a verification harness built before the work begins, and a decision trail (via the `show-me-your-work` skill) that a reviewer can audit. The trail plus the diff is what lets the human trust the work.
|
|
15
|
+
|
|
16
|
+
## How it works
|
|
17
|
+
|
|
18
|
+
Five phases: frame the problem with a falsifiable done-predicate and scoped effort estimate, design the workflow as independently-landable units sequenced riskiest-first, run each unit as a hypothesis loop (change, measure, keep or revert), keep a TSV decision log throughout, and verify the whole against the original predicate. Rigor scales to the task. One-way doors and high blast radius get more gates. The `architect` skill runs for design decisions. The `show-me-your-work` skill owns the audit trail format.
|
|
19
|
+
|
|
20
|
+
## Related
|
|
21
|
+
|
|
22
|
+
- [SKILL.md](SKILL.md)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: figure-it-out
|
|
3
|
+
description: "Design an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a human reviews after stepping away. Scales rigor to the task, runs a hypothesis loop, and logs decisions via show-me-your-work. Use for /figure-it-out, 'figure it out', a large migration, or when no narrower playbook applies."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Figure it out
|
|
8
|
+
|
|
9
|
+
When the task matches no playbook, design one. The deliverable before any code is the workflow itself: a sequence of phases that scales rigor to the task, runs the scientific method, and leaves a decision trail a human can audit after stepping away. Bias toward more rigor. The cost of building the wrong thing dwarfs the cost of being careful.
|
|
10
|
+
|
|
11
|
+
Don't reinvent a playbook you already have. A focused single-unit task that matches Bug fix, Perf, Feature, Visual parity, Eval, or Multi-phase plan routes there. But a large or cross-cutting version of one (a migration across many call sites, an ambitious multi-part change), or work the user reviews after stepping away, belongs here even though a single-unit version would be a Feature. The rigor and the audit trail are the point.
|
|
12
|
+
|
|
13
|
+
## Start
|
|
14
|
+
|
|
15
|
+
Open a todolist whose first item is to read the Principles section of the **poteto-mode** skill. Then add the phases below as todos.
|
|
16
|
+
|
|
17
|
+
## Phase A: Frame
|
|
18
|
+
|
|
19
|
+
Ground first, then commit. Don't start the run until you can state:
|
|
20
|
+
|
|
21
|
+
- The definition of done as a falsifiable predicate (the **prove-it-works** principle skill). "Done well" has to be checkable.
|
|
22
|
+
- Scope, quantified: rough units and effort, plus the blockers grounding surfaced. Raise them before spending hours, not after fifty doomed commits.
|
|
23
|
+
- The rigor level, biased high. One-way doors and high blast radius get more; reversible low-stakes steps get less. Rigor is gates and artifacts, not "try harder".
|
|
24
|
+
|
|
25
|
+
Present the framing and tradeoffs before committing to a long run. Reversible work proceeds (the **never-block-on-the-human** principle skill), but a multi-hour run earns one checkpoint.
|
|
26
|
+
|
|
27
|
+
## Phase B: Design the workflow
|
|
28
|
+
|
|
29
|
+
Decompose into atomic, independently-landable units. Sequence riskiest-unknown-first so option value stays high. Scaffold and verification come before features (the **foundational-thinking** principle skill).
|
|
30
|
+
|
|
31
|
+
- Build the verification harness before the work, with the baseline captured from the pre-change state, so the check reads as "old value vs new value".
|
|
32
|
+
- For one-way-door design decisions, run the **architect** skill (it runs **arena**) with diverse, isolated, opinionated candidates and a read-only judge on a different model family. Skip it for mechanical work whose shape is already concrete. A second arena over a settled design is over-engineering (the **laziness-protocol** principle skill).
|
|
33
|
+
- Decide what fans out. Parallelize only across genuine seams, and give each worker its own worktree or branch (the **separate-before-serializing-shared-state** principle skill). Don't over-fan.
|
|
34
|
+
- Write the designed phase list down. That list is what the human reviews.
|
|
35
|
+
|
|
36
|
+
Then put the design into motion. Add its steps to the todolist as concrete items, after the Phase C entry and before Phase D. Run each under the Phase C loop discipline, and weave the Phase D log through them, a row as each step lands, rather than saving the whole trail for the end.
|
|
37
|
+
|
|
38
|
+
## Phase C: Run the loop
|
|
39
|
+
|
|
40
|
+
Each unit is an experiment: state the hypothesis, make the smallest change, measure against the predicate on the real artifact, keep it if it advanced, revert it if it didn't.
|
|
41
|
+
Apply the **sequence-verifiable-units** principle skill, verifying each unit before starting the next instead of batching checks at the end.
|
|
42
|
+
|
|
43
|
+
- Verify by inspecting the artifact, never a self-report. When something passes too easily, suspect the observation method before the system. A blank screenshot passes a lazy gate.
|
|
44
|
+
- Pair delegated work with a judge and audit the delegates' artifacts yourself before trusting them. If a worker games the gate, reset and harden the contract. If the gate itself is wrong, fix the gate in its own change rather than routing around it.
|
|
45
|
+
- A verdict is VERIFIED, NOT VERIFIED, or INCONCLUSIVE. Inconclusive is not a pass. Don't hide a negative.
|
|
46
|
+
|
|
47
|
+
## Phase D: Keep the audit trail
|
|
48
|
+
|
|
49
|
+
Log the run via the **show-me-your-work** skill, one canonical TSV with a row per decision and per unit, evidence as links. figure-it-out's work is usually ambitious enough to commit the trail so the reviewer can read it in the PR; commit it when confidence has to be shown. Prefer evidence produced by committed scripts so a reviewer can re-run it. The trail plus the diff is what lets the human come back and trust the work.
|
|
50
|
+
|
|
51
|
+
## Phase E: Verify and hand back
|
|
52
|
+
|
|
53
|
+
Check the whole against the Phase A predicate on the real product, not just the harness. Encode any recurring correction as a gate, a lint rule, a check, or a script, so the win can't silently regress (the **encode-lessons-in-structure** principle skill).
|
|
54
|
+
|
|
55
|
+
**Reply:** the playbook you designed, the rigor level and why, the decision-trail path, what's verified against the predicate, and what's still open.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# How
|
|
2
|
+
|
|
3
|
+
Explore the codebase to answer "how does X work?" questions. Produces clear architectural explanations at the level of a senior engineer onboarding onto a subsystem.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- `/how` or "how does X work"
|
|
8
|
+
- Code walkthroughs before changing something
|
|
9
|
+
- Placement and ownership questions: "where should this live", "which package owns this"
|
|
10
|
+
- Architecture critiques when asked for issues or improvements
|
|
11
|
+
|
|
12
|
+
## What it produces
|
|
13
|
+
|
|
14
|
+
A structured explanation with overview, key concepts, flow walkthrough, file map, and gotchas. In critique mode, adds a categorized verdict (act on, consider, noted, dismissed) from a multi-model review panel.
|
|
15
|
+
|
|
16
|
+
## How it works
|
|
17
|
+
|
|
18
|
+
Two modes. Explain (default) assesses complexity, then either explores directly or fans out parallel explorer subagents to cover different slices of the subsystem. An explainer subagent synthesizes the findings into one coherent account. Critique mode runs the full explain flow first, then spawns independent critic subagents on different models to find architectural issues. The parent applies lead judgment to categorize each finding.
|
|
19
|
+
|
|
20
|
+
Model choices come from the `how explorer`, `how explainer`, and `how critics` roles in the model config.
|
|
21
|
+
|
|
22
|
+
## Related
|
|
23
|
+
|
|
24
|
+
- [SKILL.md](SKILL.md)
|
|
25
|
+
- [references/](references/) (explorer, explainer, and critic prompt templates, critique rubric)
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: how
|
|
3
|
+
description: "Use for \"how does X work\", code walkthroughs before changing something, and placement / ownership / layering questions (\"where should this live\", \"which package owns this\", \"is this the right layer\"). Explains subsystem architecture, runtime flow, onboarding mental models. Can critique architecture. Use why for motivation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# How
|
|
7
|
+
|
|
8
|
+
Explore the codebase to answer "how does X work?" questions. Produce clear architectural explanations at the level of a senior engineer onboarding onto a subsystem. Enough to build a working mental model, not annotated source code.
|
|
9
|
+
|
|
10
|
+
Two modes:
|
|
11
|
+
|
|
12
|
+
1. **Explain** (default). Explore the codebase and produce a clear explanation
|
|
13
|
+
2. **Critique.** Explain first, then spawn multiple models to independently identify architectural issues
|
|
14
|
+
|
|
15
|
+
## Explain Mode
|
|
16
|
+
|
|
17
|
+
### Step 1. Understand the Question and Assess Complexity
|
|
18
|
+
|
|
19
|
+
Parse what the user is asking about:
|
|
20
|
+
|
|
21
|
+
- "How does the rate limiter work?", a subsystem
|
|
22
|
+
- "How do we handle billing for on-demand usage?", a feature flow
|
|
23
|
+
- "How is the auth service structured?", an architectural overview
|
|
24
|
+
- "Walk me through what happens when a user submits a form", a runtime trace
|
|
25
|
+
|
|
26
|
+
Identify the scope. If ambiguous, state your best-guess interpretation before exploring. Don't ask. Let the user redirect if you're off.
|
|
27
|
+
|
|
28
|
+
**Assess complexity to decide the approach:**
|
|
29
|
+
|
|
30
|
+
- **Simple** (a single module, a small utility, a narrow question like "how does function X work"): skip explorer agents; the explainer explores and explains in a single pass. Go to Step 2b.
|
|
31
|
+
- **Complex** (a subsystem spanning multiple files/services, a cross-cutting feature, a full architectural overview): spawn parallel explorer agents first, then hand off to the explainer. Go to Step 2a.
|
|
32
|
+
|
|
33
|
+
When in doubt, lean simple. You can always spawn explorers if the explainer hits a wall.
|
|
34
|
+
|
|
35
|
+
### Step 2a. Explore (complex questions only)
|
|
36
|
+
|
|
37
|
+
Decompose the question into 2-4 parallel exploration angles, each a distinct slice of the subsystem so explorers don't duplicate work. Example split for "how does the rate limiter work?":
|
|
38
|
+
|
|
39
|
+
- Explorer 1: data model and state management
|
|
40
|
+
- Explorer 2: request path and enforcement
|
|
41
|
+
- Explorer 3: configuration and metrics infrastructure
|
|
42
|
+
|
|
43
|
+
The right decomposition depends on the question. Use your judgment. Narrow questions: 2 explorers is fine. Broad subsystems: up to 4.
|
|
44
|
+
|
|
45
|
+
Spawn all explorers in a single message:
|
|
46
|
+
|
|
47
|
+
- `subagent_type`: `general-purpose`
|
|
48
|
+
- `model`: your configured how-explorer model (default `sonnet`)
|
|
49
|
+
- `readonly`: `true` (on hosts without that param, use a read-only subagent type)
|
|
50
|
+
|
|
51
|
+
Each explorer gets the same base prompt from `references/explorer-prompt.md` plus a specific exploration angle naming its slice. Each explorer should:
|
|
52
|
+
- Start broad: Glob for relevant directories, Grep for key types/interfaces/class names
|
|
53
|
+
- Follow the thread: from an entry point, trace the call chain (callers, callees, data flow, type definitions)
|
|
54
|
+
- Read the actual code, don't guess from file names
|
|
55
|
+
- Stop when it can describe the full path from input to output (or trigger to effect) without hand-waving any step
|
|
56
|
+
- Note things that are surprising, non-obvious, or that a newcomer would get wrong
|
|
57
|
+
|
|
58
|
+
Each explorer returns structured findings: components found, flow traced, files read, anything non-obvious. Overlap between explorers is fine; the explainer reconciles.
|
|
59
|
+
|
|
60
|
+
Then proceed to Step 3.
|
|
61
|
+
|
|
62
|
+
### Step 2b. Direct Explain (simple questions)
|
|
63
|
+
|
|
64
|
+
Spawn a single Task subagent that explores and explains in one pass:
|
|
65
|
+
|
|
66
|
+
- `subagent_type`: `general-purpose`
|
|
67
|
+
- `model`: your configured how-explainer model (default `fable`)
|
|
68
|
+
- `readonly`: `true` (on hosts without that param, use a read-only subagent type)
|
|
69
|
+
|
|
70
|
+
The agent does its own exploration (Glob, Grep, Read) and writes the explanation directly. Read `references/explainer-prompt.md` for the communication style and output format. Same structure, just no explorer findings as input.
|
|
71
|
+
|
|
72
|
+
Proceed to Step 4.
|
|
73
|
+
|
|
74
|
+
### Step 3. Synthesize (complex questions only)
|
|
75
|
+
|
|
76
|
+
Once all explorers return, spawn a single Task subagent to synthesize their findings into one coherent explanation:
|
|
77
|
+
|
|
78
|
+
- `subagent_type`: `general-purpose`
|
|
79
|
+
- `model`: your configured how-explainer model (default `fable`)
|
|
80
|
+
- `readonly`: `true` (on hosts without that param, use a read-only subagent type)
|
|
81
|
+
|
|
82
|
+
The explainer gets all explorers' findings and writes the human-facing explanation (output format below). Read `references/explainer-prompt.md` for the full prompt template. The explainer reconciles overlapping findings, resolves contradictions, and weaves the slices into a unified picture.
|
|
83
|
+
|
|
84
|
+
### Step 4. Present
|
|
85
|
+
|
|
86
|
+
Present the explainer's output to the user. You may lightly edit for clarity or add context from the conversation, but don't substantially rewrite. The explainer's communication is the product.
|
|
87
|
+
|
|
88
|
+
### Output Format
|
|
89
|
+
|
|
90
|
+
Follow this structure, adapted to the question. Not every section is needed for every question.
|
|
91
|
+
|
|
92
|
+
**Overview.** 1-2 paragraphs. What it is, what it does, why it exists. Enough to decide whether to keep reading.
|
|
93
|
+
|
|
94
|
+
**Key Concepts.** The important types, services, or abstractions. Brief definition of each. Not exhaustive, just the ones needed to understand the rest.
|
|
95
|
+
|
|
96
|
+
**How It Works.** The core of the explanation. Walk through the flow: what triggers it, what happens step by step, where data goes, the decision points. Prose, not pseudocode. Reference specific files and functions so the reader can go look, but don't dump code blocks unless a snippet is genuinely necessary.
|
|
97
|
+
|
|
98
|
+
**Where Things Live.** A brief map of the relevant files/directories. Not every file, just the ones needed to start working in this area.
|
|
99
|
+
|
|
100
|
+
**Gotchas.** Non-obvious or surprising things that would trip someone up. Historical context that explains why something looks weird. Known sharp edges.
|
|
101
|
+
|
|
102
|
+
## Critique Mode
|
|
103
|
+
|
|
104
|
+
Triggered when the user asks for architectural issues, problems, or improvements, not just understanding.
|
|
105
|
+
|
|
106
|
+
### Step 1. Explain First
|
|
107
|
+
|
|
108
|
+
Run the full explain flow above (Steps 1-4). You must understand the architecture before critiquing it.
|
|
109
|
+
|
|
110
|
+
### Step 2. Spawn Critics
|
|
111
|
+
|
|
112
|
+
After the explanation is complete, spawn one architectural critic per model in your configured how-critics list (defaults `fable`, `opus`, `sonnet`), all in a single message.
|
|
113
|
+
|
|
114
|
+
For each critic:
|
|
115
|
+
- `subagent_type`: `general-purpose`
|
|
116
|
+
- `model`: one model from the configured how-critics list. These are minimum reasoning levels. The lead should escalate any model when the architecture warrants deeper analysis.
|
|
117
|
+
- `readonly`: `true` (on hosts without that param, use a read-only subagent type)
|
|
118
|
+
|
|
119
|
+
Read `references/critic-prompt.md` for the prompt template. Each critic gets:
|
|
120
|
+
1. The explanation from Step 1 (so they don't re-explore)
|
|
121
|
+
2. The relevant file paths (so they can read the actual code)
|
|
122
|
+
3. The architectural critique rubric from `references/critique-rubric.md`
|
|
123
|
+
|
|
124
|
+
### Step 3. Lead Judgment
|
|
125
|
+
|
|
126
|
+
Same framework as the interrogate skill. You're a pragmatic lead, not an aggregator.
|
|
127
|
+
|
|
128
|
+
Categorize findings:
|
|
129
|
+
- **Act on.** Architectural problems worth fixing now
|
|
130
|
+
- **Consider.** Real concerns, but the cost/benefit is unclear
|
|
131
|
+
- **Noted.** Valid observations, low priority
|
|
132
|
+
- **Dismissed.** Wrong, missing context, or style preference
|
|
133
|
+
|
|
134
|
+
Present the explanation first (from Step 1), then the critique verdict below it. The explanation should stand on its own; someone who just wants to understand the system shouldn't wade through critique.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Critic Prompt Template
|
|
2
|
+
|
|
3
|
+
Build each critic subagent's prompt from this template. Fill in the placeholders.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are reviewing the architecture of a codebase subsystem. An explanation of how it works has already been written. Read it to orient yourself, then read the actual code to form your own judgment.
|
|
8
|
+
|
|
9
|
+
## Architectural Explanation
|
|
10
|
+
|
|
11
|
+
{EXPLANATION}
|
|
12
|
+
|
|
13
|
+
## Relevant Files
|
|
14
|
+
|
|
15
|
+
{FILE_PATHS}
|
|
16
|
+
|
|
17
|
+
## Critique Rubric
|
|
18
|
+
|
|
19
|
+
{CRITIQUE_RUBRIC_CONTENTS}
|
|
20
|
+
|
|
21
|
+
## Instructions
|
|
22
|
+
|
|
23
|
+
Read the files listed above. Use the explanation as a map, but form your own opinions from the code itself. The explanation might miss things or frame them charitably.
|
|
24
|
+
|
|
25
|
+
Find architectural problems, not line-level bugs or style issues. Ask whether this subsystem is built well for what it needs to do and how it will need to evolve.
|
|
26
|
+
|
|
27
|
+
For each finding:
|
|
28
|
+
|
|
29
|
+
1. **Severity**: `structural` | `concern` | `observation`
|
|
30
|
+
- `structural`: a fundamental architectural problem. Wrong abstraction boundary, broken data model, coupling that will block future work
|
|
31
|
+
- `concern`: a real issue that makes the system harder to work with or reason about, but not fundamentally broken
|
|
32
|
+
- `observation`: worth noting. A tradeoff that might not age well, a pattern inconsistent with the rest of the codebase, technical debt
|
|
33
|
+
2. **Finding**: the architectural issue. Be specific. Name the components, the boundary, the coupling.
|
|
34
|
+
3. **Evidence**: concrete code that demonstrates the problem. Don't just assert that "this is too coupled". Show the dependency chain.
|
|
35
|
+
4. **Impact**: what the issue costs. Harder to test? Harder to change? Performance cliff at scale? Be concrete about the consequence.
|
|
36
|
+
|
|
37
|
+
## What to Avoid
|
|
38
|
+
|
|
39
|
+
- Line-level code review (not your job here)
|
|
40
|
+
- Suggesting rewrites without demonstrating a problem with the current approach
|
|
41
|
+
- "This could use more abstraction" without showing what the abstraction would actually solve
|
|
42
|
+
- Flagging intentional tradeoffs with clear benefits as issues
|
|
43
|
+
|
|
44
|
+
If the architecture is sound, say so. An empty critique is a valid outcome.
|
|
45
|
+
|
|
46
|
+
## Output
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
## Findings
|
|
50
|
+
|
|
51
|
+
### 1. [Severity] Short title
|
|
52
|
+
**Components**: Which parts of the system are involved
|
|
53
|
+
**Finding**: What's wrong architecturally
|
|
54
|
+
**Evidence**: Concrete code references
|
|
55
|
+
**Impact**: What this costs in practice
|
|
56
|
+
|
|
57
|
+
### 2. [Severity] Short title
|
|
58
|
+
...
|
|
59
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Architectural Critique Rubric
|
|
2
|
+
|
|
3
|
+
Review through whichever of these lenses are relevant. Not every lens applies to every subsystem.
|
|
4
|
+
|
|
5
|
+
## Abstraction Fit
|
|
6
|
+
|
|
7
|
+
Are the abstractions pulling their weight?
|
|
8
|
+
|
|
9
|
+
- Does each abstraction represent a real concept, or is it an indirection layer "in case we need it"?
|
|
10
|
+
- Are the boundaries in the right place? Do they separate things that change independently?
|
|
11
|
+
- Is there accidental coupling where components share implementation details they shouldn't need to know about?
|
|
12
|
+
- Is business logic entangled with framework wiring, or cleanly separated?
|
|
13
|
+
|
|
14
|
+
Over-abstraction is as much a problem as under-abstraction. A flat, simple design is fine when the domain is simple.
|
|
15
|
+
|
|
16
|
+
## Data Model
|
|
17
|
+
|
|
18
|
+
Do the data structures fit the actual usage patterns?
|
|
19
|
+
|
|
20
|
+
- Are the data models designed for how data is actually accessed, or for how it was conceptually modeled?
|
|
21
|
+
- Are there impedance mismatches, places where code constantly reshapes data because the model doesn't match the access pattern?
|
|
22
|
+
- Are types honest? Do they represent what data actually looks like at runtime, or claim more structure than exists?
|
|
23
|
+
|
|
24
|
+
## Boundary Discipline
|
|
25
|
+
|
|
26
|
+
Are system boundaries clean and well-placed?
|
|
27
|
+
|
|
28
|
+
- Is validation concentrated at entry points, or scattered through internal code?
|
|
29
|
+
- Are errors handled at boundaries and propagated cleanly, or caught and re-thrown at every layer?
|
|
30
|
+
- Does data cross boundaries in well-typed shapes, or as bags of optional fields?
|
|
31
|
+
- Could this subsystem be tested in isolation, or does it require the entire system to be running?
|
|
32
|
+
|
|
33
|
+
## Evolution Readiness
|
|
34
|
+
|
|
35
|
+
How well will this architecture handle likely changes?
|
|
36
|
+
|
|
37
|
+
- If the most probable next requirement landed tomorrow, how much would change? "One file" or "everything"?
|
|
38
|
+
- Are there hardcoded assumptions that would need to be relaxed?
|
|
39
|
+
- Is the design bolted-on (integrated as an afterthought) or integrated (looks like it was always part of the plan)?
|
|
40
|
+
- Are legacy paths preserved for compatibility that no one depends on?
|
|
41
|
+
|
|
42
|
+
Don't penalize for not handling hypothetical changes. Focus on changes plausible given the codebase's trajectory.
|
|
43
|
+
|
|
44
|
+
## Complexity vs. Value
|
|
45
|
+
|
|
46
|
+
Is the complexity budget spent wisely?
|
|
47
|
+
|
|
48
|
+
- Is complexity concentrated in the parts that need it (core logic, tricky invariants) or in accidental places (boilerplate, unnecessary indirection, configuration)?
|
|
49
|
+
- Are there simpler ways to achieve the same behavior?
|
|
50
|
+
- Does every component earn its existence, or are there vestigial pieces from an earlier design?
|
|
51
|
+
|
|
52
|
+
## Consistency
|
|
53
|
+
|
|
54
|
+
Does this subsystem follow the patterns established elsewhere in the codebase?
|
|
55
|
+
|
|
56
|
+
- Are similar problems solved the same way here as elsewhere, or does this area invent its own patterns?
|
|
57
|
+
- If the patterns differ, is there a good reason, or did it just evolve independently?
|
|
58
|
+
- Inconsistency isn't automatically bad. But unexplained inconsistency is a maintenance burden.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Explainer Prompt Template
|
|
2
|
+
|
|
3
|
+
Build the explainer subagent's prompt from this template. Fill in the placeholders.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are writing an architectural explanation for a senior engineer. Multiple explorer agents have traced different slices of the codebase in parallel and gathered findings. Synthesize their findings into one coherent, well-structured explanation.
|
|
8
|
+
|
|
9
|
+
## Original Question
|
|
10
|
+
|
|
11
|
+
> {QUESTION}
|
|
12
|
+
|
|
13
|
+
## Explorer Findings
|
|
14
|
+
|
|
15
|
+
{EXPLORER_FINDINGS_ALL}
|
|
16
|
+
|
|
17
|
+
## Instructions
|
|
18
|
+
|
|
19
|
+
The explorers each investigated a different angle of the same subsystem. Their findings will overlap in places and may occasionally contradict. Reconcile them. Merge overlapping descriptions, resolve contradictions by checking the code yourself, and weave the separate slices into a unified picture.
|
|
20
|
+
|
|
21
|
+
Write an explanation a senior engineer unfamiliar with this area could read and walk away with a solid mental model, understanding the architecture well enough to start working in it confidently.
|
|
22
|
+
|
|
23
|
+
You have read-only access to the codebase to check anything, clarify a detail, or fill a gap. Use Read, Grep, and Glob as needed. The explorers did the heavy lifting, so you shouldn't need to re-explore from scratch.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
Use this structure, adapted to what makes sense for the question. Not every section is needed for every question.
|
|
28
|
+
|
|
29
|
+
### Overview
|
|
30
|
+
1-2 paragraphs. What is this thing, what does it do, why does it exist. Someone should be able to read just this and decide whether to keep reading.
|
|
31
|
+
|
|
32
|
+
### Key Concepts
|
|
33
|
+
The important types, services, or abstractions needed to follow the rest. Brief definitions, not exhaustive.
|
|
34
|
+
|
|
35
|
+
### How It Works
|
|
36
|
+
The core of the explanation, and the longest section. Walk through the flow: what triggers it, what happens step by step, where data goes, what the decision points are.
|
|
37
|
+
|
|
38
|
+
Use prose, not pseudocode. Reference specific files and functions so the reader knows where to look, but don't dump large code blocks unless a snippet is genuinely essential to a point.
|
|
39
|
+
|
|
40
|
+
When the flow involves multiple components talking to each other, or data transforming through stages, include a diagram. Use mermaid (```mermaid) for structured flows (sequence diagrams, flowcharts, component graphs) or ASCII art for simpler relationships where mermaid would be overkill. Use your judgment. A diagram should clarify, not decorate. If prose covers the flow, skip the diagram.
|
|
41
|
+
|
|
42
|
+
### Where Things Live
|
|
43
|
+
A brief file/directory map. Just the ones someone would need to start working here.
|
|
44
|
+
|
|
45
|
+
### Gotchas
|
|
46
|
+
Non-obvious things, surprising behavior, historical context, sharp edges. Skip this section if there's nothing worth calling out.
|
|
47
|
+
|
|
48
|
+
## Communication Style
|
|
49
|
+
|
|
50
|
+
- Use concrete language, not abstractions-about-abstractions
|
|
51
|
+
- Say "the `UserService` calls `AuthClient.refresh()`" not "the service delegates to the client"
|
|
52
|
+
- When something is complex, explain why it's complex. Don't just describe the complexity
|
|
53
|
+
- When something is simple, don't pad it out
|
|
54
|
+
- If there's a helpful analogy, use it; if there isn't, don't force one
|
|
55
|
+
- If the explorers flagged open questions or gaps, acknowledge them honestly rather than papering over them
|