@event4u/agent-config 8.9.0 → 8.10.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.
Files changed (117) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +41 -0
  3. package/README.md +5 -5
  4. package/dist/agent-src/commands/cost/report.md +13 -3
  5. package/dist/agent-src/commands/tests/create.md +28 -6
  6. package/dist/agent-src/commands/work.md +33 -0
  7. package/dist/agent-src/commands/worktree/cleanup.md +78 -0
  8. package/dist/agent-src/commands/worktree/create.md +62 -0
  9. package/dist/agent-src/commands/worktree/status.md +63 -0
  10. package/dist/agent-src/commands/worktree/verify.md +70 -0
  11. package/dist/agent-src/commands/worktree.md +85 -0
  12. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +47 -34
  13. package/dist/agent-src/rules/design-fidelity.md +40 -0
  14. package/dist/agent-src/rules/spreadsheet-source-quality.md +61 -0
  15. package/dist/agent-src/skills/accessibility-auditor/evals/evals.json +15 -0
  16. package/dist/agent-src/skills/analysis-skill-router/evals/evals.json +13 -0
  17. package/dist/agent-src/skills/api-testing/SKILL.md +15 -1
  18. package/dist/agent-src/skills/character-consistency/evals/evals.json +16 -0
  19. package/dist/agent-src/skills/command-routing/evals/evals.json +14 -0
  20. package/dist/agent-src/skills/dashboard-design/evals/evals.json +16 -0
  21. package/dist/agent-src/skills/dcf-modeling/evals/evals.json +20 -0
  22. package/dist/agent-src/skills/decision-record/evals/evals.json +20 -0
  23. package/dist/agent-src/skills/design-intelligence/evals/evals.json +14 -0
  24. package/dist/agent-src/skills/design-review/SKILL.md +6 -0
  25. package/dist/agent-src/skills/design-system-capture/SKILL.md +21 -0
  26. package/dist/agent-src/skills/design-system-capture/evals/evals.json +15 -0
  27. package/dist/agent-src/skills/developer-like-execution/evals/evals.json +16 -0
  28. package/dist/agent-src/skills/doc-coauthoring/SKILL.md +27 -0
  29. package/dist/agent-src/skills/doc-coauthoring/evals/evals.json +16 -0
  30. package/dist/agent-src/skills/editorial-calendar/evals/domain-truth.json +16 -0
  31. package/dist/agent-src/skills/editorial-calendar/evals/evals.json +16 -0
  32. package/dist/agent-src/skills/estimate-ticket/evals/evals.json +16 -0
  33. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +30 -0
  34. package/dist/agent-src/skills/existing-ui-audit/evals/triggers.json +47 -0
  35. package/dist/agent-src/skills/fe-design/SKILL.md +36 -5
  36. package/dist/agent-src/skills/fe-design/evals/triggers.json +47 -0
  37. package/dist/agent-src/skills/forecasting/evals/evals.json +20 -0
  38. package/dist/agent-src/skills/fundraising-narrative/evals/domain-truth.json +16 -0
  39. package/dist/agent-src/skills/fundraising-narrative/evals/evals.json +16 -0
  40. package/dist/agent-src/skills/html-deck/SKILL.md +27 -0
  41. package/dist/agent-src/skills/iconography/SKILL.md +24 -0
  42. package/dist/agent-src/skills/incident-commander/evals/domain-truth.json +16 -0
  43. package/dist/agent-src/skills/incident-commander/evals/evals.json +20 -0
  44. package/dist/agent-src/skills/launch-readiness/evals/evals.json +21 -0
  45. package/dist/agent-src/skills/logging-monitoring/evals/evals.json +16 -0
  46. package/dist/agent-src/skills/messaging-architecture/evals/domain-truth.json +16 -0
  47. package/dist/agent-src/skills/messaging-architecture/evals/evals.json +16 -0
  48. package/dist/agent-src/skills/perf-feedback-craft/evals/evals.json +16 -0
  49. package/dist/agent-src/skills/pest-testing/SKILL.md +1 -1
  50. package/dist/agent-src/skills/playwright-testing/SKILL.md +16 -0
  51. package/dist/agent-src/skills/prompt-engineering-patterns/evals/evals.json +16 -0
  52. package/dist/agent-src/skills/refine-prompt/evals/evals.json +16 -0
  53. package/dist/agent-src/skills/refine-ticket/evals/evals.json +16 -0
  54. package/dist/agent-src/skills/release-comms/evals/evals.json +16 -0
  55. package/dist/agent-src/skills/rice-prioritization/evals/evals.json +20 -0
  56. package/dist/agent-src/skills/runway-cognition/evals/evals.json +20 -0
  57. package/dist/agent-src/skills/scenario-modeling/evals/evals.json +20 -0
  58. package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +98 -0
  59. package/dist/agent-src/skills/spreadsheet-authoring/evals/triggers.json +47 -0
  60. package/dist/agent-src/skills/systematic-debugging/evals/evals.json +20 -0
  61. package/dist/agent-src/skills/test-case-discovery/SKILL.md +118 -0
  62. package/dist/agent-src/skills/test-case-discovery/evals/triggers.json +52 -0
  63. package/dist/agent-src/skills/test-driven-development/SKILL.md +32 -6
  64. package/dist/agent-src/skills/test-driven-development/evals/evals.json +16 -0
  65. package/dist/agent-src/skills/testing-anti-patterns/SKILL.md +7 -6
  66. package/dist/agent-src/skills/threat-modeling/evals/evals.json +21 -0
  67. package/dist/agent-src/skills/typography-system/evals/evals.json +14 -0
  68. package/dist/agent-src/skills/unit-economics-modeling/evals/evals.json +24 -0
  69. package/dist/agent-src/skills/verify-completion-evidence/evals/evals.json +16 -0
  70. package/dist/agent-src/skills/vision-articulation/evals/evals.json +16 -0
  71. package/dist/agent-src/skills/voice-and-tone-design/evals/evals.json +16 -0
  72. package/dist/agent-src/skills/worktree-lifecycle/SKILL.md +180 -0
  73. package/dist/agent-src/skills/worktree-lifecycle/evals/triggers.json +52 -0
  74. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  75. package/dist/discovery/deprecation-report.md +1 -1
  76. package/dist/discovery/discovery-manifest.json +249 -32
  77. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  78. package/dist/discovery/discovery-manifest.summary.md +6 -6
  79. package/dist/discovery/orphan-report.md +1 -1
  80. package/dist/discovery/packs.json +22 -13
  81. package/dist/discovery/trust-report.md +4 -4
  82. package/dist/discovery/workspaces.json +22 -11
  83. package/dist/mcp/registry-manifest.json +2 -2
  84. package/dist/router.json +1 -1
  85. package/docs/CLAIMS.md +3 -3
  86. package/docs/architecture.md +3 -3
  87. package/docs/catalog.md +19 -8
  88. package/docs/command-flows.md +6 -1
  89. package/docs/contracts/CHANGELOG-conventions.md +6 -0
  90. package/docs/contracts/design-artifact-lifecycle.md +93 -0
  91. package/docs/contracts/design-artifact-verification.md +30 -1
  92. package/docs/contracts/release-pr-gating.md +26 -0
  93. package/docs/contracts/release-sizing.md +85 -0
  94. package/docs/contracts/surface-agent-contracts.md +153 -0
  95. package/docs/decisions/ADR-115-command-cluster-consolidation-phase-4.md +1 -1
  96. package/docs/distribution/consumer-matrix.md +96 -0
  97. package/docs/featured-skills.md +2 -2
  98. package/docs/getting-started-by-role.md +1 -1
  99. package/docs/getting-started.md +2 -2
  100. package/docs/governance-advantage.md +1 -1
  101. package/docs/proof.md +4 -4
  102. package/docs/release-runbook.md +3 -0
  103. package/docs/self-review-gate.md +51 -0
  104. package/package.json +1 -1
  105. package/src/scripts/_lib/orchestration_record.ts +13 -0
  106. package/src/scripts/_lib/orchestration_savings.ts +52 -0
  107. package/src/scripts/check_release_adjacent_health.ts +121 -0
  108. package/src/scripts/check_rule_invariants.ts +275 -0
  109. package/src/scripts/consumer_matrix.ts +353 -0
  110. package/src/scripts/generate_index.ts +3 -2
  111. package/src/scripts/lint_changelog_rollback.ts +293 -0
  112. package/src/scripts/orchestration_record.ts +16 -0
  113. package/src/scripts/orchestration_savings_report.ts +36 -3
  114. package/src/scripts/second_brain_retrieval.ts +44 -2
  115. package/src/scripts/self_review_gate.test.ts +65 -0
  116. package/src/scripts/self_review_gate.ts +272 -0
  117. package/src/scripts/trigger_eval_grandfather.json +223 -224
