@event4u/agent-config 9.12.0 → 9.14.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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +110 -238
- package/README.md +1 -1
- package/dist/agent-src/commands/optimize/deep.md +147 -0
- package/dist/agent-src/commands/optimize.md +12 -6
- package/dist/agent-src/rules/active-remediation.md +0 -2
- package/dist/agent-src/rules/architecture.md +0 -1
- package/dist/agent-src/rules/artifact-drafting-protocol.md +0 -4
- package/dist/agent-src/rules/autonomous-execution.md +1 -2
- package/dist/agent-src/rules/broken-access-control.md +0 -2
- package/dist/agent-src/rules/code-comment-discipline.md +0 -3
- package/dist/agent-src/rules/code-provenance.md +0 -3
- package/dist/agent-src/rules/communication-through-line.md +2 -3
- package/dist/agent-src/rules/content-quoting-floor.md +0 -2
- package/dist/agent-src/rules/context-hygiene.md +1 -3
- package/dist/agent-src/rules/decision-revisit-gate.md +0 -2
- package/dist/agent-src/rules/design-fidelity.md +29 -0
- package/dist/agent-src/rules/domain-adoption-policy.md +0 -3
- package/dist/agent-src/rules/downstream-changes.md +10 -1
- package/dist/agent-src/rules/external-reference-deep-dive.md +0 -7
- package/dist/agent-src/rules/fast-path-marker-visibility.md +0 -1
- package/dist/agent-src/rules/git-history-discipline.md +0 -7
- package/dist/agent-src/rules/guidelines.md +0 -2
- package/dist/agent-src/rules/improve-before-implement.md +4 -2
- package/dist/agent-src/rules/invite-challenge.md +0 -4
- package/dist/agent-src/rules/linked-projects-onboarding-gate.md +0 -2
- package/dist/agent-src/rules/markdown-safe-codeblocks.md +0 -1
- package/dist/agent-src/rules/minimal-safe-diff.md +2 -2
- package/dist/agent-src/rules/missing-tool-handling.md +0 -1
- package/dist/agent-src/rules/no-attribution-footers.md +0 -3
- package/dist/agent-src/rules/no-decorative-emojis-in-git-surfaces.md +8 -5
- package/dist/agent-src/rules/no-pr-progress-comments.md +1 -3
- package/dist/agent-src/rules/no-roadmap-references.md +0 -2
- package/dist/agent-src/rules/output-discipline.md +0 -1
- package/dist/agent-src/rules/prefer-enums-over-literals.md +0 -2
- package/dist/agent-src/rules/preservation-guard.md +0 -3
- package/dist/agent-src/rules/role-mode-adherence.md +0 -1
- package/dist/agent-src/rules/secret-vcs-guard.md +0 -2
- package/dist/agent-src/rules/senior-engineering-discipline.md +0 -2
- package/dist/agent-src/rules/session-canary.md +0 -2
- package/dist/agent-src/rules/size-enforcement.md +0 -5
- package/dist/agent-src/rules/source-confidentiality.md +0 -3
- package/dist/agent-src/rules/source-discovery-gate.md +0 -2
- package/dist/agent-src/rules/think-before-action.md +3 -3
- package/dist/agent-src/rules/token-budget-discipline.md +0 -1
- package/dist/agent-src/rules/token-efficiency.md +1 -2
- package/dist/agent-src/rules/tool-safety.md +0 -1
- package/dist/agent-src/rules/user-interaction.md +0 -3
- package/dist/agent-src/rules/user-interrupt-priority.md +0 -1
- package/dist/agent-src/skills/agent-docs-writing/SKILL.md +8 -0
- package/dist/agent-src/skills/analysis-skill-router/SKILL.md +55 -86
- package/dist/agent-src/skills/character-consistency/SKILL.md +7 -4
- package/dist/agent-src/skills/decision-record/SKILL.md +8 -0
- package/dist/agent-src/skills/design-review/SKILL.md +11 -0
- package/dist/agent-src/skills/design-system-capture/reference/design-system-json.md +8 -0
- package/dist/agent-src/skills/existing-ui-audit/SKILL.md +34 -3
- package/dist/agent-src/skills/fe-design/SKILL.md +10 -0
- package/dist/agent-src/skills/motion-choreographer/SKILL.md +7 -4
- package/dist/agent-src/skills/overbuild-review-lens/SKILL.md +201 -0
- package/dist/agent-src/skills/performance/SKILL.md +14 -0
- package/dist/agent-src/skills/pixar-storyteller/SKILL.md +8 -5
- package/dist/agent-src/skills/scene-expander/SKILL.md +9 -6
- package/dist/agent-src/skills/supply-chain-intake/SKILL.md +10 -0
- package/dist/agent-src/skills/universal-project-analysis/SKILL.md +14 -37
- package/dist/agent-src/skills/video-director/SKILL.md +9 -6
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +154 -13
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/design.ts +118 -0
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +40 -0
- package/dist/agent-src/templates/scripts/work_engine/state.ts +55 -0
- package/dist/cli-delegate/{chunk-QFKQLQ7X.js → chunk-GCVFLBP2.js} +399 -365
- package/dist/cli-delegate/cmd_export.js +1 -1
- package/dist/cli-delegate/cmd_prune.js +1 -1
- package/dist/cli-delegate/cmd_settings_migrate.js +1 -1
- package/dist/cli-delegate/cmd_sync.js +1 -1
- package/dist/cli-delegate/cmd_uninstall.js +1 -1
- package/dist/cli-delegate/cmd_validate.js +1 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +123 -73
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +4 -4
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +10 -8
- package/dist/discovery/trust-report.md +3 -3
- package/dist/discovery/workspaces.json +8 -6
- package/dist/hooks/dispatch.js +174 -13
- package/dist/install/install.mjs +648 -614
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +783 -507
- package/dist/router.json +1 -1
- package/dist/scripts/condense.js +2 -2
- package/docs/MIGRATION.md +1 -1
- package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +71 -0
- package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +24 -1
- package/docs/guidelines/code-clarity.md +9 -2
- package/docs/guidelines/design-fidelity-mechanics.md +44 -0
- package/llms.txt +63 -27
- package/package.json +4 -4
- package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +154 -13
- package/src/agent-src/templates/scripts/work_engine/directives/ui/design.ts +118 -0
- package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +40 -0
- package/src/agent-src/templates/scripts/work_engine/state.ts +55 -0
- package/src/config/agent-settings.template.yml +8 -0
- package/src/scripts/_lib/counted_probe.ts +142 -0
- package/src/scripts/_lib/exec_evidence.ts +5 -0
- package/src/scripts/_lib/overbuild_lens_contract.ts +196 -0
- package/src/scripts/_lib/release_scope.ts +207 -0
- package/src/scripts/_lib/scoped_projection.ts +212 -0
- package/src/scripts/ai_council/stance_tally.ts +37 -2
- package/src/scripts/audit_auto_rules.ts +9 -9
- package/src/scripts/audit_likelihood.ts +3 -3
- package/src/scripts/audit_overlap.ts +2 -2
- package/src/scripts/audit_skill_overlap.ts +233 -95
- package/src/scripts/audit_skill_overlap_allowlist.json +4 -0
- package/src/scripts/build_proof.ts +15 -1
- package/src/scripts/check_artefact_count_messaging.ts +128 -15
- package/src/scripts/check_dependency_floors.ts +16 -6
- package/src/scripts/check_gate_coverage.ts +6 -6
- package/src/scripts/check_kernel_rule_bundle.ts +5 -4
- package/src/scripts/check_token_quality_golden.ts +0 -18
- package/src/scripts/code_graph/loader.ts +35 -6
- package/src/scripts/compile_router.ts +3 -8
- package/src/scripts/condense.ts +2 -2
- package/src/scripts/count_scoped_projection.ts +104 -0
- package/src/scripts/explain_run.ts +0 -1
- package/src/scripts/generate_pack_manifests.ts +3 -20
- package/src/scripts/hooks/block_kernel_rule_writes.ts +145 -10
- package/src/scripts/hooks/block_no_verify.ts +101 -0
- package/src/scripts/install.ts +13 -90
- package/src/scripts/lint_agent_security.ts +5 -4
- package/src/scripts/lint_framework_leakage_allowlist.json +2 -2
- package/src/scripts/lint_regression.ts +92 -1
- package/src/scripts/lint_skill_descriptions.ts +93 -5
- package/src/scripts/project_thin_rules.ts +2 -2
- package/src/scripts/release.ts +107 -3
- package/src/scripts/resolve_lint_scope.ts +53 -0
- package/src/scripts/router_telemetry.ts +0 -5
- package/src/scripts/runtime_dispatcher.ts +40 -0
- package/src/scripts/schemas/pack.schema.json +1 -5
- package/src/scripts/schemas/rule.schema.json +1 -2
- package/src/scripts/self_review_gate.ts +15 -73
- package/src/scripts/skill_linter.ts +160 -11
- package/src/scripts/sweep_dead_scan_roots.ts +550 -0
- package/src/scripts/trigger_coverage.ts +11 -37
- package/src/scripts/update_counts.ts +90 -11
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: high
|
|
3
|
+
name: overbuild-review-lens
|
|
4
|
+
description: "Use when a diff builds more than the task needs — code that should not exist, a dependency the platform already covers, or a clever form where a flat one reads better. Deletion-hunting, not quality."
|
|
5
|
+
personas:
|
|
6
|
+
- senior-engineer
|
|
7
|
+
domain: quality
|
|
8
|
+
workspaces:
|
|
9
|
+
- engineering
|
|
10
|
+
packs:
|
|
11
|
+
- engineering-base
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# overbuild-review-lens
|
|
15
|
+
|
|
16
|
+
> A deletion-hunting lens. It asks one question the other judges never
|
|
17
|
+
> ask: **should this code exist at all?** Sibling of
|
|
18
|
+
> [`architecture-review-lens`](../architecture-review-lens/SKILL.md) and
|
|
19
|
+
> the `judge-*` family — never overlaps with them.
|
|
20
|
+
|
|
21
|
+
## When to use
|
|
22
|
+
|
|
23
|
+
- A diff adds a helper, a wrapper, a config layer, an abstraction, or a
|
|
24
|
+
dependency.
|
|
25
|
+
- A rewrite, v2, or large refactor landed — the peak over-build context
|
|
26
|
+
(see [`minimal-safe-diff-mechanics`](../../../docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md)
|
|
27
|
+
§ The sanctioned-rewrite trap).
|
|
28
|
+
- A reviewer asks "is all of this needed?", "could the platform do
|
|
29
|
+
this?", or "why is this so clever?".
|
|
30
|
+
|
|
31
|
+
Do NOT use when:
|
|
32
|
+
|
|
33
|
+
- The concern is whether the code is **correct** — route to
|
|
34
|
+
[`judge-bug-hunter`](../judge-bug-hunter/SKILL.md).
|
|
35
|
+
- The concern is **security** — route to
|
|
36
|
+
[`judge-security-auditor`](../judge-security-auditor/SKILL.md).
|
|
37
|
+
- The concern is **naming, single-responsibility, or convention fit** of
|
|
38
|
+
code whose existence is not in question — route to
|
|
39
|
+
[`judge-code-quality`](../judge-code-quality/SKILL.md). That judge asks
|
|
40
|
+
*is this code malformed*; this lens asks *should it exist*.
|
|
41
|
+
- The concern is **performance** — route to
|
|
42
|
+
[`performance`](../performance/SKILL.md). Speed is out of scope here.
|
|
43
|
+
- The diff is documentation-only or formatting-only.
|
|
44
|
+
|
|
45
|
+
## The scope fence — read this before the first finding
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
CORRECTNESS, SECURITY AND PERFORMANCE ARE OUT OF SCOPE FOR THIS LENS.
|
|
49
|
+
THE MINIMUM RUNNABLE CHECK IS NEVER FLAGGED FOR DELETION.
|
|
50
|
+
A SIZE REDUCTION THAT DROPS A GUARD IS A LOSS, NOT A FINDING.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The measured failure mode this fence exists for: a bare "make it
|
|
54
|
+
simpler" critic was the only arm in a controlled comparison that dropped
|
|
55
|
+
a safety guard — the three lines it saved were a path-traversal check.
|
|
56
|
+
Tests, validation, authorization checks, tenant scoping, and error paths
|
|
57
|
+
that can actually occur are **not** over-build. If removing something
|
|
58
|
+
would reduce coverage of a real case, it is not a finding here.
|
|
59
|
+
|
|
60
|
+
## Procedure
|
|
61
|
+
|
|
62
|
+
### 1. Establish what the task actually asked for
|
|
63
|
+
|
|
64
|
+
Read the ticket / prompt, not just the diff. Over-build is measured
|
|
65
|
+
against the **requirement**, not against your taste. Anything the diff
|
|
66
|
+
adds beyond the requirement is a candidate; anything the requirement
|
|
67
|
+
demands is not, however large.
|
|
68
|
+
|
|
69
|
+
### 2. Walk each addition down the solution-size ladder
|
|
70
|
+
|
|
71
|
+
For every new unit (function, class, module, config key, dependency),
|
|
72
|
+
find the highest rung that would have carried it — see
|
|
73
|
+
[`agent-interaction-and-decision-quality`](../../../docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md)
|
|
74
|
+
§ 8b-ladder:
|
|
75
|
+
|
|
76
|
+
| Tag | Meaning | The evidence that makes it a finding |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| `delete:` | This should not exist at all | A fence line (see § 3) — mandatory |
|
|
79
|
+
| `stdlib:` | The language stdlib or framework already does it | Name the exact API and show it is equivalent |
|
|
80
|
+
| `native:` | The OS / runtime / browser / database already does it | Name the platform capability and its availability floor |
|
|
81
|
+
| `yagni:` | Built for a requirement nobody stated | Quote the requirement it exceeds |
|
|
82
|
+
| `shrink:` | Must exist, but smaller | Name the lines that carry no requirement |
|
|
83
|
+
| `flatten:` | Must exist, but in a **simpler form** | Name the cognitive cost, not the line count |
|
|
84
|
+
|
|
85
|
+
`flatten:` is the shape-axis inverse of `shrink:` — same logic, simpler
|
|
86
|
+
form, **even when that costs a line or two**. Without it the lens only
|
|
87
|
+
ever argues downward and becomes a golfing engine. A nested ternary
|
|
88
|
+
replaced by an `if` block is a valid `flatten:` finding even though the
|
|
89
|
+
diff grows.
|
|
90
|
+
|
|
91
|
+
### 3. Every `delete:` carries a fence line — no exceptions
|
|
92
|
+
|
|
93
|
+
Chesterton's Fence, operationalised. Agents are documented as
|
|
94
|
+
especially fence-blind: complex code reads as an invitation to simplify
|
|
95
|
+
when the complexity may exist for a reason the reader has no context
|
|
96
|
+
for. This does not restate
|
|
97
|
+
[`minimal-safe-diff`](../../../src/rules/minimal-safe-diff.md)'s "never
|
|
98
|
+
delete code that *looks* dead without proof" — it is the output contract
|
|
99
|
+
that makes the proof visible.
|
|
100
|
+
|
|
101
|
+
The fence line has three fields, all required:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Fence: why=<why the code existed — blame, test, issue, or "unknown">
|
|
105
|
+
safe=<the evidence that removal is safe>
|
|
106
|
+
covered=<yes|no|partial — was the removed path under test?>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- `why=unknown` is a legal value and it is **not** a pass. It downgrades
|
|
110
|
+
the finding to a question for the author, never an instruction.
|
|
111
|
+
- `covered=` is the one machine-checkable input to an otherwise
|
|
112
|
+
archaeological judgement (the Beyoncé rule: if you liked it, you put a
|
|
113
|
+
test on it). Deleting *tested* behaviour trips a test and is visible;
|
|
114
|
+
deleting *untested* behaviour breaks silently — so `covered=no` is
|
|
115
|
+
surfaced as **higher** risk, not as equivalent.
|
|
116
|
+
|
|
117
|
+
### 4. Emit the null when there is nothing to cut
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
A LENS THAT CANNOT SAY "NOTHING TO CUT" IS A FINDING GENERATOR.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
A lean diff must produce the honest null, not an invented finding. This
|
|
124
|
+
is the load-bearing output, not a fallback: a reviewer who sees findings
|
|
125
|
+
on every diff stops reading them.
|
|
126
|
+
|
|
127
|
+
### 5. Validate before emitting
|
|
128
|
+
|
|
129
|
+
- Every finding has a `file:line` and exactly one tag from § 2.
|
|
130
|
+
- Every `delete:` has all three fence fields.
|
|
131
|
+
- No finding restates a correctness, security, or performance concern.
|
|
132
|
+
- The net-lines summary counts `flatten:` findings honestly, including
|
|
133
|
+
the ones that **add** lines.
|
|
134
|
+
- Zero findings → emit the null block, not an empty issues list.
|
|
135
|
+
|
|
136
|
+
## Output format
|
|
137
|
+
|
|
138
|
+
The verdict block carries these ordered fields:
|
|
139
|
+
|
|
140
|
+
1. `Lens:` — fixed value `overbuild-review-lens`
|
|
141
|
+
2. `Target:` — the diff range or file set reviewed
|
|
142
|
+
3. `Verdict:` — exactly one of `lean` / `trim` / `overbuilt`
|
|
143
|
+
4. `Findings:` — one line per finding: tag, `file:line`, one sentence;
|
|
144
|
+
`delete:` findings carry their `Fence:` line directly beneath
|
|
145
|
+
5. `Net:` — lines removable if every finding is applied, stated as a
|
|
146
|
+
signed number so a line-adding `flatten:` is visible
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
Lens: overbuild-review-lens
|
|
150
|
+
Target: <branch / diff range>
|
|
151
|
+
|
|
152
|
+
Verdict: lean | trim | overbuilt
|
|
153
|
+
|
|
154
|
+
Findings:
|
|
155
|
+
1. stdlib: src/util/uuid.ts:1 Hand-rolled v4 generator; crypto.randomUUID covers it.
|
|
156
|
+
2. delete: src/config/flags.ts:12 Flag read by nothing since the feature shipped.
|
|
157
|
+
Fence: why=guarded the 2026-03 rollout safe=zero readers, grep clean covered=no
|
|
158
|
+
3. flatten: src/parser.ts:88 Nested ternary; an if/else reads flat (+2 lines).
|
|
159
|
+
|
|
160
|
+
Net: -34 lines
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
The null, when there is nothing to cut — emit verbatim, do not
|
|
164
|
+
paraphrase:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
Lens: overbuild-review-lens
|
|
168
|
+
Target: <branch / diff range>
|
|
169
|
+
|
|
170
|
+
Verdict: lean
|
|
171
|
+
|
|
172
|
+
Findings: none — nothing in this diff exceeds the stated requirement.
|
|
173
|
+
|
|
174
|
+
Net: 0 lines
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Gotcha
|
|
178
|
+
|
|
179
|
+
- **The requirement is the yardstick, not your preference.** A large
|
|
180
|
+
diff that the ticket demanded is not over-built. Say so and emit the
|
|
181
|
+
null.
|
|
182
|
+
- **`covered=no` makes a deletion riskier, not more attractive.** The
|
|
183
|
+
absence of a test is the absence of a tripwire.
|
|
184
|
+
- **A `flatten:` finding that saves lines is suspicious.** If it is
|
|
185
|
+
shorter *and* simpler it is probably a `shrink:`; `flatten:` exists
|
|
186
|
+
for the cases where simplicity costs length.
|
|
187
|
+
- **Never flag the minimum runnable check.** One happy-path test is not
|
|
188
|
+
over-build; it is the floor.
|
|
189
|
+
- **Do not count `delete:` lines that git already removed.** The net
|
|
190
|
+
figure is about the diff as proposed, not the diff's own deletions.
|
|
191
|
+
|
|
192
|
+
## Do NOT
|
|
193
|
+
|
|
194
|
+
- Do NOT emit a `delete:` finding without all three fence fields — the
|
|
195
|
+
output contract rejects it.
|
|
196
|
+
- Do NOT invent a finding to avoid an empty report.
|
|
197
|
+
- Do NOT review correctness, security, or performance — other surfaces
|
|
198
|
+
own those, and a size argument against a guard is the canonical
|
|
199
|
+
failure this lens is fenced against.
|
|
200
|
+
- Do NOT report a size number as a score. A size metric is a
|
|
201
|
+
measurement, never a target.
|
|
@@ -28,6 +28,20 @@ Do NOT use when:
|
|
|
28
28
|
3. Check for N+1 queries on list endpoints.
|
|
29
29
|
4. Search for existing cache services in the project.
|
|
30
30
|
|
|
31
|
+
**Performance complexity is a claim, and a claim needs evidence.** No cache
|
|
32
|
+
layer, no denormalised column, no materialised view, no read replica ships on
|
|
33
|
+
"this will be slow" — it ships on a profile, a query log, or a timing that names
|
|
34
|
+
the bottleneck. The added complexity is permanent (invalidation bugs, stale
|
|
35
|
+
reads, a second source of truth); the speedup is hypothetical until measured.
|
|
36
|
+
State the measurement in the change, or do not add the mechanism.
|
|
37
|
+
|
|
38
|
+
**Carve-out — this does not override the `scale-discipline` floor.** Where that
|
|
39
|
+
pack is installed, R-A2 *mandates* an index on every FK and every WHERE / ORDER
|
|
40
|
+
BY column, and R-A4 governs duplicated data by waiver. Those are structural
|
|
41
|
+
defaults that ship with the query, not optimisations awaiting a profiler; the
|
|
42
|
+
evidence gate above applies to *added mechanisms* (caches, denormalisation,
|
|
43
|
+
replicas, bespoke indexes beyond parity), never to the floor's baseline.
|
|
44
|
+
|
|
31
45
|
### Step 1: Apply the right fix
|
|
32
46
|
|
|
33
47
|
| Bottleneck | Fix |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
model_tier: inherit
|
|
3
3
|
name: pixar-storyteller
|
|
4
|
-
description: "Use when
|
|
4
|
+
description: "Use when an idea becomes a Pixar-style animation prompt — character sheet, scene, image, video; emotional beat, want, obstacle. Triggers 'Pixar prompt', 'animated scene'. Live-action → video-director."
|
|
5
5
|
domain: product
|
|
6
6
|
workspaces:
|
|
7
7
|
- small-business
|
|
@@ -119,12 +119,15 @@ Any "no" → revise that block.
|
|
|
119
119
|
|
|
120
120
|
## Policies
|
|
121
121
|
|
|
122
|
+
Paths, enforcement model, and the full set: the
|
|
123
|
+
[media policy preamble](../../../agents/settings/policies/media/README.md).
|
|
124
|
+
|
|
122
125
|
The Pixar-storyteller skill anchors prompts to named films and studios by design — the policy surface is the largest in the video cluster:
|
|
123
126
|
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
127
|
+
- **`style`** — naming a film + year as the *primary* anchor crosses the "in the style of [STUDIO]" trigger; surface and refuse without a transformative-intent rationale.
|
|
128
|
+
- **`likeness`** — when a beat references a named animator's signature character (real-person extension of style).
|
|
129
|
+
- **`public-figures`** — when the storyteller's character is a recognised public figure rendered in Pixar shape.
|
|
130
|
+
- **`disclosure`** — every Pixar-style output ships with the AI-generation disclosure; parody / commentary cases are flagged for human review.
|
|
128
131
|
|
|
129
132
|
Refuse-and-surface when style ⇒ primary signature, not one influence among several.
|
|
130
133
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
model_tier: inherit
|
|
3
3
|
name: scene-expander
|
|
4
|
-
description: "Use when expanding a one-line idea into the 12-block Cinematic Scene Blueprint —
|
|
4
|
+
description: "Use when expanding a one-line idea into the 12-block Cinematic Scene Blueprint — optional dialogue + ambient. Triggers 'expand this scene', 'blueprint for X'. 11-block refine → video-director."
|
|
5
5
|
personas:
|
|
6
6
|
- hollywood-director
|
|
7
7
|
domain: product
|
|
@@ -146,13 +146,16 @@ Any "no" → revise that block.
|
|
|
146
146
|
|
|
147
147
|
## Policies
|
|
148
148
|
|
|
149
|
+
Paths, enforcement model, and the full set: the
|
|
150
|
+
[media policy preamble](../../../agents/settings/policies/media/README.md).
|
|
151
|
+
|
|
149
152
|
The 12-block Cinematic Scene Blueprint is the policy choke point — every downstream skill (`motion-choreographer`, `video-director`) inherits whatever the blueprint encodes. Before emitting:
|
|
150
153
|
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
154
|
+
- **`likeness`** — when the SUBJECT block names or visually identifies a real person.
|
|
155
|
+
- **`public-figures`** — when the SUBJECT block is a recognised public figure.
|
|
156
|
+
- **`brand-impersonation`** — when STYLE / ENVIRONMENT references a recognised brand's visual identity.
|
|
157
|
+
- **`style`** — when STYLE anchors to a named living artist or studio as the primary signature.
|
|
158
|
+
- **`disclosure`** — every distributed blueprint output carries the AI-generation disclosure downstream.
|
|
156
159
|
|
|
157
160
|
Refuse-and-surface at the blueprint layer; do not push policy questions down to the adapter.
|
|
158
161
|
|
|
@@ -32,6 +32,16 @@ PIN IT, LOCK IT, CVE-SCAN IT. NEVER PIPE A REMOTE SCRIPT STRAIGHT TO A SHELL.
|
|
|
32
32
|
|
|
33
33
|
## Procedure — intake gate (run in order before adding a dependency)
|
|
34
34
|
|
|
35
|
+
0. **Do you need a dependency at all?** The cheapest supply-chain risk is the
|
|
36
|
+
one never taken. Walk the rungs above "installed dependency" first — is it
|
|
37
|
+
already in the tree (`npm ls <pkg>`, `composer show`, `pip list`), does the
|
|
38
|
+
stdlib or framework carry it, does the **platform** already do it
|
|
39
|
+
(`crypto.randomUUID` before a uuid package, `Intl` before a formatting
|
|
40
|
+
library, `AbortSignal.timeout` before a timeout helper, the database's own
|
|
41
|
+
full-text / JSON support before an application-side index)? Full ordering:
|
|
42
|
+
[`agent-interaction-and-decision-quality` § 8b-ladder](../../../docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md).
|
|
43
|
+
A dependency added for something already present is permanent cost — install
|
|
44
|
+
surface, CVE surface, upgrade surface — bought against a capability you had.
|
|
35
45
|
1. **Existence** — confirm the exact string resolves on the real registry, published before your session and with real usage:
|
|
36
46
|
```bash
|
|
37
47
|
npm view <pkg> version # non-zero exit = does not exist (hallucination)
|
|
@@ -31,15 +31,11 @@ Do NOT use when:
|
|
|
31
31
|
|
|
32
32
|
## Mission
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* identify the stack and framework
|
|
40
|
-
* choose the correct analysis mode
|
|
41
|
-
* route to the right specialist analysis skills
|
|
42
|
-
* define the required output for broad project investigations
|
|
34
|
+
Run the deep multi-pass audit itself, and hand each pass to the right
|
|
35
|
+
specialist. Picking *which* skill a request needs in the first place belongs to
|
|
36
|
+
[`analysis-skill-router`](../analysis-skill-router/SKILL.md) — that chooser and
|
|
37
|
+
this orchestrator are deliberately separate files, and the scope test, the
|
|
38
|
+
detection step, and the decision table live there, not here.
|
|
43
39
|
|
|
44
40
|
This skill must NOT become:
|
|
45
41
|
|
|
@@ -88,9 +84,9 @@ Goal: identify hot paths, find expensive boundaries, route into architecture or
|
|
|
88
84
|
|
|
89
85
|
### 1. Confirm scope
|
|
90
86
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
Invoked through the router, this is already settled — proceed. Invoked
|
|
88
|
+
directly, apply the router's scope test before spending a multi-pass audit on
|
|
89
|
+
something a specialist covers.
|
|
94
90
|
|
|
95
91
|
### 2. Discover the project
|
|
96
92
|
|
|
@@ -128,36 +124,17 @@ Check:
|
|
|
128
124
|
* uncertainties are marked
|
|
129
125
|
* conclusions are evidence-based
|
|
130
126
|
|
|
131
|
-
##
|
|
132
|
-
|
|
133
|
-
### Universal analysis skills
|
|
134
|
-
|
|
135
|
-
* `project-analysis-core`
|
|
136
|
-
* `project-analysis-hypothesis-driven`
|
|
137
|
-
|
|
138
|
-
### Framework-specific deep dives
|
|
139
|
-
|
|
140
|
-
* `project-analysis-laravel`
|
|
141
|
-
* `project-analysis-symfony`
|
|
142
|
-
* `project-analysis-zend-laminas`
|
|
143
|
-
* `project-analysis-node-express`
|
|
144
|
-
* `project-analysis-react`
|
|
145
|
-
* `project-analysis-nextjs`
|
|
146
|
-
|
|
147
|
-
### Optional downstream specialists
|
|
148
|
-
|
|
149
|
-
* `bug-analyzer`
|
|
150
|
-
* `performance-analysis`
|
|
151
|
-
* `security-audit`
|
|
152
|
-
|
|
153
|
-
### Ingestion preprocessor
|
|
127
|
+
## Ingestion preprocessor
|
|
154
128
|
|
|
155
129
|
* `markitdown` — when the project ships PDFs, DOCX, XLSX, PPTX, EPUB,
|
|
156
|
-
images, or audio that need to feed into any of the
|
|
157
|
-
|
|
130
|
+
images, or audio that need to feed into any of the routes in steps 3–4.
|
|
131
|
+
Convert first via the upstream `markitdown-mcp` server, then
|
|
158
132
|
route the resulting Markdown into the relevant deep-dive skill.
|
|
159
133
|
Never read a binary office format raw.
|
|
160
134
|
|
|
135
|
+
> The route lists in steps 3 and 4 are the routing map. A second copy of them
|
|
136
|
+
> lived here until 2026-08-02 and was removed — one list, one place.
|
|
137
|
+
|
|
161
138
|
## When to add a new framework analysis skill
|
|
162
139
|
|
|
163
140
|
A framework gets its own `project-analysis-*` skill ONLY if:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
model_tier: inherit
|
|
3
3
|
name: video-director
|
|
4
|
-
description: "Use when
|
|
4
|
+
description: "Use when a live-action beat becomes the 11-block cinematic prompt — lens, lighting, negatives. Triggers 'cinematic prompt', 'film-grade scene'. Animated → pixar-storyteller; 12-block → scene-expander."
|
|
5
5
|
personas:
|
|
6
6
|
- hollywood-director
|
|
7
7
|
domain: product
|
|
@@ -124,13 +124,16 @@ Any "no" → revise that block before handing off.
|
|
|
124
124
|
|
|
125
125
|
## Policies
|
|
126
126
|
|
|
127
|
+
Paths, enforcement model, and the full set: the
|
|
128
|
+
[media policy preamble](../../../agents/settings/policies/media/README.md).
|
|
129
|
+
|
|
127
130
|
The 11-block cinematic prompt is live-action shape — real-person and brand-impersonation risks are the highest in the cluster. Before emitting:
|
|
128
131
|
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
132
|
+
- **`likeness`** — when the prompt names or visually identifies a real person on camera.
|
|
133
|
+
- **`public-figures`** — when the subject is a recognised public figure.
|
|
134
|
+
- **`brand-impersonation`** — when the prompt copies a journalism / broadcaster / regulated-industry visual identity.
|
|
135
|
+
- **`style`** — when LIGHT / LENS choices are anchored to a named living cinematographer's signature.
|
|
136
|
+
- **`disclosure`** — every distributed live-action AI clip carries the non-removable AI-generation disclosure.
|
|
134
137
|
|
|
135
138
|
Refuse-and-surface at the directorial layer; live-action realism amplifies every policy gap downstream.
|
|
136
139
|
|
|
@@ -39,7 +39,7 @@ schema_version: 1
|
|
|
39
39
|
# CI guard: a release bump of `package.json` must update this value
|
|
40
40
|
# in lockstep — see scripts/check_template_pin_drift.ts (road-to-
|
|
41
41
|
# portable-runtime-and-update-check P3.3).
|
|
42
|
-
agent_config_version: "9.
|
|
42
|
+
agent_config_version: "9.14.0"
|
|
43
43
|
|
|
44
44
|
# --- Project identity ---
|
|
45
45
|
project:
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
StepResult,
|
|
18
18
|
agent_directive,
|
|
19
19
|
} from '../../delivery_state.js';
|
|
20
|
-
import { placeholder_paths } from './design.js';
|
|
20
|
+
import { has_design_system, placeholder_paths, provided_artifact } from './design.js';
|
|
21
21
|
import {
|
|
22
22
|
is_ambiguous_stack,
|
|
23
23
|
bundle_line,
|
|
@@ -51,6 +51,17 @@ export const AMBIGUITIES: ReadonlyArray<Record<string, string>> = [
|
|
|
51
51
|
'agent directive `ui-apply-<stack>` → skill ' +
|
|
52
52
|
'bundle implements the brief and writes the envelope back',
|
|
53
53
|
},
|
|
54
|
+
{
|
|
55
|
+
code: 'apply_coverage_missing',
|
|
56
|
+
trigger:
|
|
57
|
+
'a provided artifact is in state.ui_design but the ui_apply ' +
|
|
58
|
+
'envelope carries no coverage report, or the report leaves a ' +
|
|
59
|
+
'declared interaction / keyframe / asset unaccounted for',
|
|
60
|
+
resolution:
|
|
61
|
+
'agent writes ui_apply.coverage = {honoured: [], translated: [], ' +
|
|
62
|
+
'flagged: []} naming every declared item exactly once — a dropped ' +
|
|
63
|
+
'handler belongs in `flagged`, never in silence',
|
|
64
|
+
},
|
|
54
65
|
{
|
|
55
66
|
code: 'apply_placeholders_in_output',
|
|
56
67
|
trigger:
|
|
@@ -89,10 +100,122 @@ export function run(state: DeliveryState): StepResult {
|
|
|
89
100
|
return _halt_placeholders(state, violations);
|
|
90
101
|
}
|
|
91
102
|
|
|
103
|
+
const provided = provided_artifact(state.ui_design as Record<string, Any> | null);
|
|
104
|
+
if (provided !== null) {
|
|
105
|
+
const gaps = coverage_gaps(provided, envelope['coverage']);
|
|
106
|
+
if (gaps.length > 0) {
|
|
107
|
+
return _halt_coverage(state, provided, gaps);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
92
111
|
_record_changes(state, envelope);
|
|
93
112
|
return new StepResult({ outcome: Outcome.SUCCESS });
|
|
94
113
|
}
|
|
95
114
|
|
|
115
|
+
/** Buckets the coverage report must sort every declared item into. */
|
|
116
|
+
export const COVERAGE_BUCKETS: ReadonlyArray<string> = ['honoured', 'translated', 'flagged'];
|
|
117
|
+
|
|
118
|
+
/** Declared-item lists a port has to account for, in report order. */
|
|
119
|
+
export const COVERED_INVENTORIES: ReadonlyArray<string> = [
|
|
120
|
+
'interactions',
|
|
121
|
+
'keyframes',
|
|
122
|
+
'assets',
|
|
123
|
+
];
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Return every reason the coverage report fails to account for the artifact.
|
|
127
|
+
*
|
|
128
|
+
* The fidelity ledger the port case never had. `apply` used to validate its
|
|
129
|
+
* output with a single placeholder substring scan and nothing else, so a
|
|
130
|
+
* dropped handler or a lost keyframe left no trace anywhere — the loss was
|
|
131
|
+
* structurally silent, not merely unreported. Requiring each declared item to
|
|
132
|
+
* appear in exactly one bucket turns that silence into a halt: a handler the
|
|
133
|
+
* port could not carry has to be written down in `flagged`.
|
|
134
|
+
*
|
|
135
|
+
* Matching is substring containment against the bucket entries, so an entry
|
|
136
|
+
* may carry its own explanation ("submit handler — translated to a form
|
|
137
|
+
* action") and still count as accounting for `submit handler`.
|
|
138
|
+
*/
|
|
139
|
+
export function coverage_gaps(
|
|
140
|
+
provided: Record<string, Any>,
|
|
141
|
+
coverage: Any,
|
|
142
|
+
): string[] {
|
|
143
|
+
const gaps: string[] = [];
|
|
144
|
+
if (!_isDict(coverage)) {
|
|
145
|
+
return [
|
|
146
|
+
'no `coverage` report in the apply envelope — a provided artifact ' +
|
|
147
|
+
'requires one',
|
|
148
|
+
];
|
|
149
|
+
}
|
|
150
|
+
const entries: string[] = [];
|
|
151
|
+
for (const bucket of COVERAGE_BUCKETS) {
|
|
152
|
+
const value = coverage[bucket];
|
|
153
|
+
if (value === undefined) {
|
|
154
|
+
gaps.push(`\`coverage.${bucket}\` is missing (use an empty list if nothing qualifies)`);
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if (!Array.isArray(value)) {
|
|
158
|
+
gaps.push(`\`coverage.${bucket}\` must be a list of strings`);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
for (const item of value) {
|
|
162
|
+
if (typeof item === 'string' && item !== '') {
|
|
163
|
+
entries.push(item.toLowerCase());
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
for (const inventory of COVERED_INVENTORIES) {
|
|
168
|
+
const declared = provided[inventory];
|
|
169
|
+
if (!Array.isArray(declared)) continue;
|
|
170
|
+
for (const item of declared) {
|
|
171
|
+
if (typeof item !== 'string' || item === '') continue;
|
|
172
|
+
const needle = item.toLowerCase();
|
|
173
|
+
if (!entries.some((entry) => entry.includes(needle))) {
|
|
174
|
+
gaps.push(
|
|
175
|
+
`\`${inventory}\`: \`${item}\` appears in no coverage bucket`,
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return gaps;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** BLOCKED halt — the port did not account for what the artifact declared. */
|
|
184
|
+
function _halt_coverage(
|
|
185
|
+
state: DeliveryState,
|
|
186
|
+
provided: Record<string, Any>,
|
|
187
|
+
gaps: string[],
|
|
188
|
+
): StepResult {
|
|
189
|
+
const directive = _resolve_directive(state);
|
|
190
|
+
const contract = has_design_system(provided)
|
|
191
|
+
? 'A `design-system.json` came with this artifact, so its token values ' +
|
|
192
|
+
'are honoured verbatim — say which, and which you had to translate.'
|
|
193
|
+
: 'No `design-system.json` came with this artifact, so every token ' +
|
|
194
|
+
'value you did not read from it belongs in `translated` or `flagged`.';
|
|
195
|
+
const lines: string[] = [
|
|
196
|
+
agent_directive(directive),
|
|
197
|
+
'> Apply rejected: this is a port of a provided artifact, and the ' +
|
|
198
|
+
'coverage report does not account for it.',
|
|
199
|
+
`> ${contract}`,
|
|
200
|
+
'> Unaccounted:',
|
|
201
|
+
];
|
|
202
|
+
for (const gap of gaps) {
|
|
203
|
+
lines.push(`> - ${gap}`);
|
|
204
|
+
}
|
|
205
|
+
lines.push(
|
|
206
|
+
'> Write `ui_apply.coverage = {honoured: [...], translated: [...], ' +
|
|
207
|
+
'flagged: [...]}` naming every declared interaction, keyframe, and ' +
|
|
208
|
+
'asset exactly once. A handler the port could not carry goes in ' +
|
|
209
|
+
'`flagged` with the reason — never in silence.',
|
|
210
|
+
);
|
|
211
|
+
return new StepResult({
|
|
212
|
+
outcome: Outcome.BLOCKED,
|
|
213
|
+
questions: lines,
|
|
214
|
+
message:
|
|
215
|
+
`UI apply rejected: ${gaps.length} coverage gap(s) against the provided artifact.`,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
96
219
|
/** Return the agent-written `ui_apply` envelope, or `null`. */
|
|
97
220
|
function _apply_envelope(state: DeliveryState): Record<string, Any> | null {
|
|
98
221
|
const data = _pyTruthy(state.ticket) ? state.ticket : {};
|
|
@@ -143,20 +266,38 @@ function _delegate_to_stack_skill(state: DeliveryState): StepResult {
|
|
|
143
266
|
'the open question is which project to build for.',
|
|
144
267
|
});
|
|
145
268
|
}
|
|
269
|
+
const provided = provided_artifact(state.ui_design as Record<string, Any> | null);
|
|
270
|
+
const lines: string[] = [
|
|
271
|
+
agent_directive(directive),
|
|
272
|
+
`> Stack: \`${stack_label}\`. Implementing the locked design brief.`,
|
|
273
|
+
bundle_line(state.stack, 'build', stack_label),
|
|
274
|
+
'> Microcopy is locked — every button label, empty-state ' +
|
|
275
|
+
'message, and validation message must come verbatim from ' +
|
|
276
|
+
'`state.ui_design.microcopy`.',
|
|
277
|
+
];
|
|
278
|
+
if (provided !== null) {
|
|
279
|
+
lines.push(
|
|
280
|
+
'> This is a **port**: `state.ui_design.provided_artifact` is the ' +
|
|
281
|
+
'spec. Build it 1:1' +
|
|
282
|
+
(has_design_system(provided)
|
|
283
|
+
? ', and read token values from its `design_system` rather ' +
|
|
284
|
+
'than re-deriving them.'
|
|
285
|
+
: '; no `design_system` came with it, so anything you cannot ' +
|
|
286
|
+
'read from the artifact is a translation you have to name.'),
|
|
287
|
+
'> The envelope must carry `coverage: {honoured, translated, ' +
|
|
288
|
+
'flagged}` accounting for every declared interaction, keyframe, ' +
|
|
289
|
+
'and asset exactly once — apply rejects the envelope otherwise.',
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
lines.push(
|
|
293
|
+
'> 1. Continue — implement the brief and write a ' +
|
|
294
|
+
'`ui_apply` envelope back into state.ticket ' +
|
|
295
|
+
'(rendered: {path: text}, files: [...])',
|
|
296
|
+
'> 2. Abort — drop this UI request',
|
|
297
|
+
);
|
|
146
298
|
return new StepResult({
|
|
147
299
|
outcome: Outcome.BLOCKED,
|
|
148
|
-
questions:
|
|
149
|
-
agent_directive(directive),
|
|
150
|
-
`> Stack: \`${stack_label}\`. Implementing the locked design brief.`,
|
|
151
|
-
bundle_line(state.stack, 'build', stack_label),
|
|
152
|
-
'> Microcopy is locked — every button label, empty-state ' +
|
|
153
|
-
'message, and validation message must come verbatim from ' +
|
|
154
|
-
'`state.ui_design.microcopy`.',
|
|
155
|
-
'> 1. Continue — implement the brief and write a ' +
|
|
156
|
-
'`ui_apply` envelope back into state.ticket ' +
|
|
157
|
-
'(rendered: {path: text}, files: [...])',
|
|
158
|
-
'> 2. Abort — drop this UI request',
|
|
159
|
-
],
|
|
300
|
+
questions: lines,
|
|
160
301
|
message: `UI apply pending; delegating to \`${directive}\` for stack \`${stack_label}\`.`,
|
|
161
302
|
});
|
|
162
303
|
}
|