Repository navigation
fix(templates): v0.8.5 default-manifest audit — ship starter-trio slash commands + audit pins (trinity-enterprise#239) - #1767
Conversation
…rinity-enterprise#239) v0.8.5 pre-release audit of config/manifests/default-system.yaml: the tree-existence guard only pinned template.yaml, so a template shipping without CLAUDE.md would deploy 'successfully' but seed an agent with no instructions — failing the zero-cred useful bar the audit enforces. Audit outcome: manifest passes all checks (local:-only, no schedules, no prompt override, deliberate full-mesh + shared folders, all three templates present and zero-cred clean) — nothing trimmed or replaced. Co-Authored-By: Claude Fable 5 <[email protected]>
…trio (trinity-enterprise#239) Live first-chat exercise of the deployed acme fleet surfaced that every documented command in scout/sage/scribe fails as typed: Claude Code intercepts any leading-/ message before the model sees it, so /research returns "Unknown command: /research" and /status hits the disabled built-in — while the agents' own onboarding replies teach exactly that syntax. Ship .claude/commands/<name>.md for all 15 declared commands (the pattern trinity-system/demo-* templates already follow; a shipped status.md shadows the built-in, verified live), and pin declared↔shipped command parity for every manifest-referenced template in the ent#124 seed suite. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Resolve by running |
PR Validation Report —
|
| Category | Status | Notes |
|---|---|---|
| Commit Messages | ✅ | 2 commits, conventional + descriptive |
| Base Branch | ✅ | Targets dev |
| PR Size | ✅ | 16 files, verified purely additive — git diff --stat origin/dev...head = 195 insertions, zero deletions, no modification outside the one additive test file |
| Status Auto-Promotion | No closing keyword; cross-tracker anyway → manual status-in-dev bump required (see below) |
|
| Roadmap | ✅ | trinity-enterprise#239 resolves and is correctly labeled. Cross-tracker ref is the expected shape → not a failure |
| Requirements | ➖ | Agent-template content fix, no new platform capability |
| Architecture | ➖ | No endpoints, schema, components or integrations touched |
| Feature Flows | ➖ | No platform behavior change; template payload only |
| Security Check | ✅ | All 7 checks clean + public-repo content review passed (detail below) |
| Infrastructure | ➖ | No compose / Dockerfile / nginx in diff |
| Build Packaging (4.8) | ➖ | No new src/backend/*.py. Delivery path verified instead (below) |
| Config Packaging (4.9) | ➖ | No new os.getenv() |
| Test Adequacy | ✅ | Named regression test present — test_bundled_manifest_templates_ship_declared_commands, docstring names ent#239 and the exact failure mode |
| Code Quality | ✅ | Minimal, additive, faithful to each template's own CLAUDE.md; declared↔shipped parity 15/15 |
| Requirements Trace | ✅ | Body maps evidence AC-by-AC |
File classification (all 16)
15 new config/agent-templates/<t>/.claude/commands/<name>.md — YAML frontmatter (description, argument-hint) + $ARGUMENTS body with graceful no-argument handling:
| Template | New command files |
|---|---|
scout (5) |
research, competitors, trends, opportunities, status |
sage (5) |
analyze, recommend, framework, briefing, request-research |
scribe (5) |
report, proposal, summary, deliverable, status |
1 modified: tests/unit/test_ent124_default_system_seed.py (+32/−0) — a CLAUDE.md-existence assertion appended to the existing test, plus the new parity test. No existing assertion altered or removed.
Independent verification (run locally, read-only — not taken from the PR body)
- Declared↔shipped parity on the branch:
scout 5/5,sage 5/5,scribe 5/5— 0 missing, 0 undeclared. The 15 files map exactly onto the 15commands:entries in the threetemplate.yamls. - Catalog-wide scan on
devconfirms the scope claim: of 25 template dirs, only 5 declarecommands:.demo-analyst(4/4) anddemo-researcher(2/2) already shipped theirs;scout/sage/scribewere the only non-compliant templates.corneliusand thedd-*suite declare none. - Root cause confirmed:
commands:intemplate.yamlis display metadata only — consumed byagent_server/routers/info.py:213→/api/template/info→InfoPanel.vue:161("Slash Commands (N)"). Nothing generates a command file, so a declared-but-unshipped command could never work as typed. Genuine bug, not cosmetic. - Delivery mechanism confirmed:
docker/base-image/startup.sh:304usesfind /template -mindepth 1 -maxdepth 1 -print0 | … cp -r— includes dot-dirs, andcp -r /template/.claude /home/developer/merges into an existing.claude/rather than nesting../config/agent-templates:/agent-configs/templates:rois bind-mounted in bothdocker-compose.yml:251anddocker-compose.prod.yml:249, so the files reach containers ongit pull+ restart with no image rebuild. - Content fidelity spot-check: every command's save path matches its template's own CLAUDE.md convention (scout →
shared-out/research/{competitors,trends,opportunities}/+ the{date}-{topic}-{type}.mdrule; sage →strategy/{analyses,recommendations,briefings}/+ the SWOT/Porter/BCG/Ansoff list; scribe →deliverables/{reports,proposals,summaries}/).
Security
All seven Step-4 checks clean — 0 hits for keys/tokens, real emails, public IPs, .env, hardcoded secrets, credential files. In fact zero URLs of any kind in the entire diff. gitleaks CI pass.
Public-repo content review (extra scrutiny — this is shipped content): the 15 files are generic consulting-workflow prose. No internal/production URLs, no customer names ("Acme" is the repo's pre-existing fictional demo fleet, already in config/manifests/default-system.yaml and config/agent-templates/README.md), no real emails, no internal tooling references. No enterprise/paid-feature disclosure — no paid-feature names, no enterprise_* identifiers, no monetization/gating rationale, so the CLAUDE.md standing rule is satisfied. Note enterprise-docs-guard.yml is path-filtered to docs/**/CLAUDE.md/main.py/entitlement_service.py and legitimately did not trigger here — manual review found nothing it would have caught.
Issues found
Critical — none.
Warnings (non-blocking, all metadata/process hygiene)
-
No closing keyword → no auto-promotion. The reference appears only as a parenthetical
(Abilityai/trinity-enterprise#239). Two consequences:issue-status-on-merge.ymlwon't fire, and even with the keyword it couldn't, since GitHub's automation is same-repo only. Handled at merge — I setstatus-in-devon ent#239 manually. It still needs a manual close at the v0.8.5 release cut. -
Three bare
#Nrefs in the body mis-resolve to unrelated CLOSED public issues. On a public-repo PR these render againstabilityai/trinity, not the enterprise tracker:Ref in body Resolves to (public, wrong) Intended (enterprise, right) (#122 caution)CLOSED — refactor: Split agent_server/services/claude_code.py OPEN — Epic: Fresh-install fleet provisioning… #125 interactionCLOSED — refactor: Split frontend large components OPEN — feat: Resilient system-manifest deploy… findings for #137CLOSED — bug: Cleanup service misses no-session running executions OPEN — feat: Prepare the public agent fleet for the default installation Body text only, zero code impact — but it makes the audit record misleading to a future reader. Worth qualifying as
Abilityai/trinity-enterprise#Nnext time. (trinity#1646and the bare#1656are correctly public.) -
Fix reaches new agents only — flag in the v0.8.5 release notes.
startup.shgates the template copy on the/home/developer/.trinity-initializedmarker, so any agent already created fromscout/sage/scribekeeps the broken commands until recreated. Correct and intentional for the fresh-install target this issue scopes, but operators running the trio today won't see the fix from a plain upgrade.
Suggestions (optional)
- Broaden the parity test catalog-wide.
test_bundled_manifest_templates_ship_declared_commandsiterates only manifest-referenced templates.demo-analyst/demo-researchercomply today (verified), but a future template — or a new command on an existing one — can regress silently. A loop overconfig/agent-templates/*/template.yamlmakes the invariant catalog-wide for the same ~5 lines. - Document the trap for external template authors.
docs/TRINITY_COMPATIBLE_AGENT_GUIDE.md:356presentscommands:under "Slash commands with descriptions" with no hint that it's Info-tab metadata only and a real.claude/commands/<name>.mdmust ship alongside. That line is exactly what led three first-party templates here; one sentence prevents the class for the public template ecosystem. - Test nits (
test_ent124_default_system_seed.py):(template_dir / "template.yaml").read_text()omitsencoding="utf-8"while the sibling assertion two lines up includes it;.get("commands", [])raisesTypeErrorif the key is present but null (.get("commands") or []is safer);import yamlcould sit at module scope. /statusshadowing is verified live but not pinned — it depends on Claude Code's project-over-built-in precedence, upstream behavior a unit test can't cover.request-research.mdhardcodes a deployed-name hint ("namedacme-scoutwhen deployed as the acme system"). Degrades gracefully (the command instructslist_agents()first) but goes stale under a differentTRINITY_DEFAULT_SYSTEM_MANIFESTsystem name.
Recommendation
✅ APPROVE
Purely additive (+195/−0), no existing file modified or deleted, no platform code touched — the entire risk surface is agent-template payload plus one additive test. The fix is complete and independently verified: 15/15 declared commands now ship, the catalog-wide scan confirms scout/sage/scribe were the only offenders, the root cause is real (commands: is display-only metadata), and the delivery path is confirmed through the ro bind mount present in both compose files. Security clean on all seven checks with zero URLs and no enterprise disclosure. CI green including gitleaks and pytest on head + base across three seeds. The cross-tracker reference resolves and is correctly labeled — per the skill, the expected shape, not a failure.
All three warnings are metadata/process hygiene, not code defects; none justifies holding a P1 fix for the v0.8.5 fresh-install path.
🤖 Validated with Claude Code via /validate-pr
AndriiPasternak31
left a comment
There was a problem hiding this comment.
Approved via /validate-pr — see report above. Purely additive (+195/−0, zero deletions); declared↔shipped command parity independently verified 15/15, catalog-wide scan confirms scout/sage/scribe were the only non-compliant templates, root cause (commands: is Info-tab display metadata only) and delivery path (startup.sh:304 dot-dir copy over the ro bind mount in both compose files) both confirmed. Named regression test present. Security clean, zero URLs, no enterprise disclosure. Three warnings are metadata hygiene only — none blocking.
Pre-release audit of the bundled default-system manifest for v0.8.5 (Abilityai/trinity-enterprise#239). Verdict: manifest passes — nothing trimmed or replaced. The audit surfaced one real first-run defect in the starter templates (fixed here) plus one test hardening.
Audit evidence (per AC)
local:-only (scout/sage/scribe), zero network and zero PAT at seed time.test_bundled_manifest_local_templates_exist_in_treepins thelocal:-only invariant and tree existence.POST /api/systems/deploy,strict=false— the exact seed semantics):status=deployed, 3/3 agents created and healthy (clone_status: ok), full-mesh = 6 permission edges, shared-folder mounts exactly as the templates document (sage seesshared-in/acme-scout, scribe sees both), agent MCP keys +.mcp.jsonpresent zero-cred. Torn down after verification./statusproduced an honest zero-state report after the fix below. No credentials demanded, no crash, no dead agent.acme; noschedules:; noprompt:override;full-mesh+ shared folders are deliberate and documented in-manifest (the trio's CLAUDE.md assumes the team shape). Pinned bytest_bundled_manifest_parses_and_validates.Finding + fix: documented slash commands failed as typed
Live first-chat exercise caught what the static pass could not: every documented command in all three templates was broken as typed. Claude Code intercepts any leading-
/message before the model sees it —/researchreturnedUnknown command: /research,/statushit the disabled built-in — while the agents' own onboarding replies teach exactly that syntax (first-run paper cut, same class as trinity#1646).Fix: ship real
.claude/commands/<name>.mdfiles for all 15 declared commands (the patterntrinity-system/demo-*templates already follow). Verified live on a fresh agent created from the updated template:/researchengages per its command file, and a shippedstatus.mdshadows the built-in/status. The startup template copy (find /template -mindepth 1) carries dot-dirs, so the files land on first boot.Changes
config/agent-templates/{scout,sage,scribe}/.claude/commands/*.md— 15 command files, bodies faithful to each template's CLAUDE.md process docs, graceful no-argument handlingtests/unit/test_ent124_default_system_seed.py—test_bundled_manifest_templates_ship_declared_commands(declared↔shipped parity for every manifest-referenced template) + the earlier CLAUDE.md-existence pinVerification
Live (dev instance, current dev code): manifest dry-run
valid→ deploydeployed3/3 → containers healthy → zero-cred chats useful → command files verified end-to-end (template → create → start →/research,/status) → all test agents deleted.🤖 Generated with Claude Code