@azure-id/orc 1.9.0 → 1.9.2

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.
Files changed (134) hide show
  1. package/CHANGELOG.md +202 -0
  2. package/README-id.md +57 -59
  3. package/README.md +53 -54
  4. package/bin/build-agents.js +109 -109
  5. package/bin/cli.js +262 -58
  6. package/bin/graph-audit.js +235 -0
  7. package/bin/graph-extract.js +308 -3
  8. package/bin/graph-gain.js +23 -3
  9. package/bin/graph-map.js +9 -1
  10. package/bin/graph-query.js +152 -10
  11. package/bin/graph-shard.js +6 -1
  12. package/bin/graph-signals.js +287 -4
  13. package/bin/graph.js +717 -658
  14. package/bin/onboarding-content.js +4 -4
  15. package/bin/pricing.json +207 -200
  16. package/bin/verify-contracts.js +117 -2
  17. package/bin/verify-package.js +11 -7
  18. package/bin/webui/css/04-motion.css +162 -152
  19. package/bin/webui/css/panels/knowledge.css +563 -116
  20. package/bin/webui/fixtures/extra.js +2036 -2036
  21. package/bin/webui/fixtures/hookui.js +5 -5
  22. package/bin/webui/fixtures/knowledge.js +21 -4
  23. package/bin/webui/fixtures/settings.js +305 -305
  24. package/bin/webui/i18n/en/knowledge.json +122 -4
  25. package/bin/webui/i18n/id/knowledge.json +122 -4
  26. package/bin/webui/js/panels/knowledge.js +573 -9
  27. package/bin/webui/js/panels/overview.js +13 -4
  28. package/mock-run/context-combiner.md +100 -100
  29. package/mock-run/orc-budget.md +534 -534
  30. package/mock-run/orc-challenge-council.md +262 -262
  31. package/mock-run/orc-ultra.md +103 -103
  32. package/package.json +1 -1
  33. package/templates/agents/MODEL-MAPPING.md +43 -43
  34. package/templates/agents/orc-advisor-opus-5-xhigh.md +56 -56
  35. package/templates/agents/orc-analyze-mini-opus-5-med.md +60 -60
  36. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +58 -58
  37. package/templates/agents/orc-challenge-advisor-opus-5-med.md +75 -75
  38. package/templates/agents/orc-challenge-contrarian-opus-5-high.md +110 -110
  39. package/templates/agents/orc-challenge-executor-opus-5-med.md +114 -114
  40. package/templates/agents/orc-challenge-expansionist-opus-5-med.md +112 -112
  41. package/templates/agents/orc-challenge-judge-opus-5-high.md +132 -132
  42. package/templates/agents/orc-challenge-outsider-opus-5-low.md +109 -109
  43. package/templates/agents/orc-challenge-principles-opus-5-high.md +109 -109
  44. package/templates/agents/orc-challenge-reader-opus-5-low.md +90 -90
  45. package/templates/agents/orc-claude-writer-opus-5-med.md +55 -55
  46. package/templates/agents/orc-context-combiner-opus-5-high.md +88 -88
  47. package/templates/agents/orc-doc-checker-opus-5-low.md +108 -108
  48. package/templates/agents/orc-doc-writer-opus-5-med.md +134 -134
  49. package/templates/agents/orc-executor-haiku-4-5.md +2 -1
  50. package/templates/agents/orc-executor-opus-4-7-high.md +2 -1
  51. package/templates/agents/orc-executor-opus-4-7-med.md +2 -1
  52. package/templates/agents/orc-executor-opus-4-8-high.md +2 -1
  53. package/templates/agents/orc-executor-opus-5-high.md +4 -3
  54. package/templates/agents/orc-executor-opus-5-low.md +4 -3
  55. package/templates/agents/orc-executor-opus-5-med.md +4 -3
  56. package/templates/agents/orc-executor-sonnet-4-6-high.md +2 -1
  57. package/templates/agents/orc-executor-sonnet-4-6-med.md +2 -1
  58. package/templates/agents/orc-executor-sonnet-5-high.md +2 -1
  59. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -1
  60. package/templates/agents/orc-judge-opus-5-xhigh.md +85 -85
  61. package/templates/agents/orc-learn-writer-opus-5-low.md +73 -73
  62. package/templates/agents/orc-pattern-codifier-opus-5-med.md +65 -65
  63. package/templates/agents/orc-planner-mini-opus-5-med.md +4 -4
  64. package/templates/agents/orc-planner-mini-sonnet-5-high.md +1 -1
  65. package/templates/agents/orc-planner-opus-5-med.md +160 -160
  66. package/templates/agents/orc-recon-opus-5-low.md +18 -8
  67. package/templates/agents/orc-recon-sonnet-4-6-med.md +15 -5
  68. package/templates/agents/orc-retro-opus-5-med.md +3 -3
  69. package/templates/agents/orc-reviewer-opus-5-med.md +60 -60
  70. package/templates/agents/orc-scout-opus-5-low.md +40 -40
  71. package/templates/agents/orc-system-analyst-opus-5-high.md +120 -120
  72. package/templates/agents/orc-test-author-opus-5-med.md +71 -71
  73. package/templates/agents/orc-test-designer-opus-5-high.md +158 -158
  74. package/templates/agents/orc-test-interpreter-opus-5-low.md +130 -130
  75. package/templates/agents/orc-verifier-opus-5-med.md +69 -69
  76. package/templates/agents/orc-wiki-scanner-opus-5-med.md +81 -81
  77. package/templates/commands/orc-ultra.md +17 -17
  78. package/templates/commands/orc-verify.md +11 -11
  79. package/templates/hooks/README.md +13 -3
  80. package/templates/hooks/orc-effort-guard.js +178 -178
  81. package/templates/hooks/orc-graph-hook.js +53 -7
  82. package/templates/hooks/orc-statusline.js +6 -6
  83. package/templates/skills/_shared/code-graph.md +57 -18
  84. package/templates/skills/_shared/config-precedence.md +198 -198
  85. package/templates/skills/_shared/extra-dispatch.md +1346 -1346
  86. package/templates/skills/_shared/opus5-only.md +8 -8
  87. package/templates/skills/_shared/phases/analyst-gates.md +136 -136
  88. package/templates/skills/_shared/phases/execution.md +4 -4
  89. package/templates/skills/_shared/phases/planning.md +3 -3
  90. package/templates/skills/_shared/phases/preflight.md +1 -1
  91. package/templates/skills/_shared/phases/review.md +4 -2
  92. package/templates/skills/_shared/phases/ship.md +1 -1
  93. package/templates/skills/_shared/phases/trace.md +3 -2
  94. package/templates/skills/_shared/read-ladder.md +14 -1
  95. package/templates/skills/_shared/return-validation.md +1 -1
  96. package/templates/skills/context-combiner/SKILL.md +1 -1
  97. package/templates/skills/context-combiner/schemas/combined-report.md +78 -78
  98. package/templates/skills/orc/README.md +2 -2
  99. package/templates/skills/orc/SKILL.md +8 -8
  100. package/templates/skills/orc/config.md +9 -9
  101. package/templates/skills/orc/examples/full-run-mock.md +73 -73
  102. package/templates/skills/orc/references/effort-and-mode.md +222 -222
  103. package/templates/skills/orc/references/preflight-report.md +2 -2
  104. package/templates/skills/orc/references/ultra-mode.md +3 -3
  105. package/templates/skills/orc/subskills/orc-planner/SKILL.md +2 -2
  106. package/templates/skills/orc/subskills/orc-planner-mini/SKILL.md +121 -121
  107. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +76 -76
  108. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +45 -45
  109. package/templates/skills/orc-analyze/SKILL.md +2 -2
  110. package/templates/skills/orc-analyze/examples/analyze-mock.md +42 -42
  111. package/templates/skills/orc-analyze/schemas/report-audit.md +83 -83
  112. package/templates/skills/orc-analyze/schemas/report-prose.md +63 -63
  113. package/templates/skills/orc-analyze/schemas/report-requirement.md +78 -78
  114. package/templates/skills/orc-challenge/README.md +142 -142
  115. package/templates/skills/orc-challenge/examples/council-full-roster.md +273 -273
  116. package/templates/skills/orc-challenge/references/council.md +315 -315
  117. package/templates/skills/orc-challenge/references/intake.md +171 -171
  118. package/templates/skills/orc-claude/SKILL.md +14 -14
  119. package/templates/skills/orc-diy/README.md +143 -143
  120. package/templates/skills/orc-diy/references/flow-schema.md +1 -1
  121. package/templates/skills/orc-doc/README.md +229 -229
  122. package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +325 -325
  123. package/templates/skills/orc-doc/references/chunking.md +527 -527
  124. package/templates/skills/orc-fast/SKILL.md +4 -4
  125. package/templates/skills/orc-learn/SKILL.md +14 -14
  126. package/templates/skills/orc-learn/examples/learn-run-mock.md +61 -61
  127. package/templates/skills/orc-mini/SKILL.md +16 -20
  128. package/templates/skills/orc-mini/references/complexity.md +25 -11
  129. package/templates/skills/orc-quick/SKILL.md +12 -13
  130. package/templates/skills/orc-quick/references/gh-mode.md +1 -1
  131. package/templates/skills/orc-quick/references/look.md +5 -5
  132. package/templates/skills/orc-verify/SKILL.md +15 -15
  133. package/templates/skills/orc-verify/examples/verify-mock.md +33 -33
  134. package/templates/skills/orc-wiki/references/extra.md +1 -1