@@ -26,7 +26,9 @@ v1 forward-compat rule on unknown fields).
26
26
  "dispatch_tokens": null,
27
27
  "session_tier": null,
28
28
  "escalated_from": null,
29
- "verify_result_by_tier": null
29
+ "verify_result_by_tier": null,
30
+ "first_pass_success": null,
31
+ "escalated": null
30
32
  }
31
33
  ```
32
34
 
@@ -34,22 +36,24 @@ v1 forward-compat rule on unknown fields).
34
36
 
35
37
  | Field | Type | Meaning |
36
38
  |---|---|---|
37
- | `task_size_estimate` | int | Pre-dispatch estimate of the task's size (orchestrator's sizing heuristic). Counts only, no body. |
38
- | `spawn_count` | int | Subagents dispatched for this task. `0` → handled in-session. |
39
- | `tiers` | string[] | Model tiers dispatched to, one per spawn class (e.g. `["sonnet","opus"]`). Tier names only, no prompts. |
40
- | `token_delta` | int | Net token cost vs the in-session baseline. Positive = cost more; negative = saved. Counts only. |
41
- | `token_delta_provenance` | enum | `"measured"` from host-reported `usage` metadata (preferred); `"estimated"` when self-estimated from response length (mark always when host usage unavailable). |
42
- | `wall_clock_ms` | int | Dispatch wall-clock duration, milliseconds. |
39
+ | `task_size_estimate` | int | Pre-dispatch estimate of the task's size (the orchestrator's sizing heuristic). Counts only, no body. |
40
+ | `spawn_count` | int | Number of subagents dispatched for this task. `0` → handled in-session. |
41
+ | `tiers` | string[] | Model tiers dispatched to, one entry per spawn class (e.g. `["sonnet","opus"]`). Tier names only, no prompts. |
42
+ | `token_delta` | int | Net token cost of the dispatch versus the in-session baseline. Positive = orchestration cost more; negative = saved tokens. Counts only. |
43
+ | `token_delta_provenance` | enum | `"measured"` when sourced from host-reported `usage` metadata (preferred); `"estimated"` when self-estimated from response length (mark always when host usage is unavailable). |
44
+ | `wall_clock_ms` | int | Wall-clock duration of the dispatch, milliseconds. |
43
45
  | `outcome` | enum | One of `DONE` · `DONE_WITH_CONCERNS` · `NEEDS_CONTEXT` · `BLOCKED` · `killed`. |
44
- | `verify_mode` | enum | How output was verified: `deterministic` · `judge` · `none`. |
45
- | `verdict_changed_outcome` | bool \| null | **A3 extension (ADR-109 Track A).** For a review/verdict subagent (e.g. `production-validator`): did the verdict change the outcome vs the in-session baseline? `true` = caught a real issue the baseline missed / flipped a false `READY`→`NOT READY`; `false` = no lift; `null` = not a verdict dispatch / not measured. **Negative-control (clean single-file) tasks MUST record `false`** — a `true` on a control = spurious findings, fails Gate A. Additive field on THIS object, not a second schema. Boolean/counts only, no bodies. |
46
+ | `verify_mode` | enum | How the dispatch's output was verified: `deterministic` · `judge` · `none`. |
47
+ | `verdict_changed_outcome` | bool \| null | **A3 extension (ADR-109 Track A).** For a review/verdict subagent (e.g. `production-validator`): did the subagent's verdict actually change the outcome versus the in-session baseline? `true` = it caught a real issue the baseline missed or flipped a false `READY`→`NOT READY`; `false` = same outcome as baseline (no lift); `null` = not a verdict dispatch / not measured. **Negative-control tasks (a clean single-file task) MUST record `false`** — a subagent that reports `true` on a control is producing spurious findings and fails Gate A. This is an additive field on THIS object, not a second schema. Counts/boolean only, no bodies. |
46
48
  | `task_class` | string \| null | **Routing extension (road-to-cost-aware-model-routing Phase 0).** Category id of the dispatched slice (e.g. `read-only-fanout`, `mechanical-edit`, `implementation`, `review-synthesis`). Enum-style id only, never free-form task text. `null` = pre-extension line / unclassified. |
47
49
  | `tier_chosen` | string \| null | Tier the slice was dispatched on (`lite` \| `medium` \| `high`). `null` = pre-extension line. |
48
50
  | `tier_source` | enum \| null | Where `tier_chosen` came from: `static` (frontmatter/category pin) · `inferred` (deterministic per-slice inference) · `inherit` (session tier — no downshift decision). Lets the evidence gate score inferred routing separately from static pinning. |
49
- | `escalated_from` | string \| null | When the slice re-dispatched after a verification failure: tier of the FAILED attempt (e.g. `lite` when a lite return failed verify and the slice re-ran on `medium`). `null` = no escalation. |
50
- | `verify_result_by_tier` | object \| null | Map tier → verification result per attempt of this slice (e.g. `{"lite":"fail","medium":"pass"}`). Values: `pass` \| `fail` \| `skipped`. Feeds the per-tier verify-pass-rate tripwire. Enums only, no verdict bodies. |
51
+ | `escalated_from` | string \| null | When the slice was re-dispatched after a verification failure: the tier of the FAILED attempt (e.g. `lite` when a lite return failed verify and the slice re-ran on `medium`). `null` = no escalation. |
52
+ | `verify_result_by_tier` | object \| null | Map of tier → verification result for every attempt of this slice (e.g. `{"lite":"fail","medium":"pass"}`). Values: `pass` \| `fail` \| `skipped`. Feeds the per-tier verify-pass-rate tripwire. Enums only, no verdict bodies. |
51
53
  | `dispatch_tokens` | int \| null | **Cost-% extension.** Absolute tokens the dispatched slice consumed (measured subagent usage). Feeds the MODELED cost-% in `orchestration_savings_report`, which needs an absolute base the token-count delta lacks. `null` = not recorded. Counts only. |
52
54
  | `session_tier` | string \| null | **Cost-% extension.** The orchestrator's OWN tier — the baseline the downshift cost-% measures `tier_chosen` against (a `high`→`lite` downshift is a rate win the token count can't see). `null` = not recorded. |
55
+ | `first_pass_success` | bool \| null | **QUALITY extension (council verdict: quality × cost paired).** `true` = the subagent return was adopted without parent rework; `false` = the parent had to rework the return before adopting. `null` = pre-extension line / not measured. Boolean only, no bodies. |
56
+ | `escalated` | bool \| null | **QUALITY extension (council verdict: quality × cost paired).** `true` = the slice was retried on a higher tier after a verification failure; `false` = no escalation. `null` = pre-extension line / not measured. Boolean only, no bodies. |
53
57
 
54
58
  These routing + cost fields are additive and optional — a line without them is
55
59
  still a valid orchestration line; readers ignore unknown fields per the v1
@@ -74,49 +78,58 @@ object is an additive extension on an otherwise standard audit-log-v1 line:
74
78
 
75
79
  After every auto-dispatched orchestration run, the orchestrating agent writes one
76
80
  telemetry line to `agents/runtime/state/audit/YYYY-MM.jsonl` (the existing
77
- audit-log-v1 path; `YYYY-MM` = current UTC month). The line is a standard
78
- audit-log-v1 object with `input_kind: "orchestration"` and an `orchestration`
79
- sub-object carrying this shape.
81
+ audit-log-v1 path, where `YYYY-MM` is the current UTC month). The line is a
82
+ standard audit-log-v1 object with `input_kind: "orchestration"` and an
83
+ `orchestration` sub-object carrying this shape.
80
84
 
81
- **No hook or daemon required.** The agent writes the line directly —
82
- no-runtime-compatible capture path (decided 2026-06-30, maintainer decision; see
83
- `road-to-subagent-value-realization.md § Council notes`). Do NOT hand-author the
84
- JSON: run the recorder, which validates + builds a conformant line from the
85
- counts you already have:
85
+ **No hook or daemon required.** The agent writes the line directly — the
86
+ no-runtime-compatible capture path (decided 2026-06-30, maintainer decision;
87
+ see `road-to-subagent-value-realization.md § Council notes`). Do NOT
88
+ hand-author the JSON: run the recorder, which validates the inputs and builds a
89
+ conformant audit-log-v1 line from the counts you already have:
86
90
 
87
91
  ```bash
