@event4u/agent-config 1.17.0 → 1.18.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/.agent-src/rules/context-hygiene.md +6 -0
- package/.agent-src/rules/direct-answers.md +17 -26
- package/.agent-src/rules/no-cheap-questions.md +14 -21
- package/.agent-src/rules/onboarding-gate.md +7 -0
- package/.agent-src/rules/roadmap-progress-sync.md +27 -0
- package/.agent-src/rules/rule-type-governance.md +28 -0
- package/.agent-src/templates/roadmaps.md +4 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +35 -0
- package/README.md +1 -1
- package/docs/architecture.md +1 -1
- package/docs/contracts/load-context-budget-model.md +80 -0
- package/docs/contracts/load-context-schema.md +20 -0
- package/docs/contracts/roadmap-complexity-standard.md +137 -0
- package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +134 -0
- package/docs/guidelines/agent-infra/direct-answers-demos.md +145 -0
- package/docs/guidelines/agent-infra/verify-before-complete-demos.md +128 -0
- package/package.json +1 -1
- package/scripts/agent-config +20 -0
- package/scripts/ai_council/one_off_archive/2026-05/README.md +45 -0
- package/scripts/ai_council/one_off_archive/2026-05/_one_off_budget_v2_audit.py +206 -0
- package/scripts/build_rule_trigger_matrix.py +360 -0
- package/scripts/check_always_budget.py +39 -0
- package/scripts/check_one_off_location.py +81 -0
- package/scripts/check_references.py +6 -0
- package/scripts/compress.py +5 -2
- package/scripts/context_hygiene_hook.py +173 -0
- package/scripts/hooks/augment-context-hygiene.sh +55 -0
- package/scripts/hooks/augment-onboarding-gate.sh +55 -0
- package/scripts/install.py +58 -19
- package/scripts/lint_examples.py +98 -0
- package/scripts/lint_roadmap_complexity.py +127 -0
- package/scripts/onboarding_gate_hook.py +137 -0
- package/scripts/schemas/rule.schema.json +5 -0
- /package/scripts/ai_council/{_one_off_2a4_acceptance.py → one_off_archive/2026-05/_one_off_2a4_acceptance.py} +0 -0
- /package/scripts/ai_council/{_one_off_context_layer_v1_estimate.py → one_off_archive/2026-05/_one_off_context_layer_v1_estimate.py} +0 -0
- /package/scripts/ai_council/{_one_off_context_layer_v1_review.py → one_off_archive/2026-05/_one_off_context_layer_v1_review.py} +0 -0
- /package/scripts/ai_council/{_one_off_followups_review.py → one_off_archive/2026-05/_one_off_followups_review.py} +0 -0
- /package/scripts/ai_council/{_one_off_nondestructive_inline_audit.py → one_off_archive/2026-05/_one_off_nondestructive_inline_audit.py} +0 -0
- /package/scripts/{_one_off_phase4_dispatch_latency.py → ai_council/one_off_archive/2026-05/_one_off_phase4_dispatch_latency.py} +0 -0
- /package/scripts/{_one_off_phase6_trigger_jaccard.py → ai_council/one_off_archive/2026-05/_one_off_phase6_trigger_jaccard.py} +0 -0
- /package/scripts/ai_council/{_one_off_phase_2a_budget_rebalance.py → one_off_archive/2026-05/_one_off_phase_2a_budget_rebalance.py} +0 -0
- /package/scripts/ai_council/{_one_off_phase_2a_post_revert.py → one_off_archive/2026-05/_one_off_phase_2a_post_revert.py} +0 -0
- /package/scripts/ai_council/{_one_off_rebalancing_audit.py → one_off_archive/2026-05/_one_off_rebalancing_audit.py} +0 -0
- /package/scripts/ai_council/{_one_off_roundtrip.py → one_off_archive/2026-05/_one_off_roundtrip.py} +0 -0
- /package/scripts/ai_council/{_one_off_rule_hardening_v1.py → one_off_archive/2026-05/_one_off_rule_hardening_v1.py} +0 -0
- /package/scripts/ai_council/{_one_off_structural_open_questions.py → one_off_archive/2026-05/_one_off_structural_open_questions.py} +0 -0
- /package/scripts/ai_council/{_one_off_structural_optimization.py → one_off_archive/2026-05/_one_off_structural_optimization.py} +0 -0
- /package/scripts/ai_council/{_one_off_structural_v3_gaps.py → one_off_archive/2026-05/_one_off_structural_v3_gaps.py} +0 -0
- /package/scripts/ai_council/{_one_off_structural_v3_review.py → one_off_archive/2026-05/_one_off_structural_v3_review.py} +0 -0
|
@@ -7,6 +7,12 @@ source: package
|
|
|
7
7
|
|
|
8
8
|
# Context Hygiene
|
|
9
9
|
|
|
10
|
+
> **Enforced by:** [`scripts/context_hygiene_hook.py`](../../scripts/context_hygiene_hook.py)
|
|
11
|
+
> on Augment + Claude Code (`PostToolUse`). The hook maintains
|
|
12
|
+
> `agents/state/context-hygiene.json` (turn count, loop signal,
|
|
13
|
+
> freshness milestones at 20/40/60); the prose below is the spec the
|
|
14
|
+
> hook implements and the agent-side fallback.
|
|
15
|
+
|
|
10
16
|
## Conversation Freshness
|
|
11
17
|
|
|
12
18
|
Monitor for **context decay** — long conversations degrade quality and waste tokens.
|
|
@@ -22,8 +22,7 @@ ANSWER THE SUBSTANCE. SHIP THE TRUTH.
|
|
|
22
22
|
- No subjective judgments on user's code/decisions ("nice approach", "boring") unless evaluation was asked.
|
|
23
23
|
- "Good catch" / "you're right" only when literally true and load-bearing.
|
|
24
24
|
- Acknowledge mistakes without performative apologies — one sentence, switch behavior.
|
|
25
|
-
|
|
26
|
-
Failure mode: praise as a hedge before bad news. Drop the cushion, deliver the news.
|
|
25
|
+
- Failure mode — praise hedging bad news; drop the cushion, deliver the news.
|
|
27
26
|
|
|
28
27
|
## Iron Law 2 — No Invented Facts (severity-tiered)
|
|
29
28
|
|
|
@@ -39,11 +38,10 @@ WHEN VERIFICATION IS NOT WORTH THE COST → ASK.
|
|
|
39
38
|
| **Medium — project-shape** ("uses X for Y", conventions, file location) | Verify if one tool call reaches it; otherwise hedge: *"I'd guess X — not checked"*. |
|
|
40
39
|
| **Low — well-known idioms** (generic language/framework idioms, public APIs) | Inference acceptable. Mark as inference if not 100% sure. |
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
Examples + hedge-language patterns:
|
|
43
42
|
[`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--severity-tiered-claim-examples).
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
verify" → drop to Low for that turn.
|
|
43
|
+
Override: "just guess", "rough estimate is fine", "skip the verify"
|
|
44
|
+
→ drop to Low for that turn.
|
|
47
45
|
|
|
48
46
|
## Iron Law 3 — Brevity by Default
|
|
49
47
|
|
|
@@ -60,33 +58,26 @@ LONG ANSWERS ARE A FAILURE MODE, NOT A SIGN OF EFFORT.
|
|
|
60
58
|
- One-true-answer question → one sentence + the answer.
|
|
61
59
|
|
|
62
60
|
`token-efficiency` covers the loop side; this rule covers per-reply
|
|
63
|
-
length. **Never overrides** `user-interaction` (numbered options
|
|
64
|
-
|
|
61
|
+
length. **Never overrides** `user-interaction` (numbered options stay)
|
|
62
|
+
or command-mandated steps.
|
|
65
63
|
|
|
66
64
|
## Emoji Scope — functional markers only
|
|
67
65
|
|
|
68
|
-
**Whitelist (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- CLI status: `❌`, `✅`, `⚠️` (two-space rule from `language-and-tone`).
|
|
73
|
-
- Roadmap checkboxes: `[x]`, `[~]`, `[-]`.
|
|
66
|
+
**Whitelist:** `📒` (chat-history heartbeat, verbatim per
|
|
67
|
+
`chat-history-visibility`); mode markers from `role-mode-adherence`;
|
|
68
|
+
CLI status `❌` / `✅` / `⚠️` (two-space rule from `language-and-tone`);
|
|
69
|
+
roadmap checkboxes `[x]` / `[~]` / `[-]`.
|
|
74
70
|
|
|
75
|
-
**Blacklist (never in prose):**
|
|
71
|
+
**Blacklist (never in prose):** opening flair (✨, 🚀, 🎉, 💡, 🔥, 👍);
|
|
72
|
+
empathy (❤️, 🤗, 😊); section dividers, headline ornaments, reaction
|
|
73
|
+
emojis. Unsure → assume blacklist.
|
|
76
74
|
|
|
77
|
-
|
|
78
|
-
- Empathy: ❤️, 🤗, 😊.
|
|
79
|
-
- Section dividers, headline ornaments, reaction emojis.
|
|
75
|
+
## Failure modes
|
|
80
76
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## Failure modes the user will call out
|
|
84
|
-
|
|
85
|
-
Trigger phrases per Iron Law and the in-language correction pattern:
|
|
77
|
+
Trigger phrases + in-language correction pattern:
|
|
86
78
|
[`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--failure-modes-the-user-will-call-out).
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
no excuses (mirrors `language-and-tone` § slip handling).
|
|
79
|
+
On call-out: acknowledge once in the user's language, switch, no
|
|
80
|
+
excuses (mirrors `language-and-tone` § slip handling).
|
|
90
81
|
|
|
91
82
|
## Interactions
|
|
92
83
|
|
|
@@ -9,13 +9,10 @@ source: package
|
|
|
9
9
|
|
|
10
10
|
A question is **cheap** when the answer follows from stated context,
|
|
11
11
|
an option breaches an Iron Law, choices differ only in sequencing /
|
|
12
|
-
format, or one option is obviously dominant.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"trivial" failure modes scope to `personal.autonomy: on` (or
|
|
17
|
-
`auto`-after-opt-in); this rule lifts the **no-trade-off** subset to
|
|
18
|
-
`off` and pre-opt-in `auto` too.
|
|
12
|
+
format, or one option is obviously dominant. Mode-independent — holds
|
|
13
|
+
in `off`, `auto`, and `on`; autonomy never lifts the no-trade-off
|
|
14
|
+
floor (cf. [`autonomous-execution`](autonomous-execution.md), whose
|
|
15
|
+
"trivial" failure modes only scope to `on` / opted-in `auto`).
|
|
19
16
|
|
|
20
17
|
## The Iron Laws
|
|
21
18
|
|
|
@@ -35,16 +32,12 @@ Hold in `off`, `auto`, and `on`. Autonomy never lifts them.
|
|
|
35
32
|
- **CI / test asks** — [`verify-before-complete`](verify-before-complete.md) decides, not the user.
|
|
36
33
|
- **Fenced-step re-asks** — "Start Phase 1?" after *"plan only"*; see
|
|
37
34
|
[`scope-control § fenced step`](scope-control.md#fenced-step--user-set-review-gates).
|
|
38
|
-
- **Iron-Law option** —
|
|
39
|
-
|
|
40
|
-
- **
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- **Re-ask after decline** — forbidden per
|
|
45
|
-
[`scope-control § decline = silence`](scope-control.md#decline--silence--no-re-asking-on-the-same-task).
|
|
46
|
-
|
|
47
|
-
Concrete examples per class:
|
|
35
|
+
- **Iron-Law option** — breaches `commit-policy`, `scope-control` § git-ops, or `non-destructive-by-default`.
|
|
36
|
+
- **Context-derived** — answer follows from prior turn / standing instruction / roadmap; act, state the assumption inline.
|
|
37
|
+
- **Dominant option** — one choice obviously correct; alternatives carry no upside.
|
|
38
|
+
- **Re-ask after decline** — forbidden per [`scope-control § decline = silence`](scope-control.md#decline--silence--no-re-asking-on-the-same-task).
|
|
39
|
+
|
|
40
|
+
Examples per class:
|
|
48
41
|
[`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#cheap-question-class-catalog--extended-examples).
|
|
49
42
|
|
|
50
43
|
## Pre-Send Self-Check — MANDATORY before every question
|
|
@@ -52,11 +45,11 @@ Concrete examples per class:
|
|
|
52
45
|
Run silently before any numbered-options block:
|
|
53
46
|
|
|
54
47
|
1. Answer already in stated context?
|
|
55
|
-
2. Any option violates
|
|
48
|
+
2. Any option violates `commit-policy`, `scope-control` § git-ops, or `non-destructive-by-default`?
|
|
56
49
|
3. Options pure sequencing / format, no trade-off?
|
|
57
50
|
4. One option obviously dominant?
|
|
58
|
-
5. User fenced next step (*"plan only"*, *"review first"*) → deliver + handback per
|
|
59
|
-
6. User already declined? Re-ask forbidden per
|
|
51
|
+
5. User fenced next step (*"plan only"*, *"review first"*) → deliver + handback per `scope-control` § fenced step.
|
|
52
|
+
6. User already declined? Re-ask forbidden per `scope-control` § decline = silence.
|
|
60
53
|
|
|
61
54
|
Any "yes" → **do not ask**. Pick the dominant path, state assumption
|
|
62
55
|
inline (*"assuming X — adjust if wrong"*), hand back. One-question-per-turn
|
|
@@ -68,7 +61,7 @@ the question is genuine.
|
|
|
68
61
|
- Real architectural / scope decision with non-obvious trade-offs.
|
|
69
62
|
- Vague-request trigger per [`ask-when-uncertain`](ask-when-uncertain.md#vague-request-triggers--must-ask).
|
|
70
63
|
- Security-sensitive path per [`security-sensitive-stop`](security-sensitive-stop.md).
|
|
71
|
-
- Hard Floor
|
|
64
|
+
- Hard Floor per `non-destructive-by-default` — confirmation mandatory.
|
|
72
65
|
- Two genuinely-equivalent paths; user preference is the tiebreaker.
|
|
73
66
|
|
|
74
67
|
In doubt → ask. This rule narrows asking, never widens silence.
|
|
@@ -7,6 +7,12 @@ source: package
|
|
|
7
7
|
|
|
8
8
|
# Onboarding Gate
|
|
9
9
|
|
|
10
|
+
> **Enforced by:** [`scripts/onboarding_gate_hook.py`](../../scripts/onboarding_gate_hook.py)
|
|
11
|
+
> on Augment + Claude Code (`SessionStart`). The hook refreshes
|
|
12
|
+
> `agents/state/onboarding-gate.json` from `.agent-settings.yml`; the
|
|
13
|
+
> prose below is the spec the hook implements and the fallback for
|
|
14
|
+
> platforms without a hook surface.
|
|
15
|
+
|
|
10
16
|
Forces a one-time `/onboard` run for each developer on each project. This
|
|
11
17
|
replaces the previously scattered "ask once" patterns across `user_name`,
|
|
12
18
|
`personal.ide`, `personal.rtk_installed`, and cost profile confirmation.
|
|
@@ -92,3 +98,4 @@ gate. This protects projects that were set up before this rule shipped.
|
|
|
92
98
|
- [`layered-settings`](../../docs/guidelines/agent-infra/layered-settings.md) — merge rules for mid-life edits
|
|
93
99
|
- [`agent-settings` template](../templates/agent-settings.md) — `onboarding.onboarded` reference
|
|
94
100
|
- [`rule-type-governance`](rule-type-governance.md) — why this is `always`
|
|
101
|
+
- [`hardening-pattern`](../../agents/contexts/hardening-pattern.md) — Tier 1 mechanical-rule contract
|
|
@@ -12,6 +12,11 @@ load_context:
|
|
|
12
12
|
|
|
13
13
|
# Roadmap Progress Sync
|
|
14
14
|
|
|
15
|
+
> **Enforced by:** [`scripts/roadmap_progress_hook.py`](../../scripts/roadmap_progress_hook.py)
|
|
16
|
+
> on Augment + Claude Code (`PostToolUse`). Hook is primary; the prose
|
|
17
|
+
> below is the specification the hook implements and the fallback when
|
|
18
|
+
> the platform has no hook surface.
|
|
19
|
+
|
|
15
20
|
## Iron Law — dashboard sync
|
|
16
21
|
|
|
17
22
|
```
|
|
@@ -90,6 +95,28 @@ roadmap left under `agents/roadmaps/` is a rule violation, not an
|
|
|
90
95
|
optional cleanup. See `roadmap-management` skill for the archive vs
|
|
91
96
|
skipped decision table.
|
|
92
97
|
|
|
98
|
+
## Agent-authored roadmaps — placement is mandatory
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
A FILE THE AGENT DROPS INTO agents/roadmaps/ MUST EITHER
|
|
102
|
+
(a) PASS check_roadmap_trackable.py AND LAND IN THE DASHBOARD, OR
|
|
103
|
+
(b) NOT BE IN agents/roadmaps/ AT ALL.
|
|
104
|
+
NO "DECISION MATRIX" / "DESIGN NOTE" SHORTCUT.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
When the agent autonomously creates a roadmap, it owns the placement
|
|
108
|
+
in the **same response**:
|
|
109
|
+
|
|
110
|
+
- **Phase plan** (checkboxes, multi-turn execution) → `agents/roadmaps/<name>.md`, `status: ready` (default), regen dashboard.
|
|
111
|
+
- **Decision matrix / ADR / pattern / lookup** (no `Phase N`, durable rationale) → `agents/contexts/<name>.md`.
|
|
112
|
+
- **Completed work snapshot** → `agents/roadmaps/archive/<name>.md`.
|
|
113
|
+
|
|
114
|
+
A non-trackable file in `agents/roadmaps/` is a rule violation — the
|
|
115
|
+
trackable CI fails it, the dashboard hides it. The agent that
|
|
116
|
+
created it moves it the same response. If the autonomous run also
|
|
117
|
+
**finishes** the roadmap within the session (every box `[x]`/`[~]`/`[-]`),
|
|
118
|
+
the completion-archival rule above fires too — same response.
|
|
119
|
+
|
|
93
120
|
## Autonomous execution — checkbox cadence
|
|
94
121
|
|
|
95
122
|
When executing a roadmap autonomously (multi-turn, no per-step user
|
|
@@ -44,3 +44,31 @@ The `description` field IS the trigger. It must describe **when** the rule appli
|
|
|
44
44
|
- Default to `auto`. Justify `always`.
|
|
45
45
|
- If >50% of conversations don't need a rule → it must be `auto`.
|
|
46
46
|
- `optimize-agents` command checks this and suggests changes.
|
|
47
|
+
|
|
48
|
+
## Hardening tier — required on new or edited rules
|
|
49
|
+
|
|
50
|
+
Every new rule, and every edited rule whose body changes the trigger
|
|
51
|
+
or the obligation, MUST classify itself against the hardening tiers
|
|
52
|
+
documented in [`rule-trigger-matrix.md`](../../agents/contexts/rule-trigger-matrix.md):
|
|
53
|
+
|
|
54
|
+
| Tier | Meaning |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `1` | Mechanically enforceable — hook acts, rule body stays minimal. |
|
|
57
|
+
| `2a` | Marker nudge — hook injects signal, agent acts on it. |
|
|
58
|
+
| `2b` | Structured injection / tool-call gate — hook reads/writes state, may deny. |
|
|
59
|
+
| `3` | Soft, judgment-bound — no platform surface; self-check rule. |
|
|
60
|
+
| `safety-floor` | Iron-Law subset, never modified. |
|
|
61
|
+
| `mechanical-already` | Precedent — script enforces, rule body documents. |
|
|
62
|
+
|
|
63
|
+
Classification surface: the optional `tier:` frontmatter field
|
|
64
|
+
(declared in `scripts/schemas/rule.schema.json`). Recommended for new
|
|
65
|
+
rules; bulk-retrofit of existing rules is tracked separately.
|
|
66
|
+
|
|
67
|
+
Tier 3 dispositions are recorded centrally in
|
|
68
|
+
[`agents/contexts/tier-3-dispositions.md`](../../agents/contexts/tier-3-dispositions.md)
|
|
69
|
+
with a 6-month re-audit clock. New Tier 3 rules append to that list
|
|
70
|
+
on landing.
|
|
71
|
+
|
|
72
|
+
The `optimize-agents` command checks the tier alongside `type`/`source`
|
|
73
|
+
and suggests escalations when a rule's trigger matches a hardening
|
|
74
|
+
opportunity that has shipped since the rule was authored.
|
|
@@ -64,6 +64,10 @@ Check `AGENTS.md` or `Makefile` / `Taskfile.yml` for the exact commands.
|
|
|
64
64
|
Copy the structure below into a new file:
|
|
65
65
|
|
|
66
66
|
```markdown
|
|
67
|
+
---
|
|
68
|
+
complexity: lightweight
|
|
69
|
+
---
|
|
70
|
+
|
|
67
71
|
# Roadmap: {Short descriptive title}
|
|
68
72
|
|
|
69
73
|
> {One sentence: What is the expected outcome?}
|
package/CHANGELOG.md
CHANGED
|
@@ -318,6 +318,41 @@ our recommendation order, not its support status.
|
|
|
318
318
|
users" tension without removing any path that an existing user
|
|
319
319
|
might rely on.
|
|
320
320
|
|
|
321
|
+
## [1.18.0](https://github.com/event4u-app/agent-config/compare/1.17.0...1.18.0) (2026-05-04)
|
|
322
|
+
|
|
323
|
+
### Features
|
|
324
|
+
|
|
325
|
+
* **rules:** mandate hardening tier classification on new and edited rules ([42ff7c1](https://github.com/event4u-app/agent-config/commit/42ff7c1765e931a3e5e487ef83d01ca597a65800))
|
|
326
|
+
* **hooks:** wire Tier 1 hooks on Claude Code for hardening parity ([55ede24](https://github.com/event4u-app/agent-config/commit/55ede24e65b5ab7e827fa3a40b04fe9dab091392))
|
|
327
|
+
* **rules:** enforce placement for agent-authored roadmaps ([1624ede](https://github.com/event4u-app/agent-config/commit/1624ede571bcdd28adb7d8dd4868a92b9dbde646))
|
|
328
|
+
* roadmap complexity standard with shape and tier linters ([bd1bac6](https://github.com/event4u-app/agent-config/commit/bd1bac650013e449e7318c60586b7648dbcc144e))
|
|
329
|
+
* **hardening:** tier-1 hooks for onboarding-gate and context-hygiene ([5d107cd](https://github.com/event4u-app/agent-config/commit/5d107cd6fa1352d609491df12604ae0ddb7d7113))
|
|
330
|
+
* **always-budget:** hard-compress direct-answers and no-cheap-questions ([2cb9b0b](https://github.com/event4u-app/agent-config/commit/2cb9b0be7b3e6486c3689fec75e7672507ca97cb))
|
|
331
|
+
* outcome baselines and pattern-memory demos for foundational rules ([f43ede7](https://github.com/event4u-app/agent-config/commit/f43ede70a59cb7460557e6d76b041562056e78ee))
|
|
332
|
+
|
|
333
|
+
### Bug Fixes
|
|
334
|
+
|
|
335
|
+
* **check-refs:** treat .augment/state/*.json as runtime-only paths ([3d4c766](https://github.com/event4u-app/agent-config/commit/3d4c76695af38e764facc8630a97e553f5aac67f))
|
|
336
|
+
* **rules:** sync compressed rules with hardening callouts ([89bd072](https://github.com/event4u-app/agent-config/commit/89bd07267d04d6346a1f36df92759c9208777a9a))
|
|
337
|
+
|
|
338
|
+
### Documentation
|
|
339
|
+
|
|
340
|
+
* **contexts,contracts:** unlink stable artifacts from archived roadmaps ([af4e5c2](https://github.com/event4u-app/agent-config/commit/af4e5c2de6dfb0d2143f48213e04d41c9354deca))
|
|
341
|
+
* **contexts:** lock Tier 2 nudge surface, Tier 3 dispositions, platform parity ([10685a7](https://github.com/event4u-app/agent-config/commit/10685a7f3fceec1b93365cef3531a5e81f55396f))
|
|
342
|
+
* **roadmaps:** relocate budget-v2-matrix to contexts as durable rationale ([33b903a](https://github.com/event4u-app/agent-config/commit/33b903a36feeacffddedde11ff9b1bc3bd5173e3))
|
|
343
|
+
|
|
344
|
+
### Refactoring
|
|
345
|
+
|
|
346
|
+
* **state:** move hook runtime state from .augment/state/ to agents/state/ ([ef5265e](https://github.com/event4u-app/agent-config/commit/ef5265e1ead67b089c4438efcbd4e94f120c6d3e))
|
|
347
|
+
|
|
348
|
+
### Chores
|
|
349
|
+
|
|
350
|
+
* **plugin:** restructure marketplace.json to registry shape ([f3e6f24](https://github.com/event4u-app/agent-config/commit/f3e6f2425fefef2cc5fc338d27e8628ab45a4d41))
|
|
351
|
+
* **council:** archive Budget-v2 audit one-off ([00bf46e](https://github.com/event4u-app/agent-config/commit/00bf46e680e3a66bdbddac35e1ec3a08a8aa11f4))
|
|
352
|
+
* **roadmaps:** archive hardening and context-layer-maturity tracks ([21dec26](https://github.com/event4u-app/agent-config/commit/21dec26b7a6455ab95df6704773426e3dd35574f))
|
|
353
|
+
* regenerate dashboards, hashes, and roadmap progress ([06c50a9](https://github.com/event4u-app/agent-config/commit/06c50a9653bf4250a557ba2fe5a39b8609b3df30))
|
|
354
|
+
* archive ai_council one-off scripts and add location guard ([63e6dbd](https://github.com/event4u-app/agent-config/commit/63e6dbdc49749e97621bcaeaa49f81beb5ffc98c))
|
|
355
|
+
|
|
321
356
|
## [1.17.0](https://github.com/event4u-app/agent-config/compare/1.16.0...1.17.0) (2026-05-04)
|
|
322
357
|
|
|
323
358
|
### Features
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Give your AI agents an audit-disciplined orchestration contract — testing, Git
|
|
|
7
7
|
> Your agent picks up the project's stack, runs tests, prepares PRs, fixes CI — and follows your team's coding standards while doing it. Stack-aware skill sets ship for PHP (Laravel · Symfony · Zend/Laminas), JavaScript (Next.js · React · Node), and cross-stack concerns (API · testing · security · observability).
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<strong>129 Skills</strong> · <strong>58 Rules</strong> · <strong>95 Commands</strong> · <strong>
|
|
10
|
+
<strong>129 Skills</strong> · <strong>58 Rules</strong> · <strong>95 Commands</strong> · <strong>51 Guidelines</strong> · <strong>8 AI Tools</strong>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
---
|
package/docs/architecture.md
CHANGED
|
@@ -65,7 +65,7 @@ fails on any source-side violation, without producing artifacts.
|
|
|
65
65
|
| **Skills** | 129 | On-demand expertise — stack analysis (Laravel · Symfony · Zend / Laminas · Next.js · React · Node), testing, Docker, API design, security, observability, … |
|
|
66
66
|
| **Rules** | 58 | Always-active constraints — coding standards, scope control, verification, language-and-tone, agent-authority |
|
|
67
67
|
| **Commands** | 95 | Slash-command workflows — `/commit`, `/create-pr`, `/fix ci`, `/optimize skills`, `/feature plan`, `/work`, `/implement-ticket`, `/compress`, … |
|
|
68
|
-
| **Guidelines** |
|
|
68
|
+
| **Guidelines** | 51 | Reference material cited by skills — PHP patterns, Eloquent, Playwright, agent-infra, … |
|
|
69
69
|
| **Templates** | 7 | Scaffolds for features, roadmaps, contexts, skills, overrides |
|
|
70
70
|
| **Contexts** | 5 | Shared knowledge about the system itself |
|
|
71
71
|
|
|
@@ -65,6 +65,86 @@ extraction pattern (Q1) and the **one-rule + three-contexts** consolidation
|
|
|
65
65
|
(Q2); model (b) literal is the accounting that makes both patterns
|
|
66
66
|
honest about their cost.
|
|
67
67
|
|
|
68
|
+
## Load order (Q1) — file order in frontmatter
|
|
69
|
+
|
|
70
|
+
Locked by Phase 1.2 of `road-to-context-layer-maturity` (council
|
|
71
|
+
session `2026-05-03T17-56-21Z`, v2 lock).
|
|
72
|
+
|
|
73
|
+
When a rule declares multiple `load_context:` and / or
|
|
74
|
+
`load_context_eager:` entries, the agent processes them in the order
|
|
75
|
+
they appear in the YAML list, top to bottom. `load_context_eager:`
|
|
76
|
+
entries are concatenated into the active context in declaration
|
|
77
|
+
order; `load_context:` entries are available for lazy retrieval in
|
|
78
|
+
the same order, surfaced first-listed-first when the rule body cites
|
|
79
|
+
them in prose.
|
|
80
|
+
|
|
81
|
+
**Rejected alternatives:**
|
|
82
|
+
|
|
83
|
+
- *Citation order in prose* — non-machine-readable; would force every
|
|
84
|
+
rule to embed a sort hint and the linter to parse rule body text.
|
|
85
|
+
- *Priority field per entry* — adds frontmatter surface area without
|
|
86
|
+
observable benefit. The current rule with the most contexts
|
|
87
|
+
(`autonomous-execution`, 3 contexts) reads each in declaration
|
|
88
|
+
order without ambiguity.
|
|
89
|
+
|
|
90
|
+
This contract treats list order as the canonical signal. Authors
|
|
91
|
+
must order their `load_context:` entries from "load this first" to
|
|
92
|
+
"load this last" so prose citations and frontmatter agree.
|
|
93
|
+
|
|
94
|
+
## Per-rule context-count cap (Q2) — ≤ 3 contexts per rule
|
|
95
|
+
|
|
96
|
+
Locked by Phase 1.3 of `road-to-context-layer-maturity` (council
|
|
97
|
+
session `2026-05-03T17-56-21Z`, v2 lock). Enforced by
|
|
98
|
+
`scripts/check_always_budget.py` as `MAX_CONTEXTS_PER_RULE = 3`.
|
|
99
|
+
|
|
100
|
+
A rule's combined count of `load_context:` + `load_context_eager:`
|
|
101
|
+
top-level entries must not exceed **3**. The cap is on *declared*
|
|
102
|
+
entries (depth 1 from the rule), not transitive closure — depth-2
|
|
103
|
+
context citations are governed by the depth-2 nesting cap below.
|
|
104
|
+
|
|
105
|
+
**Rationale:**
|
|
106
|
+
|
|
107
|
+
- Empirical max in the current rule set is 3
|
|
108
|
+
(`autonomous-execution`); the cap locks the ceiling without forcing
|
|
109
|
+
any rewrite.
|
|
110
|
+
- A 4th declared context is the structural signal that the rule
|
|
111
|
+
should split (one rule, one obligation surface), not load more.
|
|
112
|
+
- Cross-platform mechanical: a count check is O(N), no semantic
|
|
113
|
+
analysis, identical observable on Augment and Claude Code.
|
|
114
|
+
|
|
115
|
+
The cap applies to **all rule types** (`always` and `auto`) — Q2 is
|
|
116
|
+
a structural constraint on rule shape, not a budget concern.
|
|
117
|
+
|
|
118
|
+
## Cross-rule sharing (Q3) — Model (b) literal locked
|
|
119
|
+
|
|
120
|
+
Locked by Phase 1.4 of `road-to-context-layer-maturity` (decision
|
|
121
|
+
3a). The accounting model in § The locked model above stands without
|
|
122
|
+
shared-context discount.
|
|
123
|
+
|
|
124
|
+
**Decision:** when context X is loaded by N rules, each rule pays
|
|
125
|
+
the full `RawSize(X)` under Model (b). No `chars(X) / N` discount.
|
|
126
|
+
|
|
127
|
+
**Rationale (3a over 3b):**
|
|
128
|
+
|
|
129
|
+
- The linter is correct as-is — `RECOVERY_BAND_ENABLED` plus the
|
|
130
|
+
per-rule allowlist is already a working ratchet to drive total
|
|
131
|
+
utilization below 100 %.
|
|
132
|
+
- 3b would require a linter rewrite plus a new failure-mode test
|
|
133
|
+
family (cross-rule attribution, divisor-stability invariants).
|
|
134
|
+
Phase 1.4a's 4-hour / 200-LOC feasibility cap was structured to
|
|
135
|
+
reject 3b on cost; with no current shared-context patterns
|
|
136
|
+
exceeding 1 loader per context (verified Phase 1.1 inventory), 3b
|
|
137
|
+
has no measurable upside.
|
|
138
|
+
- Phase 4c (shared-context discount) becomes a no-op under 3a.
|
|
139
|
+
Phase 4 leverage shifts to 4a (demote), 4b (merge), and 4d
|
|
140
|
+
(hard-compress) — see `road-to-context-layer-maturity` Phase 4
|
|
141
|
+
inputs gate.
|
|
142
|
+
|
|
143
|
+
**Reopener:** if a future inventory shows ≥ 3 shared-context loaders
|
|
144
|
+
and total utilization re-enters the 95–100 % zone after Phase 4
|
|
145
|
+
completes, run the Phase 1.4a feasibility spike and propose 3b via
|
|
146
|
+
contract version bump.
|
|
147
|
+
|
|
68
148
|
## Nesting cap — depth 2
|
|
69
149
|
|
|
70
150
|
A rule's `load_context:` may cite a context (depth 1). A context may
|
|
@@ -85,6 +85,26 @@ Single-rule contexts that don't fit one of the canonical topics live
|
|
|
85
85
|
directly under `contexts/` (see `contexts/model-recommendations.md`,
|
|
86
86
|
`contexts/skills-and-commands.md`).
|
|
87
87
|
|
|
88
|
+
## Per-rule context-count cap (Q2)
|
|
89
|
+
|
|
90
|
+
A rule's combined count of `load_context:` + `load_context_eager:`
|
|
91
|
+
top-level entries MUST be ≤ **3**. Enforced by
|
|
92
|
+
`scripts/check_always_budget.py` (`MAX_CONTEXTS_PER_RULE`); see
|
|
93
|
+
[`load-context-budget-model.md § Per-rule context-count cap (Q2)`](load-context-budget-model.md#per-rule-context-count-cap-q2--3-contexts-per-rule)
|
|
94
|
+
for the locking contract.
|
|
95
|
+
|
|
96
|
+
A 4th context is the structural signal that the rule should split,
|
|
97
|
+
not load more. Authors hitting the cap should extract a sibling rule
|
|
98
|
+
with its own obligation surface, not stretch the existing one.
|
|
99
|
+
|
|
100
|
+
## Load order
|
|
101
|
+
|
|
102
|
+
Entries load in **frontmatter list order**, top-to-bottom. Author
|
|
103
|
+
your list in "first read" order so prose citations and frontmatter
|
|
104
|
+
agree. See
|
|
105
|
+
[`load-context-budget-model.md § Load order (Q1)`](load-context-budget-model.md#load-order-q1--file-order-in-frontmatter)
|
|
106
|
+
for the locking rationale.
|
|
107
|
+
|
|
88
108
|
## Combined char-budget guard
|
|
89
109
|
|
|
90
110
|
`load_context_eager:` triggers a budget check:
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
stability: beta
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Roadmap Complexity Standard
|
|
6
|
+
|
|
7
|
+
> **Audience:** roadmap authors and reviewers in `agents/roadmaps/`.
|
|
8
|
+
> **Linter:** `scripts/lint_roadmap_complexity.py` (run via
|
|
9
|
+
> `task lint-roadmap-complexity`).
|
|
10
|
+
> **Source:** Phase 5 of the `road-to-context-layer-maturity` work
|
|
11
|
+
> (now archived); reviewer-flagged drift after the
|
|
12
|
+
> structural-optimization roadmap proved that "heavy" is correct for
|
|
13
|
+
> structural work but wrong for normal feature work.
|
|
14
|
+
|
|
15
|
+
Roadmaps drift toward heavyweight whenever the previous one was
|
|
16
|
+
heavyweight. This contract pins **two tiers**, names exemplars, and
|
|
17
|
+
hard-fails the lint on tier mismatch.
|
|
18
|
+
|
|
19
|
+
## Tiers
|
|
20
|
+
|
|
21
|
+
### Lightweight (default)
|
|
22
|
+
|
|
23
|
+
Almost every roadmap is lightweight. The shape:
|
|
24
|
+
|
|
25
|
+
- **≤ 6 phases** total
|
|
26
|
+
- **≤ 1 page per phase** (≈ 60 source lines including header + steps
|
|
27
|
+
+ exit gate; the linter doesn't enforce per-phase line budgets, but
|
|
28
|
+
reviewers do)
|
|
29
|
+
- **No nested council debates** inside the roadmap (no
|
|
30
|
+
`## Council Round 1`, `## Council Round 2`, `### Verdict` sections)
|
|
31
|
+
- **No 178-step backlogs** — phases are delivery-shaped, not
|
|
32
|
+
task-shaped
|
|
33
|
+
- **≤ 600 lines total** (frontmatter + body, blank lines counted)
|
|
34
|
+
- Frontmatter declares `complexity: lightweight`
|
|
35
|
+
|
|
36
|
+
**Exemplars:**
|
|
37
|
+
|
|
38
|
+
- `road-to-context-layer-maturity.md` (archived) — six phases,
|
|
39
|
+
~376 lines, no nested council; the seed roadmap that triggered this
|
|
40
|
+
standard. Self-tagged as `lightweight`.
|
|
41
|
+
- `road-to-rule-hardening.md` (archived) — five phases, ~263 lines;
|
|
42
|
+
mechanized the rule layer; sibling of the seed, also lightweight.
|
|
43
|
+
|
|
44
|
+
**Typical use:** feature work, follow-ups, bounded refactors,
|
|
45
|
+
mechanization passes, telemetry plumbing.
|
|
46
|
+
|
|
47
|
+
### Structural (rare)
|
|
48
|
+
|
|
49
|
+
Triggered only when the work changes a contract layer or a budget
|
|
50
|
+
invariant. The shape:
|
|
51
|
+
|
|
52
|
+
- Multi-round council, locked decisions, file-ownership matrix,
|
|
53
|
+
gating contracts on phase boundaries
|
|
54
|
+
- **> 600 lines** total (typical: 800 – 1500)
|
|
55
|
+
- May include `## Council Round N` / `### Verdict` blocks, ADR
|
|
56
|
+
cross-links, decision matrices
|
|
57
|
+
- Frontmatter declares `complexity: structural`
|
|
58
|
+
|
|
59
|
+
**Exemplars:**
|
|
60
|
+
|
|
61
|
+
- Archived `agents/roadmaps/_archived/road-to-structural-optimization.md`
|
|
62
|
+
(closed 2026-05-03 after 6 phases of council-driven budget work).
|
|
63
|
+
~1.5k lines, multi-round council, file-ownership matrix.
|
|
64
|
+
|
|
65
|
+
**Triggered by:** changes to a public contract surface in
|
|
66
|
+
`docs/contracts/`, a budget invariant in
|
|
67
|
+
[`load-context-budget-model.md`](load-context-budget-model.md), or a
|
|
68
|
+
priority hierarchy in
|
|
69
|
+
[`rule-priority-hierarchy.md`](rule-priority-hierarchy.md).
|
|
70
|
+
**Requires:** explicit user opt-in on creation. The agent must not
|
|
71
|
+
upgrade a lightweight roadmap to structural mid-flight without that
|
|
72
|
+
opt-in.
|
|
73
|
+
|
|
74
|
+
## Anti-game clause
|
|
75
|
+
|
|
76
|
+
The trigger is **contract-layer change**, not line count alone. A
|
|
77
|
+
heavy roadmap split into two lightweights to dodge the gate is a
|
|
78
|
+
linter-defeat — reviewers flag it on PR review. Conversely, a
|
|
79
|
+
roadmap that legitimately needs the structural shape but tries to
|
|
80
|
+
hide as `lightweight` to skip council overhead is the same defeat in
|
|
81
|
+
the other direction.
|
|
82
|
+
|
|
83
|
+
## Frontmatter
|
|
84
|
+
|
|
85
|
+
Every roadmap in `agents/roadmaps/` (including draft and archived
|
|
86
|
+
ones) declares its tier:
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
---
|
|
90
|
+
complexity: lightweight
|
|
91
|
+
---
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
or
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
---
|
|
98
|
+
complexity: structural
|
|
99
|
+
status: draft
|
|
100
|
+
---
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Other frontmatter keys (`status:`, `owner:`, `target_release:`) are
|
|
104
|
+
permitted alongside but not required by this contract.
|
|
105
|
+
|
|
106
|
+
## Linter contract
|
|
107
|
+
|
|
108
|
+
`scripts/lint_roadmap_complexity.py` (≤ 150 LOC, stdlib only)
|
|
109
|
+
enforces the **measurable** subset of this standard:
|
|
110
|
+
|
|
111
|
+
| Check | Lightweight | Structural |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| `complexity:` frontmatter declared | required | required |
|
|
114
|
+
| Total line count | ≤ 600 | > 0 (no upper cap) |
|
|
115
|
+
| `## Phase N` heading count | ≤ 6 | no cap |
|
|
116
|
+
| `## Council Round N` / `### Verdict` blocks | forbidden | allowed |
|
|
117
|
+
| Council session cross-links (`agents/sessions/.../council-…`) | warn | allowed |
|
|
118
|
+
|
|
119
|
+
The linter runs on every roadmap file under `agents/roadmaps/` and
|
|
120
|
+
exits non-zero on any violation. Hooked into `task ci` via
|
|
121
|
+
`task lint-roadmap-complexity`.
|
|
122
|
+
|
|
123
|
+
**Out of scope for the linter** (reviewer judgment only): step count,
|
|
124
|
+
per-phase length, the contract-layer-change trigger for the
|
|
125
|
+
structural tier.
|
|
126
|
+
|
|
127
|
+
## Migration
|
|
128
|
+
|
|
129
|
+
Phase 5.3 of `road-to-context-layer-maturity` applies the standard
|
|
130
|
+
retroactively to all open roadmaps in `agents/roadmaps/`: each gets
|
|
131
|
+
a `complexity:` tag based on the rules above. No content rewrites
|
|
132
|
+
land in that step — only the tag.
|
|
133
|
+
|
|
134
|
+
Roadmaps that exceed the lightweight cap but plausibly should be
|
|
135
|
+
lightweight (e.g. they accumulated drift) are tagged `structural`
|
|
136
|
+
for now and may be split or trimmed in a follow-up. The migration
|
|
137
|
+
records existing reality, not aspirational reality.
|