@@ -1,83 +1,83 @@
1
- # Template — Analyst Report (AUDIT mode)
2
-
3
- Human-readable source of truth. You review and confirm this; the machine spec
4
- is derived from it. Written to analyst_report/{analysis-name}/report.md.
5
-
6
- ```markdown
7
- # Analysis Report — {analysis-name}
8
- mode: audit
9
- depth: standard | deep
10
- source_doc: <path or "pasted">
11
- scope: <X — the requested scope only>
12
- analyzed_at: DDMMYY HH:MM:SS
13
- model: opus-5-high # the RESOLVED model of the agent that produced this
14
- # (mini writes sonnet-5-high) — never copied from here
15
- grounding: repo-read | repo-read+scouts # scouts only in deep mode
16
-
17
- ## In-scope rows (X only)
18
-
19
- Each row = one audit line that belongs to scope X, reconciled against code. Every
20
- "Code reality" cell carries quote-anchored file:line evidence
21
- (`file:line — "verbatim snippet"`, never paraphrased; a ref with no quote
22
- auto-downgrades to UNVERIFIED), OR the row is tagged ASSUMPTION/UNVERIFIED (and
23
- appears below as an open question). A row whose code reality is a claim of
24
- ABSENCE ("no retry exists") instead carries `searched:` — the concrete
25
- globs/greps run. In deep mode EVERY row is verified, not just the load-bearing
26
- ones.
27
-
28
- | # | Claim (result + notes) | Code reality | Evidence (file:line + quote / searched:) | Files/modules | Status | Resolution |
29
- |---|------------------------|--------------|------------------------------------------|---------------|--------|------------|
30
- | 1 | PASS — "UUID validated" | present | auth/uuid.x:8 — "validateUuid(id)" | auth/uuid.x | verified | — |
31
- | 2 | PASS — notes: "consider adding retry" | no retry | searched: `retry`, `backoff` in svc/ — no hits | svc/x | diverged | user: retry OUT of scope |
32
- | 3 | FAIL — "missing UUID check" | field renamed to ref_id | models/user.x:20 — "ref_id:" | models/x | diverged | user: update premise; check ref_id |
33
-
34
- Status: verified | diverged | resolved
35
- - verified: claim matches code (with evidence), nothing to challenge.
36
- - diverged: claim vs code mismatch → was challenged.
37
- - resolved: a diverged row the user decided on (Resolution column holds the call).
38
-
39
- ## Assumptions & Open Questions
40
- - UNVERIFIED (resolved): row 7 cited a "legacy flag" not found in code — user
41
- confirmed it was removed; row dropped.
42
-
43
- ## Additional context (do not build)
44
- Anchored, non-actionable context pulled from an ADJACENT scope because an in-scope
45
- row depends on it. Read for understanding; never a task. Each item names the
46
- in-scope row it serves + why. Omit this whole section if none survived.
47
- | Anchor (in-scope #) | From scope | Dependency | Touchpoint to respect | Evidence (file:line) |
48
- |---------------------|-----------|------------|-----------------------|----------------------|
49
- | Row 3 (ref_id check) | models (Y) | consumes-output | ref_id is set by the user loader before validation | models/user.x:20 |
50
-
51
- ## Alternatives & risks (DEEP mode only — omit in standard)
52
- - Row 3 fix: add ref_id check in the model (recommended) vs at the API edge —
53
- edge version duplicates validation across 3 handlers.
54
-
55
- ## Challenges raised & answers
56
- - Row 2: notes suggested retry — user confirmed OUT of scope X.
57
- - Row 3: audit says missing UUID check, code renamed field to ref_id — user
58
- confirmed implement the check against ref_id.
59
-
60
- ## Row numbering — `R#` is the SPEC's namespace, never the report's
61
- Refer to report rows as **"row N"** only. Labelling a report row `R1` collides
62
- with the spec's own `R#` ids, and the derivation lint compares the two id sets:
63
- report-`R1` (a build item) vs spec-`R1` (audit row 1) either false-passes or
64
- false-bounces. A row that legitimately duplicates another's `files[]` (e.g. a
65
- doc's closing `Recommendation:` line) carries `yields_build_work: false` in the
66
- spec rather than a prose qualifier.
67
-
68
- ## Excluded scopes (recognized, not detailed)
69
- - Recognized Y, Z in the source doc; excluded from this report per scope = X.
70
-
71
- ## Handoff readiness (checklist — all five or handoff_ready is false)
72
- The first three are checkable IN this report. The last two can only become true
73
- AFTER this report is confirmed and frozen, so on a correct run they stay
74
- unticked here and are satisfied in the spec — a reader of report.md alone must
75
- not read that as a failed checklist.
76
- - [ ] all BLOCKING challenges resolved (every diverged row decided)
77
- - [ ] zero open UNVERIFIED on any in-scope row
78
- - [ ] every row has status + evidence-or-resolution
79
- - [ ] spec derived AFTER the user confirmed this report (satisfied
80
- post-confirmation — see the spec)
81
- - [ ] scope_closed: true written into the spec (satisfied post-confirmation —
82
- see the spec)
83
- ```
1
+ # Template — Analyst Report (AUDIT mode)
2
+
3
+ Human-readable source of truth. You review and confirm this; the machine spec
4
+ is derived from it. Written to analyst_report/{analysis-name}/report.md.
5
+
6
+ ```markdown
7
+ # Analysis Report — {analysis-name}
8
+ mode: audit
9
+ depth: standard | deep
10
+ source_doc: <path or "pasted">
11
+ scope: <X — the requested scope only>
12
+ analyzed_at: DDMMYY HH:MM:SS
13
+ model: opus-5-5-high # the RESOLVED model of the agent that produced this
14
+ # (mini writes sonnet-5-high) — never copied from here
15
+ grounding: repo-read | repo-read+scouts # scouts only in deep mode
16
+
17
+ ## In-scope rows (X only)
18
+
19
+ Each row = one audit line that belongs to scope X, reconciled against code. Every
20
+ "Code reality" cell carries quote-anchored file:line evidence
21
+ (`file:line — "verbatim snippet"`, never paraphrased; a ref with no quote
22
+ auto-downgrades to UNVERIFIED), OR the row is tagged ASSUMPTION/UNVERIFIED (and
23
+ appears below as an open question). A row whose code reality is a claim of
24
+ ABSENCE ("no retry exists") instead carries `searched:` — the concrete
25
+ globs/greps run. In deep mode EVERY row is verified, not just the load-bearing
26
+ ones.
27
+
28
+ | # | Claim (result + notes) | Code reality | Evidence (file:line + quote / searched:) | Files/modules | Status | Resolution |
29
+ |---|------------------------|--------------|------------------------------------------|---------------|--------|------------|
30
+ | 1 | PASS — "UUID validated" | present | auth/uuid.x:8 — "validateUuid(id)" | auth/uuid.x | verified | — |
31
+ | 2 | PASS — notes: "consider adding retry" | no retry | searched: `retry`, `backoff` in svc/ — no hits | svc/x | diverged | user: retry OUT of scope |
32
+ | 3 | FAIL — "missing UUID check" | field renamed to ref_id | models/user.x:20 — "ref_id:" | models/x | diverged | user: update premise; check ref_id |
33
+
34
+ Status: verified | diverged | resolved
35
+ - verified: claim matches code (with evidence), nothing to challenge.
36
+ - diverged: claim vs code mismatch → was challenged.
37
+ - resolved: a diverged row the user decided on (Resolution column holds the call).
38
+
39
+ ## Assumptions & Open Questions
40
+ - UNVERIFIED (resolved): row 7 cited a "legacy flag" not found in code — user
41
+ confirmed it was removed; row dropped.
42
+
43
+ ## Additional context (do not build)
44
+ Anchored, non-actionable context pulled from an ADJACENT scope because an in-scope
45
+ row depends on it. Read for understanding; never a task. Each item names the
46
+ in-scope row it serves + why. Omit this whole section if none survived.
47
+ | Anchor (in-scope #) | From scope | Dependency | Touchpoint to respect | Evidence (file:line) |
48
+ |---------------------|-----------|------------|-----------------------|----------------------|
49
+ | Row 3 (ref_id check) | models (Y) | consumes-output | ref_id is set by the user loader before validation | models/user.x:20 |
50
+
51
+ ## Alternatives & risks (DEEP mode only — omit in standard)
52
+ - Row 3 fix: add ref_id check in the model (recommended) vs at the API edge —
53
+ edge version duplicates validation across 3 handlers.
54
+
55
+ ## Challenges raised & answers
56
+ - Row 2: notes suggested retry — user confirmed OUT of scope X.
57
+ - Row 3: audit says missing UUID check, code renamed field to ref_id — user
58
+ confirmed implement the check against ref_id.
59
+
60
+ ## Row numbering — `R#` is the SPEC's namespace, never the report's
61
+ Refer to report rows as **"row N"** only. Labelling a report row `R1` collides
62
+ with the spec's own `R#` ids, and the derivation lint compares the two id sets:
63
+ report-`R1` (a build item) vs spec-`R1` (audit row 1) either false-passes or
64
+ false-bounces. A row that legitimately duplicates another's `files[]` (e.g. a
65
+ doc's closing `Recommendation:` line) carries `yields_build_work: false` in the
66
+ spec rather than a prose qualifier.
67
+
68
+ ## Excluded scopes (recognized, not detailed)
69
+ - Recognized Y, Z in the source doc; excluded from this report per scope = X.
70
+
71
+ ## Handoff readiness (checklist — all five or handoff_ready is false)
72
+ The first three are checkable IN this report. The last two can only become true
73
+ AFTER this report is confirmed and frozen, so on a correct run they stay
74
+ unticked here and are satisfied in the spec — a reader of report.md alone must
75
+ not read that as a failed checklist.
76
+ - [ ] all BLOCKING challenges resolved (every diverged row decided)
77
+ - [ ] zero open UNVERIFIED on any in-scope row
78
+ - [ ] every row has status + evidence-or-resolution
79
+ - [ ] spec derived AFTER the user confirmed this report (satisfied
80
+ post-confirmation — see the spec)
81
+ - [ ] scope_closed: true written into the spec (satisfied post-confirmation —
82
+ see the spec)
83
+ ```
@@ -1,63 +1,63 @@
1
- # Template — Analyst Report (PROSE mode)
2
-
3
- Human-readable source of truth. Written to analyst_report/{analysis-name}/report.md.
4
-
5
- ```markdown
6
- # Analysis Report — {analysis-name}
7
- mode: prose
8
- depth: standard | deep
9
- source_doc: <path or "pasted">
10
- scope: <X — the requested scope only>
11
- analyzed_at: DDMMYY HH:MM:SS
12
- model: opus-5-high # the RESOLVED model of the agent that produced this
13
- # (mini writes sonnet-5-high) — never copied from here
14
- grounding: repo-read | repo-read+scouts # scouts only in deep mode
15
-
16
- ## In-scope requirements (X only)
17
-
18
- Every "Code reality" cell carries quote-anchored file:line evidence
19
- (`file:line — "verbatim snippet"`, never paraphrased; a ref with no quote
20
- auto-downgrades to UNVERIFIED), OR the row is tagged ASSUMPTION/UNVERIFIED (and
21
- appears below as an open question). Absence claims (status missing) instead
22
- carry `searched:` — the concrete globs/greps run.
23
-
24
- | # | Requirement (from doc) | Code reality | Evidence (file:line + quote / searched:) | Files/modules | Status | Resolution |
25
- |---|------------------------|--------------|------------------------------------------|---------------|--------|------------|
26
- | 1 | "notifications must paginate" | list is unbounded | searched: `paginate`, `cursor`, `limit` in api/notifications — no hits | api/notifications/x | missing | implement pagination |
27
- | 2 | "respect existing auth" | auth middleware present | auth/mw.x:10 — "app.use(requireAuth)" | auth/mw.x | exists | reuse, no change |
28
-
29
- Status: exists | missing | conflict | resolved
30
-
31
- ## Assumptions & Open Questions
32
- Anything not grounded to code, plus every ambiguity — each was raised as a
33
- recommended-option challenge and resolved (or is still open).
34
- - ASSUMPTION (resolved): "paginate" = cursor-based (recommended) — user confirmed.
35
- - UNVERIFIED (open): whether a rate-limit already exists — evidence not found.
36
-
37
- ## Additional context (do not build)
38
- Anchored, non-actionable context pulled from an ADJACENT scope because an in-scope
39
- requirement depends on it. Read for understanding; never a task. Each item names
40
- the in-scope requirement it serves + why. Omit this whole section if none survived.
41
- | Anchor (in-scope #) | From scope | Dependency | Touchpoint to respect | Evidence (file:line) |
42
- |---------------------|-----------|------------|-----------------------|----------------------|
43
- | Req 1 (pagination) | listing (Y) | guards-invariant | shared list serializer caps a page at 100 | api/serializers/list.x:31 |
44
-
45
- ## Alternatives & risks (DEEP mode only — omit in standard)
46
- - Approach A (recommended): reuse existing cursor helper — low blast radius, 3 files.
47
- - Approach B: new offset paginator — simpler read, breaks existing cursor clients.
48
- - Risk: pagination touches the shared list serializer (dependents: 4 call sites).
49
-
50
- ## Challenges raised & answers
51
- - Req 3 appeared to require an admin panel (belongs to scope Z) — user confirmed
52
- OUT of scope X.
53
-
54
- ## Excluded scopes (recognized, not detailed)
55
- - Recognized Y, Z; excluded per scope = X.
56
-
57
- ## Handoff readiness (checklist — all five or handoff_ready is false)
58
- - [ ] all BLOCKING challenges resolved
59
- - [ ] zero open UNVERIFIED on any in-scope requirement
60
- - [ ] every requirement has status + evidence-or-resolution
61
- - [ ] spec derived AFTER the user confirmed this report
62
- - [ ] scope_closed: true written into the spec
63
- ```
1
+ # Template — Analyst Report (PROSE mode)
2
+
3
+ Human-readable source of truth. Written to analyst_report/{analysis-name}/report.md.
4
+
5
+ ```markdown
6
+ # Analysis Report — {analysis-name}
7
+ mode: prose
8
+ depth: standard | deep
9
+ source_doc: <path or "pasted">
10
+ scope: <X — the requested scope only>
11
+ analyzed_at: DDMMYY HH:MM:SS
12
+ model: opus-5-5-high # the RESOLVED model of the agent that produced this
13
+ # (mini writes sonnet-5-high) — never copied from here
14
+ grounding: repo-read | repo-read+scouts # scouts only in deep mode
15
+
16
+ ## In-scope requirements (X only)
17
+
18
+ Every "Code reality" cell carries quote-anchored file:line evidence
19
+ (`file:line — "verbatim snippet"`, never paraphrased; a ref with no quote
20
+ auto-downgrades to UNVERIFIED), OR the row is tagged ASSUMPTION/UNVERIFIED (and
21
+ appears below as an open question). Absence claims (status missing) instead
22
+ carry `searched:` — the concrete globs/greps run.
23
+
24
+ | # | Requirement (from doc) | Code reality | Evidence (file:line + quote / searched:) | Files/modules | Status | Resolution |
25
+ |---|------------------------|--------------|------------------------------------------|---------------|--------|------------|
26
+ | 1 | "notifications must paginate" | list is unbounded | searched: `paginate`, `cursor`, `limit` in api/notifications — no hits | api/notifications/x | missing | implement pagination |
27
+ | 2 | "respect existing auth" | auth middleware present | auth/mw.x:10 — "app.use(requireAuth)" | auth/mw.x | exists | reuse, no change |
28
+
29
+ Status: exists | missing | conflict | resolved
30
+
31
+ ## Assumptions & Open Questions
32
+ Anything not grounded to code, plus every ambiguity — each was raised as a
33
+ recommended-option challenge and resolved (or is still open).
34
+ - ASSUMPTION (resolved): "paginate" = cursor-based (recommended) — user confirmed.
35
+ - UNVERIFIED (open): whether a rate-limit already exists — evidence not found.
36
+
37
+ ## Additional context (do not build)
38
+ Anchored, non-actionable context pulled from an ADJACENT scope because an in-scope
39
+ requirement depends on it. Read for understanding; never a task. Each item names
40
+ the in-scope requirement it serves + why. Omit this whole section if none survived.
41
+ | Anchor (in-scope #) | From scope | Dependency | Touchpoint to respect | Evidence (file:line) |
42
+ |---------------------|-----------|------------|-----------------------|----------------------|
43
+ | Req 1 (pagination) | listing (Y) | guards-invariant | shared list serializer caps a page at 100 | api/serializers/list.x:31 |
44
+
45
+ ## Alternatives & risks (DEEP mode only — omit in standard)
46
+ - Approach A (recommended): reuse existing cursor helper — low blast radius, 3 files.
47
+ - Approach B: new offset paginator — simpler read, breaks existing cursor clients.
48
+ - Risk: pagination touches the shared list serializer (dependents: 4 call sites).
49
+
50
+ ## Challenges raised & answers
51
+ - Req 3 appeared to require an admin panel (belongs to scope Z) — user confirmed
52
+ OUT of scope X.
53
+
54
+ ## Excluded scopes (recognized, not detailed)
55
+ - Recognized Y, Z; excluded per scope = X.
56
+
57
+ ## Handoff readiness (checklist — all five or handoff_ready is false)
58
+ - [ ] all BLOCKING challenges resolved
59
+ - [ ] zero open UNVERIFIED on any in-scope requirement
60
+ - [ ] every requirement has status + evidence-or-resolution
61
+ - [ ] spec derived AFTER the user confirmed this report
62
+ - [ ] scope_closed: true written into the spec
63
+ ```
@@ -1,78 +1,78 @@
1
- # Template — Analyst Report (REQUIREMENT mode — no document)
2
-
3
- Used when there is NO source document: the user's plain-language request IS the
4
- requirement, reconciled against the existing code. Human-readable source of
5
- truth. Written to `<analyzer_dir>/{analysis-name}/report.md` (config
6
- `analyzer_dir` — the internal artifact dir); it is COPIED to
7
- `<report_out_dir>/{analysis-name}/report.md` only on the report-only /
8
- stop-here branch. The old "written to analyst_report/…" wording described the
9
- copy target as if it were the write target.
10
-
11
- ```markdown
12
- # Analysis Report — {analysis-name}
13
- mode: requirement
14
- depth: standard | deep
15
- source: "pasted request" # the user's own words, verbatim
16
- scope: <X — the requested scope only>
17
- analyzed_at: DDMMYY HH:MM:SS
18
- model: opus-5-high # the RESOLVED model of the agent that produced this
19
- # (mini writes sonnet-5-high) — never copied from here
20
- grounding: repo-read | repo-read+scouts # scouts only in deep mode
21
-
22
- ## Restated requirement (analyst's words)
23
- One or two sentences restating the request — restating is what surfaces
24
- misreadings. If the restatement rests on any assumption, tag it and ask.
25
-
26
- ## In-scope requirement parts (X only)
27
-
28
- Each part of the request, reconciled against code. Every "Code reality" cell
29
- carries quote-anchored file:line evidence (`file:line — "verbatim snippet"`,
30
- never paraphrased; a ref with no quote auto-downgrades to UNVERIFIED), OR the
31
- part is tagged ASSUMPTION/UNVERIFIED (and appears below as an open question).
32
- Absence claims (status missing/buildable) instead carry `searched:` — the
33
- concrete globs/greps run. In deep mode EVERY part is verified.
34
-
35
- | # | Requirement part (from request) | Code reality | Evidence (file:line + quote / searched:) | Files/modules | Status | Resolution |
36
- |---|---------------------------------|--------------|------------------------------------------|---------------|--------|------------|
37
- | 1 | "add CSV export to reports" | reports render HTML only | searched: `export*`, `csv`, `download` — no hits | web/reports/x | missing | new export path |
38
- | 2 | "reuse current auth" | auth guard on report routes | web/reports/routes.x:12 — "requireAuth(" | web/reports/x | exists | reuse, no change |
39
-
40
- Status: buildable | exists | conflict | resolved
41
- - buildable: not present, but consistent with the code — safe to build.
42
- - exists: already implemented — flag so the planner doesn't duplicate.
43
- - conflict: request contradicts existing behavior → challenged.
44
- - resolved: a challenged part the user decided on.
45
-
46
- ## Assumptions & Open Questions
47
- Every ambiguity in the request + anything not grounded to code. Each raised as a
48
- recommended-option challenge and resolved (or still open).
49
- - ASSUMPTION (resolved): "export" = download file (recommended) vs email — user
50
- confirmed download.
51
- - UNVERIFIED (open): whether a reports permission gate exists — evidence not found.
52
-
53
- ## Additional context (do not build)
54
- Anchored, non-actionable context pulled from an ADJACENT scope because an in-scope
55
- request part depends on it. Read for understanding; never a task. Each item names
56
- the in-scope part it serves + why. Omit this whole section if none survived.
57
- | Anchor (in-scope #) | From scope | Dependency | Touchpoint to respect | Evidence (file:line) |
58
- |---------------------|-----------|------------|-----------------------|----------------------|
59
- | Part 1 (CSV export) | reporting (Y) | consumes-output | report query already paginates; export must page too | web/reports/query.x:44 |
60
-
61
- ## Alternatives & risks (DEEP mode only — omit in standard)
62
- - Approach A (recommended): stream CSV from the existing query — low blast radius.
63
- - Approach B: precompute + cache — faster reads, adds a cache dependency.
64
- - Risk: export reuses the report query (dependents: 2 schedulers).
65
-
66
- ## Challenges raised & answers
67
- - Part 3 ("admin-only export") looked like scope Z (admin) — user confirmed OUT.
68
-
69
- ## Excluded scopes (recognized, not detailed)
70
- - Recognized Y, Z implied by the request; excluded per scope = X.
71
-
72
- ## Handoff readiness (checklist — all five or handoff_ready is false)
73
- - [ ] all BLOCKING challenges resolved
74
- - [ ] zero open UNVERIFIED on any in-scope part
75
- - [ ] every part has status + evidence-or-resolution
76
- - [ ] spec derived AFTER the user confirmed this report
77
- - [ ] scope_closed: true written into the spec
78
- ```
1
+ # Template — Analyst Report (REQUIREMENT mode — no document)
2
+
3
+ Used when there is NO source document: the user's plain-language request IS the
4
+ requirement, reconciled against the existing code. Human-readable source of
5
+ truth. Written to `<analyzer_dir>/{analysis-name}/report.md` (config
6
+ `analyzer_dir` — the internal artifact dir); it is COPIED to
7
+ `<report_out_dir>/{analysis-name}/report.md` only on the report-only /
8
+ stop-here branch. The old "written to analyst_report/…" wording described the
9
+ copy target as if it were the write target.
10
+
11
+ ```markdown
12
+ # Analysis Report — {analysis-name}
13
+ mode: requirement
14
+ depth: standard | deep
15
+ source: "pasted request" # the user's own words, verbatim
16
+ scope: <X — the requested scope only>
17
+ analyzed_at: DDMMYY HH:MM:SS
18
+ model: opus-5-5-high # the RESOLVED model of the agent that produced this
19
+ # (mini writes sonnet-5-high) — never copied from here
20
+ grounding: repo-read | repo-read+scouts # scouts only in deep mode
21
+
22
+ ## Restated requirement (analyst's words)
23
+ One or two sentences restating the request — restating is what surfaces
24
+ misreadings. If the restatement rests on any assumption, tag it and ask.
25
+
26
+ ## In-scope requirement parts (X only)
27
+
28
+ Each part of the request, reconciled against code. Every "Code reality" cell
29
+ carries quote-anchored file:line evidence (`file:line — "verbatim snippet"`,
30
+ never paraphrased; a ref with no quote auto-downgrades to UNVERIFIED), OR the
31
+ part is tagged ASSUMPTION/UNVERIFIED (and appears below as an open question).
32
+ Absence claims (status missing/buildable) instead carry `searched:` — the
33
+ concrete globs/greps run. In deep mode EVERY part is verified.
34
+
35
+ | # | Requirement part (from request) | Code reality | Evidence (file:line + quote / searched:) | Files/modules | Status | Resolution |
36
+ |---|---------------------------------|--------------|------------------------------------------|---------------|--------|------------|
37
+ | 1 | "add CSV export to reports" | reports render HTML only | searched: `export*`, `csv`, `download` — no hits | web/reports/x | missing | new export path |
38
+ | 2 | "reuse current auth" | auth guard on report routes | web/reports/routes.x:12 — "requireAuth(" | web/reports/x | exists | reuse, no change |
39
+
40
+ Status: buildable | exists | conflict | resolved
41
+ - buildable: not present, but consistent with the code — safe to build.
42
+ - exists: already implemented — flag so the planner doesn't duplicate.
43
+ - conflict: request contradicts existing behavior → challenged.
44
+ - resolved: a challenged part the user decided on.
45
+
46
+ ## Assumptions & Open Questions
47
+ Every ambiguity in the request + anything not grounded to code. Each raised as a
48
+ recommended-option challenge and resolved (or still open).
49
+ - ASSUMPTION (resolved): "export" = download file (recommended) vs email — user
50
+ confirmed download.
51
+ - UNVERIFIED (open): whether a reports permission gate exists — evidence not found.
52
+
53
+ ## Additional context (do not build)
54
+ Anchored, non-actionable context pulled from an ADJACENT scope because an in-scope
55
+ request part depends on it. Read for understanding; never a task. Each item names
56
+ the in-scope part it serves + why. Omit this whole section if none survived.
57
+ | Anchor (in-scope #) | From scope | Dependency | Touchpoint to respect | Evidence (file:line) |
58
+ |---------------------|-----------|------------|-----------------------|----------------------|
59
+ | Part 1 (CSV export) | reporting (Y) | consumes-output | report query already paginates; export must page too | web/reports/query.x:44 |
60
+
61
+ ## Alternatives & risks (DEEP mode only — omit in standard)
62
+ - Approach A (recommended): stream CSV from the existing query — low blast radius.
63
+ - Approach B: precompute + cache — faster reads, adds a cache dependency.
64
+ - Risk: export reuses the report query (dependents: 2 schedulers).
65
+
66
+ ## Challenges raised & answers
67
+ - Part 3 ("admin-only export") looked like scope Z (admin) — user confirmed OUT.
68
+
69
+ ## Excluded scopes (recognized, not detailed)
70
+ - Recognized Y, Z implied by the request; excluded per scope = X.
71
+
72
+ ## Handoff readiness (checklist — all five or handoff_ready is false)
73
+ - [ ] all BLOCKING challenges resolved
74
+ - [ ] zero open UNVERIFIED on any in-scope part
75
+ - [ ] every part has status + evidence-or-resolution
76
+ - [ ] spec derived AFTER the user confirmed this report
77
+ - [ ] scope_closed: true written into the spec
78
+ ```