88
92
  ./scripts-run src/scripts/orchestration_record --spawn-count <n> \
89
93
  --token-delta <±n> --provenance measured|estimated \
90
94
  [--tier-chosen lite|medium|high] [--tier-source static|inferred|inherit] \
91
- [--task-class <id>] [--tiers a,b] [--dispatch-outcome DONE|BLOCKED|…]
95
+ [--task-class <id>] [--tiers a,b] [--dispatch-outcome DONE|BLOCKED|…] \
96
+ [--first-pass-success true|false] [--escalated true|false]
92
97
  ```
93
98
 
94
- A capture **hook** is the wrong tool: the PostToolUse payload carries no subagent
95
- token usage (only the orchestrator sees it) and a hook reverses the 2026-06-30
96
- no-hook decision. Reader: `src/scripts/orchestration_savings_report.ts`.
99
+ A capture **hook** is the wrong tool here: the PostToolUse payload carries no
100
+ subagent token usage — only the orchestrator sees it (via the run result) — and
101
+ a hook would reverse the 2026-06-30 no-hook decision. Reader:
102
+ `src/scripts/orchestration_savings_report.ts`.
97
103
 
98
104
  **`token_delta` sourcing priority:**
99
105
  1. Host-reported: read `usage.output_tokens` (and `usage.input_tokens` if
100
- available) from each subagent call's response metadata. Use the sum minus the
101
- estimated single-agent baseline. Set `token_delta_provenance: "measured"`.
102
- 2. Self-estimate fallback: host usage metadata unavailable → estimate from
106
+ available) from the response metadata of each subagent call. Use the sum
107
+ minus the estimated single-agent baseline. Set `token_delta_provenance:
108
+ "measured"`.
109
+ 2. Self-estimate fallback: if host usage metadata is unavailable, estimate from
103
110
  response length (chars / 4 ≈ tokens). Set `token_delta_provenance:
