@event4u/agent-config 1.24.0 → 1.26.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/commands/review-routing.md +7 -10
- package/.agent-src/contexts/authority/kernel-rule-edits.md +48 -0
- package/.agent-src/contexts/authority/scope-mechanics.md +15 -0
- package/.agent-src/contexts/contracts/consumer-agents-md-guide.md +127 -0
- package/.agent-src/contexts/contracts/emergency-triage-block.md +53 -0
- package/.agent-src/rules/analysis-skill-routing.md +1 -1
- package/.agent-src/rules/artifact-drafting-protocol.md +1 -1
- package/.agent-src/rules/artifact-engagement-recording.md +1 -1
- package/.agent-src/rules/augment-source-of-truth.md +1 -1
- package/.agent-src/rules/autonomous-execution.md +1 -1
- package/.agent-src/rules/caveman-speak.md +1 -1
- package/.agent-src/rules/cli-output-handling.md +1 -1
- package/.agent-src/rules/command-suggestion-policy.md +1 -1
- package/.agent-src/rules/docs-sync.md +1 -1
- package/.agent-src/rules/guidelines.md +1 -1
- package/.agent-src/rules/improve-before-implement.md +1 -1
- package/.agent-src/rules/invite-challenge.md +1 -1
- package/.agent-src/rules/minimal-safe-diff.md +1 -1
- package/.agent-src/rules/model-recommendation.md +1 -1
- package/.agent-src/rules/no-attribution-footers.md +1 -1
- package/.agent-src/rules/no-roadmap-references.md +56 -20
- package/.agent-src/rules/onboarding-gate.md +1 -1
- package/.agent-src/rules/package-ci-checks.md +1 -1
- package/.agent-src/rules/reviewer-awareness.md +9 -2
- package/.agent-src/rules/roadmap-progress-sync.md +1 -1
- package/.agent-src/rules/scope-control.md +6 -0
- package/.agent-src/rules/security-sensitive-stop.md +1 -1
- package/.agent-src/rules/size-enforcement.md +1 -1
- package/.agent-src/rules/token-optimizer-maintenance.md +1 -1
- package/.agent-src/rules/ui-audit-gate.md +1 -1
- package/.agent-src/skills/adr-create/SKILL.md +2 -1
- package/.agent-src/skills/agents-md-thin-root/SKILL.md +125 -0
- package/.agent-src/skills/ai-council/SKILL.md +9 -7
- package/.agent-src/skills/review-routing/SKILL.md +3 -4
- package/.agent-src/templates/AGENTS.md +18 -148
- package/.agent-src/templates/copilot-instructions.md +41 -17
- package/.agent-src/templates/github-workflows/pr-risk-review.yml +1 -1
- package/.agent-src/templates/scripts/pr_review_routing.py +1 -1
- package/.claude-plugin/marketplace.json +2 -1
- package/AGENTS.md +18 -216
- package/CHANGELOG.md +58 -0
- package/README.md +2 -2
- package/docs/architecture.md +13 -7
- package/docs/catalog.md +26 -27
- package/docs/contracts/agents-md-tech-stack.md +74 -0
- package/docs/contracts/linear-ai-rules-inclusion.md +1 -1
- package/docs/contracts/linter-structural-model.md +180 -0
- package/docs/contracts/package-self-orientation.md +135 -0
- package/docs/contracts/rule-classification.md +4 -4
- package/docs/decisions/ADR-004-rule-governance-pruning.md +240 -0
- package/docs/getting-started.md +1 -1
- package/docs/guidelines/agent-infra/review-routing-data-format.md +1 -2
- package/docs/guidelines/agent-infra/size-and-scope.md +18 -12
- package/package.json +1 -1
- package/scripts/_p4_migrate.py +5 -5
- package/scripts/audit_auto_rules.py +159 -0
- package/scripts/audit_likelihood.py +148 -0
- package/scripts/audit_overlap.py +145 -0
- package/scripts/build_rule_trigger_matrix.py +3 -5
- package/scripts/check_augment_description_cap.py +79 -0
- package/scripts/check_council_references.py +3 -3
- package/scripts/check_kernel_rule_bundle.py +151 -0
- package/scripts/check_references.py +21 -1
- package/scripts/compile_router.py +3 -0
- package/scripts/install.sh +0 -1
- package/scripts/lint_agents_md.py +168 -0
- package/scripts/measure_augment_budget.py +208 -0
- package/scripts/measure_density.py +232 -0
- package/scripts/schemas/rule.schema.json +2 -1
- package/scripts/skill_linter.py +166 -31
- package/scripts/spotcheck_thin_root.py +134 -0
- package/scripts/update_counts.py +6 -10
- package/.agent-src/rules/no-council-references.md +0 -76
- package/.agent-src/rules/review-routing-awareness.md +0 -19
- package/.agent-src/templates/copilot-review-instructions.md +0 -76
|
@@ -6,6 +6,7 @@ alwaysApply: true
|
|
|
6
6
|
source: package
|
|
7
7
|
load_context:
|
|
8
8
|
- ../contexts/authority/scope-mechanics.md
|
|
9
|
+
- ../contexts/authority/kernel-rule-edits.md
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Scope Control
|
|
@@ -29,6 +30,7 @@ The user decides the git shape. Never improvise. Commit specifics: canonical [`c
|
|
|
29
30
|
- NEVER push a tag or create a release without permission.
|
|
30
31
|
- NEVER include version numbers, target releases, deprecation dates, release-tied milestones, or git tags in roadmaps, plans, tickets, or any planning artifact. Roadmaps plan **work**; releases / tags are a separate decision outside the roadmap. Never surface "which release should this ship in?" as a numbered choice. User pins by saying so explicitly.
|
|
31
32
|
- Task seems to need a separate branch / PR → STOP and **brief before asking** ([`scope-mechanics § Brief-before-asking`](../contexts/authority/scope-mechanics.md)).
|
|
33
|
+
- BEFORE the first commit on related work, **inventory** existing branches and open PRs (`git branch --show-current`, `gh pr list --state open`). If a plausible base beyond the current branch exists, STOP and ask with numbered options — never improvise the base. Inventory + 4-option template + diverging-stack failure mode: [`scope-mechanics § Branch-base inventory`](../contexts/authority/scope-mechanics.md).
|
|
32
34
|
|
|
33
35
|
"Explicit permission" = user said so **this turn or in a standing instruction not yet revoked**. Earlier permission for a different operation does not carry over.
|
|
34
36
|
|
|
@@ -36,6 +38,10 @@ The user decides the git shape. Never improvise. Commit specifics: canonical [`c
|
|
|
36
38
|
|
|
37
39
|
A subset is **never** autonomous and never auto-permitted by a standing autonomy directive. Canonical: [`non-destructive-by-default`](non-destructive-by-default.md). Trigger list (prod-branch merges, deploys / releases, prod data / infra, bulk-destructive ops) and the "authorization is this turn, not earlier" clarification: [`scope-mechanics § Production, infrastructure, bulk-destructive`](../contexts/authority/scope-mechanics.md).
|
|
38
40
|
|
|
41
|
+
## Kernel-rule edits — slow-rollout guarantee
|
|
42
|
+
|
|
43
|
+
Each kernel-rule edit ships in **its own PR**, ≥ 24 h between merges. Autonomous mandate does NOT lift this — soak guarantee, not preference. CI fails > 1 kernel rule per PR unless labeled `bundled-always-rules-acknowledged`. Trigger / scope: [`kernel-rule-edits`](../contexts/authority/kernel-rule-edits.md).
|
|
44
|
+
|
|
39
45
|
## Decline = silence — no re-asking on the same task
|
|
40
46
|
|
|
41
47
|
After the user **declines** a proposal (branch switch, PR creation, tag/release entry, separate worktree, version pinning), do **not** raise it again on the same task. Decline stands until the user reopens the topic. Timing / "is this worth asking?": [`scope-mechanics § Decline = silence`](../contexts/authority/scope-mechanics.md).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: "auto"
|
|
3
3
|
tier: "2a"
|
|
4
4
|
alwaysApply: false
|
|
5
|
-
description: "Security-sensitive paths — auth, billing, tenant boundaries, secrets,
|
|
5
|
+
description: "Security-sensitive paths — auth, billing, tenant boundaries, secrets, uploads, integrations, webhooks, public endpoints — threat-model BEFORE editing"
|
|
6
6
|
source: package
|
|
7
7
|
triggers:
|
|
8
8
|
- keyword: "auth"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: "auto"
|
|
3
3
|
tier: "2a"
|
|
4
|
-
description: "Editing a token-optimizer-cited asset (cli-output-handling, rtk-output-filtering, token-efficiency,
|
|
4
|
+
description: "Editing a token-optimizer-cited asset (cli-output-handling, rtk-output-filtering, token-efficiency, markitdown) — sync catalog same commit"
|
|
5
5
|
source: package
|
|
6
6
|
triggers:
|
|
7
7
|
- keyword: "cli-output-handling"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: "auto"
|
|
3
3
|
tier: "2b"
|
|
4
4
|
alwaysApply: false
|
|
5
|
-
description: "Writing or editing UI — components, screens, partials, layouts, design tokens — require existing-ui-audit findings
|
|
5
|
+
description: "Writing or editing UI — components, screens, partials, layouts, design tokens — require existing-ui-audit findings before non-trivial UI change"
|
|
6
6
|
source: package
|
|
7
7
|
triggers:
|
|
8
8
|
- path_prefix: "resources/views/"
|
|
@@ -194,4 +194,5 @@ to every ADR you author.
|
|
|
194
194
|
- Reuse an existing ADR number — the index regenerator hard-fails.
|
|
195
195
|
- Author ADRs for reversible refactors or minor cleanups.
|
|
196
196
|
- Cite a council session id without ensuring the file is committed
|
|
197
|
-
or otherwise reachable from the repo (per `no-
|
|
197
|
+
or otherwise reachable from the repo (per `no-roadmap-references`,
|
|
198
|
+
council clause).
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agents-md-thin-root
|
|
3
|
+
description: "Use when editing AGENTS.md (package root) or templates/AGENTS.md (consumer) — enforces Thin-Root contract: hard char ceilings, ≥40% pointer ratio, mandatory emergency-triage block."
|
|
4
|
+
source: package
|
|
5
|
+
execution:
|
|
6
|
+
type: assisted
|
|
7
|
+
handler: internal
|
|
8
|
+
allowed_tools: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# agents-md-thin-root
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
Use when:
|
|
16
|
+
- Editing `AGENTS.md` at the package root.
|
|
17
|
+
- Editing `.agent-src.uncompressed/templates/AGENTS.md` (consumer-shipped template).
|
|
18
|
+
- Reviewing a PR that changes either file.
|
|
19
|
+
- Running `/optimize/agents`.
|
|
20
|
+
- A budget meter (`scripts/measure_augment_budget.py`) flags the package-root AGENTS.md as the dominant cost.
|
|
21
|
+
|
|
22
|
+
## Do NOT
|
|
23
|
+
|
|
24
|
+
- Edit `.github/copilot-instructions.md` with this skill (use `copilot-agents-optimization` instead).
|
|
25
|
+
- Edit other `.md` files under `.augment/`, `.agent-src.uncompressed/`, or `agents/` with this skill.
|
|
26
|
+
- Add a section to AGENTS.md without first checking whether an outboard target already exists in `agents/contexts/` or `docs/contracts/`.
|
|
27
|
+
- Replace prose with a bare link `[label](path)` — every pointer needs a *why*-clause ≥ 60 chars or it does not count toward the 40 % ratio.
|
|
28
|
+
- Reuse the package-root anatomy in the consumer template — caps and target paths differ.
|
|
29
|
+
|
|
30
|
+
## Why Thin-Root
|
|
31
|
+
|
|
32
|
+
Augment Code injects `AGENTS.md` verbatim into every workspace prompt. Each kilobyte spent here permanently consumes the 49,512-char workspace-guidelines budget shared with always-rules and auto-rule registry stubs. The Thin-Root pattern keeps the entry point a navigation surface (pointers + intent) and pushes deep detail into files Augment loads on demand via `load_context` or that other tools fetch only when their search retrieves them. Strategic council R2 (2026-05-08, Sonnet 4.5 / Opus 4.1 / gpt-4o / o1) converged on the contract codified below as the minimum guard against AGENTS.md re-bloat.
|
|
33
|
+
|
|
34
|
+
## The contract — hard caps
|
|
35
|
+
|
|
36
|
+
| File | FAIL above | WARN above | Target |
|
|
37
|
+
|---|---|---|---|
|
|
38
|
+
| `AGENTS.md` (package root) | 3,000 chars | 2,800 chars | ≤ 2,800 |
|
|
39
|
+
| `.agent-src.uncompressed/templates/AGENTS.md` (consumer) | 2,500 chars | 2,300 chars | ≤ 2,300 |
|
|
40
|
+
|
|
41
|
+
Char-count is raw file size (`wc -c`), frontmatter included. Enforcement: `scripts/lint_agents_md.py` (Phase 7), wired into the package's CI pipeline via the `lint-agents-md` task. WARN is a soft signal in CI; FAIL blocks merge.
|
|
42
|
+
|
|
43
|
+
The R2 council originally proposed 2,500 / 2,000 caps. Phase 6.4 empirical refactor demonstrated that the mandatory emergency-triage block (≈ 700 chars) plus operational must-haves (source-of-truth disclaimer, `task` quickstart, six substantive pointers) raise the achievable floor by ≈ 500 chars. The caps above are the post-refactor baseline; the previous numbers stayed unattainable without dropping mandatory content.
|
|
44
|
+
|
|
45
|
+
## The contract — pointer ratio
|
|
46
|
+
|
|
47
|
+
≥ 40 % of non-blank lines must be **substantive pointers**. A substantive pointer is a Markdown link `[label](path[#anchor])` whose surrounding sentence carries a *why* clause ≥ 60 chars explaining what the reader will learn there. Decorative links (table-of-contents, badges, repeated cross-refs) do not count. Lint formula:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
pointer_ratio = (substantive_pointer_lines / non_blank_lines) >= 0.40
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## The contract — pointer anatomy
|
|
54
|
+
|
|
55
|
+
Every substantive pointer specifies, on the same line or the immediately following line:
|
|
56
|
+
|
|
57
|
+
1. **Target file path** — repo-relative, no leading `./`.
|
|
58
|
+
2. **Optional anchor** — `#section-slug` when the linked file's content is large enough that landing in the middle saves the reader. Skip only when the linked file is itself short.
|
|
59
|
+
3. ***Why* clause** — ≥ 60 chars, present-tense, names the concrete decision the pointer unblocks. Not "see also", not "more info", not the file's title repeated.
|
|
60
|
+
|
|
61
|
+
### Wrong vs. right
|
|
62
|
+
|
|
63
|
+
❌ **Wrong** — bare link, no *why*, no anchor:
|
|
64
|
+
> See [`commit-policy`](.agent-src/rules/commit-policy.md).
|
|
65
|
+
|
|
66
|
+
❌ **Wrong** — *why* present but < 60 chars:
|
|
67
|
+
> Commit rules: [`commit-policy`](.agent-src/rules/commit-policy.md).
|
|
68
|
+
|
|
69
|
+
✅ **Right** — full anatomy, anchor, *why* ≥ 60 chars:
|
|
70
|
+
> Commit policy — never auto-commit, four named exceptions, Hard Floor list of bulk-deletion / infra triggers: [`commit-policy § Iron Law`](.agent-src/rules/commit-policy.md#the-iron-law).
|
|
71
|
+
|
|
72
|
+
✅ **Right** — anchor optional when target is short:
|
|
73
|
+
> Mirror the user's language every reply, single Iron Law that overrides any momentum: [`language-and-tone`](.agent-src/rules/language-and-tone.md).
|
|
74
|
+
|
|
75
|
+
## The contract — emergency-triage block
|
|
76
|
+
|
|
77
|
+
Every Thin-Root AGENTS.md MUST contain an **Emergency Triage** section verbatim from `.agent-src.uncompressed/contexts/contracts/emergency-triage-block.md` (Phase 6.4 will create that file as the canonical source). The block lists the five questions a host agent answers from the root file alone when network / tool access is degraded:
|
|
78
|
+
|
|
79
|
+
1. What is this repository?
|
|
80
|
+
2. What language(s) does this repository accept?
|
|
81
|
+
3. Where do I edit (source-of-truth path)?
|
|
82
|
+
4. What is the lint / test / sync entry point?
|
|
83
|
+
5. Where do the always-active behavior rules live?
|
|
84
|
+
|
|
85
|
+
Each answer must fit on one line. The block exists so the root never silently degrades to "useful only when every linked file is reachable".
|
|
86
|
+
|
|
87
|
+
## Procedure — apply Thin-Root to AGENTS.md
|
|
88
|
+
|
|
89
|
+
1. **Measure baseline.** `wc -c AGENTS.md` and `python3 scripts/measure_augment_budget.py`. Record current char-count and the gap to 2,200 / 2,500.
|
|
90
|
+
2. **Inventory sections.** List every `## ` heading and its char-count. Mark each as `keep-inline` (Iron-Law-adjacent, ≤ 200 chars, no good outboard target) or `outboard-candidate` (longer-form prose, table-only sections, narrative).
|
|
91
|
+
3. **Identify outboard targets.** For each `outboard-candidate`, name the destination — `.agent-src.uncompressed/contexts/`, `docs/contracts/`, an existing rule body, an existing skill body. Never invent a new top-level directory.
|
|
92
|
+
4. **Move content; insert pointer.** Cut the section into the target file. Replace it in AGENTS.md with a single substantive pointer per anatomy above. Verify the *why*-clause length.
|
|
93
|
+
5. **Re-measure.** `wc -c AGENTS.md` again. If above 2,200, repeat steps 2–4 on the next-largest section. Above 2,500 = must outboard further before commit.
|
|
94
|
+
6. **Validate pointer ratio.** Count non-blank lines and substantive-pointer lines. Ratio < 0.40 = collapse decorative or boilerplate lines into a single pointer or remove.
|
|
95
|
+
7. **Verify emergency-triage block.** Diff the in-file block against `.agent-src.uncompressed/contexts/contracts/emergency-triage-block.md`. Drift = revert to canonical.
|
|
96
|
+
8. **Run lints.** `task lint-agents-md && task check-refs && task lint-skills`. All green before commit.
|
|
97
|
+
|
|
98
|
+
## Procedure — apply Thin-Root to consumer template
|
|
99
|
+
|
|
100
|
+
Same procedure, applied to `.agent-src.uncompressed/templates/AGENTS.md`. Hard cap shifts to 2,000 / 1,700. The consumer template intentionally lacks the package-self-references — its pointers target files that exist in the **consumer's** repo (`.augment/skills/`, `agents/contexts/`, ...), not this package's authoring tree.
|
|
101
|
+
|
|
102
|
+
## Gotchas
|
|
103
|
+
|
|
104
|
+
- **Outboarding to a new top-level dir.** Inventing `agents/explainers/` or `docs/notes/` for the moved content silently widens the contract surface. Outboard only into `.agent-src.uncompressed/contexts/`, `docs/contracts/`, an existing rule body, or an existing skill body.
|
|
105
|
+
- **Pointer-ratio inflation by decoration.** Adding boilerplate "Browse all skills" / "See also" links to lift the ratio above 40 % defeats the purpose. The lint counts only substantive pointers (with a *why*-clause ≥ 60 chars); decorative links get filtered out and the ratio drops back below threshold.
|
|
106
|
+
- **Emergency-triage drift.** Editing the in-file emergency-triage block instead of the canonical `.agent-src.uncompressed/contexts/contracts/emergency-triage-block.md` causes the package-root and consumer-template versions to diverge silently. Always edit the canonical file and let the lint diff pull both back in sync.
|
|
107
|
+
- **Cap inversion under WARN.** A 2,250-char AGENTS.md (above 2,200 WARN, below 2,500 FAIL) is a yellow signal not a green one — every additional sentence raises the probability of the next FAIL. Treat WARN as the spend boundary, not a buffer.
|
|
108
|
+
- **Char-count includes frontmatter.** `wc -c` counts every byte including the YAML preamble, blank lines, and the trailing newline. Stripping a section to "look smaller" without re-running `wc -c` understates the true budget impact.
|
|
109
|
+
|
|
110
|
+
## Output format
|
|
111
|
+
|
|
112
|
+
When invoked as a planning step, produce:
|
|
113
|
+
|
|
114
|
+
1. Current size + gap to target (one line per file).
|
|
115
|
+
2. Inventory table (section, chars, keep-inline / outboard-candidate, target).
|
|
116
|
+
3. Pointer ratio before / after (predicted).
|
|
117
|
+
4. Specific outboarding edits as a numbered diff plan.
|
|
118
|
+
5. The four lint commands the agent must run before claiming completion.
|
|
119
|
+
|
|
120
|
+
## See also
|
|
121
|
+
|
|
122
|
+
- [`copilot-agents-optimization`](../copilot-agents-optimization/SKILL.md) — sibling skill for `.github/copilot-instructions.md`; runs alongside Thin-Root in `/optimize/agents`.
|
|
123
|
+
- [`agent-docs-writing`](../agent-docs-writing/SKILL.md) — broader documentation-structure context for navigating outboard targets.
|
|
124
|
+
- [`size-enforcement`](../../rules/size-enforcement.md) — covers per-skill / per-rule / per-command size budgets; AGENTS.md caps live in this skill instead.
|
|
125
|
+
- [`ADR-004-rule-governance-pruning`](../../../docs/decisions/ADR-004-rule-governance-pruning.md) — captures the rule-governance pruning that freed the workspace-guidelines budget; the Thin-Root caps build on that headroom.
|
|
@@ -235,9 +235,10 @@ durable contract lives in the roadmap / ADR / skill body that cites
|
|
|
235
235
|
the council's convergence inline.
|
|
236
236
|
|
|
237
237
|
**Linking to a specific council file is forbidden by
|
|
238
|
-
[`no-
|
|
239
|
-
gitignored, not in the cloned repo, gone after
|
|
240
|
-
Inline the convergence with date + members
|
|
238
|
+
[`no-roadmap-references`](../../rules/no-roadmap-references.md)
|
|
239
|
+
(council clause)** — gitignored, not in the cloned repo, gone after
|
|
240
|
+
the retention window. Inline the convergence with date + members
|
|
241
|
+
instead.
|
|
241
242
|
|
|
242
243
|
Three directories, three modes:
|
|
243
244
|
|
|
@@ -258,10 +259,11 @@ matching `road-to-<topic-slug>` roadmap under `agents/roadmaps/`).
|
|
|
258
259
|
- Any other directory below `agents/` (e.g. `agents/scratch/`,
|
|
259
260
|
`agents/tmp/`).
|
|
260
261
|
- Cross-references from any artefact to specific council files —
|
|
261
|
-
see [`no-
|
|
262
|
-
Inline the convergence summary instead, with
|
|
263
|
-
for traceability (`Council (claude-sonnet-4-5
|
|
264
|
-
reviewed N candidate strategies; converged
|
|
262
|
+
see [`no-roadmap-references`](../../rules/no-roadmap-references.md)
|
|
263
|
+
(council clause). Inline the convergence summary instead, with
|
|
264
|
+
date and member list for traceability (`Council (claude-sonnet-4-5
|
|
265
|
+
+ gpt-4o, YYYY-MM-DD) reviewed N candidate strategies; converged
|
|
266
|
+
on …`).
|
|
265
267
|
|
|
266
268
|
`scripts/check_council_layout.py` is the mechanical check for the
|
|
267
269
|
output path convention — wire it into the package's CI pipeline so
|
|
@@ -26,7 +26,7 @@ Do NOT use when:
|
|
|
26
26
|
- The diff is low-risk and no ownership map exists — fall back to
|
|
27
27
|
[`reviewer-awareness`](../../rules/reviewer-awareness.md) defaults.
|
|
28
28
|
- A full PR description is requested — route to
|
|
29
|
-
[`create-pr-description`](../create-pr-
|
|
29
|
+
[`create-pr-description`](../create-pr:description-only/SKILL.md) and let
|
|
30
30
|
it call this skill for the routing block.
|
|
31
31
|
- A threat model is wanted — route to
|
|
32
32
|
[`threat-modeling`](../threat-modeling/SKILL.md).
|
|
@@ -187,9 +187,8 @@ Data source: <"ownership-map.yml + historical-bug-patterns.yml"
|
|
|
187
187
|
|
|
188
188
|
## See also
|
|
189
189
|
|
|
190
|
-
- [`reviewer-awareness`](../../rules/reviewer-awareness.md)
|
|
191
|
-
- [`review-routing-awareness`](../../rules/review-routing-awareness.md)
|
|
190
|
+
- [`reviewer-awareness`](../../rules/reviewer-awareness.md) — role vocabulary + data-source rules
|
|
192
191
|
- [`review-routing-data-format`](../../../docs/guidelines/agent-infra/review-routing-data-format.md)
|
|
193
|
-
- [`create-pr-description`](../create-pr-
|
|
192
|
+
- [`create-pr-description`](../create-pr:description-only/SKILL.md)
|
|
194
193
|
- [`judge-test-coverage`](../judge-test-coverage/SKILL.md) — consumes
|
|
195
194
|
the `required_test` entries from matched patterns.
|
|
@@ -1,164 +1,34 @@
|
|
|
1
1
|
# {{project_name}}
|
|
2
2
|
|
|
3
3
|
<!--
|
|
4
|
-
AGENTS.md
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Fill in the placeholders below (or run `/copilot-agents-init` to do it
|
|
8
|
-
interactively) and then delete this HTML comment.
|
|
9
|
-
|
|
10
|
-
Keep it short. Detailed conventions belong in `.augment/` (read-only from
|
|
11
|
-
the shared package) or in `agents/overrides/` (project-specific).
|
|
4
|
+
AGENTS.md entry point for AI coding agents. Installed by
|
|
5
|
+
`event4u/agent-config`. Fill placeholders (or run `/copilot-agents-init`)
|
|
6
|
+
and delete this comment. Keep thin; bulk prose belongs in the linked guide.
|
|
12
7
|
-->
|
|
13
8
|
|
|
14
9
|
{{project_description}}
|
|
15
10
|
|
|
16
|
-
##
|
|
11
|
+
## Layers
|
|
17
12
|
|
|
18
13
|
| Layer | Location | Purpose |
|
|
19
14
|
|---|---|---|
|
|
20
|
-
| **Shared package** | `.augment/` |
|
|
15
|
+
| **Shared package** | `.augment/`, `.agent-src/` | Installed skills / rules / commands — do not hand-edit |
|
|
21
16
|
| **Project overrides** | `agents/overrides/` | Customizations of shared resources |
|
|
22
17
|
| **Project docs** | `agents/` | Architecture, features, roadmaps, sessions, contexts |
|
|
23
|
-
| **Agent settings** | `.agent-settings.yml` | Project-specific config consumed by skills
|
|
24
|
-
|
|
25
|
-
### Key References
|
|
26
|
-
|
|
27
|
-
| What | Where |
|
|
28
|
-
|---|---|
|
|
29
|
-
| Behavior rules (always active) | `.augment/rules/` |
|
|
30
|
-
| Coding guidelines | `.augment/guidelines/` |
|
|
31
|
-
| Skills (on-demand expertise) | `.augment/skills/` |
|
|
32
|
-
| Commands (workflows) | `.augment/commands/` |
|
|
33
|
-
| Copilot instructions | `.github/copilot-instructions.md` |
|
|
34
|
-
|
|
35
|
-
### Recommended entry flow
|
|
36
|
-
|
|
37
|
-
Two entrypoints share the same engine and Option-A loop; pick by input shape:
|
|
38
|
-
|
|
39
|
-
| You have | Command | Envelope |
|
|
40
|
-
|---|---|---|
|
|
41
|
-
| Ticket id, URL, or pasted ticket payload | [`/implement-ticket`](.augment/commands/implement-ticket.md) | `input.kind="ticket"` |
|
|
42
|
-
| Free-form goal, no ticket | [`/work`](.augment/commands/work.md) | `input.kind="prompt"` |
|
|
43
|
-
|
|
44
|
-
Both drive the linear flow `refine → memory → analyze → plan → implement →
|
|
45
|
-
test → verify → report` with block-on-ambiguity semantics and no auto-git.
|
|
46
|
-
|
|
47
|
-
`/work` adds a confidence-band gate at `refine`: the
|
|
48
|
-
[`refine-prompt`](.augment/skills/refine-prompt/SKILL.md) skill scores the
|
|
49
|
-
prompt on five dimensions and the engine proceeds **silently** on `high`,
|
|
50
|
-
halts with an **assumptions report** on `medium`, or halts with **one
|
|
51
|
-
clarifying question** on `low` (per the `ask-when-uncertain` Iron Law).
|
|
52
|
-
UI-shaped prompts route through the product UI track (`directive_set`
|
|
53
|
-
`ui` / `ui-trivial` / `mixed`) — `audit → design → apply → review →
|
|
54
|
-
polish` with a hard audit gate before any `apply`.
|
|
55
|
-
|
|
56
|
-
Persona comes from `.agent-settings.yml` (`roles.active_role`). Use
|
|
57
|
-
`/commit` and `/create-pr` explicitly after the delivery report. The two
|
|
58
|
-
flows are mutually exclusive at the state-file level: one
|
|
59
|
-
`.work-state.json` carries one envelope at a time; the engine refuses to
|
|
60
|
-
switch mid-flight.
|
|
61
|
-
|
|
62
|
-
### Multi-Agent Support
|
|
63
|
-
|
|
64
|
-
| Tool | Rules | Skills | How |
|
|
65
|
-
|---|---|---|---|
|
|
66
|
-
| **Augment Code** | `.augment/rules/` | `.augment/skills/` | Native (source) |
|
|
67
|
-
| **Claude Code** | `.claude/rules/` | `.claude/skills/` | Symlinks + Agent Skills standard |
|
|
68
|
-
| **Cursor** | `.cursor/rules/` | — | Symlinks |
|
|
69
|
-
| **Cline** | `.clinerules/` | — | Symlinks |
|
|
70
|
-
| **Windsurf** | `.windsurfrules` | — | Concatenated file |
|
|
71
|
-
| **Gemini CLI** | `GEMINI.md` | — | Symlink → AGENTS.md |
|
|
72
|
-
|
|
73
|
-
Regenerate: `task generate-tools` · Clean: `task clean-tools`
|
|
74
|
-
(Requires the `task` binary; see https://taskfile.dev if missing.)
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Tech Stack
|
|
79
|
-
|
|
80
|
-
<!-- Replace with your actual stack. Examples:
|
|
81
|
-
- Framework: Laravel 11 (PHP ^8.2) / Next.js 15 / Rails 7 / Django 5
|
|
82
|
-
- Database: PostgreSQL / MySQL / MariaDB / SQLite
|
|
83
|
-
- Queue: Redis / RabbitMQ / SQS
|
|
84
|
-
- Testing: Pest / PHPUnit / Jest / Vitest / pytest
|
|
85
|
-
- Code style / linters: ECS / PHPStan / Ruff / ESLint
|
|
86
|
-
-->
|
|
87
|
-
|
|
88
|
-
- **Language:** {{primary_language}}
|
|
89
|
-
- **Framework:** {{framework}}
|
|
90
|
-
- **Database:** {{database}}
|
|
91
|
-
- **Testing:** {{test_framework}}
|
|
92
|
-
- **Code style:** {{code_style_tool}}
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Development Setup
|
|
97
|
-
|
|
98
|
-
<!-- Replace with your project's actual setup commands. Examples:
|
|
99
|
-
- `make start` / `make console` / `make test`
|
|
100
|
-
- `docker compose up` / `docker compose exec app bash`
|
|
101
|
-
- `npm run dev` / `npm test`
|
|
102
|
-
- `php artisan serve` / `php artisan test`
|
|
103
|
-
-->
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
{{dev_start_command}}
|
|
107
|
-
{{dev_test_command}}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Environment files
|
|
111
|
-
|
|
112
|
-
| File | Purpose |
|
|
113
|
-
|---|---|
|
|
114
|
-
| `.env` | Main environment |
|
|
115
|
-
| `.env.local` | Local overrides |
|
|
116
|
-
| `.env.testing` | Testing env |
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## Project Structure
|
|
121
|
-
|
|
122
|
-
<!-- Document your directory conventions:
|
|
123
|
-
- Where new features go
|
|
124
|
-
- Module/component boundaries
|
|
125
|
-
- Namespace conventions
|
|
126
|
-
-->
|
|
127
|
-
|
|
128
|
-
{{project_structure_notes}}
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
## Testing
|
|
133
|
-
|
|
134
|
-
<!-- Document:
|
|
135
|
-
- Test framework and its quirks
|
|
136
|
-
- How to run all tests / targeted tests
|
|
137
|
-
- Test data strategy (seeders, factories, fixtures)
|
|
138
|
-
- Performance-critical tests or suites
|
|
139
|
-
-->
|
|
140
|
-
|
|
141
|
-
{{testing_notes}}
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Quality Tools
|
|
146
|
-
|
|
147
|
-
<!-- Document:
|
|
148
|
-
- Which linters/formatters run
|
|
149
|
-
- Whether they auto-fix or report only
|
|
150
|
-
- CI enforcement level
|
|
151
|
-
-->
|
|
18
|
+
| **Agent settings** | `.agent-settings.yml` | Project-specific config consumed by skills |
|
|
152
19
|
|
|
153
|
-
|
|
20
|
+
## Pointers
|
|
154
21
|
|
|
155
|
-
|
|
22
|
+
- **Filling out this AGENTS.md** — tech-stack / dev-setup / testing / quality / project-structure templates plus `/work` + `/implement-ticket` entry flow and multi-agent matrix: [`.augment/contexts/contracts/consumer-agents-md-guide.md`](.augment/contexts/contracts/consumer-agents-md-guide.md).
|
|
23
|
+
- **Behavior rules (always active)** — Iron Laws and routed rules that fire automatically while you work in this project: [`.augment/rules/`](.augment/rules/).
|
|
24
|
+
- **Skills (on-demand expertise)** — domain skills surfaced by description; invoked when their trigger fires: [`.augment/skills/`](.augment/skills/).
|
|
25
|
+
- **Commands (workflows)** — slash-commands the agent runs end-to-end (`/work`, `/implement-ticket`, `/commit`, `/create-pr`, …): [`.augment/commands/`](.augment/commands/).
|
|
26
|
+
- **Project-specific docs** — your own architecture notes, roadmaps, sessions, contexts: [`agents/`](agents/).
|
|
156
27
|
|
|
157
|
-
##
|
|
28
|
+
## Emergency triage — read this when nothing else is reachable
|
|
158
29
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
| `.agent-settings.yml` | Project-specific agent configuration (YAML) |
|
|
30
|
+
1. **What is this repo?** — Consumer project; agent-config is installed as a shared skill / rule / command suite at `.augment/` and `.agent-src/`.
|
|
31
|
+
2. **What language?** — Project-specific; agents mirror the user's language at runtime.
|
|
32
|
+
3. **Where do I edit agent-config?** — Do not edit `.augment/` or `.agent-src/` here; they are installed artifacts. Project edits live in `agents/` and project source.
|
|
33
|
+
4. **Lint / test / sync entry point?** — Project-specific (see project README); agent-config reinstalls via `composer update event4u/agent-config` or `npm update @event4u/agent-config`.
|
|
34
|
+
5. **Where do the always-active rules live?** — `.agent-src/rules/` (kernel = 9 Iron-Law rules; tier-1 / tier-2 routed via `.agent-src/router.json`).
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
# Copilot Repository Instructions
|
|
2
2
|
|
|
3
3
|
<!--
|
|
4
|
-
copilot-instructions.md —
|
|
5
|
-
Copilot Chat when
|
|
4
|
+
copilot-instructions.md — the ONE file GitHub Copilot Code Review (PR bot)
|
|
5
|
+
loads from `.github/`. Also read by Copilot Chat when editing this repo.
|
|
6
6
|
|
|
7
7
|
This file was installed by `event4u/agent-config` as a starting template.
|
|
8
8
|
Fill in the placeholders below and remove this HTML comment.
|
|
9
9
|
|
|
10
10
|
Keep this file **self-contained**. Copilot Code Review CANNOT follow links
|
|
11
11
|
to `.augment/` — so every rule Copilot must enforce lives here in full.
|
|
12
|
+
Copilot Code Review only reads the **first 4000 characters**; keep the
|
|
13
|
+
highest-priority rules (Scope Control, Known False Positives) up top.
|
|
12
14
|
Copilot Chat (in the IDE) can read other files, but still benefits from
|
|
13
15
|
this overview.
|
|
16
|
+
|
|
17
|
+
For path-specific rules, use `.github/instructions/<NAME>.instructions.md`
|
|
18
|
+
with an `applyTo:` frontmatter glob — that is GitHub's documented
|
|
19
|
+
convention for narrowing instructions to a subtree.
|
|
14
20
|
-->
|
|
15
21
|
|
|
16
22
|
This repository contains {{project_description_oneline}}.
|
|
@@ -89,23 +95,41 @@ This repository contains {{project_description_oneline}}.
|
|
|
89
95
|
## ✅ Known False Positives — Do NOT Flag
|
|
90
96
|
|
|
91
97
|
The repo ships agent-config rules and skills under `.augment/`,
|
|
92
|
-
`.agent-src/`, and `.agent-src.uncompressed/`.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
`.agent-src/`, and (during authoring) `.agent-src.uncompressed/`.
|
|
99
|
+
Cross-references inside those trees resolve via the **delivered**
|
|
100
|
+
`.augment/` layout — not via raw git checkout. Copilot's static
|
|
101
|
+
checker walks the git tree, so it sees broken paths where there are
|
|
102
|
+
none. **Intentional, not a bug.** The installer projects
|
|
103
|
+
`.agent-src/` → `.augment/` and creates the symlinks that make paths
|
|
104
|
+
resolve at agent runtime. The patterns below are correct by design:
|
|
105
|
+
|
|
106
|
+
- **Relative cross-references inside markdown rules / skills /
|
|
107
|
+
commands** like `[x](../docs/guidelines/foo.md)` or
|
|
108
|
+
`[y](../contexts/bar.md)`. The base resolves from the file's
|
|
109
|
+
delivered location (e.g. `.augment/rules/<rule>.md`) — these paths
|
|
110
|
+
are valid via the `.augment/` tree, even when the file is symlinked
|
|
111
|
+
into `.claude/rules/`, `.cursor/rules/`, or `.clinerules/`.
|
|
102
112
|
- **`path_prefix:` triggers containing `.agent-src.uncompressed/`**
|
|
103
113
|
in YAML frontmatter. This is a literal match pattern for the
|
|
104
|
-
host's router, **not** a file reference —
|
|
105
|
-
source
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
114
|
+
host's router, **not** a file reference — source-of-truth meta-rules
|
|
115
|
+
(`augment-source-of-truth`, `augment-portability`, `skill-quality`,
|
|
116
|
+
`docs-sync`, `rule-type-governance`) legitimately match against the
|
|
117
|
+
authoring tree.
|
|
118
|
+
- **Symlinked rule / skill / command files** under `.claude/`,
|
|
119
|
+
`.cursor/`, `.clinerules/`. Targets resolve into `.augment/rules/`,
|
|
120
|
+
`.augment/skills/`, `.augment/commands/` via installer-managed
|
|
121
|
+
symlinks. Missing-file reports here are renderer artifacts.
|
|
122
|
+
- **Body-link forms `../docs/guidelines/...`** (single-up). This is
|
|
123
|
+
the post-rewrite shape produced by `scripts/compress.py`. The
|
|
124
|
+
compressed `.agent-src/rules/` tree is one level deeper than the
|
|
125
|
+
source `.agent-src.uncompressed/rules/`, so the rewriter collapses
|
|
126
|
+
`../../docs/...` to `../docs/...`. Both forms are expected — one in
|
|
127
|
+
source, one in compressed output.
|
|
128
|
+
|
|
129
|
+
**What TO flag:** code defects, security issues, broken tests, type
|
|
130
|
+
errors, and any new `.agent-src.uncompressed/` substring introduced
|
|
131
|
+
into `.agent-src/rules/` body content (the `check-compressed-paths`
|
|
132
|
+
task gates this — flag it as a regression if it slips through).
|
|
109
133
|
|
|
110
134
|
## ✅ Code Review Comment Behavior
|
|
111
135
|
|
|
@@ -106,7 +106,7 @@ jobs:
|
|
|
106
106
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
107
107
|
# The script auto-discovers ownership-map.yml and
|
|
108
108
|
# historical-bug-patterns.yml under .github/ first and falls
|
|
109
|
-
# back to agents/ — matching the
|
|
109
|
+
# back to agents/ — matching the reviewer-awareness rule.
|
|
110
110
|
# Missing data files emit a generic fallback, not an error.
|
|
111
111
|
run: |
|
|
112
112
|
python3 scripts/pr_review_routing.py \
|
|
@@ -22,7 +22,7 @@ Usage:
|
|
|
22
22
|
|
|
23
23
|
If --ownership-map / --patterns are omitted, the script searches
|
|
24
24
|
`.github/` first and falls back to `agents/` — matching what the
|
|
25
|
-
|
|
25
|
+
reviewer-awareness rule and review-routing skill document.
|
|
26
26
|
Missing data files are not an error; the script emits a generic
|
|
27
27
|
fallback block.
|
|
28
28
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Shared agent configuration \u2014 skills for AI coding tools (Claude Code, Augment, Cursor, Cline, Windsurf, Gemini CLI).",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.26.0"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"./.claude/skills/agents",
|
|
24
24
|
"./.claude/skills/agents-audit",
|
|
25
25
|
"./.claude/skills/agents-cleanup",
|
|
26
|
+
"./.claude/skills/agents-md-thin-root",
|
|
26
27
|
"./.claude/skills/agents-prepare",
|
|
27
28
|
"./.claude/skills/ai-council",
|
|
28
29
|
"./.claude/skills/analysis-autonomous-mode",
|