self-diagnosis: Maintainer Harness Profiler & Audit¶
Maintainer-only skill: Run
self-diagnosisonly inside anAgy-Squadsource repository checkout. To review or govern your own external repository, usepr-review,full-review,day-one-review, orswarm-governance.
self-diagnosis audits Agy-Squad itself and its workspace skills for contract accuracy, progressive-disclosure budgets, compiled template sizes, link integrity, and pipeline latency.
- Source specification:
.agents/skills/self-diagnosis/SKILL.md - References & scripts:
diagnose.mjs,self-diagnosis-manifest.json,optimization-and-review-rubric.md,execution-and-teardown.md - Canonical role map & closure gate: Roles, skill workflows, and runtime closure
Workflow¶
- Pre-flight intake & zero-subagent profiler (
Operator): Confirm execution mode (/swarm,invoke_subagentfallback, or Local Profiler Only), topology (Flatvs.Layered, zero default bias), retention (--keep-reportsvs.--teardown), and integrity gate (audit-<id>vs.--allow-unaudited). Run the zero-subagent local profiler first:
diagnose.mjs validates SKILL.md line/byte/prose-share budgets, relative and hosted doc links, runtime closure checklists, zensical.toml nav entries, SVG XML sanity, Standard v1.5.0 (11-category ARCH–DEP, SEC) and legacy v1.4.0 review ledgers, compiled brief byte budgets, and canary handoff pipeline timings in isolated temp directories.
- Compile diagnostic cohorts: Compile
self-diagnosis-manifest.jsonviadiagnose.mjs --print-plan(primary/swarm) ordiagnose.mjs --print-dispatch <all_l1|all_specialists|squadId>(invoke_subagentfallback): Skill & PR-Review Standard Lead(skill_and_pr_review_audit) -> 2readOnly: truespecialists (SKILL,DOC,ARCH,SCRIPT).Runtime & Contract Diagnostics Lead(runtime_and_contract_diagnosis) -> 2readOnly: truespecialists (MCP,RUN,SVC,SCRIPT,TEST,DEP,SEC).Token & Execution Optimization Lead(token_and_execution_optimization) -> 2readOnly: truespecialists (RUN,SKILL,SVC,ARCH).- Report, patrol & bundle (
Specialists->Working Leads / Coordinator->Operator): Specialists writespecialist-<N>/report.mdand send<= 500BREADYreceipts. Leads or coordinator verify claims against source files andnpm test, emitContent Verdict: PASS, and pair with flataudit-<id>(Integrity Verdict: CLEAN) before bundling viaagy-squad finalize. - Ledger, teardown, remediation & re-verification: Transcribe every
P0–P3item1-to-1intodocs/reviews/<slug>.md(Sections 1, 8, and 9), rundiagnose.mjs --teardown all --ledger docs/reviews/<slug>.md, keep spawned workers alive to re-verify fixes in place, flip closed ledger rows, kill workers (swarm{action: "kill"}/manage_subagents), and pass the four-check runtime closure gate.