104
- "estimated"`. Lossy; measured always preferred.
111
+ "estimated"`. This estimate is lossy; measured is always preferred.
105
112
 
106
113
  ## Savings report
107
114
 
108
- Aggregate accumulated telemetry into a token-savings report:
115
+ Aggregate the accumulated telemetry into a token-savings report:
109
116
 
110
117
  ```bash
111
118
  ./scripts-run src/scripts/orchestration_savings_report [--dir <path>] [--format text|json]
112
119
  ```
113
120
 
114
- Sums `token_delta` across dispatches (negative = net saved); splits by
115
- provenance (measured vs estimated), `tier_chosen`, `task_class`. Reports
116
- **ABSOLUTE net tokens saved, never a percentage**: telemetry records net delta,
117
- not the absolute in-session baseline → "% of session saved" not derivable. A
118
- percentage needs an additive absolute-baseline field (deferred follow-up).
119
- Reader: [`src/scripts/_lib/orchestration_savings.ts`](../../../../src/scripts/_lib/orchestration_savings.ts).
121
+ It sums `token_delta` across dispatches (negative = net saved) and splits by
122
+ provenance (measured vs estimated), `tier_chosen`, and `task_class`. **Quality
123
+ and cost render as PAIRED columns** (council verdict — never savings alone):
124
+ `first_pass_success_rate` and `escalation_rate` aggregate over the lines that
125
+ carry the quality booleans; with ≥ 20 such lines in the window the real rates
126
+ render beside the savings figures, below 20 the quality columns render as
127
+ `n/a (n=<count>)`. It reports
128
+ **ABSOLUTE net tokens saved, never a percentage**: the telemetry records net
129
+ delta, not the absolute in-session baseline, so a "% of session saved" is not
130
+ derivable from this data. A percentage would require an additive
131
+ absolute-baseline field on this object (deferred follow-up). Reader:
132
+ [`src/scripts/_lib/orchestration_savings.ts`](../../../../src/scripts/_lib/orchestration_savings.ts).
120
133
 
121
134
  ## Related
122
135
 
@@ -88,6 +88,46 @@ redesign.
88
88
  - Treating an internal "honesty gate" or "stub" concern as licence to redesign the UI.
89
89
  - Re-running a redesign after the user already said "match the prototype".
90
90
 
