@event4u/agent-config 8.13.0 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +183 -0
- package/MIGRATION.md +14 -0
- package/README.md +2 -2
- package/dist/agent-src/commands/agent-handoff.md +35 -0
- package/dist/agent-src/commands/agents/init.md +1 -0
- package/dist/agent-src/commands/agents/optimize.md +1 -0
- package/dist/agent-src/commands/agents/user/accept.md +3 -2
- package/dist/agent-src/commands/agents/user/init.md +5 -4
- package/dist/agent-src/commands/agents/user/update.md +3 -2
- package/dist/agent-src/commands/agents/user.md +1 -0
- package/dist/agent-src/commands/agents.md +1 -0
- package/dist/agent-src/commands/analytics/show.md +1 -0
- package/dist/agent-src/commands/analytics.md +1 -0
- package/dist/agent-src/commands/analyze/decision.md +1 -0
- package/dist/agent-src/commands/analyze/incident.md +1 -0
- package/dist/agent-src/commands/analyze/near-miss.md +1 -0
- package/dist/agent-src/commands/analyze/postmortem.md +1 -0
- package/dist/agent-src/commands/analyze/premortem.md +1 -0
- package/dist/agent-src/commands/analyze/reference-repo.md +1 -0
- package/dist/agent-src/commands/analyze.md +3 -2
- package/dist/agent-src/commands/brand/identity.md +6 -5
- package/dist/agent-src/commands/brand/review.md +6 -5
- package/dist/agent-src/commands/brand/strategy.md +6 -4
- package/dist/agent-src/commands/brand/tokens.md +7 -6
- package/dist/agent-src/commands/brand/voice.md +5 -4
- package/dist/agent-src/commands/brand.md +9 -7
- package/dist/agent-src/commands/bug/fix.md +1 -0
- package/dist/agent-src/commands/bug/investigate.md +1 -0
- package/dist/agent-src/commands/bug.md +2 -1
- package/dist/agent-src/commands/challenge-me/vision.md +1 -0
- package/dist/agent-src/commands/challenge-me/with-docs.md +1 -0
- package/dist/agent-src/commands/challenge-me.md +28 -6
- package/dist/agent-src/commands/chat-history.md +1 -0
- package/dist/agent-src/commands/check-current-md.md +1 -0
- package/dist/agent-src/commands/commit.md +1 -0
- package/dist/agent-src/commands/context/create.md +3 -2
- package/dist/agent-src/commands/context.md +1 -0
- package/dist/agent-src/commands/cost/profile.md +1 -0
- package/dist/agent-src/commands/cost.md +2 -1
- package/dist/agent-src/commands/council/analysis.md +1 -0
- package/dist/agent-src/commands/council/debate.md +1 -0
- package/dist/agent-src/commands/council/default.md +21 -20
- package/dist/agent-src/commands/council/design.md +1 -0
- package/dist/agent-src/commands/council/optimize.md +1 -0
- package/dist/agent-src/commands/council/pr.md +1 -0
- package/dist/agent-src/commands/council.md +1 -0
- package/dist/agent-src/commands/estimate-ticket.md +1 -0
- package/dist/agent-src/commands/explain-run.md +88 -0
- package/dist/agent-src/commands/feature/dev.md +1 -0
- package/dist/agent-src/commands/feature/explore.md +1 -0
- package/dist/agent-src/commands/feature/plan.md +1 -0
- package/dist/agent-src/commands/feature/refactor.md +1 -0
- package/dist/agent-src/commands/feature/roadmap.md +1 -0
- package/dist/agent-src/commands/feature.md +2 -1
- package/dist/agent-src/commands/fix/pr-comments.md +19 -0
- package/dist/agent-src/commands/fix.md +2 -1
- package/dist/agent-src/commands/ghostwriter/delete.md +1 -0
- package/dist/agent-src/commands/ghostwriter/fetch.md +1 -0
- package/dist/agent-src/commands/ghostwriter/show.md +1 -0
- package/dist/agent-src/commands/ghostwriter/write.md +1 -0
- package/dist/agent-src/commands/ghostwriter.md +1 -0
- package/dist/agent-src/commands/grill-me.md +17 -12
- package/dist/agent-src/commands/humanize.md +1 -0
- package/dist/agent-src/commands/image/analyse.md +2 -1
- package/dist/agent-src/commands/image/create.md +1 -0
- package/dist/agent-src/commands/image/verify.md +1 -0
- package/dist/agent-src/commands/image.md +16 -12
- package/dist/agent-src/commands/implement-ticket.md +1 -0
- package/dist/agent-src/commands/judge/on-diff.md +1 -0
- package/dist/agent-src/commands/judge/solo.md +1 -0
- package/dist/agent-src/commands/judge/steps.md +1 -0
- package/dist/agent-src/commands/judge.md +1 -0
- package/dist/agent-src/commands/knowledge/cross-repo.md +1 -0
- package/dist/agent-src/commands/knowledge/forget.md +1 -0
- package/dist/agent-src/commands/knowledge/ingest.md +1 -0
- package/dist/agent-src/commands/knowledge/list.md +10 -0
- package/dist/agent-src/commands/knowledge.md +1 -0
- package/dist/agent-src/commands/memory/learn-low-impact.md +1 -0
- package/dist/agent-src/commands/memory/mine-session.md +1 -0
- package/dist/agent-src/commands/memory/promote.md +3 -2
- package/dist/agent-src/commands/memory.md +1 -0
- package/dist/agent-src/commands/mission/upgrade.md +45 -24
- package/dist/agent-src/commands/mode.md +1 -0
- package/dist/agent-src/commands/module/create.md +1 -0
- package/dist/agent-src/commands/module/explore.md +1 -0
- package/dist/agent-src/commands/module.md +1 -0
- package/dist/agent-src/commands/optimize/agents-dir.md +1 -0
- package/dist/agent-src/commands/optimize/project.md +1 -0
- package/dist/agent-src/commands/optimize/prompt.md +1 -0
- package/dist/agent-src/commands/optimize.md +2 -1
- package/dist/agent-src/commands/orchestrate.md +1 -0
- package/dist/agent-src/commands/override.md +1 -0
- package/dist/agent-src/commands/package.md +2 -1
- package/dist/agent-src/commands/post-as/ghostwriter.md +1 -0
- package/dist/agent-src/commands/post-as/me.md +1 -0
- package/dist/agent-src/commands/post-as.md +1 -0
- package/dist/agent-src/commands/pr/create/description-only.md +139 -8
- package/dist/agent-src/commands/pr/create.md +35 -22
- package/dist/agent-src/commands/prediction-pool.md +7 -6
- package/dist/agent-src/commands/prepare-for-review.md +1 -0
- package/dist/agent-src/commands/profile/activate.md +1 -0
- package/dist/agent-src/commands/profile/deactivate.md +1 -0
- package/dist/agent-src/commands/profile.md +1 -0
- package/dist/agent-src/commands/project.md +2 -1
- package/dist/agent-src/commands/refine-ticket.md +7 -0
- package/dist/agent-src/commands/research/deep.md +1 -0
- package/dist/agent-src/commands/research.md +1 -0
- package/dist/agent-src/commands/review/routing.md +1 -0
- package/dist/agent-src/commands/review.md +2 -1
- package/dist/agent-src/commands/roadmap/ai-council.md +1 -0
- package/dist/agent-src/commands/roadmap/materialize.md +1 -0
- package/dist/agent-src/commands/roadmap/process-full.md +1 -0
- package/dist/agent-src/commands/roadmap/process-phase.md +1 -0
- package/dist/agent-src/commands/roadmap/process-step.md +1 -0
- package/dist/agent-src/commands/roadmap.md +1 -0
- package/dist/agent-src/commands/security-audit-config.md +2 -1
- package/dist/agent-src/commands/skill/preview.md +1 -0
- package/dist/agent-src/commands/skill.md +1 -0
- package/dist/agent-src/commands/skills/discover.md +1 -0
- package/dist/agent-src/commands/skills.md +1 -0
- package/dist/agent-src/commands/sync/agent-settings.md +1 -0
- package/dist/agent-src/commands/sync.md +2 -1
- package/dist/agent-src/commands/team/adversarial.md +3 -2
- package/dist/agent-src/commands/team/delegate.md +3 -2
- package/dist/agent-src/commands/team/review.md +3 -2
- package/dist/agent-src/commands/team/status.md +49 -18
- package/dist/agent-src/commands/team-knowledge.md +8 -6
- package/dist/agent-src/commands/team.md +21 -16
- package/dist/agent-src/commands/tests/e2e-heal.md +1 -0
- package/dist/agent-src/commands/tests/e2e-plan.md +1 -0
- package/dist/agent-src/commands/tests/execute.md +1 -0
- package/dist/agent-src/commands/tests.md +2 -1
- package/dist/agent-src/commands/update-form-request-messages.md +1 -0
- package/dist/agent-src/commands/upstream-contribute.md +1 -0
- package/dist/agent-src/commands/video/from-script.md +3 -2
- package/dist/agent-src/commands/video/from-song.md +22 -21
- package/dist/agent-src/commands/video/scene.md +1 -0
- package/dist/agent-src/commands/video/stitch.md +2 -1
- package/dist/agent-src/commands/video/storyboard.md +1 -0
- package/dist/agent-src/commands/video.md +1 -0
- package/dist/agent-src/commands/work.md +1 -0
- package/dist/agent-src/commands/worktree/cleanup.md +8 -7
- package/dist/agent-src/commands/worktree/create.md +1 -0
- package/dist/agent-src/commands/worktree/verify.md +1 -0
- package/dist/agent-src/commands/worktree.md +1 -0
- package/dist/agent-src/rules/active-remediation.md +12 -36
- package/dist/agent-src/rules/artifact-drafting-protocol.md +7 -64
- package/dist/agent-src/rules/context-hygiene.md +19 -113
- package/dist/agent-src/rules/design-fidelity.md +4 -60
- package/dist/agent-src/rules/domain-adoption-policy.md +10 -106
- package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +12 -60
- package/dist/agent-src/rules/improve-before-implement.md +4 -0
- package/dist/agent-src/rules/minimal-safe-diff.md +6 -86
- package/dist/agent-src/rules/size-enforcement.md +10 -0
- package/dist/agent-src/rules/tool-safety.md +17 -3
- package/dist/agent-src/skills/agent-security-review/SKILL.md +12 -1
- package/dist/agent-src/skills/ai-council/SKILL.md +11 -0
- package/dist/agent-src/skills/bug-analyzer/SKILL.md +24 -2
- package/dist/agent-src/skills/code-review/SKILL.md +105 -93
- package/dist/agent-src/skills/code-review/checklists/backend.md +50 -0
- package/dist/agent-src/skills/code-review/checklists/database.md +19 -0
- package/dist/agent-src/skills/code-review/checklists/dependency.md +18 -0
- package/dist/agent-src/skills/code-review/checklists/docs.md +14 -0
- package/dist/agent-src/skills/code-review/checklists/frontend.md +19 -0
- package/dist/agent-src/skills/code-review/checklists/infra.md +17 -0
- package/dist/agent-src/skills/code-review/checklists/producing-the-review.md +62 -0
- package/dist/agent-src/skills/code-review/checklists/test-only.md +13 -0
- package/dist/agent-src/skills/code-review/evals/evals.json +53 -15
- package/dist/agent-src/skills/condense-memory/SKILL.md +3 -2
- package/dist/agent-src/skills/conventional-commits-writing/evals/evals.json +15 -0
- package/dist/agent-src/skills/docker/SKILL.md +10 -0
- package/dist/agent-src/skills/docx-authoring/SKILL.md +102 -0
- package/dist/agent-src/skills/github-ci/evals/evals.json +25 -0
- package/dist/agent-src/skills/humanizer/SKILL.md +79 -3
- package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +112 -0
- package/dist/agent-src/skills/humanizer/references/fixtures.md +70 -0
- package/dist/agent-src/skills/judge-bug-hunter/SKILL.md +7 -1
- package/dist/agent-src/skills/laravel/SKILL.md +10 -0
- package/dist/agent-src/skills/launch-readiness/SKILL.md +35 -0
- package/dist/agent-src/skills/llm-provider-knowledge/SKILL.md +146 -0
- package/dist/agent-src/skills/llm-provider-knowledge/evals/triggers.json +20 -0
- package/dist/agent-src/skills/merge-conflicts/SKILL.md +30 -0
- package/dist/agent-src/skills/pdf-tools/SKILL.md +101 -0
- package/dist/agent-src/skills/quality-tools/evals/evals.json +15 -0
- package/dist/agent-src/skills/security-audit/SKILL.md +29 -0
- package/dist/agent-src/skills/security-maturity-assessment/SKILL.md +90 -0
- package/dist/agent-src/skills/security-maturity-assessment/evals/triggers.json +52 -0
- package/dist/agent-src/skills/skill-writing/SKILL.md +79 -0
- package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +11 -3
- package/dist/agent-src/skills/subagent-orchestration/prompts/README.md +11 -0
- package/dist/agent-src/skills/subagent-orchestration/schemas/team-review-status.json +103 -0
- package/dist/agent-src/skills/terraform/SKILL.md +10 -0
- package/dist/agent-src/skills/test-driven-development/SKILL.md +31 -0
- package/dist/agent-src/skills/threat-modeling/SKILL.md +15 -0
- package/dist/agent-src/skills/token-optimizer/SKILL.md +10 -4
- package/dist/agent-src/templates/agent-settings.md +28 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/dist/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
- package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
- package/dist/agent-src/templates/scripts/telemetry_record.ts +5 -0
- package/dist/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +314 -194
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +5 -5
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +23 -18
- package/dist/discovery/trust-report.md +8 -8
- package/dist/discovery/workspaces.json +18 -13
- package/dist/install/install.mjs +48 -33
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/agent_settings.js +4 -1
- package/dist/scripts/_lib/agent_settings.js.map +1 -1
- package/dist/scripts/condense.js +5 -0
- package/dist/scripts/condense.js.map +1 -1
- package/dist/server/schemas/settings.js +10 -1
- package/dist/server/schemas/settings.js.map +1 -1
- package/docs/CLAIMS.md +9 -2
- package/docs/MIGRATION.md +20 -0
- package/docs/SKILL_CENSUS.md +8 -0
- package/docs/architecture.md +3 -3
- package/docs/benchmark.md +67 -2
- package/docs/catalog.md +2 -2
- package/docs/command-flows.md +1 -1
- package/docs/contracts/agents-layout.md +1 -1
- package/docs/contracts/ai-council-config.md +9 -2
- package/docs/contracts/ai-team-config.md +37 -4
- package/docs/contracts/consumer-bridge.md +55 -63
- package/docs/contracts/install-layout.md +1 -1
- package/docs/contracts/migrate-command.md +1 -1
- package/docs/contracts/prelaunch-diagnostics.md +151 -0
- package/docs/contracts/release-pr-gating.md +1 -0
- package/docs/customization.md +22 -1
- package/docs/decisions/ADR-020-global-only-consumer-scope.md +34 -0
- package/docs/decisions/ADR-049-configuration-trust-boundary.md +9 -1
- package/docs/featured-skills.md +2 -2
- package/docs/getting-started-by-role.md +1 -1
- package/docs/getting-started.md +17 -6
- package/docs/governance-advantage.md +1 -1
- package/docs/guidelines/agent-infra/active-remediation-mechanics.md +45 -0
- package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +28 -0
- package/docs/guidelines/agent-infra/api-cost-levers.md +126 -0
- package/docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +76 -0
- package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +90 -0
- package/docs/guidelines/agent-infra/domain-adoption-gates.md +112 -0
- package/docs/guidelines/agent-infra/framework-neutrality-patterns.md +66 -0
- package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +99 -0
- package/docs/guidelines/agent-infra/skill-quality-checklist.md +13 -0
- package/docs/guidelines/design-fidelity-mechanics.md +76 -0
- package/docs/installation.md +2 -1
- package/docs/maintainers/dev-mode.md +3 -2
- package/docs/parity/command-frontmatter.md +60 -0
- package/docs/proof.md +7 -6
- package/package.json +1 -1
- package/src/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/src/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
- package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
- package/src/agent-src/templates/scripts/telemetry_record.ts +5 -0
- package/src/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
- package/src/config/agent-settings.template.yml +73 -10
- package/src/config/gitignore-block.txt +16 -6
- package/src/config/prelaunch-areas.yml +36 -0
- package/src/scripts/_cli/cmd_conformance.ts +2 -2
- package/src/scripts/_cli/cmd_doctor.ts +280 -39
- package/src/scripts/_cli/cmd_refresh.ts +35 -118
- package/src/scripts/_lib/agent_settings.ts +4 -1
- package/src/scripts/_lib/claude_plugin.ts +77 -2
- package/src/scripts/_lib/orchestration_record.ts +5 -0
- package/src/scripts/_lib/tool_adapter_registry.ts +120 -0
- package/src/scripts/ai_council/clients.ts +68 -6
- package/src/scripts/ai_council/pricing.ts +62 -0
- package/src/scripts/ai_team/config.ts +73 -1
- package/src/scripts/ai_team/review_gate.ts +636 -0
- package/src/scripts/ai_team/team_dispatch.ts +612 -0
- package/src/scripts/bench_ab_task_runner.ts +11 -1
- package/src/scripts/bench_parity_count.ts +279 -0
- package/src/scripts/build_linear_digest.ts +3 -1
- package/src/scripts/check_bridge_derivation.ts +172 -0
- package/src/scripts/check_consumer_scope_flip.ts +179 -0
- package/src/scripts/check_council_config_location.ts +115 -15
- package/src/scripts/check_host_loadability.ts +81 -0
- package/src/scripts/condense.ts +5 -0
- package/src/scripts/council_cli.ts +19 -3
- package/src/scripts/hook_manifest.yaml +12 -1
- package/src/scripts/install.ts +44 -45
- package/src/scripts/lint_agents_layout.ts +10 -4
- package/src/scripts/lint_breaking_changes_index.ts +303 -0
- package/src/scripts/lint_handoffs.ts +42 -0
- package/src/scripts/lint_skill_descriptions.ts +228 -0
- package/src/scripts/lint_skill_descriptions_allowlist.json +1 -0
- package/src/scripts/lint_skill_scripts_readonly.ts +145 -0
- package/src/scripts/lint_skill_scripts_readonly_allowlist.json +8 -0
- package/src/scripts/lint_supported_tools_matrix.ts +35 -0
- package/src/scripts/mcp_server/tools.ts +1 -3
- package/src/scripts/optimize_skill_description.ts +144 -0
- package/src/scripts/orchestration_record.ts +2 -1
- package/src/scripts/prelaunch_diagnostics.ts +248 -0
- package/src/scripts/run_skill_evals.ts +70 -4
- package/src/scripts/schemas/agent-settings.schema.json +17 -0
- package/src/scripts/schemas/command.schema.json +7 -0
- package/src/scripts/schemas/evals.schema.json +105 -14
- package/src/scripts/schemas/prelaunch-report.schema.json +107 -0
- package/src/scripts/schemas/skill.schema.json +18 -1
- package/src/scripts/schemas/subagent.schema.json +6 -0
- package/src/scripts/self_review_gate.test.ts +11 -0
- package/src/scripts/self_review_gate.ts +7 -1
- package/src/scripts/skill_eval_coverage.ts +4 -1
- package/src/scripts/skill_linter.ts +43 -3
- package/src/scripts/smoke_host_loadability.sh +73 -0
- package/src/scripts/team_review_gate_hook.ts +115 -0
- package/src/scripts/trigger_eval_grandfather.json +1 -2
- package/src/scripts/utilization_report.ts +225 -0
- package/src/server/schemas/settings.ts +24 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Minimal Safe Diff — Mechanics
|
|
2
|
+
|
|
3
|
+
> Anti-over-engineering criteria, larger-change guidance, break-glass exception, and the bounded remediation carve-out for the `minimal-safe-diff` rule
|
|
4
|
+
|
|
5
|
+
_Origin: migrated from `src/rules/minimal-safe-diff.md` per the P4 pattern of `road-to-kernel-and-router.md`. The Iron Law, "The rule", "Before writing the diff", the red-flags list, and "Own-orphan cleanup" (anchor-referenced by `downstream-changes`) stay in the rule; this file carries the worked criteria._
|
|
6
|
+
|
|
7
|
+
## When the task seems to require a larger change
|
|
8
|
+
|
|
9
|
+
- A rename, restructure, or framework upgrade that crosses the minimal-diff
|
|
10
|
+
line is a **separate, explicit** task — ask the user before expanding.
|
|
11
|
+
- A bug fix that exposes a broader design problem stays a bug fix. Log the
|
|
12
|
+
design problem as a follow-up (ticket, note, TODO) and ship the fix alone.
|
|
13
|
+
- A new feature that tempts you to "clean up" the module first: resist.
|
|
14
|
+
Add the feature, commit it, then propose the cleanup as a separate change.
|
|
15
|
+
|
|
16
|
+
## Auto-formatter or linter rewrites unrelated code
|
|
17
|
+
|
|
18
|
+
Revert those hunks before staging. The diff you present is the diff you own.
|
|
19
|
+
If project policy forbids partial formatting, split into two commits:
|
|
20
|
+
*format only* · *behavior change*.
|
|
21
|
+
|
|
22
|
+
## Anti-over-engineering
|
|
23
|
+
|
|
24
|
+
The smallest change is also the least *abstract* and least *speculative* one:
|
|
25
|
+
|
|
26
|
+
- **Three similar lines beat a premature abstraction.** Do not extract a helper
|
|
27
|
+
/ generic / config layer to dedupe two or three call sites — inline
|
|
28
|
+
repetition is cheaper to read and change than the wrong abstraction. Per new
|
|
29
|
+
abstraction: **cite the second caller — or inline it.**
|
|
30
|
+
- **No speculative features.** Nothing beyond what was asked: no
|
|
31
|
+
configurability or "flexibility" nobody requested, no parameters with one
|
|
32
|
+
call site, no error handling for scenarios that cannot occur in this
|
|
33
|
+
codebase.
|
|
34
|
+
- **The rewrite trigger.** If the change could be half the size without losing
|
|
35
|
+
behavior, rewrite before presenting. Self-check: *"Would a senior engineer
|
|
36
|
+
call this overcomplicated?"* — if yes, simplify.
|
|
37
|
+
- **No tombstones.** Delete removed code completely — no `_oldName` renames,
|
|
38
|
+
no `// removed X` / `// no longer used` markers, no dead re-export shims kept
|
|
39
|
+
"for safety". Git history is the tombstone.
|
|
40
|
+
- **No docstrings/comments on untouched code.** Do not annotate code the diff
|
|
41
|
+
does not change.
|
|
42
|
+
|
|
43
|
+
Wrong/right pairs for each ban:
|
|
44
|
+
[`simplicity-and-goal-demos`](simplicity-and-goal-demos.md)
|
|
45
|
+
— the demos are the recognition surface; match your diff against the *right*
|
|
46
|
+
column before presenting.
|
|
47
|
+
|
|
48
|
+
**Not adopted (council):** the source's "validate only at system boundaries /
|
|
49
|
+
trust internal code" clause is **rejected** — internal code can be wrong, and
|
|
50
|
+
"trust" is not a testing strategy. Keep validating internal invariants; this
|
|
51
|
+
fold is about *diff shape*, not about dropping internal checks.
|
|
52
|
+
|
|
53
|
+
## Break-glass exception
|
|
54
|
+
|
|
55
|
+
The rule stays in force during production incidents. "Break-glass mode"
|
|
56
|
+
narrows verification (see `verify-before-complete`) — it does **not**
|
|
57
|
+
license drive-by edits.
|
|
58
|
+
|
|
59
|
+
Allowed during break-glass:
|
|
60
|
+
|
|
61
|
+
- The **smallest** change that stops the bleeding — one file, one
|
|
62
|
+
method, one guard — preferred over any refactor.
|
|
63
|
+
- A fast revert to a known-good commit, even if it undoes unrelated
|
|
64
|
+
improvements shipped in the same PR.
|
|
65
|
+
|
|
66
|
+
Not allowed, even in break-glass:
|
|
67
|
+
|
|
68
|
+
- "While I'm in there" cleanups, reformatting, or dependency bumps.
|
|
69
|
+
- Expanding the fix to neighboring modules without evidence they are
|
|
70
|
+
part of the incident.
|
|
71
|
+
- Merging the hotfix with pending refactors from another branch.
|
|
72
|
+
|
|
73
|
+
After the incident, open a **follow-up PR** for any scope that was
|
|
74
|
+
intentionally deferred and reference the break-glass commit in its
|
|
75
|
+
description.
|
|
76
|
+
|
|
77
|
+
## Bounded remediation carve-out
|
|
78
|
+
|
|
79
|
+
The default stands: no drive-by edits, no opportunistic refactors. The one
|
|
80
|
+
bounded exception — a **small, task-aligned security/correctness fix in code
|
|
81
|
+
the current task already touches** — is governed by `active-remediation`
|
|
82
|
+
(mechanics: [`active-remediation-mechanics`](active-remediation-mechanics.md)).
|
|
83
|
+
It is permitted inline **only** when ALL hold: same request path / module,
|
|
84
|
+
≤ ~10 changed lines in one production file (plus its test file), no
|
|
85
|
+
public-API / response-shape change, no dependency bump or migration, and its
|
|
86
|
+
verification (e.g. the negative test) ships in the same commit. Anything
|
|
87
|
+
outside those five conditions is **not** this carve-out — it is note + ask
|
|
88
|
+
per `active-remediation`. This never licenses reformatting, renames,
|
|
89
|
+
dependency bumps, or version upgrades (a syntax-idiom modernization is
|
|
90
|
+
allowed only under `active-remediation`'s version-gated,
|
|
91
|
+
behavior-preserving clause; a dependency/version bump stays ask-only). The
|
|
92
|
+
sole case that may interrupt is a **live cross-user/tenant data exposure**
|
|
93
|
+
(`broken-access-control`) — fix-now-if-small, else stop and surface; never
|
|
94
|
+
defer it silently.
|
|
95
|
+
|
|
96
|
+
## See also
|
|
97
|
+
|
|
98
|
+
- `minimal-safe-diff` (rule) — Iron Law, the rule, pre-diff checklist, red flags, own-orphan cleanup.
|
|
99
|
+
- [`active-remediation-mechanics`](active-remediation-mechanics.md) — the fix-now / note+ask / follow-up-PR ladder detail.
|
|
@@ -17,6 +17,19 @@ Every skill must answer four questions. If ANY answer is weak, the skill is not
|
|
|
17
17
|
| 3 | How do I verify it worked? | `Procedure` (validation step) | Concrete checks, not "verify it works" |
|
|
18
18
|
| 4 | What common failure must I avoid? | `Gotcha` + `Do NOT` | Real failure patterns, not platitudes |
|
|
19
19
|
|
|
20
|
+
## Register — explain the trade-off, except in the safety kernel
|
|
21
|
+
|
|
22
|
+
Two registers, chosen by artifact class (U4, ecosystem harvest 2026-07-13):
|
|
23
|
+
|
|
24
|
+
- **Capability skills** (workflows, analyses, generators) **explain the
|
|
25
|
+
trade-off** — say *why* the recommended path beats the alternative instead of
|
|
26
|
+
shouting ALL-CAPS MUSTs; an agent that understands the why generalizes to
|
|
27
|
+
cases the skill never enumerated.
|
|
28
|
+
- **The safety kernel keeps its imperative Iron-Law register** — kernel rules,
|
|
29
|
+
safety floors (`*-safety-floor`), and Hard-Floor surfaces stay ALL-CAPS
|
|
30
|
+
fenced-law imperative, non-negotiable (`preservation-guard` enforces the
|
|
31
|
+
byte-level protection). Never downgrade an Iron Law to friendly prose.
|
|
32
|
+
|
|
20
33
|
## Required Sections
|
|
21
34
|
|
|
22
35
|
Every skill MUST have: `When to use`, `Procedure`, `Gotcha`, `Output format`, `Do NOT`.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Design Fidelity — Mechanics
|
|
2
|
+
|
|
3
|
+
> Surgical-edit discipline, asset & imagery floor, and the failure-mode catalog for the `design-fidelity` rule
|
|
4
|
+
|
|
5
|
+
_Origin: migrated from `src/rules/design-fidelity.md` per the P4 pattern of `road-to-kernel-and-router.md`. The Iron Law, the `design.fidelity_mode` strictness table, and the fire/not-fire scope stay in the rule; this file carries the illustrative depth._
|
|
6
|
+
|
|
7
|
+
## Surgical visual edits
|
|
8
|
+
|
|
9
|
+
A request to change one visual thing — a colour, a label, a single element — is
|
|
10
|
+
a **targeted edit**, not a redesign licence. Apply the same
|
|
11
|
+
`minimal-safe-diff` discipline to design work that backend edits have
|
|
12
|
+
always owed.
|
|
13
|
+
|
|
14
|
+
- **Change only the semantic target.** Preserve the surrounding layout,
|
|
15
|
+
spacing, typography, dimensions, content, animation, and interaction states.
|
|
16
|
+
Do not rewrite the component, reflow the section, or "modernise" neighbours
|
|
17
|
+
while you are in there. (fixtures: `daf-edit-preservation`, `daf-unwanted-variations`.)
|
|
18
|
+
- **A broader redesign needs an explicit trigger.** Only phrases like *"new
|
|
19
|
+
direction"*, *"from scratch"*, *"make it feel premium"*, *"rework the flow"*,
|
|
20
|
+
or *"give me variations / options"* license a from-scratch rework. Absent such
|
|
21
|
+
a phrase, a "fix / change / update the X" request is surgical — when unsure
|
|
22
|
+
which, ask (`ask-when-uncertain`). (fixture: `daf-redesign-trigger`.)
|
|
23
|
+
- **Preserve stable anchors.** Where the host exposes DOM/comment metadata, keep
|
|
24
|
+
comment anchors and screen labels intact so the edit stays locatable. Where
|
|
25
|
+
the host has no such surface, preserve stable semantic anchors already present
|
|
26
|
+
in source comments / `data-*` attributes — never strip them, and do not invent
|
|
27
|
+
new ones.
|
|
28
|
+
|
|
29
|
+
## Asset & imagery discipline
|
|
30
|
+
|
|
31
|
+
Visual artifacts carry **real assets or honest placeholders — never fabricated
|
|
32
|
+
brand evidence**. The design-surface instance of the no-invented-facts floor.
|
|
33
|
+
|
|
34
|
+
- **Copy owned assets through the project's accepted path.** Reference or copy
|
|
35
|
+
project-owned assets (logos, icons, fonts, images) via the target project's
|
|
36
|
+
asset directory/pipeline — never hotlink a design-system's internal URL, never
|
|
37
|
+
bulk-copy a huge source folder. (fixtures: `daf-missing-asset`, `daf-external-asset-url`.)
|
|
38
|
+
- **Real imagery where inspection matters.** On visual pages/decks, use actual
|
|
39
|
+
product / place / object / state imagery where the image IS the proof (a
|
|
40
|
+
product screenshot, a real dashboard state). Decorative atmosphere is not proof
|
|
41
|
+
— never pass a stock-like or invented image off as the real product. An
|
|
42
|
+
invented product screenshot is fabricated evidence. (fixture: `daf-invented-screenshot`.)
|
|
43
|
+
- **Icons follow the iconography floor** — no emoji-as-icon in serious UI, no
|
|
44
|
+
hand-rolled icon when a set exists; see the `iconography` skill § Iconography floor.
|
|
45
|
+
- **Ask before adding material — no unrequested filler.** Never generate copy,
|
|
46
|
+
placeholder sections, or decorative blocks the user did not ask for to "complete"
|
|
47
|
+
a design. Brief silent on a region → surface the gap (`ask-when-uncertain`)
|
|
48
|
+
or leave an honest placeholder; never invent filler to fill space.
|
|
49
|
+
|
|
50
|
+
## Failure modes
|
|
51
|
+
|
|
52
|
+
- Swapping the prototype's font / typeface because another "reads better".
|
|
53
|
+
- Replacing a specified control (slider, stepper, chip) with a different control.
|
|
54
|
+
- Dropping or adding an element the prototype shows ("+", a send→stop toggle, a warning chip).
|
|
55
|
+
- Restructuring layout or moving sections "because the flow is better".
|
|
56
|
+
- Treating an internal "honesty gate" or "stub" concern as licence to redesign the UI.
|
|
57
|
+
- Re-running a redesign after the user already said "match the prototype".
|
|
58
|
+
|
|
59
|
+
## How to surface a deviation — do NOT execute it
|
|
60
|
+
|
|
61
|
+
Name what the spec shows, what you would change, and why — as a numbered option
|
|
62
|
+
per `user-interaction`. The user picks. Honesty about **behaviour** (a control
|
|
63
|
+
not yet wired) never licenses changing the **design**: a faithful visual plus a
|
|
64
|
+
labelled "not wired yet" note beats an invented redesign.
|
|
65
|
+
|
|
66
|
+
## Fixtures
|
|
67
|
+
|
|
68
|
+
Behavioral baseline: the `daf-*` fixtures named above (edit preservation,
|
|
69
|
+
unwanted variations, redesign trigger, missing asset, external asset URL,
|
|
70
|
+
invented screenshot).
|
|
71
|
+
|
|
72
|
+
## See also
|
|
73
|
+
|
|
74
|
+
- `design-fidelity` (rule) — Iron Law + `design.fidelity_mode` strictness table.
|
|
75
|
+
- `brand-source-of-truth` / `brand-consistency` — same precedence shape, for registered brand tokens.
|
|
76
|
+
- [`design-modes.md`](design-modes.md) — brand vs product register discriminator.
|
package/docs/installation.md
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
**Principle:** Global is the only consumer scope. `init` writes to
|
|
4
4
|
user-scope paths (`~/.event4u/agent-config/`, `~/.claude/`,
|
|
5
5
|
`~/.cursor/`, …); the project tree only gets `agents/overrides/`
|
|
6
|
-
|
|
6
|
+
(the bridge marker was retired — ADR-020 amendment 2026-07-13; the
|
|
7
|
+
global root resolves from `~/.event4u/agent-config`). Opt-in `export` if a team wants
|
|
7
8
|
a tool's config committed to a repo. No Task, no Make, no build
|
|
8
9
|
tools required.
|
|
9
10
|
|
|
@@ -23,8 +23,9 @@ With the flag set, the installer:
|
|
|
23
23
|
1. Allows project-scope writes back into the repo tree (so a
|
|
24
24
|
maintainer can run `task dev:install-global` and iterate on the
|
|
25
25
|
working copy).
|
|
26
|
-
2. **Skips**
|
|
27
|
-
|
|
26
|
+
2. **Skips** consumer-surface writes into the package repo. (The
|
|
27
|
+
`agents/.event4u-bridge.yml` marker is retired — ADR-020 amendment
|
|
28
|
+
2026-07-13 — and no longer written at all.) The repo is the
|
|
28
29
|
source, not a consumer of itself.
|
|
29
30
|
3. Treats `~/.event4u/agent-config/` as a peer install — touches are
|
|
30
31
|
limited to the working-copy projection.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Command frontmatter — per-host projection parity
|
|
2
|
+
|
|
3
|
+
> Which command frontmatter fields each host bridge actually consumes, and the
|
|
4
|
+
> deliberate divergences from the official command-authoring field standard.
|
|
5
|
+
> Source of truth for command definitions: `src/domains/<pack>/<name>/command.md`
|
|
6
|
+
> (projected verbatim to `dist/agent-src/commands/` by the condensation
|
|
7
|
+
> pipeline). Schema: [`command.schema.json`](../../src/scripts/schemas/command.schema.json).
|
|
8
|
+
> Roadmap origin: `road-to-ecosystem-harvest-skill-quality-gates` Phase 4 (Source C).
|
|
9
|
+
|
|
10
|
+
## Projection paths per host
|
|
11
|
+
|
|
12
|
+
| Host | Projection | Frontmatter reaches host? |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| Claude Code | `.claude/skills/<slug>/SKILL.md` — symlink to the command source; rendered copy (with native `model:`) when `model.auto_switch: auto` and a `model_tier` maps | Yes — full frontmatter, verbatim |
|
|
15
|
+
| Cursor | `.cursor/commands/<slug>.md` — symlink to the command source | Yes — file verbatim; Cursor treats unknown frontmatter as inert |
|
|
16
|
+
| Windsurf | `.windsurf/workflows/<slug>.md` — symlink to the command source | Yes — same inert-passthrough as Cursor |
|
|
17
|
+
| Cline / Gemini / Copilot / Roo / Codex / Continue | Text reference via `AGENTS.md` only (no native command surface) | No — invocation is conversational |
|
|
18
|
+
|
|
19
|
+
## Field consumption matrix (official-standard fields)
|
|
20
|
+
|
|
21
|
+
| Field | Claude Code | Cursor / Windsurf | Notes |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| `name` | ✅ load rule: must equal the skill directory slug | inert | Path-derived hyphen slug; enforced by `check_host_loadability` |
|
|
24
|
+
| `description` | ✅ routing + display | inert | ≤ 200 chars per schema |
|
|
25
|
+
| `argument-hint` | ✅ rendered next to the slash command | inert | Added Phase 4; set on every command whose body documents an invocation argument (140/183 at introduction) |
|
|
26
|
+
| `disable-model-invocation` | ✅ honored natively | inert (vacuously true — no model-invocation surface) | Schema pins `enum: [true]` — commands are user-invoked by design |
|
|
27
|
+
| `model` | ✅ (rendered copies only) | inert | Never authored by hand: the generator rewrites `model_tier:` → native `model:` at projection time (ADR-034/035) |
|
|
28
|
+
|
|
29
|
+
All other fields (`tier`, `visibility`, `pack`, `cluster`, `intent`,
|
|
30
|
+
`routes_to`, `replaces`, `suggestion`, `workspaces`, `packs`, `trust`,
|
|
31
|
+
`install`, `model_tier`, …) are **suite governance metadata** — consumed by the
|
|
32
|
+
package's own linters, router, discovery manifest, and docs generators, never
|
|
33
|
+
by a host. Hosts that read the file verbatim ignore them; that is the intended
|
|
34
|
+
contract, not drift.
|
|
35
|
+
|
|
36
|
+
## Deliberate divergences from the official standard
|
|
37
|
+
|
|
38
|
+
1. **No colon names.** The official examples allow `/cluster:sub` invocation;
|
|
39
|
+
this suite forbids colons in `name:` (Agent-Skills-spec compliance for
|
|
40
|
+
strict consumers like Zed). Claude Code's `/cluster:sub` invocation still
|
|
41
|
+
works — it is path-derived from `commands/<cluster>/<sub>.md`, not from the
|
|
42
|
+
`name:` field.
|
|
43
|
+
2. **`disable-model-invocation` is locked to `true`.** The standard allows
|
|
44
|
+
model-invocable commands; this suite's commands are always user-invoked
|
|
45
|
+
(`command-suggestion-policy` owns proactive surfacing instead — suggest,
|
|
46
|
+
never invoke).
|
|
47
|
+
3. **`model` is generated, never authored.** Authors declare the
|
|
48
|
+
vendor-neutral `model_tier:`; the Claude bridge renders a native `model:`
|
|
49
|
+
only when the consumer opted into `model.auto_switch: auto`.
|
|
50
|
+
4. **`argument-hint` is host-passthrough.** Only Claude Code renders it today;
|
|
51
|
+
it stays in the neutral source (harmless elsewhere) rather than being
|
|
52
|
+
projected host-specifically — per the do-NOT-chase-host-fields rule for the
|
|
53
|
+
neutral tree.
|
|
54
|
+
|
|
55
|
+
## Verification
|
|
56
|
+
|
|
57
|
+
- `./scripts-run src/scripts/validate_frontmatter` — every command validates
|
|
58
|
+
against the schema (including `argument-hint` shape, ≤ 120 chars).
|
|
59
|
+
- `./scripts-run src/scripts/check_host_loadability --root .` — generated
|
|
60
|
+
`.claude/skills/` entries parse and satisfy the host load rule.
|
package/docs/proof.md
CHANGED
|
@@ -27,8 +27,9 @@ evidence pointer, or `task check-claims` fails the build.
|
|
|
27
27
|
| Claim | Kind | Evidence | Resolves |
|
|
28
28
|
|---|---|---|---|
|
|
29
29
|
| The release process is documented as an inheritable runbook + succession doc, and the project's bus-factor (trailing-90-day distinct human reviewers) is tracked and reported truthfully — currently 1, not implied to be more. | qual | `docs/succession.md#trailing 90 days` | ✅ |
|
|
30
|
-
|
|
|
30
|
+
| 184 commands. | quant | `src/scripts/check_artefact_count_messaging.ts#Artefact-count messaging gate` | ✅ |
|
|
31
31
|
| A MEASURED-BUT-NOT-SHIPPED experiment — the thin rule projection reduced eager rule load 78,513 → 13,881 GPT-tokens (whole always-loaded projection 98,529 → 33,897, ~65.6%), but FAILED the quality gate (thin win-rate 36.2% vs required 48%) and does not ship; it un-defers only behind `discipline_profile: essential`. Shipped behavior does NOT include this reduction. Method: `agent-config benchmark` over the pinned token baseline; the baseline is the honest "what the user pays if everything loads eagerly", NOT a synthetic full-corpus strawman (council Q4); quality gate per the Phase-0 paired judge run. | quant | `internal/bench/reports/token-baseline.json#eager_rule_load` | ✅ |
|
|
32
|
+
| The first cross-vendor parity pass (5 orchestration-corpus tasks × 2 vendors × 3 repeats, identical prompts via the council transport, $0.16) measured real per-host finding-count differences — claude-sonnet-4-5 surfaced ~2× the findings of gpt-4o on the multi-file analysis task (median 11 vs 5) while both vendors were identical on the planted hollow-implementation task (2 vs 2) and perfectly silent on the clean-code negative control (0 vs 0, no spurious findings). The per-task `finding_floor` values are calibrated from the cross-host lower envelope and the gate is armed. | quant | `internal/bench/reports/parity-count.json#min over hosts of median` | ✅ |
|
|
32
33
|
| On a weak host (claude-haiku-4-5) the package produces a significant, placebo-controlled discipline lift on scope/downstream traps; on a strong host the same measurement is a published null — the package transplants discipline a weak model lacks, not model intelligence. | quant | `docs/benchmark.md#weak-host-specific` | ✅ |
|
|
33
34
|
| The non-coding domain skills (finance/founder/ops/content) are forged on TS/PHP and labeled unvalidated until they pass a sourced domain-truth fixture; no public prose implies proven domain correctness, and the validated count is CI-ratcheted. | qual | `src/scripts/domain_soundness_status.ts#checkRatchet` | ✅ |
|
|
34
35
|
| The validated non-coding domain-skill count is pinned and CI-ratcheted at a maintainer-set floor (9 of 20 default-surface skills carry a sourced `evals/domain-truth.json` fixture at pin time, 2026-07-11 — 5 deterministic, keys from cited formulas; 4 rubric, criteria matching a named external practice); the floor only rises via a maintainer `--write-floor` after a new sourced fixture lands. | quant | `internal/evals/domain-soundness-floor.json#validated` | ✅ |
|
|
@@ -44,10 +45,10 @@ evidence pointer, or `task check-claims` fails the build.
|
|
|
44
45
|
| On a deterministic multi-session recall corpus, the memory substrate produces a measured, placebo-controlled recall lift — memory-on 27/27 vs no-memory 10/27 and vs equal-byte placebo 9/27 (claude-haiku-4-5, n=9 tasks x 3 seeds, sign test p=0.031 for BOTH pairings). Scoped honestly: this is the context-value upper bound (perfect retrieval on a one-fact-per-task corpus), not retrieval precision under a large store. | quant | `internal/bench/reports/second-brain-delta.json` | ✅ |
|
|
45
46
|
| Removing the perfect-retrieval assumption, the substrate's REAL keyword retrieval recalls the needed decision into the top-5 under keyword-overlapping confusers (precision@5 9/9) and the model disambiguates it from the co-injected confusers — retrieval-on 27/27 vs no-memory 5/27 and vs equal-count placebo 5/27 (claude-haiku-4-5, 9 tasks x 3 seeds, sign test p=0.008 both). Named limit: retrieval RECALLS but does not RANK (mean tie-set 3.3, ties broken by store order, not relevance) — the discrimination gap that motivates the SQLite-FTS5 activation path (ADR-116) at larger scale. | quant | `internal/bench/reports/second-brain-retrieval.json` | ✅ |
|
|
46
47
|
| Every artifact the package ships — source AND the condensed projection that reaches consumers — is machine-scanned in CI for hidden-Unicode, mixed-script-confusable, and instruction-smuggling payloads (the rules-file-backdoor class); a finding blocks the release before `npm publish`, not just the merge. | qual | `.github/workflows/publish-npm.yml#lint_agent_security` | ✅ |
|
|
47
|
-
|
|
|
48
|
+
| 275 skills. | quant | `src/scripts/check_artefact_count_messaging.ts#Artefact-count messaging gate` | ✅ |
|
|
48
49
|
| Removes only its own keys from a shared host config (matched by JSON-pointer + SHA-256), never a neighbour tool's entries. | qual | `docs/contracts/install-layout.md#JSON-pointer` | ✅ |
|
|
49
50
|
|
|
50
|
-
**
|
|
51
|
+
**21 backed claim(s)** — all evidence pointers resolve in CI.
|
|
51
52
|
|
|
52
53
|
Artefact counts in public prose (skills, commands, governed rules,
|
|
53
54
|
guidelines, personas) are **generated from source and CI-drift-checked**:
|
|
@@ -76,11 +77,11 @@ shipping theater; the full per-cell data is committed at
|
|
|
76
77
|
`internal/bench/reports/persona-placebo.json`.
|
|
77
78
|
|
|
78
79
|
**Behavioural-eval coverage — the honest baseline.** Skill *quality* is only
|
|
79
|
-
as good as its measurement. Today **
|
|
80
|
+
as good as its measurement. Today **42 of 275** skills carry a behavioural
|
|
80
81
|
`evals.json`; the highest-traffic / highest-cost tiers (default-surface +
|
|
81
82
|
`rich` + routers) are **fully covered (35 of 35)**, the long tail
|
|
82
|
-
(
|
|
83
|
-
"
|
|
83
|
+
(7 of 240) is not. We publish that gap rather than imply
|
|
84
|
+
"275 evaluated skills": coverage is measured per tier
|
|
84
85
|
(`./scripts-run src/scripts/skill_eval_coverage`), **CI-ratcheted so it can
|
|
85
86
|
only rise**, and the priority tiers carry a hard **tier floor**: every
|
|
86
87
|
rich / default-surface / router skill MUST have a behavioural eval or an
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@event4u/agent-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "Universal AI Agent OS — audited skills, governance rules, commands, and templates for AI coding tools (Claude Code, Cursor, Windsurf, Copilot).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
Binary file
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
* "boundary_kind": "task" | "phase-step" | "tool-call",
|
|
16
16
|
* "consulted": {"skills": [...], "rules": [...], ...},
|
|
17
17
|
* "applied": {"skills": [...], "rules": [...], ...},
|
|
18
|
+
* "loaded": {"skills": [...], "rules": [...], ...} # optional (U1a):
|
|
19
|
+
* what was AVAILABLE/INJECTED at the boundary — the Fired/Loaded
|
|
20
|
+
* denominator. Superset contract: consulted ⊆ loaded. Ids only
|
|
21
|
+
* (same PII-exclusion-by-construction shape as consulted).
|
|
18
22
|
* "outcomes": ["blocked", "verification_failed", ...] # optional
|
|
19
23
|
* "tokens_estimate": {"consulted_load": <int>} # optional
|
|
20
24
|
* }
|
|
@@ -127,6 +131,7 @@ export interface EngagementEventInit {
|
|
|
127
131
|
boundary_kind: string;
|
|
128
132
|
consulted?: Record<string, string[]>;
|
|
129
133
|
applied?: Record<string, string[]>;
|
|
134
|
+
loaded?: Record<string, string[]> | null;
|
|
130
135
|
outcomes?: string[] | null;
|
|
131
136
|
tokens_estimate?: Record<string, number> | null;
|
|
132
137
|
schema_version?: number;
|
|
@@ -138,6 +143,7 @@ export class EngagementEvent {
|
|
|
138
143
|
boundary_kind: string;
|
|
139
144
|
consulted: Record<string, string[]>;
|
|
140
145
|
applied: Record<string, string[]>;
|
|
146
|
+
loaded: Record<string, string[]> | null;
|
|
141
147
|
outcomes: string[] | null;
|
|
142
148
|
tokens_estimate: Record<string, number> | null;
|
|
143
149
|
schema_version: number;
|
|
@@ -148,6 +154,7 @@ export class EngagementEvent {
|
|
|
148
154
|
this.boundary_kind = init.boundary_kind;
|
|
149
155
|
this.consulted = init.consulted ?? {};
|
|
150
156
|
this.applied = init.applied ?? {};
|
|
157
|
+
this.loaded = init.loaded ?? null;
|
|
151
158
|
this.outcomes = init.outcomes ?? null;
|
|
152
159
|
this.tokens_estimate = init.tokens_estimate ?? null;
|
|
153
160
|
this.schema_version = init.schema_version ?? SCHEMA_VERSION;
|
|
@@ -171,6 +178,20 @@ export class EngagementEvent {
|
|
|
171
178
|
}
|
|
172
179
|
_validate_artefact_dict('consulted', this.consulted);
|
|
173
180
|
_validate_artefact_dict('applied', this.applied);
|
|
181
|
+
if (this.loaded !== null) {
|
|
182
|
+
_validate_artefact_dict('loaded', this.loaded);
|
|
183
|
+
for (const [kind, ids] of Object.entries(this.consulted)) {
|
|
184
|
+
const avail = new Set(this.loaded[kind] ?? []);
|
|
185
|
+
for (const art_id of ids) {
|
|
186
|
+
if (!avail.has(art_id)) {
|
|
187
|
+
throw new EngagementSchemaError(
|
|
188
|
+
`consulted.${kind} id '${art_id}' missing from loaded.${kind}; `
|
|
189
|
+
+ 'superset contract: consulted \u2286 loaded',
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
174
195
|
if (this.outcomes !== null) {
|
|
175
196
|
_validate_outcomes(this.outcomes);
|
|
176
197
|
}
|
|
@@ -206,6 +227,12 @@ export class EngagementEvent {
|
|
|
206
227
|
consulted: _normalise_artefact_dict(this.consulted),
|
|
207
228
|
applied: _normalise_artefact_dict(this.applied),
|
|
208
229
|
};
|
|
230
|
+
if (this.loaded !== null) {
|
|
231
|
+
const norm = _normalise_artefact_dict(this.loaded);
|
|
232
|
+
if (Object.keys(norm).length > 0) {
|
|
233
|
+
out['loaded'] = norm;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
209
236
|
if (this.outcomes && this.outcomes.length > 0) {
|
|
210
237
|
out['outcomes'] = [...this.outcomes];
|
|
211
238
|
}
|
|
@@ -310,6 +337,9 @@ export function parse_event(line: string): EngagementEvent {
|
|
|
310
337
|
boundary_kind: (r['boundary_kind'] as string) ?? '',
|
|
311
338
|
consulted: _orEmptyDict(r['consulted']),
|
|
312
339
|
applied: _orEmptyDict(r['applied']),
|
|
340
|
+
loaded: r['loaded'] === undefined || r['loaded'] === null
|
|
341
|
+
? null
|
|
342
|
+
: _orEmptyDict(r['loaded']),
|
|
313
343
|
outcomes: (r['outcomes'] as string[] | null | undefined) ?? null,
|
|
314
344
|
tokens_estimate: (r['tokens_estimate'] as Record<string, number> | null | undefined) ?? null,
|
|
315
345
|
schema_version: r['schema_version'] === undefined
|
|
@@ -121,15 +121,19 @@ export function render_markdown(aggregate: AggregateResult, opts: RenderOptions
|
|
|
121
121
|
lines.push('');
|
|
122
122
|
continue;
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
lines.push(
|
|
124
|
+
const withLoaded = aggregate.loaded_events > 0;
|
|
125
|
+
lines.push(withLoaded
|
|
126
|
+
? '| kind | id | loaded | consulted | applied | fired/loaded | applied/consulted | last seen |'
|
|
127
|
+
: '| kind | id | consulted | applied | applied/consulted | last seen |');
|
|
128
|
+
lines.push(withLoaded ? '|---|---|---:|---:|---:|---:|---:|---|' : '|---|---|---:|---:|---:|---|');
|
|
126
129
|
for (const entry of rows) {
|
|
127
130
|
const s = entry.stat;
|
|
128
131
|
check_id_redaction(`buckets.${s.kind}.id`, s.artefact_id);
|
|
129
|
-
lines.push(
|
|
130
|
-
`| ${s.kind} | \`${s.artefact_id}\` | ${s.consulted} | ${s.applied} `
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
lines.push(withLoaded
|
|
133
|
+
? `| ${s.kind} | \`${s.artefact_id}\` | ${s.loaded} | ${s.consulted} | ${s.applied} `
|
|
134
|
+
+ `| ${_pyFixed(s.fired_ratio, 2)} | ${_pyFixed(s.applied_ratio, 2)} | \`${s.last_seen_ts}\` |`
|
|
135
|
+
: `| ${s.kind} | \`${s.artefact_id}\` | ${s.consulted} | ${s.applied} `
|
|
136
|
+
+ `| ${_pyFixed(s.applied_ratio, 2)} | \`${s.last_seen_ts}\` |`);
|
|
133
137
|
}
|
|
134
138
|
lines.push('');
|
|
135
139
|
}
|
|
@@ -147,7 +151,9 @@ export function render_json(aggregate: AggregateResult, opts: RenderOptions = {}
|
|
|
147
151
|
[BUCKET_BOTTOM]: [],
|
|
148
152
|
};
|
|
149
153
|
for (const entry of bucketed) {
|
|
150
|
-
(grouped[entry.bucket] as Array<Record<string, unknown>>).push(
|
|
154
|
+
(grouped[entry.bucket] as Array<Record<string, unknown>>).push(
|
|
155
|
+
_stat_to_dict(entry.stat, aggregate.loaded_events > 0),
|
|
156
|
+
);
|
|
151
157
|
}
|
|
152
158
|
if (top !== null) {
|
|
153
159
|
for (const bucket of Object.keys(grouped)) {
|
|
@@ -179,9 +185,9 @@ export function render_json(aggregate: AggregateResult, opts: RenderOptions = {}
|
|
|
179
185
|
return `${_py_json_dumps_indent2_sorted(payload)}\n`;
|
|
180
186
|
}
|
|
181
187
|
|
|
182
|
-
function _stat_to_dict(stat: ArtefactStat): Record<string, unknown> {
|
|
188
|
+
function _stat_to_dict(stat: ArtefactStat, withLoaded = false): Record<string, unknown> {
|
|
183
189
|
check_id_redaction(`buckets.${stat.kind}.id`, stat.artefact_id);
|
|
184
|
-
|
|
190
|
+
const out: Record<string, unknown> = {
|
|
185
191
|
kind: stat.kind,
|
|
186
192
|
id: stat.artefact_id,
|
|
187
193
|
consulted: stat.consulted,
|
|
@@ -189,6 +195,13 @@ function _stat_to_dict(stat: ArtefactStat): Record<string, unknown> {
|
|
|
189
195
|
applied_ratio: new PyFloat(_pyRound(stat.applied_ratio, 4)),
|
|
190
196
|
last_seen_ts: stat.last_seen_ts,
|
|
191
197
|
};
|
|
198
|
+
// U1a: emitted only when the log carries the loaded denominator, so
|
|
199
|
+
// pre-U1a logs render byte-identically to the frozen parity oracle.
|
|
200
|
+
if (withLoaded) {
|
|
201
|
+
out['loaded'] = stat.loaded;
|
|
202
|
+
out['fired_ratio'] = new PyFloat(_pyRound(stat.fired_ratio, 4));
|
|
203
|
+
}
|
|
204
|
+
return out;
|
|
192
205
|
}
|
|
193
206
|
|
|
194
207
|
// ── Python-parity helpers ───────────────────────────────────────────────
|
|
@@ -63,6 +63,7 @@ interface RecordArgs {
|
|
|
63
63
|
boundary: string;
|
|
64
64
|
consulted: string[] | null;
|
|
65
65
|
applied: string[] | null;
|
|
66
|
+
loaded: string[] | null;
|
|
66
67
|
outcome: string[] | null;
|
|
67
68
|
ts: string;
|
|
68
69
|
payload_file: string | null;
|
|
@@ -78,6 +79,7 @@ function _build_event_from_args(args: RecordArgs): EngagementEvent {
|
|
|
78
79
|
boundary_kind: args.boundary,
|
|
79
80
|
consulted: _parse_kv_list(args.consulted ?? []),
|
|
80
81
|
applied: _parse_kv_list(args.applied ?? []),
|
|
82
|
+
loaded: args.loaded && args.loaded.length > 0 ? _parse_kv_list(args.loaded) : null,
|
|
81
83
|
outcomes: args.outcome && args.outcome.length > 0 ? [...args.outcome] : null,
|
|
82
84
|
});
|
|
83
85
|
}
|
|
@@ -101,6 +103,7 @@ function _build_event_from_payload(raw: string): EngagementEvent {
|
|
|
101
103
|
boundary_kind: (d['boundary_kind'] as string) ?? '',
|
|
102
104
|
consulted: _orEmpty(d['consulted']),
|
|
103
105
|
applied: _orEmpty(d['applied']),
|
|
106
|
+
loaded: d['loaded'] === undefined || d['loaded'] === null ? null : _orEmpty(d['loaded']),
|
|
104
107
|
outcomes: (d['outcomes'] as string[] | null | undefined) ?? null,
|
|
105
108
|
tokens_estimate: (d['tokens_estimate'] as Record<string, number> | null | undefined) ?? null,
|
|
106
109
|
});
|
|
@@ -121,6 +124,7 @@ function _parseArgs(argv: string[]): RecordArgs {
|
|
|
121
124
|
boundary: 'task',
|
|
122
125
|
consulted: null,
|
|
123
126
|
applied: null,
|
|
127
|
+
loaded: null,
|
|
124
128
|
outcome: null,
|
|
125
129
|
ts: '',
|
|
126
130
|
payload_file: null,
|
|
@@ -155,6 +159,7 @@ function _parseArgs(argv: string[]): RecordArgs {
|
|
|
155
159
|
}
|
|
156
160
|
a.boundary = v;
|
|
157
161
|
} else if (tok === '--consulted') (a.consulted ??= []).push(next());
|
|
162
|
+
else if (tok === '--loaded') (a.loaded ??= []).push(next());
|
|
158
163
|
else if (tok === '--applied') (a.applied ??= []).push(next());
|
|
159
164
|
else if (tok === '--outcome') {
|
|
160
165
|
const v = next();
|
|
@@ -252,7 +252,10 @@ const _AGENTS_DIR_MARKERS: readonly string[] = [
|
|
|
252
252
|
'roadmaps',
|
|
253
253
|
'settings/.ai-council.yml',
|
|
254
254
|
'roadmaps-progress.md',
|
|
255
|
-
|
|
255
|
+
// `overrides/` is the guaranteed minimal-consumer surface (ADR-020).
|
|
256
|
+
// Replaced the retired `.event4u-bridge.yml` marker (ADR-020 amendment
|
|
257
|
+
// 2026-07-13) so a bare consumer `agents/` dir stays anchorable.
|
|
258
|
+
'overrides',
|
|
256
259
|
];
|
|
257
260
|
|
|
258
261
|
/**
|
|
@@ -62,10 +62,15 @@ projection:
|
|
|
62
62
|
# rules ALWAYS project (unconditional by definition); untagged rules fail
|
|
63
63
|
# safe and ship. Example consumer scope:
|
|
64
64
|
# rule_workspaces: [engineering]
|
|
65
|
-
#
|
|
66
|
-
#
|
|
65
|
+
# DEFAULT FLIPPED 2026-07-13 (the Phase-1 human gate, maintainer-approved,
|
|
66
|
+
# evidence-gated): the default below lists EVERY consumer workspace, so
|
|
67
|
+
# exactly the exclusively-maintainer specification rules drop from consumer
|
|
68
|
+
# installs (the audited 16-rule lever — see
|
|
69
|
+
# agents/settings/contexts/consumer-scoping-audit-2026-07-07.md) while all
|
|
70
|
+
# domain safety floors and domain rules keep shipping. Narrowing further
|
|
71
|
+
# (e.g. [engineering] only) stays a per-install user choice.
|
|
67
72
|
# An EMPTY list is inactive (= legacy-all); only a non-empty list scopes.
|
|
68
|
-
rule_workspaces: []
|
|
73
|
+
rule_workspaces: [engineering, product, finance, founder, gtm, ops, small-business, construction, legal-review-prep]
|
|
69
74
|
#
|
|
70
75
|
# Optional second axis, same semantics per pack ids (packs.yml). When set,
|
|
71
76
|
# a non-kernel rule also needs a `packs:` intersection to project — e.g.
|
|
@@ -622,10 +627,14 @@ worktrees:
|
|
|
622
627
|
|
|
623
628
|
# --- AI Council (external second-opinion network) ---
|
|
624
629
|
#
|
|
625
|
-
#
|
|
626
|
-
#
|
|
627
|
-
#
|
|
628
|
-
#
|
|
630
|
+
# The council config is NOT here and is NOT project-local. It lives ONLY
|
|
631
|
+
# user-global at `~/.event4u/agent-config/settings/.ai-council.yml` — one
|
|
632
|
+
# file, configured once, serving every project / worktree / CWD (ADR-104,
|
|
633
|
+
# superseding ADR-093). The project tree is NEVER searched; a
|
|
634
|
+
# `.ai-council.yml` under any `agents/` tree is ignored. To opt in, copy
|
|
635
|
+
# the shape from `agents/templates/.ai-council.yml.example` to that
|
|
636
|
+
# user-global path and flip `enabled: true` per provider — do NOT drop it
|
|
637
|
+
# into a project's `agents/` tree.
|
|
629
638
|
#
|
|
630
639
|
# See `docs/contracts/ai-council-config.md` for the schema.
|
|
631
640
|
|
|
@@ -665,9 +674,24 @@ ai_team:
|
|
|
665
674
|
# plugin on Claude-Code hosts. Cosmetic only — never changes behavior.
|
|
666
675
|
suppress_setup_hint: false
|
|
667
676
|
|
|
668
|
-
#
|
|
669
|
-
#
|
|
670
|
-
#
|
|
677
|
+
# Managed governance of the codex plugin's Stop-hook Review Gate
|
|
678
|
+
# (road-to-team-mode Phase 4). The gate itself stays upstream's; these
|
|
679
|
+
# keys only govern it. Upstream's own warning: "The review gate can
|
|
680
|
+
# create a long-running Claude/Codex loop and may drain usage limits
|
|
681
|
+
# quickly."
|
|
682
|
+
review_gate:
|
|
683
|
+
# false (default) = byte-identical pre-Phase-4 behavior: no counting,
|
|
684
|
+
# no circuit breaker, our Stop path never touches the gate. true =
|
|
685
|
+
# count consecutive BLOCK verdicts per session and trip the circuit
|
|
686
|
+
# breaker at the bound below.
|
|
687
|
+
managed: false
|
|
688
|
+
|
|
689
|
+
# Circuit-breaker bound: after this many CONSECUTIVE BLOCK verdicts
|
|
690
|
+
# in one session, a visible notice is injected exactly once and the
|
|
691
|
+
# managed layer stops re-blocking — the user decides, never an
|
|
692
|
+
# infinite Claude↔Codex loop. An ALLOW verdict resets the counter.
|
|
693
|
+
# Positive integer.
|
|
694
|
+
max_consecutive_blocks: 3
|
|
671
695
|
|
|
672
696
|
# --- Onboarding ---
|
|
673
697
|
#
|
|
@@ -737,6 +761,45 @@ commands:
|
|
|
737
761
|
create_pr:
|
|
738
762
|
preview_description: false
|
|
739
763
|
|
|
764
|
+
# Verbosity tier for the generated PR description body.
|
|
765
|
+
# min (default) = title + 2-3 sentence what/why/impact + linked ticket.
|
|
766
|
+
# Token-frugal. Critical info (breaking changes,
|
|
767
|
+
# migrations, security, rollback) is ALWAYS included
|
|
768
|
+
# regardless of tier — the tier governs explanatory
|
|
769
|
+
# depth, never whether a critical callout appears.
|
|
770
|
+
# med = min + grouped logical changes + tests note.
|
|
771
|
+
# max = med + how-to-test + edge cases / trade-offs +
|
|
772
|
+
# reviewer guidance (the richest, ~legacy output).
|
|
773
|
+
detail_level: min
|
|
774
|
+
|
|
775
|
+
# JSON request/response examples for API-endpoint changes.
|
|
776
|
+
# true (default) = include a fenced example ONLY when it can be
|
|
777
|
+
# grounded in a real source (response DTO/resource,
|
|
778
|
+
# OpenAPI/schema, test fixture, or an actual probe).
|
|
779
|
+
# No grounded source → a one-line pointer, never an
|
|
780
|
+
# invented example (a hallucinated contract misleads
|
|
781
|
+
# reviewers, so it is worse than none).
|
|
782
|
+
# false = never add API examples.
|
|
783
|
+
api_examples: true
|
|
784
|
+
|
|
785
|
+
# Screenshots for frontend changes. Default false (off). Capability-gated:
|
|
786
|
+
# requires the host to have browser/preview tooling (Playwright / a
|
|
787
|
+
# dev-server URL). When true + a frontend change + no such tooling, the
|
|
788
|
+
# agent emits a one-line note and leaves the template placeholder — it
|
|
789
|
+
# never fails or blocks PR creation, and never claims an embed that did
|
|
790
|
+
# not happen. Before/after + changed-region highlighting is best-effort.
|
|
791
|
+
# false (default) = never attempt screenshots.
|
|
792
|
+
# true = attempt when capable (see command contract).
|
|
793
|
+
screenshots: false
|
|
794
|
+
|
|
795
|
+
# Optional glob lists that make frontend / API-endpoint detection
|
|
796
|
+
# explicit instead of heuristic. Empty (default) = the command uses a
|
|
797
|
+
# light path/extension heuristic and fails open (no false enrichment
|
|
798
|
+
# when the surface is ambiguous). Populate to pin your project's paths,
|
|
799
|
+
# e.g. ui_paths: ["resources/views/**", "src/pages/**"].
|
|
800
|
+
ui_paths: []
|
|
801
|
+
api_paths: []
|
|
802
|
+
|
|
740
803
|
# --- Memory ---
|
|
741
804
|
#
|
|
742
805
|
# Engineering memory consolidation behaviour. Memory is entirely
|