@event4u/agent-config 1.39.0 → 1.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.agent-src/commands/orchestrate.md +123 -0
  2. package/.agent-src/commands/sync-gitignore/fix.md +135 -0
  3. package/.agent-src/commands/sync-gitignore.md +31 -5
  4. package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +30 -2
  5. package/.agent-src/skills/subagent-orchestration/SKILL.md +9 -0
  6. package/.agent-src/skills/using-git-worktrees/SKILL.md +25 -0
  7. package/.agent-src/templates/agent-settings.md +9 -0
  8. package/.agent-src/templates/scripts/work_engine/orchestration.py +168 -0
  9. package/.claude-plugin/marketplace.json +3 -1
  10. package/CHANGELOG.md +42 -0
  11. package/README.md +5 -5
  12. package/bin/install.php +13 -6
  13. package/config/agent-settings.template.yml +21 -0
  14. package/docs/DISTRIBUTION_CHECKLIST.md +169 -0
  15. package/docs/architecture.md +1 -1
  16. package/docs/catalog.md +3 -2
  17. package/docs/contracts/audit-log-v1.md +142 -0
  18. package/docs/contracts/command-clusters.md +2 -0
  19. package/docs/contracts/file-ownership-matrix.json +20 -0
  20. package/docs/contracts/orchestration-dsl-v1.md +152 -0
  21. package/docs/getting-started.md +1 -1
  22. package/docs/installation.md +132 -0
  23. package/docs/setup/per-ide/aider.md +48 -0
  24. package/docs/setup/per-ide/claude-code.md +108 -0
  25. package/docs/setup/per-ide/claude-desktop.md +148 -0
  26. package/docs/setup/per-ide/cline.md +43 -0
  27. package/docs/setup/per-ide/codex.md +46 -0
  28. package/docs/setup/per-ide/copilot.md +80 -0
  29. package/docs/setup/per-ide/cursor.md +125 -0
  30. package/docs/setup/per-ide/gemini-cli.md +45 -0
  31. package/docs/setup/per-ide/windsurf.md +120 -0
  32. package/package.json +1 -1
  33. package/scripts/compress.py +153 -1
  34. package/scripts/extract_audit_patterns.py +202 -0
  35. package/scripts/install +156 -1
  36. package/scripts/install.py +270 -10
  37. package/scripts/install.sh +52 -7
  38. package/scripts/lint_orchestration_dsl.py +214 -0
  39. package/scripts/skill_linter.py +9 -0
  40. package/scripts/sync_gitignore.py +56 -1
  41. package/templates/claude_desktop_config.json.template +21 -0
  42. package/templates/cursor-rule.mdc.j2 +7 -0
  43. package/templates/global-install-manifest.yml +91 -0
  44. package/templates/marketing-copy.yml +64 -0
  45. package/templates/windsurf-rule.md.j2 +7 -0
package/CHANGELOG.md CHANGED
@@ -318,6 +318,48 @@ 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.40.0](https://github.com/event4u-app/agent-config/compare/1.39.0...1.40.0) (2026-05-11)
322
+
323
+ ### Features
324
+
325
+ * **settings:** add worktrees.mode (off/on/ask) to gate autonomous worktree usage ([a07080f](https://github.com/event4u-app/agent-config/commit/a07080f28113dfa2452830b660deb4cb467256ec))
326
+ * **commands:** add /sync-gitignore:fix subcommand for legacy cleanup ([5b058b0](https://github.com/event4u-app/agent-config/commit/5b058b0a8a5b451eac89c4905076e4cc9773e299))
327
+ * **audit:** add pattern-extraction script for audit-log-v1 (roadmap Q2) ([966e472](https://github.com/event4u-app/agent-config/commit/966e47215eb80cfff6e2229b90c6e28b806c7dff))
328
+ * **learning-skill:** wire audit-log-v1 into learning-to-rule-or-skill (roadmap Q3) ([f53d129](https://github.com/event4u-app/agent-config/commit/f53d12947b41334c58952b3a6017962507abbe45))
329
+ * **orchestrate:** add /orchestrate command + state machine (roadmap G2) ([4b39691](https://github.com/event4u-app/agent-config/commit/4b396910c0c7078430aa11958f121d49ddda766c))
330
+ * **contracts:** add orchestration-dsl-v1 + linter (roadmap G1) ([5cb2801](https://github.com/event4u-app/agent-config/commit/5cb2801f14a06d2dabe9f2dc57b7ca424d7e4d4d))
331
+ * **contracts:** add audit-log-v1 schema (roadmap Q1) ([e0849b2](https://github.com/event4u-app/agent-config/commit/e0849b2305949ad5409ff9981970922ec702c68e))
332
+ * **install:** one-liner setup.sh + npm wrapper refinements ([aee688f](https://github.com/event4u-app/agent-config/commit/aee688fcbf9bb18b0253bc7ce96192cc7e5afe2e))
333
+ * **compress:** project Cursor .mdc + Windsurf .md rules + flatten commands ([486bafd](https://github.com/event4u-app/agent-config/commit/486bafd83c1f5224ee61b29b46cc827b21440623))
334
+ * **install:** multi-tool installer + global user-level install ([6113872](https://github.com/event4u-app/agent-config/commit/6113872b146321b784b01a428c5c2abcbad9e08d))
335
+
336
+ ### Bug Fixes
337
+
338
+ * **ci:** bump README command count and exclude projection dirs from skill-lint ([c5a1493](https://github.com/event4u-app/agent-config/commit/c5a1493d4ef31b2e9af16e0945330cccaa02576c))
339
+ * **clusters:** register /orchestrate as new cluster head ([fb73e58](https://github.com/event4u-app/agent-config/commit/fb73e58c7eb72d53e6ee111a18fe8f5a1f1e053b))
340
+ * **roadmap:** annotate council reference with allowed-marker ([e2997d0](https://github.com/event4u-app/agent-config/commit/e2997d00b5e7dc2625367f87dab3bc611b9cf8e5))
341
+ * **readme:** unlink experimental mcp-cloud-scope contract ([c7ac883](https://github.com/event4u-app/agent-config/commit/c7ac883be116e6f92f2125d5334f38f17b97da27))
342
+
343
+ ### Documentation
344
+
345
+ * bump command count to 105 for /orchestrate ([df49c6c](https://github.com/event4u-app/agent-config/commit/df49c6c268e08df7567128c97cc267fed9e38694))
346
+
347
+ ### Refactoring
348
+
349
+ * **roadmap:** apply council shape-fix to distribution roadmap ([4c7f770](https://github.com/event4u-app/agent-config/commit/4c7f770d66b07107164c2eafcc886ddf6bf29aa6))
350
+ * **distribution:** extract marketplace listings to docs/DISTRIBUTION_CHECKLIST.md ([5fc6075](https://github.com/event4u-app/agent-config/commit/5fc607567a96bc5e3d9a38d276ce85f88dae7015))
351
+ * **roadmap:** move S33 (screencasts) to distribution roadmap H5 ([95d27f6](https://github.com/event4u-app/agent-config/commit/95d27f65b577824d9c330478af5c7c7acddfe9f3))
352
+
353
+ ### Chores
354
+
355
+ * **ownership:** regenerate ownership matrix for new files ([f728343](https://github.com/event4u-app/agent-config/commit/f728343cd4bc9a7340bb19a218d1ccdc6b5bfb9e))
356
+ * **index:** tag orchestrate command with cluster in catalogs ([c4ed9ee](https://github.com/event4u-app/agent-config/commit/c4ed9ee9eaca972bc35549330131c98dd6b05966))
357
+ * **index:** regenerate catalog for /orchestrate command ([c6fe13a](https://github.com/event4u-app/agent-config/commit/c6fe13ae9d83e142154226235bf65d1d2f72cacd))
358
+ * **roadmaps:** regen dashboard after distribution-roadmap shape-fix ([e0ad5b3](https://github.com/event4u-app/agent-config/commit/e0ad5b3554d34a4eaaf747b0955cc16e32f5c8e2))
359
+ * **roadmaps:** archive road-to-simplicity-and-everywhere + regen dashboard ([d2d5c31](https://github.com/event4u-app/agent-config/commit/d2d5c310db1ec8fd3cd44111400b098c4d99c856))
360
+
361
+ Tests: 3141 (+442 since 1.39.0)
362
+
321
363
  ## [1.39.0](https://github.com/event4u-app/agent-config/compare/1.38.0...1.39.0) (2026-05-11)
322
364
 
323
365
  ### 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>174 Skills</strong> · <strong>60 Rules</strong> · <strong>104 Commands</strong> · <strong>69 Guidelines</strong> · <strong>8 AI Tools</strong>
10
+ <strong>174 Skills</strong> · <strong>60 Rules</strong> · <strong>106 Commands</strong> · <strong>69 Guidelines</strong> · <strong>8 AI Tools</strong>
11
11
  </p>
12
12
 
13
13
  ---
@@ -122,8 +122,8 @@ Experimental — A0-cloud contract lives at `docs/contracts/mcp-cloud-scope.md`
122
122
  > of the ~112 Python scripts that ship with the package (linters,
123
123
  > audits, `task ci`, work-engine hooks, …). Those require the full
124
124
  > local install per [Quickstart](#quickstart). See
125
- > [`docs/contracts/mcp-cloud-scope.md`](docs/contracts/mcp-cloud-scope.md)
126
- > for the execution-safety boundary.
125
+ > `docs/contracts/mcp-cloud-scope.md` (internal reference only per
126
+ > `STABILITY.md`) for the execution-safety boundary.
127
127
 
128
128
  ### Optional: persistent agent memory
129
129
 
@@ -378,7 +378,7 @@ kernel set: [`docs/contracts/kernel-membership.md`](docs/contracts/kernel-member
378
378
  | [`/jira-ticket`](.agent-src/commands/jira-ticket.md) | Read ticket from branch, implement feature |
379
379
  | [`/compress`](.agent-src/commands/compress.md) | Compress skills for token efficiency |
380
380
 
381
- → [Browse all 104 active commands](.agent-src/commands/)
381
+ → [Browse all 106 active commands](.agent-src/commands/)
382
382
 
383
383
  ---
384
384
 
@@ -403,7 +403,7 @@ Every developer gets the same behavior. No per-user setup needed.
403
403
  native slash-commands)
404
404
 
405
405
  > **What this means in practice:** Augment Code and Claude Code get the full
406
- > package (rules + 174 skills + 104 native commands). Cursor, Cline, Windsurf,
406
+ > package (rules + 174 skills + 106 native commands). Cursor, Cline, Windsurf,
407
407
  > Gemini CLI, and GitHub Copilot only get the **rules** natively; skills and
408
408
  > commands are available to them as documentation the agent can read, not as
409
409
  > first-class features.
package/bin/install.php CHANGED
@@ -12,12 +12,19 @@ declare(strict_types=1);
12
12
  * invoke it via `php vendor/bin/install.php` without knowing about bash.
13
13
  *
14
14
  * Usage:
15
- * php vendor/bin/install.php # full install
16
- * php vendor/bin/install.php --profile=balanced # pick cost profile
17
- * php vendor/bin/install.php --force # overwrite existing bridges
18
- * php vendor/bin/install.php --skip-bridges # payload only
19
- * php vendor/bin/install.php --skip-sync # bridges only
20
- * php vendor/bin/install.php --help # full option list
15
+ * php vendor/bin/install.php # full install (every tool)
16
+ * php vendor/bin/install.php --profile=balanced # pick cost profile
17
+ * php vendor/bin/install.php --tools=claude-code,cursor # only those two surfaces
18
+ * php vendor/bin/install.php --tools=cursor --yes # CI-friendly, single tool
19
+ * php vendor/bin/install.php --list-tools # show valid tool IDs
20
+ * php vendor/bin/install.php --force # overwrite existing bridges
21
+ * php vendor/bin/install.php --skip-bridges # payload only
22
+ * php vendor/bin/install.php --skip-sync # bridges only
23
+ * php vendor/bin/install.php --help # full option list
24
+ *
25
+ * Valid --tools IDs (default: all):
26
+ * claude-code, claude-desktop, cursor, windsurf, cline,
27
+ * gemini-cli, copilot, augment, aider, codex, all
21
28
  */
22
29
 
23
30
  $packageRoot = dirname(__DIR__);
@@ -197,6 +197,27 @@ subagents:
197
197
  # Integer, default 3. Set to 1 to serialize. Hard cap enforced by runtime.
198
198
  max_parallel: 3
199
199
 
200
+ # --- Git worktrees ---
201
+ #
202
+ # Controls how the `using-git-worktrees` skill and `subagent-orchestration`
203
+ # mode 6 (`do-in-worktrees`) behave. Mechanical layer on top of the
204
+ # existing `scope-control` permission gate — narrows, never widens.
205
+ worktrees:
206
+ # off | on | ask (default: ask)
207
+ #
208
+ # ask = status quo. Skill asks before creating any worktree; mode 6 is
209
+ # selectable when the chain shape warrants it. Matches the
210
+ # behaviour required by `scope-control` and `autonomous-execution`.
211
+ # off = no autonomous worktree creation. Skill refuses; mode 6 falls
212
+ # back to mode 3 (do-in-steps). Explicit user request in the
213
+ # chat ("do this in a worktree", "use mode 6") overrides for
214
+ # that single task — the setting suppresses *unprompted* usage,
215
+ # not the tool itself.
216
+ # on = standing permission. Skill skips the per-creation permission
217
+ # ask; mode 6 may be picked without prompting. Iron-Law gates
218
+ # (ignore-check, clean baseline) still apply.
219
+ mode: ask
220
+
200
221
  # --- AI Council (external second-opinion network) ---
201
222
  #
202
223
  # When enabled, the /council command lets the agent poll independent
@@ -0,0 +1,169 @@
1
+ # Distribution Checklist
2
+
3
+ External marketplace, registry, and marketing actions for
4
+ `event4u/agent-config`. **Human-gated work.** Items here cannot be
5
+ executed by an autonomous agent — they require credentials, manual
6
+ web-form submissions, terminal-recording on a maintainer's machine,
7
+ content authoring, or external approval processes. Tracked separately
8
+ from the roadmap dashboard so the agent step counter stays honest.
9
+
10
+ ## Origin
11
+
12
+ Lifted from archived
13
+ [`agents/roadmaps/archive/road-to-simplicity-and-everywhere.md`](../agents/roadmaps/archive/road-to-simplicity-and-everywhere.md)
14
+ Phase 7 (S34–S38) after a follow-up AI Council review flagged the
15
+ category error of tracking external-action items inside an
16
+ engineering roadmap. See the "Post-merge addendum" in that archive
17
+ for the full lessons-learned.
18
+
19
+ ## Status vocabulary
20
+
21
+ - **Prepared** — substrate (config file, package source, copy) committed.
22
+ - **Submitted** — handed to the external queue.
23
+ - **In Review** — accepted into review queue, awaiting approval.
24
+ - **Live** — listing public, install path verified end-to-end.
25
+ - **Blocked** — gated on an external dependency; see Notes.
26
+
27
+ `[ ]`/`[x]` markers are **deliberately not used** here — these items
28
+ are not roadmap steps.
29
+
30
+ ## Items
31
+
32
+ ### Anthropic Claude Code plugin marketplace
33
+
34
+ - **Status:** Prepared
35
+ - **Owner:** maintainer
36
+ - **Last Reviewed:** 2026-05-12
37
+ - **Substrate:** [`.claude-plugin/marketplace.json`](../.claude-plugin/marketplace.json)
38
+ committed and current. Slug `event4u/agent-config` is canonical
39
+ across all listings.
40
+ - **Doc anchor:** [`docs/setup/per-ide/claude-code.md`](setup/per-ide/claude-code.md)
41
+ § "Plugin marketplace".
42
+ - **Action:** Submit via Anthropic plugin marketplace review queue
43
+ per current Claude Code plugin docs.
44
+ - **Pre-conditions:** none (substrate ready).
45
+ - **Notes:** Source of truth for naming — Cursor / Smithery listings
46
+ reference this slug.
47
+
48
+ ### Cursor 2026 marketplace listing
49
+
50
+ - **Status:** Prepared
51
+ - **Owner:** maintainer
52
+ - **Last Reviewed:** 2026-05-12
53
+ - **Substrate:** [`templates/marketing-copy.yml`](../templates/marketing-copy.yml)
54
+ is the single source for listing copy across surfaces.
55
+ - **Doc anchor:** [`docs/setup/per-ide/cursor.md`](setup/per-ide/cursor.md)
56
+ § "Marketplace install".
57
+ - **Action:** Submit to Cursor's 2026 marketplace listing process.
58
+ - **Pre-conditions:** Anthropic listing live (link as primary source
59
+ to avoid drift).
60
+ - **Notes:** Per "Decisions" in archived roadmap — Anthropic listing
61
+ is canonical, others reference by stable slug.
62
+
63
+ ### Smithery (MCP server registry)
64
+
65
+ - **Status:** Blocked
66
+ - **Owner:** maintainer
67
+ - **Last Reviewed:** 2026-05-12
68
+ - **Substrate:** none yet — MCP server itself is not publishable.
69
+ - **Doc anchor:** none yet.
70
+ - **Action:** Submit to Smithery once the MCP server can be installed
71
+ and exercised end-to-end.
72
+ - **Pre-conditions:** [`road-to-mcp-full-coverage.md`](../agents/roadmaps/road-to-mcp-full-coverage.md)
73
+ Phase 3 (Selective Implementation) shipped.
74
+ - **Notes:** **Do not submit before the gate.** Premature listing
75
+ produces a bad first impression and is hard to retract.
76
+
77
+ ### npm: `@event4u/create-agent-config`
78
+
79
+ - **Status:** Prepared
80
+ - **Owner:** maintainer
81
+ - **Last Reviewed:** 2026-05-12
82
+ - **Substrate:** [`packages/create-agent-config/`](../packages/create-agent-config/)
83
+ source is ready; the wrapper clones the repo to a temp dir, runs
84
+ `scripts/install`, then deletes the temp dir.
85
+ - **Doc anchor:** [`docs/installation.md`](installation.md) §
86
+ "npx one-liner".
87
+ - **Action:** `npm publish --access public` from `packages/create-agent-config/`.
88
+ - **Pre-conditions:** npm registry credentials for the `@event4u`
89
+ scope.
90
+ - **Notes:** Public scope, MIT-licensed. Verify `npx
91
+ @event4u/create-agent-config init` in an empty directory before
92
+ declaring Live.
93
+
94
+ ### GitHub repo topics + tagline
95
+
96
+ - **Status:** Prepared
97
+ - **Owner:** maintainer
98
+ - **Last Reviewed:** 2026-05-12
99
+ - **Substrate:** Topic list + tagline copy live in
100
+ [`templates/marketing-copy.yml`](../templates/marketing-copy.yml).
101
+ - **Doc anchor:** none (GitHub-native).
102
+ - **Action:** Apply via `gh repo edit` (or repo Settings → General).
103
+ Topics: `agent`, `claude-code`, `cursor`, `windsurf`, `cline`,
104
+ `mcp`, `agents-md`, `skill-files`. Description: one-line tagline
105
+ matching the marketplace copy.
106
+ - **Pre-conditions:** none.
107
+ - **Notes:** Per `scope-control` rule, repo-settings changes are
108
+ permission-gated and run by the maintainer.
109
+
110
+ ### Medium / dev.to articles + conference CFP
111
+
112
+ - **Status:** Blocked
113
+ - **Owner:** unassigned
114
+ - **Last Reviewed:** 2026-05-12
115
+ - **Substrate:** none — copy authored per submission.
116
+ - **Doc anchor:** none yet.
117
+ - **Action:** Owner authors articles (Medium / dev.to), submits CFP
118
+ to relevant conferences. Cadence aligned to the 1 day/week
119
+ marketing cap from `road-to-distribution-and-adoption.md` Phase 1.
120
+ - **Pre-conditions:** owner + budget assigned; Phase 1 pre-conditions
121
+ 1–4 from the distribution roadmap met (Thinking A+C ≥80%,
122
+ post-pr29 1.15.0, `docs/contracts/` policy active).
123
+ - **Notes:** Origin: `road-to-distribution-and-adoption.md` H4 (moved
124
+ here 2026-05-11 after AI Council convergence on category-error
125
+ filter: "owner + budget assigned first" is non-agent action). The
126
+ roadmap step is `[-]` cancelled with a back-reference.
127
+
128
+ ### Screencasts / asciinema casts per primary surface
129
+
130
+ - **Status:** Blocked
131
+ - **Owner:** unassigned
132
+ - **Last Reviewed:** 2026-05-12
133
+ - **Substrate:** the `## Verification` block in every
134
+ [`docs/setup/per-ide/<surface>.md`](setup/per-ide/) page is the
135
+ cast script — agent-shipped, ready to record against.
136
+ - **Doc anchor:** [`docs/setup/per-ide/claude-code.md`](setup/per-ide/claude-code.md),
137
+ [`docs/setup/per-ide/cursor.md`](setup/per-ide/cursor.md),
138
+ [`docs/setup/per-ide/windsurf.md`](setup/per-ide/windsurf.md),
139
+ [`docs/setup/per-ide/claude-desktop.md`](setup/per-ide/claude-desktop.md).
140
+ - **Action:** Record asciinema cast on a real maintainer machine
141
+ following each surface's Verification block; embed under the
142
+ surface doc.
143
+ - **Pre-conditions:** all four per-IDE docs landed with stable
144
+ Verification blocks (shipped via archived
145
+ `road-to-simplicity-and-everywhere.md`).
146
+ - **Notes:** Origin: `road-to-distribution-and-adoption.md` H5
147
+ (moved here 2026-05-11 after AI Council convergence — terminal
148
+ capture on a real machine is non-agent action; substrate was
149
+ already shipped, the cast itself is the human-gated step). The
150
+ roadmap step is `[-]` cancelled with a back-reference.
151
+
152
+ ## Review cadence
153
+
154
+ Refresh `Last Reviewed` each time an item is revisited or its status
155
+ changes. Stale items (`Last Reviewed` older than 90 days while not
156
+ `Live`) should surface in a manual review pass — no automated
157
+ enforcement, this file is deliberately out of the agent's execution
158
+ loop.
159
+
160
+ ## See also
161
+
162
+ - [`agents/roadmaps/archive/road-to-simplicity-and-everywhere.md`](../agents/roadmaps/archive/road-to-simplicity-and-everywhere.md)
163
+ — origin (Phase 7, S34–S38) and lessons-learned addendum.
164
+ - [`agents/roadmaps/road-to-distribution-and-adoption.md`](../agents/roadmaps/road-to-distribution-and-adoption.md)
165
+ § "External distribution (human-gated, not agent-executable)" —
166
+ sibling roadmap. H4 (Medium / CFP) and H5 (screencasts) are
167
+ `[-]` cancelled there with back-references to the entries above.
168
+ - [`agents/roadmaps/road-to-mcp-full-coverage.md`](../agents/roadmaps/road-to-mcp-full-coverage.md)
169
+ Phase 3 — pre-condition for the Smithery item.
@@ -98,7 +98,7 @@ fails on any source-side violation, without producing artifacts.
98
98
  |---|---|---|
99
99
  | **Skills** | 174 | On-demand expertise — stack analysis (Laravel · Symfony · Zend / Laminas · Next.js · React · Node), testing, Docker, API design, security, observability, … |
100
100
  | **Rules** | 60 | Always-active constraints — coding standards, scope control, verification, language-and-tone, agent-authority |
101
- | **Commands** | 104 | Slash-command workflows — `/commit`, `/create-pr`, `/fix ci`, `/optimize skills`, `/feature plan`, `/work`, `/implement-ticket`, `/compress`, … |
101
+ | **Commands** | 106 | Slash-command workflows — `/commit`, `/create-pr`, `/fix ci`, `/optimize skills`, `/feature plan`, `/work`, `/implement-ticket`, `/compress`, … |
102
102
  | **Guidelines** | 69 | Reference material cited by skills — PHP patterns, Eloquent, Playwright, agent-infra, … |
103
103
  | **Templates** | 7 | Scaffolds for features, roadmaps, contexts, skills, overrides |
104
104
  | **Contexts** | 5 | Shared knowledge about the system itself |
package/docs/catalog.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # agent-config — Public Catalog
2
2
 
3
- Consumer-facing catalog of all **404 public artefacts** shipped by
3
+ Consumer-facing catalog of all **405 public artefacts** shipped by
4
4
  this package. Internal package-maintenance rules and deprecation shims
5
5
  are excluded.
6
6
 
@@ -248,7 +248,7 @@ are excluded.
248
248
  | rule | [`user-interaction`](../.agent-src/rules/user-interaction.md) | auto | Asking the user a question, presenting options, or summarizing progress — numbered-options Iron Law, single-recommendation rule, progress indicators |
249
249
  | rule | [`verify-before-complete`](../.agent-src/rules/verify-before-complete.md) | always | Verify before completion — run tests and quality tools before claiming done |
250
250
 
251
- ## Commands (104)
251
+ ## Commands (105)
252
252
 
253
253
  | kind | name | cluster | description |
254
254
  |---|---|---|---|
@@ -324,6 +324,7 @@ are excluded.
324
324
  | command | [`optimize:skills`](../.agent-src/commands/optimize/skills.md) | cluster: optimize | Audits skills — measures baseline, finds duplicates/merge candidates, runs linter. Suggest only, never auto-apply. |
325
325
  | command | [`optimize-prompt`](../.agent-src/commands/optimize-prompt.md) | cluster: optimize | Optimize a raw prompt for ChatGPT, Claude, Gemini, or another AI via the 4-D methodology — BASIC vs DETAIL auto-detect, one clarifying question per turn, returns the polished prompt. |
326
326
  | command | [`optimize`](../.agent-src/commands/optimize.md) | cluster: optimize | Optimize orchestrator — routes to skills, agents-dir, augmentignore, rtk-filters |
327
+ | command | [`orchestrate`](../.agent-src/commands/orchestrate.md) | cluster: orchestrate | Run a YAML pipeline defined under `.agent-config/orchestrations/` — chains personas / skills / commands / sub-agents per the orchestration-dsl-v1 contract |
327
328
  | command | [`override:create`](../.agent-src/commands/override/create.md) | cluster: override | Creates a project-level override for a shared skill, rule, or command. |
328
329
  | command | [`override:manage`](../.agent-src/commands/override/manage.md) | cluster: override | Reviews, updates, and refactors existing project-level overrides. |
329
330
  | command | [`override`](../.agent-src/commands/override.md) | cluster: override | Override orchestrator — routes to create, manage |
@@ -0,0 +1,142 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+ # Audit-log v1
6
+
7
+ **Purpose.** Pin the append-only schema that the audit-as-memory
8
+ pipeline writes per `/work` and `/implement-ticket` run, so the
9
+ pattern-extraction script ([`extract_audit_patterns.py`](../../scripts/extract_audit_patterns.py))
10
+ and the `learning-to-rule-or-skill` skill can mine repeated successful
11
+ patterns without re-reading conversation bodies.
12
+
13
+ **Scope.** Defines the JSONL line shape, file location, redaction
14
+ floor, append-only invariant, and the producer/consumer contract.
15
+ Does **not** define how patterns are scored or how proposals are
16
+ promoted — that is the consumer's responsibility (see Cross-references).
17
+
18
+ Last refreshed: 2026-05-11.
19
+
20
+ ## Producer / consumer split
21
+
22
+ | Side | Responsibility | Where |
23
+ |---|---|---|
24
+ | **Producer** | One JSONL line per phase end, derived from the phase's [`decision-trace-v1.md`](decision-trace-v1.md) JSON and the [`memory-visibility-v1.md`](memory-visibility-v1.md) counts. | `work_engine` hook on phase boundary. |
25
+ | **Consumer** | Pattern mining + human review gate. Never edits a written line; corrections are new lines with `type=supersede`. | [`extract_audit_patterns.py`](../../scripts/extract_audit_patterns.py). |
26
+
27
+ ## File location
28
+
29
+ ```
30
+ agents/state/audit/<YYYY-MM>.jsonl
31
+ ```
32
+
33
+ One file per UTC month. Files are append-only — `merge=union` via
34
+ `.gitattributes` (same mechanism as the archived
35
+ `agents/memory/intake/*.jsonl` recipe). Files MAY be gitignored in
36
+ consumer projects; the contract does not require commit.
37
+
38
+ ## Line shape
39
+
40
+ One JSON object per line, UTF-8, no trailing whitespace:
41
+
42
+ ```json
43
+ {"schema_version":1,"id":"01HXY...","ts":"2026-05-11T12:34:56Z","work_id":"PROJ-123-2026-05-11T12-30-00Z","phase":"verify","outcome":"success","confidence_band":"high","risk_class":"low","memory":{"asks":3,"hits":2},"verify":{"claims":1,"first_try_passes":1},"rules_applied":["verify-before-complete","commit-policy"],"persona":"backend","input_kind":"ticket","type":"phase"}
44
+ ```
45
+
46
+ Single-line. The pretty-printed reference shape:
47
+
48
+ ```json
49
+ {
50
+ "schema_version": 1,
51
+ "id": "01HXY7K9...",
52
+ "ts": "2026-05-11T12:34:56Z",
53
+ "work_id": "PROJ-123-2026-05-11T12-30-00Z",
54
+ "phase": "verify",
55
+ "outcome": "success",
56
+ "confidence_band": "high",
57
+ "risk_class": "low",
58
+ "memory": { "asks": 3, "hits": 2 },
59
+ "verify": { "claims": 1, "first_try_passes": 1 },
60
+ "rules_applied": ["verify-before-complete", "commit-policy"],
61
+ "persona": "backend",
62
+ "input_kind": "ticket",
63
+ "type": "phase"
64
+ }
65
+ ```
66
+
67
+ ## Field semantics
68
+
69
+ | Field | Type | Meaning |
70
+ |---|---|---|
71
+ | `schema_version` | int | Always `1` for this contract. Major bump on breaking changes. |
72
+ | `id` | string | ULID or content hash. Stable, deduplicated by the **reader**, never by in-place edit. |
73
+ | `ts` | string | ISO-8601 UTC timestamp of phase end. |
74
+ | `work_id` | string | Matches the `WorkState` directory id from [`decision-trace-v1.md`](decision-trace-v1.md). Allows cross-trace correlation. |
75
+ | `phase` | enum | One of `refine` · `memory` · `analyze` · `plan` · `implement` · `test` · `verify` · `report`. |
76
+ | `outcome` | enum | One of `success` · `blocked` · `skipped` · `error`. Mirrors `Outcome` from `work_engine.directives`. |
77
+ | `confidence_band` | enum | One of `low` · `medium` · `high`. Sourced from decision-trace. |
78
+ | `risk_class` | enum | One of `low` · `medium` · `high`. Inherits max risk from touched files. |
79
+ | `memory.asks` / `memory.hits` | int | Counts only — never ids, never bodies. |
80
+ | `verify.claims` / `verify.first_try_passes` | int | Verify-gate counts. |
81
+ | `rules_applied` | string[] | Stable rule ids whose Iron Law fired this phase. Bounded to ≤ 32; remainder dropped silently. |
82
+ | `persona` | string \| null | Resolved `roles.active_role` from `.agent-settings.yml` at phase start. |
83
+ | `input_kind` | enum | One of `prompt` · `ticket` · `orchestration`. Matches `WorkState.input.kind`. |
84
+ | `type` | enum | One of `phase` · `supersede` · `note`. `supersede` carries an extra `supersedes` field with the prior `id`. |
85
+
86
+ Unknown trailing fields are forward-compat extensions; readers MUST
87
+ NOT raise on them.
88
+
89
+ ## Privacy floor
90
+
91
+ Lines MUST NOT contain:
92
+
93
+ - Conversation **bodies**, summaries, prompts, or quoted snippets.
94
+ - Memory entry bodies, ids, or content. Only **counts** travel here —
95
+ ids stay in `decision-trace-*.json` per [`memory-visibility-v1.md`](memory-visibility-v1.md).
96
+ - Secrets, tokens, environment values, file contents.
97
+ - Paths outside the package's `agents/state/` and `tests/` allowlist.
98
+
99
+ The floor is enforced by
100
+ `tests/contracts/test_audit_log_redaction.py` — any new producer-side
101
+ edit that touches this schema adds a fixture there.
102
+
103
+ ## Append-only invariant
104
+
105
+ - New entries append. Existing lines are **immutable**.
106
+ - A correction is a **new** entry with `type=supersede` and a
107
+ `supersedes` field carrying the prior `id`. The reader applies the
108
+ chain.
109
+ - Deletion is forbidden at the producer layer. Operators rotate
110
+ monthly files; archived months MAY be purged out-of-band by the
111
+ consumer project's retention policy.
112
+
113
+ ## Cadence
114
+
115
+ One line per phase end. The producer hook fires on the same
116
+ `post_tool_use` / `stop` boundary that emits the visibility line
117
+ ([`memory-visibility-v1.md`](memory-visibility-v1.md) § Cadence).
118
+
119
+ Cost-profile interaction:
120
+
121
+ | Cost profile | Line emission |
122
+ |---|---|
123
+ | `lean` | suppress unless `outcome != success` OR `risk_class >= medium` |
124
+ | `standard` | always |
125
+ | `verbose` | always |
126
+
127
+ ## Stability
128
+
129
+ Beta. Breaking changes between v1 and v2 are allowed in a minor
130
+ release if the change appears in `CHANGELOG.md` under a `### Breaking`
131
+ heading. Consumers MUST gate on `schema_version` and refuse unknown
132
+ majors.
133
+
134
+ ## Cross-references
135
+
136
+ - Input feed (counts + ids): [`memory-visibility-v1.md`](memory-visibility-v1.md).
137
+ - Per-phase JSON the producer reads: [`decision-trace-v1.md`](decision-trace-v1.md).
138
+ - Pattern-extraction consumer: [`extract_audit_patterns.py`](../../scripts/extract_audit_patterns.py).
139
+ - Skill that consumes promoted patterns:
140
+ [`learning-to-rule-or-skill`](../../.agent-src.uncompressed/skills/learning-to-rule-or-skill/SKILL.md).
141
+ - Append-only JSONL precedent:
142
+ [`adr-chat-history-split.md`](adr-chat-history-split.md).
@@ -44,6 +44,8 @@ column 1 of this table.
44
44
  | `council` | 3 | `default` · `pr` · `design` · `optimize` | `council` (legacy default lens) · `council-pr` · `council-design` · `council-optimize` |
45
45
  | `challenge-me` | — | `vision` · `with-docs` | new — Pocock-inspired one-question-at-a-time interview; `vision` is the standard 95%-confidence variant, `with-docs` adds doc/glossary awareness with a session-scoped glossary and load-bearing claim-vs-code verification |
46
46
  | `research` | 2 | `deep` · `report` | preliminary-research scaffolder ported from `Weizhena/Deep-Research-skills` (cluster head emits `outline.yaml` + `fields.yaml` against the `research-schema` contract). `:deep` populates per-item JSON in batches with native web-search + JSON-Schema self-validation (no Python runtime); `:report` renders `report.md` directly + optionally emits a `jq` template for deterministic regeneration. `add-items` / `add-fields` intentionally **not** ported — re-run `/research <topic>` to extend the field framework. |
47
+ | `orchestrate` | — | _(none yet — cluster head only)_ | new — runtime executor for YAML pipelines under `.agent-config/orchestrations/` per the [`orchestration-dsl-v1`](orchestration-dsl-v1.md) contract; chains personas / skills / commands / sub-agents deterministically. Single cluster head; sub-commands deferred until a second verb is needed. |
48
+ | `sync-gitignore` | — | `fix` | new sub-command 2026-05-11 — cluster head retains the existing append-only sync as its default flow; `:fix` adds `--cleanup-legacy` semantics, scrubbing pre-`/agents/` runtime patterns wherever they appear in the consumer's `.gitignore` (inside or outside the managed block) and re-syncing the canonical entries. |
47
49
 
48
50
  **Net change:** Phase 1 collapsed 15 atomics → 3 clusters; Phase 2
49
51
  collapses 26 atomics → 11 sub-command clusters. Sub-commands use
@@ -435,6 +435,12 @@
435
435
  "load_context": [],
436
436
  "load_context_eager": []
437
437
  },
438
+ ".agent-src.uncompressed/commands/orchestrate.md": {
439
+ "kind": "command",
440
+ "rule_type": null,
441
+ "load_context": [],
442
+ "load_context_eager": []
443
+ },
438
444
  ".agent-src.uncompressed/commands/override.md": {
439
445
  "kind": "command",
440
446
  "rule_type": null,
@@ -3495,6 +3501,20 @@
3495
3501
  "via": "self",
3496
3502
  "depth": 0
3497
3503
  },
3504
+ {
3505
+ "source": ".agent-src.uncompressed/commands/orchestrate.md",
3506
+ "target": ".agent-src.uncompressed/commands/orchestrate.md",
3507
+ "type": "WRITE",
3508
+ "via": "self",
3509
+ "depth": 0
3510
+ },
3511
+ {
3512
+ "source": ".agent-src.uncompressed/commands/orchestrate.md",
3513
+ "target": ".agent-src.uncompressed/skills/subagent-orchestration/SKILL.md",
3514
+ "type": "READ_ONLY",
3515
+ "via": "body_link",
3516
+ "depth": 1
3517
+ },
3498
3518
  {
3499
3519
  "source": ".agent-src.uncompressed/commands/override.md",
3500
3520
  "target": ".agent-src.uncompressed/commands/override.md",