91
+ ## Surgical visual edits
92
+
93
+ A request to change one visual thing — a colour, a label, a single element — is
94
+ a **targeted edit**, not a redesign licence. Apply the same
95
+ [`minimal-safe-diff`](minimal-safe-diff.md) discipline to design work that
96
+ backend edits have always owed.
97
+
98
+ - **Change only the semantic target.** Preserve the surrounding layout,
99
+ spacing, typography, dimensions, content, animation, and interaction states.
100
+ Do not rewrite the component, reflow the section, or "modernise" neighbours
101
+ while you are in there. (fixtures: `daf-edit-preservation`, `daf-unwanted-variations`.)
102
+ - **A broader redesign needs an explicit trigger.** Only phrases like *"new
103
+ direction"*, *"from scratch"*, *"make it feel premium"*, *"rework the flow"*,
104
+ or *"give me variations / options"* license a from-scratch rework. Absent such
105
+ a phrase, a "fix / change / update the X" request is surgical — when unsure
106
+ which, ask ([`ask-when-uncertain`](ask-when-uncertain.md)). (fixture: `daf-redesign-trigger`.)
107
+ - **Preserve stable anchors.** Where the host exposes DOM/comment metadata, keep
108
+ comment anchors and screen labels intact so the edit stays locatable. Where
109
+ the host has no such surface, preserve stable semantic anchors already present
110
+ in source comments / `data-*` attributes — never strip them, and do not invent
111
+ new ones.
112
+
113
+ ## Asset & imagery discipline
114
+
115
+ Visual artifacts carry **real assets or honest placeholders — never fabricated
116
+ brand evidence**. The design-surface instance of the no-invented-facts floor.
117
+
118
+ - **Copy owned assets through the project's accepted path.** Reference or copy
119
+ project-owned assets (logos, icons, fonts, images) via the target project's
120
+ asset directory/pipeline — never hotlink a design-system's internal URL, never
121
+ bulk-copy a huge source folder. (fixtures: `daf-missing-asset`, `daf-external-asset-url`.)
122
+ - **Real imagery where inspection matters.** On visual pages/decks, use actual
123
+ product / place / object / state imagery where the image IS the proof (a
124
+ product screenshot, a real dashboard state). Decorative atmosphere is not proof
125
+ — never pass a stock-like or invented image off as the real product. An
126
+ invented product screenshot is fabricated evidence. (fixture: `daf-invented-screenshot`.)
127
+ - **Icons follow the iconography floor** — no emoji-as-icon in serious UI, no
128
+ hand-rolled icon when a set exists; see
129
+ [`iconography`](../skills/iconography/SKILL.md) § Iconography floor.
130
+
91
131
  ## See also
92
132
 
93
133
  - [`brand-source-of-truth`](brand-source-of-truth.md) / [`brand-consistency`](brand-consistency.md) — same precedence shape, for registered brand tokens.
