@rryando/arcs 4.0.0 → 4.2.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 +18 -20
- package/dist/cli/arcs-flash.d.ts +1 -1
- package/dist/cli/arcs-flash.d.ts.map +1 -1
- package/dist/cli/arcs-flash.js +9 -50
- package/dist/cli/arcs-flash.js.map +1 -1
- package/dist/cli/arcs-orchestrate-caveman.d.ts +2 -2
- package/dist/cli/arcs-orchestrate-caveman.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate-caveman.js +2 -8
- package/dist/cli/arcs-orchestrate-caveman.js.map +1 -1
- package/dist/cli/arcs-orchestrate.d.ts +1 -1
- package/dist/cli/arcs-orchestrate.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate.js +4 -54
- package/dist/cli/arcs-orchestrate.js.map +1 -1
- package/dist/cli/orchestrator-shared-blocks.d.ts +10 -30
- package/dist/cli/orchestrator-shared-blocks.d.ts.map +1 -1
- package/dist/cli/orchestrator-shared-blocks.js +46 -128
- package/dist/cli/orchestrator-shared-blocks.js.map +1 -1
- package/dist/utils/claude-code-hook-install.d.ts.map +1 -1
- package/dist/utils/claude-code-hook-install.js +3 -2
- package/dist/utils/claude-code-hook-install.js.map +1 -1
- package/dist/utils/diagram-generator.d.ts.map +1 -1
- package/dist/utils/diagram-generator.js +11 -6
- package/dist/utils/diagram-generator.js.map +1 -1
- package/dist/utils/hook-token-store.d.ts +5 -3
- package/dist/utils/hook-token-store.d.ts.map +1 -1
- package/dist/utils/hook-token-store.js +5 -3
- package/dist/utils/hook-token-store.js.map +1 -1
- package/dist/utils/session-store.d.ts +9 -57
- package/dist/utils/session-store.d.ts.map +1 -1
- package/dist/utils/session-store.js +19 -92
- package/dist/utils/session-store.js.map +1 -1
- package/dist/utils/storage-utils.d.ts +1 -1
- package/dist/utils/storage-utils.d.ts.map +1 -1
- package/dist/utils/storage-utils.js +1 -1
- package/dist/utils/storage-utils.js.map +1 -1
- package/dist/web-client/assets/{GraphCanvas-CTyf_XXQ.js → GraphCanvas-BPDgvsyT.js} +1 -1
- package/dist/web-client/assets/{MarkdownEditor-af2vwQOX.js → MarkdownEditor-D7TLp78z.js} +1 -1
- package/dist/web-client/assets/{abnfDiagram-VRR7QNED-CdxcKX9t.js → abnfDiagram-VRR7QNED-CyuP2N9t.js} +1 -1
- package/dist/web-client/assets/architecture-TIHT7OUA-Bdo2Yvm9.js +1 -0
- package/dist/web-client/assets/{architectureDiagram-ZJ3FMSHR-DOISDv6o.js → architectureDiagram-ZJ3FMSHR-DZ0ul9QX.js} +1 -1
- package/dist/web-client/assets/{blockDiagram-677ZJIJ3-DKwtbttM.js → blockDiagram-677ZJIJ3-LLGzlc9l.js} +1 -1
- package/dist/web-client/assets/{c4Diagram-LMCZKHZV-CilqK-Mm.js → c4Diagram-LMCZKHZV-CViu3CTc.js} +1 -1
- package/dist/web-client/assets/channel-DBNmizpo.js +1 -0
- package/dist/web-client/assets/{chunk-32BRIVSS-C79m1mkG.js → chunk-32BRIVSS-Bw_IuJCM.js} +1 -1
- package/dist/web-client/assets/{chunk-52WLFC77-C6WelGWJ.js → chunk-52WLFC77-C29h440W.js} +1 -1
- package/dist/web-client/assets/{chunk-C7G6YPKG-DLg7ryWI.js → chunk-C7G6YPKG-hhOrvw5w.js} +1 -1
- package/dist/web-client/assets/{chunk-EX3LRPZG-DjWgo4gL.js → chunk-EX3LRPZG-COMzol-M.js} +1 -1
- package/dist/web-client/assets/{chunk-FWX5IMBZ-BgS9p_zy.js → chunk-FWX5IMBZ-6vdX9EUn.js} +2 -2
- package/dist/web-client/assets/{chunk-HOUHSVGY-DuVR7dZO.js → chunk-HOUHSVGY-DWDW6sxp.js} +1 -1
- package/dist/web-client/assets/{chunk-ICXQ74PX-Y8DlnIJM.js → chunk-ICXQ74PX-BdMYglo2.js} +1 -1
- package/dist/web-client/assets/{chunk-MOJQB5TN-BEM3QgeD.js → chunk-MOJQB5TN-C0LAX_dC.js} +1 -1
- package/dist/web-client/assets/{chunk-OGEWGWER-DlM8LxGr.js → chunk-OGEWGWER-CBx8MB7f.js} +1 -1
- package/dist/web-client/assets/{chunk-PUDLZKDR-c6cqNVTx.js → chunk-PUDLZKDR-DKssR1nf.js} +1 -1
- package/dist/web-client/assets/{chunk-Q4XR5HBZ-C5lNmcka.js → chunk-Q4XR5HBZ-B3kcxFE-.js} +1 -1
- package/dist/web-client/assets/{chunk-V7JOEXUC-nSswxvSG.js → chunk-V7JOEXUC-CAlymndy.js} +1 -1
- package/dist/web-client/assets/{chunk-VAUOI2AC-CqJkCkT0.js → chunk-VAUOI2AC-BowfsmTW.js} +1 -1
- package/dist/web-client/assets/{chunk-VR4S4FIN-D3pFchin.js → chunk-VR4S4FIN-BBOydgvt.js} +1 -1
- package/dist/web-client/assets/{chunk-WYO6CB5R-BI9c-NzI.js → chunk-WYO6CB5R-DcymFbES.js} +1 -1
- package/dist/web-client/assets/{chunk-ZGVPDNZ5-CKTF2kLR.js → chunk-ZGVPDNZ5--uKFP-Lr.js} +1 -1
- package/dist/web-client/assets/classDiagram-OUVF2IWQ-CB3HiA1_.js +1 -0
- package/dist/web-client/assets/classDiagram-v2-EOCWNBFH-CB3HiA1_.js +1 -0
- package/dist/web-client/assets/{cynefin-VYW2F7L2-BrJrnfh1.js → cynefin-VYW2F7L2-CjboUOMA.js} +1 -1
- package/dist/web-client/assets/{cynefinDiagram-TSTJHNR4-9jYzPWJZ.js → cynefinDiagram-TSTJHNR4-BcxygBP7.js} +1 -1
- package/dist/web-client/assets/{dagre-VKFMJZFB-B705Djpu.js → dagre-VKFMJZFB-D-tiERQE.js} +1 -1
- package/dist/web-client/assets/{diagram-FQU43EPY-BfQAlUlJ.js → diagram-FQU43EPY-ChPXczaS.js} +1 -1
- package/dist/web-client/assets/{diagram-G47NLZAW-s1YDe06A.js → diagram-G47NLZAW-CVL3Y91h.js} +1 -1
- package/dist/web-client/assets/{diagram-NH7WQ7WH-Dy3z11Hc.js → diagram-NH7WQ7WH-DsaNA9Lh.js} +1 -1
- package/dist/web-client/assets/{diagram-OA4YK3LP-Bius2xUN.js → diagram-OA4YK3LP-CXhrhdhU.js} +1 -1
- package/dist/web-client/assets/{diagram-WEI45ONY-D7x4VcHM.js → diagram-WEI45ONY-BTVPnk4E.js} +1 -1
- package/dist/web-client/assets/{ebnfDiagram-CCIWWBDH-CBg1xrmD.js → ebnfDiagram-CCIWWBDH-BAyrRBtM.js} +1 -1
- package/dist/web-client/assets/{erDiagram-Q63AITRT-CJRvTFvd.js → erDiagram-Q63AITRT-Qm24Wepm.js} +1 -1
- package/dist/web-client/assets/eventmodeling-45OFAUF4-DoTBIvl5.js +1 -0
- package/dist/web-client/assets/flowDiagram-23GEKE2U-BEH23L1A.js +1 -0
- package/dist/web-client/assets/{ganttDiagram-NO4QXBWP-C_LsypZ4.js → ganttDiagram-NO4QXBWP-D8h7l3XJ.js} +1 -1
- package/dist/web-client/assets/{gitGraph-TEB2WS4Q-Dx2XxdGk.js → gitGraph-TEB2WS4Q-DIBml1SB.js} +1 -1
- package/dist/web-client/assets/{gitGraphDiagram-IHSO6WYX-DiKWkGWQ.js → gitGraphDiagram-IHSO6WYX-CtkYoXjn.js} +1 -1
- package/dist/web-client/assets/{index-CYwhkPtc.js → index-DOSH4Q9H.js} +38 -38
- package/dist/web-client/assets/{info-DKCQHKI2-DORwHenK.js → info-DKCQHKI2-DLEUtV5Q.js} +1 -1
- package/dist/web-client/assets/{infoDiagram-FWYZ7A6U-CQecXS1E.js → infoDiagram-FWYZ7A6U-BJQ7aQux.js} +1 -1
- package/dist/web-client/assets/{ishikawaDiagram-FXEZZL3T-CWhj60Zp.js → ishikawaDiagram-FXEZZL3T-BPM11FvG.js} +1 -1
- package/dist/web-client/assets/{journeyDiagram-5HDEW3XC-Cj3z2U8u.js → journeyDiagram-5HDEW3XC-C0aX2z3c.js} +1 -1
- package/dist/web-client/assets/{kanban-definition-HUTT4EX6-DFmBRenP.js → kanban-definition-HUTT4EX6-C56F29Ib.js} +1 -1
- package/dist/web-client/assets/{line-C_Hxz9xb.js → line-BLFHLF2N.js} +1 -1
- package/dist/web-client/assets/{mermaid-parser.core-E3xRdzPn.js → mermaid-parser.core-BLC8FhgU.js} +3 -3
- package/dist/web-client/assets/{mermaid.core-C2_CcotH.js → mermaid.core-BBqkKuXt.js} +3 -3
- package/dist/web-client/assets/{mindmap-definition-LN4V7U3C-Bs7VxPid.js → mindmap-definition-LN4V7U3C-aVZbsoPc.js} +1 -1
- package/dist/web-client/assets/{packet-7NZHBO7P-D2nqso7i.js → packet-7NZHBO7P-D4aqSQfB.js} +1 -1
- package/dist/web-client/assets/{pegDiagram-2B236MQR-Cepo1sIu.js → pegDiagram-2B236MQR-DjfyNI0U.js} +1 -1
- package/dist/web-client/assets/{pie-RZYD4A2V-Sx0IGbXt.js → pie-RZYD4A2V-ChCwYsYj.js} +1 -1
- package/dist/web-client/assets/{pieDiagram-ENE6RG2P-D-PMDNhk.js → pieDiagram-ENE6RG2P-BeHLKkXC.js} +1 -1
- package/dist/web-client/assets/{quadrantDiagram-ABIIQ3AL-BNGC7Fms.js → quadrantDiagram-ABIIQ3AL-stga3gvq.js} +1 -1
- package/dist/web-client/assets/{radar-I7S5WNFK-CFf_-2OC.js → radar-I7S5WNFK-DOGheiwT.js} +1 -1
- package/dist/web-client/assets/{railroad-3IZDKUUU-BvZeVRGh.js → railroad-3IZDKUUU-_JnU7M6L.js} +1 -1
- package/dist/web-client/assets/railroad-abnf-AHOZXSZD-nhNub7LE.js +1 -0
- package/dist/web-client/assets/railroad-ebnf-EBAXGLYW-BlQYe7Yf.js +1 -0
- package/dist/web-client/assets/railroad-peg-LSFZ7HO6-B3E8pRVN.js +1 -0
- package/dist/web-client/assets/{railroadDiagram-RFXS5EU6-D0iK_k84.js → railroadDiagram-RFXS5EU6-C0CkMsOd.js} +1 -1
- package/dist/web-client/assets/{requirementDiagram-TGXJPOKE-BPdsw9tz.js → requirementDiagram-TGXJPOKE-DuImwoRD.js} +1 -1
- package/dist/web-client/assets/{sankeyDiagram-HTMAVEWB-maA6ukOJ.js → sankeyDiagram-HTMAVEWB-kprq0XF9.js} +1 -1
- package/dist/web-client/assets/{sequenceDiagram-DBY2YBRQ-DKmAjmgr.js → sequenceDiagram-DBY2YBRQ-DiXKJMF6.js} +1 -1
- package/dist/web-client/assets/{stateDiagram-2N3HPSRC-esxmzk3w.js → stateDiagram-2N3HPSRC-D5qbVStE.js} +1 -1
- package/dist/web-client/assets/stateDiagram-v2-6OUMAXLB-DWwTAG1r.js +1 -0
- package/dist/web-client/assets/{swimlanes-5IMT3BWC-DFd-wGBv.js → swimlanes-5IMT3BWC-DCbw389c.js} +1 -1
- package/dist/web-client/assets/swimlanesDiagram-G3AALYLV-DabrCsjZ.js +8 -0
- package/dist/web-client/assets/{timeline-definition-FHXFAJF6-C7SG8MQH.js → timeline-definition-FHXFAJF6-CQeaYN_9.js} +1 -1
- package/dist/web-client/assets/{treeView-QDETBFTQ-M0rhxbs2.js → treeView-QDETBFTQ-Cf7Sq3qo.js} +1 -1
- package/dist/web-client/assets/{treemap-6X3UGDF4-BQfkQxSh.js → treemap-6X3UGDF4-BovzvoTU.js} +1 -1
- package/dist/web-client/assets/{vennDiagram-L72KCM5P-CyIlb8ju.js → vennDiagram-L72KCM5P-CZsJy139.js} +1 -1
- package/dist/web-client/assets/{wardley-OPB4EBWU-EE-7q8M1.js → wardley-OPB4EBWU-DJ7MS6XZ.js} +1 -1
- package/dist/web-client/assets/{wardleyDiagram-EHGQE667-bY8XdYYS.js → wardleyDiagram-EHGQE667-rqhcmsbM.js} +1 -1
- package/dist/web-client/assets/{xychartDiagram-FW5EYKEG-AhuXJ3de.js → xychartDiagram-FW5EYKEG-HuK4Seps.js} +1 -1
- package/dist/web-client/index.html +1 -1
- package/dist/web-server/app.d.ts +2 -2
- package/dist/web-server/app.d.ts.map +1 -1
- package/dist/web-server/app.js +0 -3
- package/dist/web-server/app.js.map +1 -1
- package/dist/web-server/routes/hook-events.d.ts +6 -7
- package/dist/web-server/routes/hook-events.d.ts.map +1 -1
- package/dist/web-server/routes/hook-events.js +18 -22
- package/dist/web-server/routes/hook-events.js.map +1 -1
- package/dist/web-server/routes/sessions.d.ts +6 -8
- package/dist/web-server/routes/sessions.d.ts.map +1 -1
- package/dist/web-server/routes/sessions.js +27 -137
- package/dist/web-server/routes/sessions.js.map +1 -1
- package/opencode/arcs/bundle-runtime.json +0 -3
- package/opencode/arcs/manifest.json +8 -25
- package/opencode/arcs/prompts/arcs-docs.txt +19 -157
- package/opencode/arcs/prompts/arcs-flash.txt +49 -152
- package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +47 -165
- package/opencode/arcs/prompts/arcs-orchestrate.txt +46 -158
- package/opencode/arcs/prompts/code-reviewer.txt +20 -60
- package/opencode/arcs/prompts/graph-explorer.txt +19 -49
- package/opencode/arcs/prompts/software-engineer.txt +21 -67
- package/opencode/arcs/prompts/tech-architect.txt +20 -130
- package/opencode/arcs/skills/brainstorming/SKILL.md +20 -100
- package/opencode/arcs/skills/brainstorming/visual-companion.md +6 -264
- package/opencode/arcs/skills/caveman-commit/SKILL.md +6 -43
- package/opencode/arcs/skills/deep-pr-review/SKILL.md +18 -200
- package/opencode/arcs/skills/deep-pr-review/codegraph-diff.md +7 -93
- package/opencode/arcs/skills/deep-pr-review/review-template.md +13 -60
- package/opencode/arcs/skills/enriching-codegraph-proposals/SKILL.md +16 -156
- package/opencode/arcs/skills/implementation/SKILL.md +20 -46
- package/opencode/arcs/skills/init-project/SKILL.md +12 -150
- package/opencode/arcs/skills/install-claude-code-hook/SKILL.md +13 -133
- package/opencode/arcs/skills/systematic-debugging/SKILL.md +13 -152
- package/opencode/arcs/skills/systematic-debugging/condition-based-waiting.md +7 -110
- package/opencode/arcs/skills/systematic-debugging/defense-in-depth.md +7 -119
- package/opencode/arcs/skills/systematic-debugging/phases-reference.md +9 -166
- package/opencode/arcs/skills/systematic-debugging/root-cause-tracing.md +8 -165
- package/opencode/arcs/skills/test-driven-development/SKILL.md +10 -61
- package/opencode/arcs/skills/test-driven-development/tdd-rationalizations-and-examples.md +7 -154
- package/opencode/arcs/skills/test-driven-development/testing-anti-patterns.md +8 -295
- package/opencode/arcs/skills/to-diagram/SKILL.md +18 -206
- package/opencode/arcs/skills/writing-knowledge/SKILL.md +11 -63
- package/opencode/arcs/skills/writing-plans/SKILL.md +25 -118
- package/opencode/arcs/skills/writing-plans/plan-document-reviewer-prompt.md +10 -61
- package/package.json +1 -1
- package/scripts/claude-code-session-hook.mjs +16 -41
- package/skills/explore-dag.md +9 -52
- package/skills/init-project.md +9 -98
- package/skills/orchestrate.md +15 -109
- package/skills/update-docs.md +9 -60
- package/dist/web-client/assets/architecture-TIHT7OUA-Bt2-DmfV.js +0 -1
- package/dist/web-client/assets/channel-C2mb9np_.js +0 -1
- package/dist/web-client/assets/classDiagram-OUVF2IWQ-CPd_w3Zr.js +0 -1
- package/dist/web-client/assets/classDiagram-v2-EOCWNBFH-CPd_w3Zr.js +0 -1
- package/dist/web-client/assets/eventmodeling-45OFAUF4-CTKRC2Yj.js +0 -1
- package/dist/web-client/assets/flowDiagram-23GEKE2U-CaZjFyU1.js +0 -1
- package/dist/web-client/assets/railroad-abnf-AHOZXSZD-DnGh6x2O.js +0 -1
- package/dist/web-client/assets/railroad-ebnf-EBAXGLYW-CGfgCoaE.js +0 -1
- package/dist/web-client/assets/railroad-peg-LSFZ7HO6-BzQxYdqp.js +0 -1
- package/dist/web-client/assets/stateDiagram-v2-6OUMAXLB-hcBqlOLc.js +0 -1
- package/dist/web-client/assets/swimlanesDiagram-G3AALYLV-DbSrPBYr.js +0 -8
- package/dist/web-server/opencode-client.d.ts +0 -123
- package/dist/web-server/opencode-client.d.ts.map +0 -1
- package/dist/web-server/opencode-client.js +0 -514
- package/dist/web-server/opencode-client.js.map +0 -1
- package/opencode/arcs/prompts/devil-advocate.txt +0 -79
- package/opencode/arcs/skills/executing-plans/SKILL.md +0 -49
|
@@ -1,270 +1,12 @@
|
|
|
1
|
-
# Visual Companion
|
|
1
|
+
# Optional Visual Companion
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use only when seeing an interaction or layout is materially clearer than discussing it in text and the user accepts the offer.
|
|
4
4
|
|
|
5
|
-
The companion is loopback-only
|
|
6
|
-
|
|
7
|
-
## When to Use
|
|
8
|
-
|
|
9
|
-
Decide per-question, not per-session. The test: **would the user understand this better by seeing it than reading it?**
|
|
10
|
-
|
|
11
|
-
**Use the browser** when the content itself is visual:
|
|
12
|
-
|
|
13
|
-
- **UI mockups** — wireframes, layouts, navigation structures, component designs
|
|
14
|
-
- **Architecture diagrams** — system components, data flow, relationship maps
|
|
15
|
-
- **Side-by-side visual comparisons** — comparing two layouts, two color schemes, two design directions
|
|
16
|
-
- **Design polish** — when the question is about look and feel, spacing, visual hierarchy
|
|
17
|
-
- **Spatial relationships** — state machines, flowcharts, entity relationships rendered as diagrams
|
|
18
|
-
|
|
19
|
-
**Use the terminal** when the content is text or tabular:
|
|
20
|
-
|
|
21
|
-
- **Requirements and scope questions** — "what does X mean?", "which features are in scope?"
|
|
22
|
-
- **Conceptual A/B/C choices** — picking between approaches described in words
|
|
23
|
-
- **Tradeoff lists** — pros/cons, comparison tables
|
|
24
|
-
- **Technical decisions** — API design, data modeling, architectural approach selection
|
|
25
|
-
- **Clarifying questions** — anything where the answer is words, not a visual preference
|
|
26
|
-
|
|
27
|
-
A question *about* a UI topic is not automatically a visual question. "What kind of wizard do you want?" is conceptual — use the terminal. "Which of these wizard layouts feels right?" is visual — use the browser.
|
|
28
|
-
|
|
29
|
-
## How It Works
|
|
30
|
-
|
|
31
|
-
The server watches a directory for HTML files and serves the newest one to the browser. You write HTML content, the user sees it in their browser and can click to select options. Selections are recorded to a `.events` file that you read on your next turn.
|
|
32
|
-
|
|
33
|
-
**Content fragments vs full documents:** If your HTML file starts with `<!DOCTYPE` or `<html`, the server serves it as-is (just injects the helper script). Otherwise, the server automatically wraps your content in the frame template — adding the header, CSS theme, selection indicator, and all interactive infrastructure. **Write content fragments by default.** Only write full documents when you need complete control over the page.
|
|
34
|
-
|
|
35
|
-
## Starting a Session
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
# Start server with persistence (mockups saved to project)
|
|
39
|
-
scripts/start-server.sh --project-dir /path/to/project
|
|
40
|
-
|
|
41
|
-
# Returns: {"type":"server-started","port":52341,"url":"http://localhost:52341",
|
|
42
|
-
# "screen_dir":"/path/to/project/.arcs/brainstorm/12345-1706000000"}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Save `screen_dir` from the response. Tell user to open the URL.
|
|
46
|
-
|
|
47
|
-
**Finding connection info:** The server writes its startup JSON to `$SCREEN_DIR/.server-info`. If you launched the server in the background and didn't capture stdout, read that file to get the URL and port. When using `--project-dir`, check `<project>/.arcs/brainstorm/` for the session directory.
|
|
48
|
-
|
|
49
|
-
**Note:** Pass the project root as `--project-dir` so mockups persist in `.arcs/brainstorm/` and survive server restarts. Without it, files go to `/tmp` and get cleaned up. Remind the user to add `.arcs/` to `.gitignore` if it's not already there.
|
|
50
|
-
|
|
51
|
-
**Launching the server by platform:**
|
|
52
|
-
|
|
53
|
-
**Claude Code:**
|
|
54
|
-
```bash
|
|
55
|
-
# Default mode works — the script backgrounds the server itself
|
|
56
|
-
scripts/start-server.sh --project-dir /path/to/project
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**Codex:**
|
|
60
|
-
```bash
|
|
61
|
-
# Codex reaps background processes. The script auto-detects CODEX_CI and
|
|
62
|
-
# switches to foreground mode. Run it normally — no extra flags needed.
|
|
63
|
-
scripts/start-server.sh --project-dir /path/to/project
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
**Gemini CLI:**
|
|
67
|
-
```bash
|
|
68
|
-
# Use --foreground and set is_background: true on your shell tool call
|
|
69
|
-
# so the process survives across turns
|
|
70
|
-
scripts/start-server.sh --project-dir /path/to/project --foreground
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**Other environments:** The server must keep running in the background across conversation turns. If your environment reaps detached processes, use `--foreground` and launch the command with your platform's background execution mechanism.
|
|
74
|
-
|
|
75
|
-
`--host` and `--url-host` accept loopback names and addresses only. Remote/container port exposure is intentionally unsupported.
|
|
76
|
-
|
|
77
|
-
## The Loop
|
|
78
|
-
|
|
79
|
-
1. **Check server is alive**, then **write HTML** to a new file in `screen_dir`:
|
|
80
|
-
- Before each write, check that `$SCREEN_DIR/.server-info` exists. If it doesn't (or `.server-stopped` exists), the server has shut down — restart it with `start-server.sh` before continuing. The server auto-exits after 30 minutes of inactivity.
|
|
81
|
-
- Use semantic filenames: `platform.html`, `visual-style.html`, `layout.html`
|
|
82
|
-
- **Never reuse filenames** — each screen gets a fresh file
|
|
83
|
-
- Use Write tool — **never use cat/heredoc** (dumps noise into terminal)
|
|
84
|
-
- Server automatically serves the newest file
|
|
85
|
-
|
|
86
|
-
2. **Tell user what to expect and end your turn:**
|
|
87
|
-
- Remind them of the URL (every step, not just first)
|
|
88
|
-
- Give a brief text summary of what's on screen (e.g., "Showing 3 layout options for the homepage")
|
|
89
|
-
- Ask them to respond in the terminal: "Take a look and let me know what you think. Click to select an option if you'd like."
|
|
90
|
-
|
|
91
|
-
3. **On your next turn** — after the user responds in the terminal:
|
|
92
|
-
- Read `$SCREEN_DIR/.events` if it exists — this contains the user's browser interactions (clicks, selections) as JSON lines
|
|
93
|
-
- Merge with the user's terminal text to get the full picture
|
|
94
|
-
- The terminal message is the primary feedback; `.events` provides structured interaction data
|
|
95
|
-
|
|
96
|
-
4. **Iterate or advance** — if feedback changes current screen, write a new file (e.g., `layout-v2.html`). Only move to the next question when the current step is validated.
|
|
97
|
-
|
|
98
|
-
5. **Unload when returning to terminal** — when the next step doesn't need the browser (e.g., a clarifying question, a tradeoff discussion), push a waiting screen to clear the stale content:
|
|
99
|
-
|
|
100
|
-
```html
|
|
101
|
-
<!-- filename: waiting.html (or waiting-2.html, etc.) -->
|
|
102
|
-
<div style="display:flex;align-items:center;justify-content:center;min-height:60vh">
|
|
103
|
-
<p class="subtitle">Continuing in terminal...</p>
|
|
104
|
-
</div>
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
This prevents the user from staring at a resolved choice while the conversation has moved on. When the next visual question comes up, push a new content file as usual.
|
|
108
|
-
|
|
109
|
-
6. Repeat until done.
|
|
110
|
-
|
|
111
|
-
## Writing Content Fragments
|
|
112
|
-
|
|
113
|
-
Write just the content that goes inside the page. The server wraps it in the frame template automatically (header, theme CSS, selection indicator, and all interactive infrastructure).
|
|
114
|
-
|
|
115
|
-
**Minimal example:**
|
|
116
|
-
|
|
117
|
-
```html
|
|
118
|
-
<h2>Which layout works better?</h2>
|
|
119
|
-
<p class="subtitle">Consider readability and visual hierarchy</p>
|
|
120
|
-
|
|
121
|
-
<div class="options">
|
|
122
|
-
<div class="option" data-choice="a" onclick="toggleSelect(this)">
|
|
123
|
-
<div class="letter">A</div>
|
|
124
|
-
<div class="content">
|
|
125
|
-
<h3>Single Column</h3>
|
|
126
|
-
<p>Clean, focused reading experience</p>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
<div class="option" data-choice="b" onclick="toggleSelect(this)">
|
|
130
|
-
<div class="letter">B</div>
|
|
131
|
-
<div class="content">
|
|
132
|
-
<h3>Two Column</h3>
|
|
133
|
-
<p>Sidebar navigation with main content</p>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
That's it. No `<html>`, no CSS, no `<script>` tags needed. The server provides all of that.
|
|
140
|
-
|
|
141
|
-
## CSS Classes Available
|
|
142
|
-
|
|
143
|
-
The frame template provides these CSS classes for your content:
|
|
144
|
-
|
|
145
|
-
### Options (A/B/C choices)
|
|
146
|
-
|
|
147
|
-
```html
|
|
148
|
-
<div class="options">
|
|
149
|
-
<div class="option" data-choice="a" onclick="toggleSelect(this)">
|
|
150
|
-
<div class="letter">A</div>
|
|
151
|
-
<div class="content">
|
|
152
|
-
<h3>Title</h3>
|
|
153
|
-
<p>Description</p>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
**Multi-select:** Add `data-multiselect` to the container to let users select multiple options. Each click toggles the item. The indicator bar shows the count.
|
|
160
|
-
|
|
161
|
-
```html
|
|
162
|
-
<div class="options" data-multiselect>
|
|
163
|
-
<!-- same option markup — users can select/deselect multiple -->
|
|
164
|
-
</div>
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Cards (visual designs)
|
|
168
|
-
|
|
169
|
-
```html
|
|
170
|
-
<div class="cards">
|
|
171
|
-
<div class="card" data-choice="design1" onclick="toggleSelect(this)">
|
|
172
|
-
<div class="card-image"><!-- mockup content --></div>
|
|
173
|
-
<div class="card-body">
|
|
174
|
-
<h3>Name</h3>
|
|
175
|
-
<p>Description</p>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Mockup container
|
|
182
|
-
|
|
183
|
-
```html
|
|
184
|
-
<div class="mockup">
|
|
185
|
-
<div class="mockup-header">Preview: Dashboard Layout</div>
|
|
186
|
-
<div class="mockup-body"><!-- your mockup HTML --></div>
|
|
187
|
-
</div>
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### Split view (side-by-side)
|
|
191
|
-
|
|
192
|
-
```html
|
|
193
|
-
<div class="split">
|
|
194
|
-
<div class="mockup"><!-- left --></div>
|
|
195
|
-
<div class="mockup"><!-- right --></div>
|
|
196
|
-
</div>
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Pros/Cons
|
|
200
|
-
|
|
201
|
-
```html
|
|
202
|
-
<div class="pros-cons">
|
|
203
|
-
<div class="pros"><h4>Pros</h4><ul><li>Benefit</li></ul></div>
|
|
204
|
-
<div class="cons"><h4>Cons</h4><ul><li>Drawback</li></ul></div>
|
|
205
|
-
</div>
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### Mock elements (wireframe building blocks)
|
|
209
|
-
|
|
210
|
-
```html
|
|
211
|
-
<div class="mock-nav">Logo | Home | About | Contact</div>
|
|
212
|
-
<div style="display: flex;">
|
|
213
|
-
<div class="mock-sidebar">Navigation</div>
|
|
214
|
-
<div class="mock-content">Main content area</div>
|
|
215
|
-
</div>
|
|
216
|
-
<button class="mock-button">Action Button</button>
|
|
217
|
-
<input class="mock-input" placeholder="Input field">
|
|
218
|
-
<div class="placeholder">Placeholder area</div>
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### Typography and sections
|
|
222
|
-
|
|
223
|
-
- `h2` — page title
|
|
224
|
-
- `h3` — section heading
|
|
225
|
-
- `.subtitle` — secondary text below title
|
|
226
|
-
- `.section` — content block with bottom margin
|
|
227
|
-
- `.label` — small uppercase label text
|
|
228
|
-
|
|
229
|
-
## Browser Events Format
|
|
230
|
-
|
|
231
|
-
When the user clicks options in the browser, their interactions are recorded to `$SCREEN_DIR/.events` (one JSON object per line). The file is cleared automatically when you push a new screen.
|
|
232
|
-
|
|
233
|
-
```jsonl
|
|
234
|
-
{"type":"click","choice":"a","text":"Option A - Simple Layout","timestamp":1706000101}
|
|
235
|
-
{"type":"click","choice":"c","text":"Option C - Complex Grid","timestamp":1706000108}
|
|
236
|
-
{"type":"click","choice":"b","text":"Option B - Hybrid","timestamp":1706000115}
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
The full event stream shows the user's exploration path — they may click multiple options before settling. The last `choice` event is typically the final selection, but the pattern of clicks can reveal hesitation or preferences worth asking about.
|
|
240
|
-
|
|
241
|
-
If `.events` doesn't exist, the user didn't interact with the browser — use only their terminal text.
|
|
242
|
-
|
|
243
|
-
## Design Tips
|
|
244
|
-
|
|
245
|
-
- **Scale fidelity to the question** — wireframes for layout, polish for polish questions
|
|
246
|
-
- **Explain the question on each page** — "Which layout feels more professional?" not just "Pick one"
|
|
247
|
-
- **Iterate before advancing** — if feedback changes current screen, write a new version
|
|
248
|
-
- **2-4 options max** per screen
|
|
249
|
-
- **Use real content when it matters** — for a photography portfolio, use actual images (Unsplash). Placeholder content obscures design issues.
|
|
250
|
-
- **Keep mockups simple** — focus on layout and structure, not pixel-perfect design
|
|
251
|
-
|
|
252
|
-
## File Naming
|
|
253
|
-
|
|
254
|
-
- Use semantic names: `platform.html`, `visual-style.html`, `layout.html`
|
|
255
|
-
- Never reuse filenames — each screen must be a new file
|
|
256
|
-
- For iterations: append version suffix like `layout-v2.html`, `layout-v3.html`
|
|
257
|
-
- Server serves newest file by modification time
|
|
258
|
-
|
|
259
|
-
## Cleaning Up
|
|
5
|
+
The companion is loopback-only. Do not expose it on a LAN or public interface.
|
|
260
6
|
|
|
261
7
|
```bash
|
|
262
|
-
scripts/
|
|
8
|
+
node scripts/start-server.sh
|
|
9
|
+
node scripts/stop-server.sh
|
|
263
10
|
```
|
|
264
11
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
## Reference
|
|
268
|
-
|
|
269
|
-
- Frame template (CSS reference): `scripts/frame-template.html`
|
|
270
|
-
- Helper script (client-side): `scripts/helper.js`
|
|
12
|
+
Present one focused mockup or choice at a time. Treat selections as design input, not permission to write code or durable artifacts. Stop the server when the visual discussion ends.
|
|
@@ -1,51 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: caveman-commit
|
|
3
|
-
description:
|
|
3
|
+
description: Write a terse Conventional Commit message from an existing diff
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Caveman Commit
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Read the diff and output a commit message only; never run Git commands.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Format the subject as `type(scope): imperative`, preferably at most 50 characters and never over 72. Use a body only when the reason is not obvious, or for breaking changes, security fixes, migrations, and reverts. Wrap body lines at 72 characters.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Use established project types and scopes. Avoid filler, AI attribution, emoji unless conventional, and a trailing subject period.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
flowchart TD
|
|
16
|
-
A[Read diff] --> B[Classify: feat/fix/refactor/perf/docs/test/chore]
|
|
17
|
-
B --> C["Write subject: type(scope): imperative ≤50"]
|
|
18
|
-
C --> D{Why obvious from diff?}
|
|
19
|
-
D -->|yes| E[Subject only — done]
|
|
20
|
-
D -->|no| F[Write body: why + context]
|
|
21
|
-
F --> G{Breaking/security/migration?}
|
|
22
|
-
G -->|yes| H[MUST include body]
|
|
23
|
-
G -->|no| E
|
|
24
|
-
H --> E
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Format Rules
|
|
28
|
-
|
|
29
|
-
| Element | Rule |
|
|
30
|
-
|---------|------|
|
|
31
|
-
| Subject | `<type>(<scope>): <imperative>` ≤50 chars (hard cap 72) |
|
|
32
|
-
| Types | feat, fix, refactor, perf, docs, test, chore, build, ci, style, revert |
|
|
33
|
-
| Mood | Imperative: "add", "fix", "remove" — not past/present tense |
|
|
34
|
-
| Body | Wrap 72 chars, bullets `-`, skip if subject self-explanatory |
|
|
35
|
-
| Issues | End of body: `Closes #42`, `Refs #17` |
|
|
36
|
-
|
|
37
|
-
## Never Include
|
|
38
|
-
|
|
39
|
-
- "This commit does X", "I", "we", "now" — diff says what
|
|
40
|
-
- AI attribution (unless explicitly requested)
|
|
41
|
-
- Emoji (unless project history uses them)
|
|
42
|
-
- Trailing period on subject
|
|
43
|
-
|
|
44
|
-
## Always Include Body For
|
|
45
|
-
|
|
46
|
-
- Breaking changes, security fixes (cite CVE), data migrations, reverts (name SHA)
|
|
47
|
-
|
|
48
|
-
## Constraints
|
|
49
|
-
|
|
50
|
-
- Output message as code block only — do not run `git commit`
|
|
51
|
-
- "Stop caveman-commit" or "normal mode" → revert to verbose style
|
|
14
|
+
Return only the message in a code block.
|
|
@@ -1,218 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deep-pr-review
|
|
3
|
-
description:
|
|
3
|
+
description: Review a GitHub PR deeply and post only after explicit user confirmation
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Deep PR Review
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Boundary
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Remain read-only until the user confirms the exact posting mode and payload. Never auto-approve. Use one GitHub write for the final review.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Gather Once
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Cache repository metadata, PR metadata, and the diff once:
|
|
15
15
|
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
A[User: 'deep review' + PR URL] --> B[Gather phase — see Data Gathering section]
|
|
21
|
-
B --> C{cwd repo == PR repo?}
|
|
22
|
-
C -->|no| Z[Halt — wrong checkout]:::bail
|
|
23
|
-
C -->|yes| D{Label = wip/draft?}
|
|
24
|
-
D -->|yes| D1[Soften severity — flag as WIP]
|
|
25
|
-
D -->|no| D2[Standard severity]
|
|
26
|
-
D1 & D2 --> E[arcs context --audience=implementer --lean --json]
|
|
27
|
-
E -->|found| F[Load AGENTS.md + targeted arcs search]
|
|
28
|
-
E -->|missing| G[Degraded mode — heuristics only]
|
|
29
|
-
F --> H{Prior AI review exists?}
|
|
30
|
-
G --> H
|
|
31
|
-
H -->|yes| I[Diff against prior review commit_id only]
|
|
32
|
-
H -->|no| J[Use full PR diff]
|
|
33
|
-
I --> K[Pick adaptive rubric from diff context]
|
|
34
|
-
J --> K
|
|
35
|
-
K --> L{Diff size?}
|
|
36
|
-
L -->|huge >40 files OR >2000 lines| M[Force summary mode]
|
|
37
|
-
L -->|normal| N{codegraph available?}
|
|
38
|
-
N -->|yes| O[Run impact/query on changed symbols]
|
|
39
|
-
N -->|no| P[Skip coupling check — note in report]
|
|
40
|
-
M --> Q[Aggregate findings + cite each]
|
|
41
|
-
O --> Q
|
|
42
|
-
P --> Q
|
|
43
|
-
Q --> R[Present report + 5 posting modes]
|
|
44
|
-
R --> S{User choice}
|
|
45
|
-
S -->|don't post| END1[Show report only]
|
|
46
|
-
S -->|post| T[gh api: review + inline comments]
|
|
47
|
-
T --> U{Recurring pattern surfaced?}
|
|
48
|
-
U -->|yes| V[Propose arcs knowledge upsert in report — ARCS-write opt-in to apply]
|
|
49
|
-
U -->|no| END2[Done]
|
|
50
|
-
V --> END2
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Data Gathering (ONE PASS — no repeat `gh` reads)
|
|
54
|
-
|
|
55
|
-
Run these three commands once at the start. Cache the results. All downstream steps read from cache — never call `gh repo view` or `gh pr view` again.
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
1. gh repo view --json name,owner → REPO
|
|
59
|
-
2. gh pr view <number> --json number,title,body,author,labels,reviews,state,files,headRefName,baseRefName → PR_META
|
|
60
|
-
3. gh pr diff <number> → DIFF
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
| Downstream need | Read from |
|
|
64
|
-
|-----------------|-----------|
|
|
65
|
-
| Repo-match check | `REPO.name`, `REPO.owner` |
|
|
66
|
-
| WIP / draft check | `PR_META.labels`, `PR_META.state` |
|
|
67
|
-
| Author context | `PR_META.author` |
|
|
68
|
-
| Prior review detection | `PR_META.reviews` |
|
|
69
|
-
| File list / LOC delta | `PR_META.files` |
|
|
70
|
-
| Diff text | `DIFF` |
|
|
71
|
-
|
|
72
|
-
`codegraph-diff.md` receives this cached `DIFF` snapshot; it must not run a second diff fetch.
|
|
73
|
-
|
|
74
|
-
## Adaptive Rubric
|
|
75
|
-
|
|
76
|
-
Agent picks dimensions from diff context. **Correctness is always evaluated.** Other dimensions activate when the diff signals them:
|
|
77
|
-
|
|
78
|
-
| Dimension | Activates when |
|
|
79
|
-
|-----------|----------------|
|
|
80
|
-
| **Correctness** | Always — bugs, off-by-one, error handling, null safety |
|
|
81
|
-
| **DRY** | New code resembles existing patterns; cross-module grep finds duplicates |
|
|
82
|
-
| **KISS** | New abstraction layers, deep nesting, premature generalization |
|
|
83
|
-
| **YAGNI** | Code written "for later" with no current caller; abstractions with one concrete use; configurable hooks with one known value; generic machinery built for hypothetical consumers |
|
|
84
|
-
| **SOLID** | Module gains responsibilities, dependency direction shifts, large classes touched |
|
|
85
|
-
| **Convention fit** | AGENTS.md or DAG `pattern`/`architecture` knowledge applies to changed files |
|
|
86
|
-
| **Architectural risk** → handoff to the tech-architect agent (structural audit) | Diff crosses module boundaries, touches god nodes, changes public API |
|
|
87
|
-
| **Performance/incident risk** → handoff to the software-engineer agent in incident mode with systematic-debugging | Hot paths, loops over external IO, new queries, allocations in render |
|
|
88
|
-
|
|
89
|
-
Skipped dimensions are reported as `cleared (not applicable: <reason>)`. Never silently dropped.
|
|
90
|
-
|
|
91
|
-
## Over-engineering / bloat pass
|
|
92
|
-
|
|
93
|
-
A focused pass that hunts ONLY over-engineering and complexity — correctness, security, and performance stay in the normal review pass above. Runs on a diff (delete-list for the changed lines) OR whole-repo (bloat audit). Lists findings only; applies nothing.
|
|
94
|
-
|
|
95
|
-
One finding per line, tagged:
|
|
96
|
-
|
|
97
|
-
| Tag | Catches | Replacement |
|
|
98
|
-
|-----|---------|-------------|
|
|
99
|
-
| `delete:` | Dead code, unused flexibility, speculative feature | nothing |
|
|
100
|
-
| `stdlib:` | Hand-rolled thing the standard library ships | name the function |
|
|
101
|
-
| `native:` | Dependency or code doing what the platform already does | name the feature |
|
|
102
|
-
| `yagni:` | Abstraction with one implementation, config nobody sets, layer with one caller | inline / remove |
|
|
103
|
-
| `shrink:` | Same logic in fewer lines | show the shorter form |
|
|
104
|
-
|
|
105
|
-
Format: `L<line>: <tag> <what>. <replacement>.` — use `<file>:L<line>: ...` for multi-file or whole-repo audits.
|
|
106
|
-
|
|
107
|
-
End with the only metric that matters: `net: -<N> lines, -<M> deps possible.` Nothing to cut → `Lean already. Ship.`
|
|
108
|
-
|
|
109
|
-
Boundary: never flag the single runnable check that implementation minimalism requires for non-trivial logic as bloat.
|
|
110
|
-
|
|
111
|
-
## Severity Prefixes
|
|
112
|
-
|
|
113
|
-
Inline findings are one line — `<file>:L<line>: problem. fix.` — prefixed by severity:
|
|
114
|
-
|
|
115
|
-
| Prefix | Meaning | Posting default |
|
|
116
|
-
|--------|---------|-----------------|
|
|
117
|
-
| `🔴 bug:` | Broken behavior, will cause incident | Always post |
|
|
118
|
-
| `🟠 risk:` | Works but fragile, edge case unhandled | Always post |
|
|
119
|
-
| `🟡 suggestion:` | Concrete fix improving quality | Posted in modes 2/3 |
|
|
120
|
-
| `🔵 nit:` | Style / naming / minor consistency | Posted only in mode 3 |
|
|
121
|
-
| `❓ q:` | Genuine question for the author | Always post |
|
|
122
|
-
|
|
123
|
-
## Posting Modes
|
|
124
|
-
|
|
125
|
-
User picks one before any `gh` write:
|
|
126
|
-
|
|
127
|
-
| # | Mode | What posts |
|
|
128
|
-
|---|------|------------|
|
|
129
|
-
| 1 | **Critical-only** | 🔴 bug + 🟠 risk + ❓ q only |
|
|
130
|
-
| 2 | **Critical + actionable** | Above + 🟡 suggestion |
|
|
131
|
-
| 3 | **All findings** | Above + 🔵 nit |
|
|
132
|
-
| 4 | **Summary only** | Single top-level review body, no inline comments |
|
|
133
|
-
| 5 | **Don't post** | Show report only — no `gh` calls |
|
|
134
|
-
|
|
135
|
-
## Iron Law
|
|
136
|
-
|
|
137
|
-
**READ ONLY until user picks a posting mode.** No `gh` writes, no ARCS writes, no auto-approve. Approval is only ever produced via explicit user override (`approve it`, `lgtm post approve`) — never inferred from finding count.
|
|
138
|
-
|
|
139
|
-
## Citation Rule
|
|
140
|
-
|
|
141
|
-
Every finding cites a source. No uncited findings:
|
|
142
|
-
|
|
143
|
-
- `see knowledge/<id>: <title>` — ARCS knowledge entry
|
|
144
|
-
- `AGENTS.md §<section>` — project convention
|
|
145
|
-
- `codegraph: <observation>` — coupling/impact result
|
|
146
|
-
- `principle: <KISS|DRY|YAGNI|SOLID|correctness>` — first-principles label
|
|
147
|
-
|
|
148
|
-
If only first-principles applies, that is sufficient — but it must be stated.
|
|
149
|
-
|
|
150
|
-
## Inline Suggestion Rule
|
|
151
|
-
|
|
152
|
-
GitHub ````suggestion` blocks render an "Apply suggestion" button. Use **only** when the fix is a one-to-few-line replacement of existing lines on the diff. For larger fixes:
|
|
153
|
-
|
|
154
|
-
- Multi-line code restructure → inline review comment with a fenced code block (no `suggestion` tag)
|
|
155
|
-
- Missing block / new file content → top-level review body bullet
|
|
156
|
-
- Cross-file refactor → handoff finding recommending the tech-architect agent (structural audit)
|
|
157
|
-
|
|
158
|
-
## Posting Protocol (ONE `gh api` call — never per-finding)
|
|
159
|
-
|
|
160
|
-
All findings are batched into a **single** GitHub review submission. Never loop through findings and post each one individually.
|
|
161
|
-
|
|
162
|
-
```
|
|
163
|
-
gh api POST /repos/{owner}/{repo}/pulls/{number}/reviews \
|
|
164
|
-
--field commit_id="<PR head SHA from PR_META>" \
|
|
165
|
-
--field event="COMMENT" \
|
|
166
|
-
--field body="<top-level summary>" \
|
|
167
|
-
--field 'comments=[{"path":"...","position":N,"body":"..."},...]'
|
|
16
|
+
```bash
|
|
17
|
+
gh repo view --json name,owner
|
|
18
|
+
gh pr view <number> --json number,title,body,author,labels,reviews,state,files,headRefName,baseRefName
|
|
19
|
+
gh pr diff <number>
|
|
168
20
|
```
|
|
169
21
|
|
|
170
|
-
|
|
171
|
-
|------|--------|
|
|
172
|
-
| One call per review session | Top-level body + all inline comments in the same `comments[]` array |
|
|
173
|
-
| Never mix `gh pr review` and `gh api` | Pick one entry point — use `gh api` for full control; `gh pr review` for body-only (mode 4) |
|
|
174
|
-
| Never call `gh pr comment` after `gh api reviews` | `gh pr comment` adds a stand-alone comment, not a review — it will duplicate the top-level body |
|
|
175
|
-
| Dry-run before sending | Print the full payload to the user for confirmation; only call `gh api` once user confirms |
|
|
176
|
-
|
|
177
|
-
### Mode → command mapping
|
|
22
|
+
Verify the current checkout matches the PR repository. Reuse the cached diff for review and optional `codegraph-diff.md` analysis.
|
|
178
23
|
|
|
179
|
-
|
|
180
|
-
|------|---------|
|
|
181
|
-
| 1–3 (inline + summary) | `gh api POST .../reviews` with `body` + `comments[]` — **one call** |
|
|
182
|
-
| 4 (summary only) | `gh pr review <number> --comment --body "..."` — **one call, no `comments[]`** |
|
|
183
|
-
| 5 (don't post) | No `gh` writes |
|
|
24
|
+
## Review
|
|
184
25
|
|
|
185
|
-
|
|
26
|
+
Check correctness first, then activate only relevant dimensions: security, tests, compatibility, KISS/YAGNI/DRY, architecture, and performance. Cite every finding with a diff location and consequence. Large PRs may use summary mode.
|
|
186
27
|
|
|
187
|
-
|
|
28
|
+
Present findings and ask the user to choose: critical-only, actionable, all, summary-only, or do not post. Show the exact payload before confirmation.
|
|
188
29
|
|
|
189
|
-
|
|
30
|
+
For inline modes, batch summary and comments into one `gh api POST .../reviews` call. For summary-only, use one `gh pr review --comment` call. Do not mix posting methods or post comments one by one.
|
|
190
31
|
|
|
191
|
-
|
|
192
|
-
# Deep PR Review: <repo>#<number> — <title>
|
|
193
|
-
## Pre-flight (repo match, PR state, prior reviews)
|
|
194
|
-
## Scope (files touched, LOC delta, modules affected)
|
|
195
|
-
## Rubric Selection (which dimensions activated, why)
|
|
196
|
-
## Findings (grouped by severity)
|
|
197
|
-
## Cleared Dimensions (with evidence)
|
|
198
|
-
## Knowledge Proposals (recurring findings → proposed arcs knowledge upsert, ARCS-write opt-in)
|
|
199
|
-
## Architectural / Performance Handoffs (if any)
|
|
200
|
-
## Posting Plan (mode chosen → exact comments to be posted)
|
|
201
|
-
## Confidence & Gaps
|
|
202
|
-
```
|
|
32
|
+
Recurring knowledge is optional and separately authorized from GitHub posting.
|
|
203
33
|
|
|
204
|
-
##
|
|
34
|
+
## Return
|
|
205
35
|
|
|
206
|
-
|
|
207
|
-
- **ONE `gh api` call to post the review** — batch all inline comments into the `comments[]` array; never loop and post per-finding; never mix `gh pr review` + `gh api` + `gh pr comment` in the same session
|
|
208
|
-
- Never auto-approve; approval only on explicit user override
|
|
209
|
-
- Never post to GitHub before user picks a posting mode
|
|
210
|
-
- Cite every finding — no uncited claims
|
|
211
|
-
- ` ```suggestion ` blocks only for small line-replacement fixes
|
|
212
|
-
- Defer to the tech-architect agent (structural audit) for full structural drift; surface as handoff flag, do not run inline
|
|
213
|
-
- Defer performance or incident investigation to the software-engineer agent with `AGENT_MODE: incident` and mandatory systematic-debugging; surface as a risk flag
|
|
214
|
-
- Review dimensions are defined in this skill (Adaptive Rubric); inline findings use the one-line format `<file>:L<line>: problem. fix.` — do not duplicate
|
|
215
|
-
- Re-review detection: if AI has reviewed before, scope to diff since last review's commit_id
|
|
216
|
-
- Tag each posted suggestion with `<!-- arcs:deep-review:<finding-id> -->` for re-review tracking
|
|
217
|
-
- See `review-template.md` for GitHub review body template
|
|
218
|
-
- See `codegraph-diff.md` for the changed-symbols-to-impact algorithm
|
|
36
|
+
Report scope, findings by severity, cleared risks, confidence/gaps, and the chosen posting result.
|