@event4u/agent-config 3.0.0 → 3.1.1
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/install-via-agent.md +129 -0
- package/.agent-src/commands/video/from-script.md +1 -1
- package/.agent-src/commands/video.md +1 -1
- package/.agent-src/contexts/execution/cheap-question-mechanics.md +81 -0
- package/.agent-src/rules/caveman-speak.md +2 -2
- package/.agent-src/rules/context-hygiene.md +36 -0
- package/.agent-src/rules/engineering-safety-floor.md +102 -0
- package/.agent-src/rules/finance-safety-floor.md +114 -0
- package/.agent-src/rules/git-history-discipline.md +1 -1
- package/.agent-src/rules/no-cheap-questions.md +34 -32
- package/.agent-src/rules/provider-lifecycle-discipline.md +4 -4
- package/.agent-src/rules/strategy-safety-floor.md +114 -0
- package/.agent-src/skills/agents-md-thin-root/SKILL.md +15 -9
- package/.agent-src/skills/async-python-patterns/SKILL.md +1 -1
- package/.agent-src/skills/project-analysis-node-express/SKILL.md +1 -1
- package/.agent-src/skills/readme-reviewer/SKILL.md +52 -3
- package/.agent-src/skills/readme-writing/SKILL.md +52 -4
- package/.agent-src/skills/readme-writing-package/SKILL.md +48 -5
- package/.agent-src/skills/systematic-debugging/SKILL.md +41 -0
- package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/.agent-src/templates/hooks/pre-commit-frontmatter +66 -0
- package/.agent-src/templates/hooks/pre-commit-roadmap-progress +78 -39
- package/.agent-src/templates/scripts/work_engine/_lib/agent_settings.py +4 -1
- package/.agent-src/templates/scripts/work_engine/orchestration.py +25 -11
- package/.claude-plugin/marketplace.json +2 -1
- package/AGENTS.md +10 -8
- package/CHANGELOG.md +233 -123
- package/README.md +165 -553
- package/config/agent-settings.template.yml +0 -7
- package/config/discovery/packs.yml +20 -0
- package/config/discovery/unassigned-artefacts.yml +2 -0
- package/config/gitignore-block.txt +19 -3
- package/dist/cli/commands/uiServe.js +13 -4
- package/dist/cli/commands/uiServe.js.map +1 -1
- package/dist/cli/registry.js +2 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/discovery/deprecation-report.md +7 -0
- package/dist/discovery/discovery-manifest.json +2107 -1409
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +9 -9
- package/dist/discovery/orphan-report.md +10 -0
- package/dist/discovery/packs.json +1002 -0
- package/dist/discovery/trust-report.md +26 -0
- package/dist/discovery/workspaces.json +705 -0
- package/dist/mcp/registry-manifest.json +4 -4
- package/dist/router.json +1623 -0
- package/dist/server/app.js +11 -3
- package/dist/server/app.js.map +1 -1
- package/dist/server/io/atomicMultiWrite.js +3 -1
- package/dist/server/io/atomicMultiWrite.js.map +1 -1
- package/dist/server/io/yamlIO.js +22 -0
- package/dist/server/io/yamlIO.js.map +1 -1
- package/dist/server/routes/ping.js +8 -0
- package/dist/server/routes/ping.js.map +1 -1
- package/dist/server/routes/schema.js +2 -2
- package/dist/server/routes/schema.js.map +1 -1
- package/dist/server/routes/settings.js +104 -23
- package/dist/server/routes/settings.js.map +1 -1
- package/dist/server/routes/userMd.js +37 -27
- package/dist/server/routes/userMd.js.map +1 -1
- package/dist/server/routes/wizard.js +256 -20
- package/dist/server/routes/wizard.js.map +1 -1
- package/dist/server/schemas/settings.js +0 -1
- package/dist/server/schemas/settings.js.map +1 -1
- package/dist/server/token.js +10 -3
- package/dist/server/token.js.map +1 -1
- package/dist/server/writeRoot.js +28 -11
- package/dist/server/writeRoot.js.map +1 -1
- package/dist/server/writeRoot.test.js +22 -4
- package/dist/server/writeRoot.test.js.map +1 -1
- package/dist/shared/userMd/formAdapter.js +29 -51
- package/dist/shared/userMd/formAdapter.js.map +1 -1
- package/dist/shared/userMd/schema.js +32 -104
- package/dist/shared/userMd/schema.js.map +1 -1
- package/dist/shared/userMd/utils.js +64 -50
- package/dist/shared/userMd/utils.js.map +1 -1
- package/dist/ui/assets/index-D-DY1ywI.js +35 -0
- package/dist/ui/assets/index-D-DY1ywI.js.map +1 -0
- package/dist/ui/index.html +1 -1
- package/docs/adrs/router/0001-three-tier-routing.md +5 -5
- package/docs/adrs/smoke/0001-per-tier-smoke-scripts.md +1 -1
- package/docs/architecture.md +3 -3
- package/docs/archive/CHANGELOG-pre-3.1.0.md +167 -0
- package/docs/catalog.md +30 -26
- package/docs/contracts/CHANGELOG-conventions.md +1 -1
- package/docs/contracts/agent-user-schema.md +6 -9
- package/docs/contracts/consumer-bridge.md +79 -0
- package/docs/contracts/discovery-manifest.md +209 -0
- package/docs/contracts/discovery-manifest.schema.json +77 -4
- package/docs/contracts/explain-trace.schema.json +1 -1
- package/docs/contracts/file-ownership-matrix.json +197 -13
- package/docs/contracts/frontmatter-contract.md +140 -0
- package/docs/contracts/gui-wizard.md +223 -0
- package/docs/contracts/installer-agent-mode.md +137 -0
- package/docs/contracts/kernel-membership.md +1 -1
- package/docs/contracts/mcp-tool-inventory.md +9 -9
- package/docs/contracts/namespace.md +6 -6
- package/docs/contracts/provider-lifecycle.md +5 -5
- package/docs/contracts/rule-router.md +4 -4
- package/docs/contracts/settings-api.md +53 -6
- package/docs/contracts/smoke-contracts.md +3 -3
- package/docs/contracts/trust-and-safety.md +144 -0
- package/docs/customization.md +2 -2
- package/docs/decisions/ADR-007-agent-discovery-scopes.md +12 -0
- package/docs/decisions/ADR-013-discovery-frontmatter-contract.md +24 -0
- package/docs/decisions/ADR-015-discovery-manifest-contract.md +146 -0
- package/docs/decisions/ADR-016-installer-architecture.md +189 -0
- package/docs/decisions/ADR-017-monorepo-physical-layout.md +261 -0
- package/docs/decisions/ADR-018-trust-and-safety-layer.md +159 -0
- package/docs/decisions/ADR-019-router-json-dist-location.md +124 -0
- package/docs/decisions/ADR-020-global-only-consumer-scope.md +123 -0
- package/docs/decisions/ADR-021-deployment-shape.md +153 -0
- package/docs/decisions/INDEX.md +7 -0
- package/docs/deploy/connector-setup.md +129 -0
- package/docs/deploy/env-vars.md +70 -0
- package/docs/deploy/policy-cookbook.md +130 -0
- package/docs/deploy/quickstart.md +112 -0
- package/docs/distribution/public-install-smoke.md +68 -0
- package/docs/distribution/registries.md +55 -0
- package/docs/distribution/telemetry-privacy.md +128 -0
- package/docs/distribution/telemetry-schema.md +174 -0
- package/docs/featured-skills.md +95 -0
- package/docs/getting-started-by-role.md +19 -1
- package/docs/getting-started.md +2 -2
- package/docs/guidelines/agent-infra/installed-tools-manifest.md +11 -8
- package/docs/guidelines/docs/readme-size-and-splitting.md +53 -1
- package/docs/installation.md +27 -14
- package/docs/maintainers/dev-mode.md +105 -0
- package/docs/setup/per-ide/claude-desktop.md +3 -2
- package/docs/wizard.md +39 -4
- package/package.json +18 -1
- package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
- package/scripts/_cli/cmd_doctor.py +150 -2
- package/scripts/_cli/cmd_explain.py +2 -1
- package/scripts/_cli/cmd_migrate_to_global.py +415 -0
- package/scripts/_cli/cmd_settings_migrate.py +146 -0
- package/scripts/_cli/explain_last/route.py +2 -1
- package/scripts/_dispatch.bash +36 -3
- package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
- package/scripts/_lib/agent_settings.py +4 -1
- package/scripts/_lib/agent_src.py +157 -0
- package/scripts/agent-config +17 -6
- package/scripts/audit_skill_descriptions.py +18 -6
- package/scripts/build_discovery_manifest.py +373 -17
- package/scripts/check_artefact_checksums.py +104 -0
- package/scripts/check_cluster_patterns.py +20 -4
- package/scripts/check_command_count_messaging.py +33 -14
- package/scripts/check_council_references.py +43 -4
- package/scripts/check_overlay_cascade_subdirs.py +7 -3
- package/scripts/check_references.py +5 -2
- package/scripts/check_reply_consistency.py +32 -9
- package/scripts/check_template_pin_drift.py +24 -7
- package/scripts/check_token_optimizer_freshness.py +18 -3
- package/scripts/compile_router.py +34 -2
- package/scripts/compress.py +162 -44
- package/scripts/config/presets.py +19 -1
- package/scripts/config/profiles.py +16 -1
- package/scripts/discovery_stats.py +70 -0
- package/scripts/expected_perms.json +47 -0
- package/scripts/generate_index.py +78 -46
- package/scripts/generate_ownership_matrix.py +98 -43
- package/scripts/generate_pack_manifests.py +183 -0
- package/scripts/install +18 -1
- package/scripts/install.py +934 -59
- package/scripts/install.sh +27 -9
- package/scripts/lint_agents_layout.py +93 -13
- package/scripts/lint_agents_md.py +1 -1
- package/scripts/lint_archived_skills.py +32 -16
- package/scripts/lint_bench_corpus.py +14 -2
- package/scripts/lint_command_tiers.py +15 -2
- package/scripts/lint_featured_skills.py +139 -0
- package/scripts/lint_framework_leakage.py +33 -6
- package/scripts/lint_global_paths.py +147 -0
- package/scripts/lint_orchestration_dsl.py +6 -3
- package/scripts/lint_pack_boundaries.py +147 -0
- package/scripts/lint_pack_first_win.py +103 -0
- package/scripts/lint_readme_jargon.py +131 -0
- package/scripts/lint_readme_size.py +33 -0
- package/scripts/lint_rule_interactions.py +23 -5
- package/scripts/lint_rule_tiers.py +12 -3
- package/scripts/lint_trust_coherence.py +212 -0
- package/scripts/measure_rule_budget.py +22 -4
- package/scripts/move_artefact.py +143 -0
- package/scripts/new_skill.py +148 -0
- package/scripts/plan_physical_move.py +353 -0
- package/scripts/refine_ticket_detect.py +30 -7
- package/scripts/release.py +22 -2
- package/scripts/schemas/command.schema.json +4 -0
- package/scripts/skill_linter.py +248 -118
- package/scripts/skill_trigger_eval.py +28 -8
- package/scripts/smoke/kernel.sh +1 -1
- package/scripts/smoke/router.sh +24 -5
- package/scripts/smoke/skills.sh +15 -7
- package/scripts/smoke_quickstart.py +11 -2
- package/scripts/snapshot_agent_outputs.py +144 -0
- package/scripts/update_counts.py +45 -17
- package/scripts/validate_decision_engine.py +9 -1
- package/scripts/validate_discovery_manifest.py +94 -0
- package/scripts/validate_frontmatter.py +39 -20
- package/scripts/verify_physical_move.py +185 -0
- package/templates/agent-user.md +0 -1
- package/templates/agent-user.yml +21 -0
- package/templates/minimal/agents-overrides-readme.md +46 -0
- package/templates/minimal/overrides-gitkeep +2 -0
- package/dist/ui/assets/index-BTRcKDlB.js +0 -39
- package/dist/ui/assets/index-BTRcKDlB.js.map +0 -1
- package/templates/minimal/agents-gitkeep +0 -2
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
stability: beta
|
|
3
|
+
keep-beta-until: 2026-08-21
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Consumer Bridge Marker
|
|
7
|
+
|
|
8
|
+
**Status:** Proposed — road-to-global-only-install Phase 4.1.
|
|
9
|
+
**Pairs with:** [`ADR-020 — global-only consumer scope`](../decisions/ADR-020-global-only-consumer-scope.md), [`ADR-007 § Amendment 2026-05-13`](../decisions/ADR-007-agent-discovery-scopes.md#amendment-2026-05-13--augment-global-only).
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
After Phase 3 of `road-to-global-only-install` lands, a consumer
|
|
14
|
+
project carries **only** `agents/overrides/` plus this bridge marker.
|
|
15
|
+
Every other agent artefact (rules, skills, commands, personas,
|
|
16
|
+
settings, user identity) is read from `~/.event4u/agent-config/`. The
|
|
17
|
+
bridge marker is the single, declarative pointer that lets per-tool
|
|
18
|
+
adapters (Windsurf, Cline, Gemini-CLI, the Augment workspace
|
|
19
|
+
projector) locate the global root from inside the repo.
|
|
20
|
+
|
|
21
|
+
## File
|
|
22
|
+
|
|
23
|
+
`agents/.event4u-bridge.yml` at the consumer project root. <!-- ref-ignore -->
|
|
24
|
+
Written by `scripts/install.py` on every successful consumer install
|
|
25
|
+
(global scope). Idempotent — same file, refreshed `installed_at`.
|
|
26
|
+
|
|
27
|
+
## Schema
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
schema: event4u-bridge/v1
|
|
31
|
+
global_root: ~/.event4u/agent-config
|
|
32
|
+
installed_at: 2026-05-23T14:00:00Z
|
|
33
|
+
installer_version: 2.4.0
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Fields
|
|
37
|
+
|
|
38
|
+
| Field | Type | Required | Description |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| `schema` | string | yes | Must equal `event4u-bridge/v1`. Bumped on breaking field changes. |
|
|
41
|
+
| `global_root` | string | yes | Absolute path or `~`-prefixed path to the global install. Readers MUST expand `~` against the current user's `$HOME`. |
|
|
42
|
+
| `installed_at` | string (ISO-8601 UTC) | yes | Timestamp of the last successful install or refresh. |
|
|
43
|
+
| `installer_version` | string (semver) | yes | Version of `@event4u/agent-config` that produced the marker. |
|
|
44
|
+
|
|
45
|
+
Unknown fields are ignored by `v1` readers (forward-compat).
|
|
46
|
+
|
|
47
|
+
## Reader contract
|
|
48
|
+
|
|
49
|
+
Per-tool adapters MUST:
|
|
50
|
+
|
|
51
|
+
1. Read `agents/.event4u-bridge.yml` from the project root. <!-- ref-ignore -->
|
|
52
|
+
2. Reject `schema != event4u-bridge/v1` with a clear error pointing at this contract.
|
|
53
|
+
3. Expand `~` in `global_root` against the **current process's** `$HOME` (not the writer's).
|
|
54
|
+
4. Fail closed if `global_root` is missing on disk — never silently fall back to project-local lookup.
|
|
55
|
+
5. Treat the marker as **read-only data**. Adapters MUST NOT write back through it.
|
|
56
|
+
|
|
57
|
+
## Writer contract
|
|
58
|
+
|
|
59
|
+
`scripts/install.py` MUST:
|
|
60
|
+
|
|
61
|
+
1. Write the marker atomically (temp file + rename) so a crash never leaves a half-formed pointer.
|
|
62
|
+
2. Refresh `installed_at` + `installer_version` on every consumer-scope install.
|
|
63
|
+
3. Use `0644` permissions (world-readable, owner-writable). The marker contains no secrets.
|
|
64
|
+
4. Skip the write under `AGENT_CONFIG_DEV_MODE=1` — maintainer dev installs never lay the bridge into the source repo (this repo's `agents/` directory is the project surface, not a consumer surface).
|
|
65
|
+
|
|
66
|
+
## Per-tool anchor strategy
|
|
67
|
+
|
|
68
|
+
Some AI tools only load rules when an anchor file is **inside** the workspace (Windsurf, Cline, Gemini-CLI). For those IDs, Phase 4.3 plants a thin pointer file under the tool's per-project directory whose body resolves to the bridge marker. Tools that load purely from user-scope (Claude Code, Cursor, Augment) read the marker once and need no per-tool file.
|
|
69
|
+
|
|
70
|
+
## Out of scope
|
|
71
|
+
|
|
72
|
+
- Cross-machine sync of `~/.event4u/agent-config/` (the marker is local-only).
|
|
73
|
+
- Editing the marker by hand to swap installs (use `agent-config init --global-root=…` instead, once that flag ships in Phase 5).
|
|
74
|
+
- Multi-tenant `global_root` (one marker = one global install per project).
|
|
75
|
+
|
|
76
|
+
## References
|
|
77
|
+
|
|
78
|
+
- [`ADR-020`](../decisions/ADR-020-global-only-consumer-scope.md) — global-only consumer scope; cites the in-flight roadmap for Phase 4 surface design + Phase 5 migration order.
|
|
79
|
+
- [`ADR-007`](../decisions/ADR-007-agent-discovery-scopes.md) — scope precedence and the global-default amendment.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
stability: beta
|
|
3
|
+
keep-beta-until: 2026-08-19
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Discovery manifest — worked-example reference
|
|
7
|
+
|
|
8
|
+
> Companion to [ADR-015](../decisions/ADR-015-discovery-manifest-contract.md)
|
|
9
|
+
> and [`discovery-manifest.schema.json`](discovery-manifest.schema.json).
|
|
10
|
+
> The ADR is the decision; the schema is the contract; this file is the
|
|
11
|
+
> worked-example reference linters, the installer, and contributors
|
|
12
|
+
> cite at runtime.
|
|
13
|
+
|
|
14
|
+
## Source of truth
|
|
15
|
+
|
|
16
|
+
The generator
|
|
17
|
+
[`scripts/build_discovery_manifest.py`](../../scripts/build_discovery_manifest.py)
|
|
18
|
+
walks `.agent-src.uncompressed/` and emits the manifest to
|
|
19
|
+
`dist/discovery/discovery-manifest.json` plus a sidecar
|
|
20
|
+
`discovery-manifest.json.sha256` for tamper detection.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
task build-discovery # regenerate the manifest
|
|
24
|
+
task validate-discovery-manifest # re-build to tempdir + diff committed
|
|
25
|
+
task discovery-stats # pretty-print the stats block
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`task ci` runs `build-discovery`, `validate-discovery-manifest`,
|
|
29
|
+
`check-discovery-determinism`, and `check-artefact-checksums` so a
|
|
30
|
+
stale committed manifest, a non-deterministic build, or a
|
|
31
|
+
per-artefact checksum drift all fail CI (Phase-6 invariants).
|
|
32
|
+
|
|
33
|
+
## Top-level shape
|
|
34
|
+
|
|
35
|
+
```jsonc
|
|
36
|
+
{
|
|
37
|
+
"version": 1,
|
|
38
|
+
"generated_at": "2026-05-21T00:00:00Z",
|
|
39
|
+
"scanner_version": "a1b2c3d4e5f6",
|
|
40
|
+
"checksum": "sha256:<64 hex>",
|
|
41
|
+
"workspaces": [ /* one entry per workspace in config/discovery/workspaces.yml */ ],
|
|
42
|
+
"packs": [ /* one entry per pack in config/discovery/packs.yml */ ],
|
|
43
|
+
"artefacts": [ /* sorted by path, ADR-013 frontmatter projected here */ ],
|
|
44
|
+
"unassigned": [ /* artefacts that failed assignment; reason required */ ],
|
|
45
|
+
"documented_unassigned": [ /* explicit skips from config/discovery/unassigned-artefacts.yml */ ],
|
|
46
|
+
"stats": { /* see below */ }
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- `version` — stays `1` for additive changes (ADR-015). Breaking → bump.
|
|
51
|
+
- `generated_at` — UTC ISO-8601. **Only field allowed to differ** between
|
|
52
|
+
two determinism runs.
|
|
53
|
+
- `scanner_version` — first 12 hex of `sha256(build_discovery_manifest.py)`.
|
|
54
|
+
- `checksum` — `sha256:<hex>` of the JSON with `checksum` zeroed and
|
|
55
|
+
`generated_at` normalized to `"<normalised>"`.
|
|
56
|
+
|
|
57
|
+
## Worked artefact entry
|
|
58
|
+
|
|
59
|
+
```jsonc
|
|
60
|
+
{
|
|
61
|
+
"path": ".agent-src.uncompressed/skills/laravel/SKILL.md",
|
|
62
|
+
"category": "skill",
|
|
63
|
+
"name": "laravel",
|
|
64
|
+
"workspaces": ["engineering"],
|
|
65
|
+
"packs": ["laravel"],
|
|
66
|
+
"requires": ["php"],
|
|
67
|
+
"lifecycle": "active",
|
|
68
|
+
"trust": {
|
|
69
|
+
"level": "professional",
|
|
70
|
+
"confidence": "high",
|
|
71
|
+
"human_review_required": false
|
|
72
|
+
},
|
|
73
|
+
"install": { "default": false, "removable": true },
|
|
74
|
+
"checksum": "sha256:<64 hex of normalized file content>"
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- `path` is the canonical identity. There is no `id` field — the path
|
|
79
|
+
is short, unique, and survives renames via git history (ADR-015).
|
|
80
|
+
- `requires` is optional. Empty/absent → no extra pack dependencies
|
|
81
|
+
beyond the artefact's own `packs[]`.
|
|
82
|
+
- `checksum` covers the on-disk bytes with frontmatter normalized
|
|
83
|
+
(sorted keys, trailing newline, no trailing whitespace). Used by the
|
|
84
|
+
Phase-3 installer for drift detection.
|
|
85
|
+
|
|
86
|
+
## Worked pack entry
|
|
87
|
+
|
|
88
|
+
```jsonc
|
|
89
|
+
{
|
|
90
|
+
"id": "laravel",
|
|
91
|
+
"label": "Laravel",
|
|
92
|
+
"description": "PHP framework — Eloquent, Artisan, queues, jobs.",
|
|
93
|
+
"workspaces": ["engineering"],
|
|
94
|
+
"requires_hint": ["php"],
|
|
95
|
+
"trust_level_default": "professional",
|
|
96
|
+
"artefact_count": 18
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`requires_hint` is a vocabulary-side hint (lives in
|
|
101
|
+
`config/discovery/packs.yml`); the canonical dependency edges sit on
|
|
102
|
+
the artefact-level `requires` field, which the installer aggregates.
|
|
103
|
+
|
|
104
|
+
## Stats block
|
|
105
|
+
|
|
106
|
+
```jsonc
|
|
107
|
+
{
|
|
108
|
+
"total_artefacts": 419,
|
|
109
|
+
"by_category": { "skill": 246, "rule": 91, "command": 76, "template": 6 },
|
|
110
|
+
"by_lifecycle": { "active": 405, "experimental": 12, "deprecated": 2, "archived": 0 },
|
|
111
|
+
"by_trust_level": { "core": 142, "professional": 220, "experimental": 41, "advisory": 12, "restricted": 4 },
|
|
112
|
+
"unassigned_count": 0,
|
|
113
|
+
"documented_unassigned_count": 3
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Counts derive from the `artefacts[]` list — no second walk, no desync
|
|
118
|
+
risk. The optional `_count` fields mirror the lengths of the
|
|
119
|
+
`unassigned` and `documented_unassigned` arrays for dashboard ease.
|
|
120
|
+
|
|
121
|
+
## Published files
|
|
122
|
+
|
|
123
|
+
`task build-discovery` writes:
|
|
124
|
+
|
|
125
|
+
| File | Purpose |
|
|
126
|
+
|---|---|
|
|
127
|
+
| `dist/discovery/discovery-manifest.json` | The canonical manifest. |
|
|
128
|
+
| `dist/discovery/discovery-manifest.json.sha256` | Sidecar checksum of the on-disk file bytes. |
|
|
129
|
+
| `dist/discovery/discovery-manifest.summary.md` | Human-readable workspace/pack summary. |
|
|
130
|
+
| `dist/discovery/deprecation-report.md` | Phase-4 lifecycle report — lists every `lifecycle: deprecated` artefact with workspace / pack context. |
|
|
131
|
+
| `dist/discovery/trust-report.md` | Phase-4 trust report — per-workspace breakdown of trust levels and `human_review_required` artefacts. |
|
|
132
|
+
| `dist/discovery/orphan-report.md` | Phase-4 orphan report — non-experimental artefacts whose declared pack has no other members (typo signal). |
|
|
133
|
+
| `dist/discovery/workspaces.json` | Phase-5 flattened workspace sub-view — per workspace, the set of packs + artefact paths visible in it. Lightweight surface for browser wizard previews. |
|
|
134
|
+
| `dist/discovery/packs.json` | Phase-5 flattened pack sub-view — per pack, the artefact paths, plus `by_lifecycle` and `by_trust_level` counts. Lightweight surface for pack-picker UIs. |
|
|
135
|
+
|
|
136
|
+
### Sub-view shape
|
|
137
|
+
|
|
138
|
+
`workspaces.json` and `packs.json` carry the parent manifest's
|
|
139
|
+
`checksum`, `generated_at`, and `scanner_version` so consumers can
|
|
140
|
+
pin against the same source-of-truth version. Artefacts are
|
|
141
|
+
referenced by `path` (the stable identity from the main manifest);
|
|
142
|
+
there is no `id` field.
|
|
143
|
+
|
|
144
|
+
```jsonc
|
|
145
|
+
// workspaces.json
|
|
146
|
+
{
|
|
147
|
+
"generated_at": "…",
|
|
148
|
+
"scanner_version": "…",
|
|
149
|
+
"checksum": "sha256:…",
|
|
150
|
+
"workspaces": [
|
|
151
|
+
{
|
|
152
|
+
"id": "engineering",
|
|
153
|
+
"label": "Engineering",
|
|
154
|
+
"description": "…",
|
|
155
|
+
"default_packs": ["engineering-base", "php", "laravel"],
|
|
156
|
+
"optional_packs": ["symfony"],
|
|
157
|
+
"artefact_count": 124,
|
|
158
|
+
"packs": [
|
|
159
|
+
{ "id": "engineering-base", "artefact_count": 83, "artefacts": [".agent-src.uncompressed/skills/…/SKILL.md", "…"] }
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
```jsonc
|
|
167
|
+
// packs.json
|
|
168
|
+
{
|
|
169
|
+
"generated_at": "…",
|
|
170
|
+
"scanner_version": "…",
|
|
171
|
+
"checksum": "sha256:…",
|
|
172
|
+
"packs": [
|
|
173
|
+
{
|
|
174
|
+
"id": "engineering-base",
|
|
175
|
+
"label": "Engineering Base",
|
|
176
|
+
"description": "…",
|
|
177
|
+
"workspaces": ["engineering"],
|
|
178
|
+
"requires_hint": [],
|
|
179
|
+
"trust_level_default": "core",
|
|
180
|
+
"artefact_count": 83,
|
|
181
|
+
"artefacts": [".agent-src.uncompressed/skills/…/SKILL.md", "…"],
|
|
182
|
+
"by_lifecycle": { "active": 82, "experimental": 1, "deprecated": 0, "archived": 0 },
|
|
183
|
+
"by_trust_level": { "core": 83, "professional": 0, "experimental": 0, "advisory": 0, "restricted": 0 }
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Both sub-views are byte-identical between two consecutive
|
|
190
|
+
`task build-discovery` runs (modulo `generated_at`), same determinism
|
|
191
|
+
guarantee as the main manifest.
|
|
192
|
+
|
|
193
|
+
## Consumer guide
|
|
194
|
+
|
|
195
|
+
- **Phase-3 installer** — reads `artefacts[]`, resolves `requires`,
|
|
196
|
+
verifies each file against its `checksum` before write.
|
|
197
|
+
- **Browser wizard / docs site** — reads `workspaces[]`, `packs[]`,
|
|
198
|
+
`stats` to render pickers and counts.
|
|
199
|
+
- **Third-party tools** — treat the schema as the contract; pin the
|
|
200
|
+
schema by `version` and watch for breaking-change ADRs.
|
|
201
|
+
|
|
202
|
+
## See also
|
|
203
|
+
|
|
204
|
+
- [ADR-013](../decisions/ADR-013-discovery-frontmatter-contract.md) —
|
|
205
|
+
the frontmatter contract (input side).
|
|
206
|
+
- [ADR-015](../decisions/ADR-015-discovery-manifest-contract.md) —
|
|
207
|
+
the manifest contract (output side, this file).
|
|
208
|
+
- [`frontmatter-contract.md`](frontmatter-contract.md) — per-artefact
|
|
209
|
+
worked frontmatter examples.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Discovery Manifest",
|
|
5
5
|
"description": "Release-time scan output for @event4u/agent-config. See ADR-013 and agents/roadmaps/archive/automated-pack-workspace-and-skill-discovery.md (archived, status: completed).",
|
|
6
6
|
"type": "object",
|
|
7
|
-
"required": ["version", "generated_at", "scanner_version", "checksum", "workspaces", "packs", "artefacts", "unassigned"],
|
|
7
|
+
"required": ["version", "generated_at", "scanner_version", "checksum", "workspaces", "packs", "artefacts", "unassigned", "stats"],
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
10
|
"version": {
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"type": "array",
|
|
50
50
|
"items": { "$ref": "#/$defs/unassigned" },
|
|
51
51
|
"description": "Artefacts explicitly skipped via config/discovery/unassigned-artefacts.yml. Each entry MUST carry a reason."
|
|
52
|
-
}
|
|
52
|
+
},
|
|
53
|
+
"stats": { "$ref": "#/$defs/stats" }
|
|
53
54
|
},
|
|
54
55
|
"$defs": {
|
|
55
56
|
"workspace_id": {
|
|
@@ -97,12 +98,29 @@
|
|
|
97
98
|
"workspaces": { "type": "array", "items": { "$ref": "#/$defs/workspace_id" }, "minItems": 1 },
|
|
98
99
|
"requires_hint": { "type": "array", "items": { "$ref": "#/$defs/pack_id" } },
|
|
99
100
|
"trust_level_default": { "$ref": "#/$defs/trust_level" },
|
|
100
|
-
"artefact_count": { "type": "integer", "minimum": 0 }
|
|
101
|
+
"artefact_count": { "type": "integer", "minimum": 0 },
|
|
102
|
+
"human_review_required": {
|
|
103
|
+
"type": "integer",
|
|
104
|
+
"minimum": 0,
|
|
105
|
+
"description": "Phase 5 (ADR-018) — count of artefacts in this pack with trust.human_review_required=true. Zero for core-only packs."
|
|
106
|
+
},
|
|
107
|
+
"trust_summary": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"description": "Phase 5 (ADR-018) — per-pack artefact counts broken down by trust level. Sum equals artefact_count.",
|
|
111
|
+
"properties": {
|
|
112
|
+
"core": { "type": "integer", "minimum": 0 },
|
|
113
|
+
"professional": { "type": "integer", "minimum": 0 },
|
|
114
|
+
"advisory": { "type": "integer", "minimum": 0 },
|
|
115
|
+
"restricted": { "type": "integer", "minimum": 0 },
|
|
116
|
+
"experimental": { "type": "integer", "minimum": 0 }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
101
119
|
}
|
|
102
120
|
},
|
|
103
121
|
"artefact": {
|
|
104
122
|
"type": "object",
|
|
105
|
-
"required": ["path", "category", "workspaces", "packs", "lifecycle", "trust", "install"],
|
|
123
|
+
"required": ["path", "category", "workspaces", "packs", "lifecycle", "trust", "install", "checksum"],
|
|
106
124
|
"additionalProperties": false,
|
|
107
125
|
"properties": {
|
|
108
126
|
"path": { "type": "string", "minLength": 1, "description": "POSIX path relative to repo root." },
|
|
@@ -110,6 +128,16 @@
|
|
|
110
128
|
"name": { "type": "string" },
|
|
111
129
|
"workspaces": { "type": "array", "items": { "$ref": "#/$defs/workspace_id" }, "minItems": 1 },
|
|
112
130
|
"packs": { "type": "array", "items": { "$ref": "#/$defs/pack_id" }, "minItems": 1 },
|
|
131
|
+
"requires": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": { "$ref": "#/$defs/pack_id" },
|
|
134
|
+
"description": "Optional dependency edges — pack IDs the artefact transitively needs at install time. Closed vocabulary."
|
|
135
|
+
},
|
|
136
|
+
"checksum": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
139
|
+
"description": "sha256 of the artefact file content with frontmatter normalized (sorted keys, no trailing whitespace, trailing newline). Drift-detection for the Phase-3 installer."
|
|
140
|
+
},
|
|
113
141
|
"lifecycle": { "$ref": "#/$defs/lifecycle" },
|
|
114
142
|
"trust": {
|
|
115
143
|
"type": "object",
|
|
@@ -141,6 +169,51 @@
|
|
|
141
169
|
"category": { "type": "string", "enum": ["skill", "rule", "command", "template", "unknown"] },
|
|
142
170
|
"reason": { "type": "string", "minLength": 1 }
|
|
143
171
|
}
|
|
172
|
+
},
|
|
173
|
+
"stats": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"required": ["total_artefacts", "by_category", "by_lifecycle", "by_trust_level"],
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"description": "Aggregate counts over the manifest. Cheap sanity surface for `task discovery-stats` and downstream dashboards.",
|
|
178
|
+
"properties": {
|
|
179
|
+
"total_artefacts": { "type": "integer", "minimum": 0 },
|
|
180
|
+
"by_category": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"additionalProperties": false,
|
|
183
|
+
"properties": {
|
|
184
|
+
"skill": { "type": "integer", "minimum": 0 },
|
|
185
|
+
"rule": { "type": "integer", "minimum": 0 },
|
|
186
|
+
"command": { "type": "integer", "minimum": 0 },
|
|
187
|
+
"template": { "type": "integer", "minimum": 0 }
|
|
188
|
+
},
|
|
189
|
+
"required": ["skill", "rule", "command", "template"]
|
|
190
|
+
},
|
|
191
|
+
"by_lifecycle": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"properties": {
|
|
195
|
+
"active": { "type": "integer", "minimum": 0 },
|
|
196
|
+
"experimental": { "type": "integer", "minimum": 0 },
|
|
197
|
+
"deprecated": { "type": "integer", "minimum": 0 },
|
|
198
|
+
"archived": { "type": "integer", "minimum": 0 }
|
|
199
|
+
},
|
|
200
|
+
"required": ["active", "experimental", "deprecated", "archived"]
|
|
201
|
+
},
|
|
202
|
+
"by_trust_level": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"properties": {
|
|
206
|
+
"core": { "type": "integer", "minimum": 0 },
|
|
207
|
+
"professional": { "type": "integer", "minimum": 0 },
|
|
208
|
+
"experimental": { "type": "integer", "minimum": 0 },
|
|
209
|
+
"advisory": { "type": "integer", "minimum": 0 },
|
|
210
|
+
"restricted": { "type": "integer", "minimum": 0 }
|
|
211
|
+
},
|
|
212
|
+
"required": ["core", "professional", "experimental", "advisory", "restricted"]
|
|
213
|
+
},
|
|
214
|
+
"unassigned_count": { "type": "integer", "minimum": 0 },
|
|
215
|
+
"documented_unassigned_count": { "type": "integer", "minimum": 0 }
|
|
216
|
+
}
|
|
144
217
|
}
|
|
145
218
|
}
|
|
146
219
|
}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"route": {
|
|
60
60
|
"type": ["object", "null"],
|
|
61
|
-
"description": "Rule-router activation snapshot. Null when router.json is absent.",
|
|
61
|
+
"description": "Rule-router activation snapshot. Null when dist/router.json is absent.",
|
|
62
62
|
"required": ["matched_rules", "kernel_rules", "persona"],
|
|
63
63
|
"additionalProperties": false,
|
|
64
64
|
"properties": {
|