@@ -0,0 +1,61 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "2a"
4
+ description: "Financial data in a spreadsheet uses official sources first (IR, regulatory filings); aggregator/news/social figures need explicit permission + a cell-level unofficial mark"
5
+ triggers:
6
+ - keyword: "financial data"
7
+ - keyword: "financial model"
8
+ - keyword: "stock price"
9
+ - keyword: "revenue figures"
10
+ - keyword: "market data"
11
+ - phrase: "pull the numbers"
12
+ workspaces:
13
+ - finance
14
+ packs:
15
+ - finance-basic
16
+ ---
17
+
18
+ # Spreadsheet Source Quality
19
+
20
+ A financial figure is only as trustworthy as its source. A number typed into a
21
+ cell from an aggregator, a news headline, or a social post — entered as if it
22
+ were official — is a sourcing defect even when the number is right, because the
23
+ next reader cannot tell provenance from precision.
24
+
25
+ ## The Iron Law
26
+
27
+ ```
28
+ FINANCIAL DATA USES OFFICIAL SOURCES FIRST.
29
+ AN AGGREGATOR / NEWS / SOCIAL FIGURE IS NEVER ENTERED AS OFFICIAL —
30
+ IT NEEDS EXPLICIT USER PERMISSION AND A CELL-LEVEL "UNOFFICIAL" MARK.
31
+ EVERY SOURCED CELL CARRIES ITS SOURCE.
32
+ ```
33
+
34
+ ## Source priority (highest first)
35
+
36
+ 1. **Company investor relations** — the company's own IR site / filings.
37
+ 2. **Regulatory filings** — SEC (10-K/10-Q/8-K), or the equivalent exchange /
38
+ regulator filing in the jurisdiction.
39
+ 3. **Official reports / transcripts / earnings decks** — first-party.
40
+ 4. **Exchange / regulator data** — the exchange or regulator's own feed.
41
+
42
+ Aggregators, financial-news sites, analyst blogs, and social posts are **below
43
+ the floor**: use them only with the user's explicit permission, and mark the
44
+ cell unofficial (a cell comment: `unofficial — <source>, verify`).
45
+
46
+ ## When it fires
47
+
48
+ Entering, updating, or charting **financial figures** in a spreadsheet / model.
49
+
50
+ ## When NOT to fire
51
+
52
+ - Non-financial data (a product's own event counts, internal ops numbers the
53
+ user supplies) — no official-source obligation, but a source comment still helps.
54
+ - The user explicitly supplied the figures — trust the user's input; note the
55
+ provenance they gave.
56
+
57
+ ## See also
58
+
59
+ - [`spreadsheet-authoring`](../skills/spreadsheet-authoring/SKILL.md) — the spreadsheet surface floor this rule's sourcing discipline plugs into.
60
+ - [`surface-agent-contracts`](../../docs/contracts/surface-agent-contracts.md) — the spreadsheet surface's invariants + truth source.
61
+ - [`finance-safety-floor`](finance-safety-floor.md) — the finance-pack advisory floor (not-investment-advice, sensitivity) this complements.
@@ -0,0 +1,15 @@
1
+ {
2
+ "skill": "accessibility-auditor",
3
+ "_calibration": "Behavioural fixtures (road-to-skill-eval-coverage Phase 2, rich set). Deterministic `contains` asserts a real WCAG audit property (the standard is cited); finding_floor n=2 is a conservative floor (an icon-button with no name + a placeholder-only input surface ≥2 issues), not a calibrated per-host number; the rubric names the specific missing control as a pinned-judge known-limit.",
4
+ "scenarios": [
5
+ {
6
+ "id": "audit-icon-button-and-placeholder-input",
7
+ "prompt": "Audit this UI for accessibility and list each issue as its own bullet point:\n```html\n<button onclick=\"save()\"><svg width=\"16\" height=\"16\"></svg></button>\n<input type=\"text\" placeholder=\"Email address\">\n```",
8
+ "assertions": [
9
+ { "kind": "finding_floor", "n": 2, "pattern": "(?m)^\\s*[-*+]\\s+" },
10
+ { "kind": "contains", "value": "WCAG" },
11
+ { "kind": "rubric", "criterion": "Names the icon-only button's missing accessible name (aria-label / visible label) AND the placeholder-not-a-label problem on the input." }
12
+ ]
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "skill": "analysis-skill-router",
3
+ "_calibration": "Behavioural fixtures (road-to-skill-eval-coverage Phase 2, router set). Deterministic `contains` asserts the router picks the NARROWEST matching project-analysis-* skill (the whole routing contract) — a mis-route names the wrong or a generic skill.",
4
+ "scenarios": [
5
+ {
6
+ "id": "route-laravel-slow-queries",
7
+ "prompt": "Analyze why our Laravel app's database queries are slow. Which analysis skill should handle this?",
8
+ "assertions": [
9
+ { "kind": "contains", "value": "project-analysis-laravel" }
10
+ ]
11
+ }
12
+ ]
13
+ }
@@ -20,7 +20,7 @@ contract validation, response structure checks, or external service mocking.
20
20
 
21
21
  1. **Understand the endpoint** — Read the controller, form request, and existing tests. Understand expected behavior, edge cases, and auth requirements before writing anything.
22
22
  2. **Set up test data** — Use seeders (preferred) or factories. Mock external services with `Http::fake()`.
23
- 3. **Write test cases** — Cover success, validation errors, authorization failures, edge cases.
23
+ 3. **Enumerate test cases** — Run the [`test-case-discovery`](../test-case-discovery/SKILL.md) funnel first; cover success, validation errors, authorization failures, and edge cases — floor per behavior: 1 happy + 1 boundary + 1 error (+1 abuse case; on data-returning endpoints the three `broken-access-control` negative tests are mandatory).
24
24
  4. **Assert response** — Check status code, JSON structure, data values. Use `assertJsonStructure()`.
25
25
  5. **Verify** — Run the test. Must pass. Check no flaky assertions (no time-dependent, no random ordering).
26
26
 
@@ -155,6 +155,8 @@ expect($data['title'])->toBeString();
155
155
  expect($data['total'])->toBeString(); // Money as string, not float
156
156
  ```
157
157
 
158
+ ### Filter noisy responses
159
+
158
160
  When a failing test dumps the full JSON body, narrow the diagnosis with `jq` or `grep`
159
161
  instead of scrolling the whole payload:
160
162
 
@@ -193,6 +195,10 @@ it('handles external API failure gracefully', function () {
193
195
  | **Side effects** | Database changes, events dispatched, jobs queued |
194
196
  | **Edge cases** | Empty results, large payloads, concurrent access |
195
197
 
198
+ ## Bridge to UI verification
199
+
200
+ API tests cover the contract layer. When an endpoint feeds a UI surface (Livewire component, Blade-rendered page, SPA route), complement the API test with a thin UI probe: a `livewire test` for wired components, or a Playwright spec / browser `screenshot` for the rendered shell. Never assume the UI works just because the API test is green.
201
+
196
202
  ## Output format
197
203
 
198
204
  1. Pest test file covering happy path, validation, auth, and edge cases
@@ -220,3 +226,11 @@ it('handles external API failure gracefully', function () {
220
226
  - Do not skip auth tests — always test both authenticated and unauthenticated.
221
227
  - Do not assert entire JSON responses — assert only meaningful fields.
222
228
  - Do not use `Http::fake()` without also testing the real integration path.
229
+
230
+ ## Anti-bruteforce — diagnose before retry
231
+
232
+ When a test fails, do not retry blindly with tweaked assertions until something passes. Diagnose the root cause first: print the actual response shape once, compare it to the contract, then write a targeted fix. Trial-and-error retries hide real regressions.
233
+
234
+ ## Clarification guard — ambiguous contract → ask
235
+
236
+ If the endpoint contract is ambiguous (unclear status code, optional fields, error envelope shape), do not assume. Ask the user or check the OpenAPI spec / route definition before writing assertions — never guess the response shape from the route name.
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "character-consistency",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "keep-character-consistent",
7
+ "prompt": "Keep this recurring character consistent across a multi-scene story.",
8
+ "assertions": [
9
+ {
10
+ "kind": "rubric",
11
+ "criterion": "Pins a character bible (traits, voice, visual anchors) and checks each scene against it, flagging drift — not re-inventing per scene."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "skill": "command-routing",
3
+ "_calibration": "Behavioural fixtures (road-to-skill-eval-coverage Phase 2, router set). Deterministic `contains` asserts the invocation routes to the matching command (its file/path) rather than improvising — a mis-route runs the wrong command or reinvents it.",
4
+ "scenarios": [
5
+ {
6
+ "id": "route-create-pr",
7
+ "prompt": "I typed /create-pr — what runs, and which command file governs it?",
8
+ "assertions": [
9
+ { "kind": "contains", "value": "create-pr" },
10
+ { "kind": "rubric", "criterion": "Routes to the create-pr command file (commands/pr/create) and follows it rather than improvising a PR-creation flow." }
11
+ ]
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "dashboard-design",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "design-metrics-dashboard",
7
+ "prompt": "Design a metrics dashboard for our SaaS ops team.",
8
+ "assertions": [
9
+ {
10
+ "kind": "rubric",
11
+ "criterion": "Leads with the decisions the viewer must make, groups metrics by that, uses the right chart per data shape, and avoids vanity metrics."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "skill": "dcf-modeling",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "dcf-terminal-value-and-sensitivity",
7
+ "prompt": "DCF this target: year-6 FCFF $108M, WACC 10%, terminal growth 2%, net debt $200M. Give enterprise + equity value and the discount-rate sensitivity.",
8
+ "assertions": [
9
+ {
10
+ "kind": "contains",
11
+ "value": "WACC"
12
+ },
13
+ {
14
+ "kind": "rubric",
15
+ "criterion": "Computes Gordon terminal value = FCFF_{n+1}/(WACC−g) = 108/0.08 = 1350, bridges EV→equity via net debt, and includes a WACC/terminal-growth sensitivity grid — never a single point estimate."
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "skill": "decision-record",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "record-adr",
7
+ "prompt": "Record our decision to adopt Postgres over MySQL as an ADR.",
8
+ "assertions": [
9
+ {
10
+ "kind": "contains",
11
+ "value": "Consequences"
12
+ },
13
+ {
14
+ "kind": "rubric",
15
+ "criterion": "Uses the ADR shape — Status / Context / Decision / Consequences / Alternatives — and states the trade-off given up, not only the choice."
16
+ }
17
+ ]
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "skill": "design-intelligence",
3
+ "_calibration": "Behavioural fixtures (road-to-skill-eval-coverage Phase 2, rich set). Deterministic `contains` asserts the WCAG-checked-token property the skill promises; the rubric (pinned-judge known-limit) checks the corpus-grounding — a grounded brief names a concrete style/palette/type decision, not arbitrary taste.",
4
+ "scenarios": [
5
+ {
6
+ "id": "grounded-brief-fintech-dashboard",
7
+ "prompt": "Give me a grounded design brief (style, color tokens, typography, layout pattern) for a serious fintech analytics dashboard. Justify the palette's contrast.",
8
+ "assertions": [
9
+ { "kind": "contains", "value": "WCAG" },
10
+ { "kind": "rubric", "criterion": "Selects a concrete named style/archetype + a specific palette and type pairing grounded in the design corpus (not arbitrary), and states at least one anti-pattern to avoid." }
11
+ ]
12
+ }
13
+ ]
14
+ }
@@ -13,6 +13,12 @@ packs:
13
13
 
14
14
  ## When to use
15
15
 
16
+ > **Render-verification gate.** A UI verdict is gated on the
17
+ > [design-artifact verification checklist](../../../docs/contracts/design-artifact-verification.md#verification-checklist):
18
+ > where render capability exists, do not pass a design task without render
19
+ > evidence (checklist steps 1–5); where it is absent, scope the verdict to what
20
+ > was statically checked and say so — never "looks good" without evidence.
21
+
16
22
  Use this skill when:
17
23
  - Reviewing pull requests with UI changes
18
24
  - Auditing frontend components for design quality
@@ -276,6 +276,27 @@ Fidelity declaration is load-bearing: hi-fi vs lo-fi tells the dev whether to
276
276
  recreate the mockup pixel-for-pixel or apply the existing system — the single
277
277
  most common handoff ambiguity.
278
278
 
279
+ ## Design-system extraction floor
280
+
281
+ When the goal is to extract this repo's design system as a **reusable package
282
+ artifact** (not just DESIGN.md prose), the extraction meets this floor — the
283
+ handoff shape emitted alongside `design-system.json`
284
+ ([import contract](reference/design-system-json.md)).
285
+
286
+ - **Contract contents.** A complete extraction carries: a root guide / manifest;
287
+ token CSS (or the stack's equivalent); the typography / colour / spacing /
288
+ iconography foundations; component specimens; an asset inventory (logos, icons,
289
+ fonts); UI-kit screens; and starting-point templates where appropriate.
290
+ - **Specimen granularity.** Many small foundation cards beat one dense dump —
291
+ each specimen demonstrates ONE reusable sub-concept (a single button state,
292
+ one spacing step, one elevation level), so a consumer lifts concepts
293
+ individually rather than parsing a monolith.
294
+ - **Developer handoff bundle** (extends § Design→dev handoff README): a
295
+ high-fidelity reference, behaviour notes, the assets list, the component
296
+ mapping (design name → code component), responsive states, known caveats, and
297
+ — when the artifact is a mock — an explicit "prototype, not production code"
298
+ warning so a consumer never ships the reference verbatim.
299
+
279
300
  ## Gotcha
280
301
 
281
302
  - **Over-writing instead of diff-updating** — the most common failure.
@@ -0,0 +1,15 @@
1
+ {
2
+ "skill": "design-system-capture",
3
+ "_calibration": "Behavioural fixtures (road-to-skill-eval-coverage Phase 2, rich set). Deterministic `contains` asserts the two artifacts the skill's contract maintains (DESIGN.md + PRODUCT.md); the rubric checks it captures decisions rather than re-describing generic guidance.",
4
+ "scenarios": [
5
+ {
6
+ "id": "capture-from-repo",
7
+ "prompt": "Capture this project's design system so future sessions stay consistent: it uses a 4px spacing grid, 8px radius, a spring motion strategy, and a blue primary. Where do these decisions go?",
8
+ "assertions": [
9
+ { "kind": "contains", "value": "DESIGN.md" },
10
+ { "kind": "contains", "value": "PRODUCT.md" },
11
+ { "kind": "rubric", "criterion": "Routes the visual decisions (spacing/radius/motion/color) into DESIGN.md and interaction patterns into PRODUCT.md, and flags any TBD rather than inventing values." }
12
+ ]
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "developer-like-execution",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "execute-like-dev",
7
+ "prompt": "Implement this small change end-to-end the way a senior would.",
8
+ "assertions": [
9
+ {
10
+ "kind": "rubric",
11
+ "criterion": "Reads before editing, keeps the diff minimal + scoped, updates downstream callers/tests, and verifies with a real run before claiming done."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -13,6 +13,12 @@ packs:
13
13
 
14
14
  ## When to use
15
15
 
16
+ > **Cross-surface handoff.** When this document consumes upstream work (research
17
+ > → document, spreadsheet → report), read the handoff envelope from
18
+ > [`surface-agent-contracts`](../../../docs/contracts/surface-agent-contracts.md#cross-surface-handoff-envelope):
19
+ > trust `verification_already_done`, honour source restrictions, and don't
20
+ > re-fetch what the source already grounded.
21
+
16
22
  Use this skill when:
17
23
 
18
24
  * User starts a substantial writing task — PRD, RFC, design doc, decision doc, technical spec, proposal
@@ -40,6 +46,27 @@ Move from a fuzzy ask to a complete document the user owns, by:
40
46
  * `save-file` and `str-replace-editor` available
41
47
  * Target path and filename agreed up front
42
48
 
49
+ ## Document format & export floor
50
+
51
+ The document surface's floor (per
52
+ [`surface-agent-contracts`](../../../docs/contracts/surface-agent-contracts.md)):
53
+
54
+ - **Choose the format by intent.** Markdown vs `.docx` vs PDF follows what the
55
+ user will DO with it — when a named format is requested, produce THAT format
56
+ via the document tooling; never silently substitute markdown for a `.docx`
57
+ request. (fixture: `ssac-docx-requested-markdown-only`.)
58
+ - **Preserve edit scope.** On an edit, change only what was asked and preserve
59
+ the rest of the document (mirrors
60
+ [`minimal-safe-diff`](../../rules/minimal-safe-diff.md)).
61
+ - **Print/PDF preserves selectable text.** Never rasterize a text-heavy document
62
+ to an image-only PDF when browser print or native export keeps the text
63
+ selectable. (fixture: `ssac-pdf-screenshot-rasterized`.)
64
+ - **Verify the output opens/exports.** Confirm the generated file opens /
65
+ round-trips
66
+ ([`design-artifact-verification`](../../../docs/contracts/design-artifact-verification.md));
67
+ where the format's tooling is absent, ship the source + say what could not be
68
+ verified rather than claiming a produced file.
69
+
43
70
  ## Procedure
44
71
 
45
72
  ### 0. Inspect existing material
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "doc-coauthoring",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "coauthor-prd",
7
+ "prompt": "Help me write the PRD for our new onboarding flow.",
8
+ "assertions": [
9
+ {
10
+ "kind": "rubric",
11
+ "criterion": "Runs the 3-stage flow — context → section-by-section → reader-test — rather than dumping a full doc; asks for the missing context first."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "editorial-calendar",
3
+ "domain": "content",
4
+ "_note": "Rubric domain-truth fixture (road-to-domain-soundness Phase 2, rubric target). The criterion names a CITED EXTERNAL practice/standard — NOT the skill's own output (blocker: domain-competence-for-answer-keys, option a). Authored as a maintainer-RATIFICATION CANDIDATE: rubric is NON-deterministic (pinned-judge known-limit); the Phase-3 run + --write-floor ratchet-pin + per-domain backed-CLAIMS remain the maintainer's gate.",
5
+ "cases": [
6
+ {
7
+ "id": "matches-content-pillar-practice",
8
+ "scenario": "Plan a content calendar for next quarter for our developer-tools blog.",
9
+ "source": "The content-pillar + audience-goal-cadence editorial-planning practice (standard content strategy).",
10
+ "check": {
11
+ "kind": "rubric",
12
+ "criterion": "Matches the content-pillar practice: themes tied to a named audience + a stated goal, an explicit publishing cadence, and pieces sequenced with dependencies - not a random list of topics."
13
+ }
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "editorial-calendar",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "plan-content-calendar",
7
+ "prompt": "Plan a content calendar for next quarter for our dev-tools blog.",
8
+ "assertions": [
9
+ {
10
+ "kind": "rubric",
11
+ "criterion": "Grounds cadence + themes in a named audience + goal, sequences pieces with dependencies, not a random topic list."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "skill": "estimate-ticket",
3
+ "_calibration": "Behavioural fixture (road-to-skill-eval-coverage Phase 2, default-surface). Deterministic assertions on a real output property where reliable; rubric pins the qualitative core as a known-limit (pass ratified in PR review, not a hidden judge). finding_floor n is a conservative floor, not a calibrated per-host number.",
4
+ "scenarios": [
5
+ {
6
+ "id": "estimate-ticket",
7
+ "prompt": "Estimate this ticket: add CSV export to the reports page.",
8
+ "assertions": [
9
+ {
10
+ "kind": "rubric",
11
+ "criterion": "Estimates from decomposed work + named unknowns/risks; gives a range or points, and does NOT invent a wall-clock duration."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }