@chankov/agent-fleet 0.0.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/.claude/commands/build.md +44 -0
- package/.claude/commands/code-simplify.md +22 -0
- package/.claude/commands/design-agent.md +14 -0
- package/.claude/commands/doctor-agent-fleet.md +17 -0
- package/.claude/commands/orchestrate.md +112 -0
- package/.claude/commands/plan.md +16 -0
- package/.claude/commands/prime.md +22 -0
- package/.claude/commands/review.md +16 -0
- package/.claude/commands/setup-agent-fleet.md +25 -0
- package/.claude/commands/ship.md +72 -0
- package/.claude/commands/spec.md +15 -0
- package/.claude/commands/test.md +19 -0
- package/.claude/commands/webperf.md +32 -0
- package/.claude/orchestrate-teams.yaml +24 -0
- package/.opencode/commands/af-build.md +17 -0
- package/.opencode/commands/af-code-simplify.md +16 -0
- package/.opencode/commands/af-compound.md +16 -0
- package/.opencode/commands/af-design-agent.md +15 -0
- package/.opencode/commands/af-doctor-agent-fleet.md +15 -0
- package/.opencode/commands/af-orchestrate.md +112 -0
- package/.opencode/commands/af-plan.md +16 -0
- package/.opencode/commands/af-prime.md +22 -0
- package/.opencode/commands/af-review.md +15 -0
- package/.opencode/commands/af-setup-agent-fleet.md +15 -0
- package/.opencode/commands/af-ship.md +16 -0
- package/.opencode/commands/af-spec.md +16 -0
- package/.opencode/commands/af-test.md +21 -0
- package/.opencode/commands/af-webperf.md +32 -0
- package/.opencode/orchestrate-teams.yaml +24 -0
- package/.pi/agents/dispatch-policy.yaml +32 -0
- package/.pi/agents/model-profiles.yaml +20 -0
- package/.pi/agents/peers.yaml +142 -0
- package/.pi/agents/teams.yaml +39 -0
- package/.pi/damage-control-rules.yaml +297 -0
- package/.pi/extensions/agent-fleet-update-check/README.md +58 -0
- package/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
- package/.pi/extensions/agent-fleet-update-check/package.json +6 -0
- package/.pi/extensions/btw/README.md +118 -0
- package/.pi/extensions/btw/index.ts +917 -0
- package/.pi/extensions/btw/package.json +6 -0
- package/.pi/extensions/btw/state.js +179 -0
- package/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
- package/.pi/extensions/chrome-devtools-mcp/index.ts +92 -0
- package/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.pi/extensions/package-lock.json +1143 -0
- package/.pi/extensions/package.json +9 -0
- package/.pi/extensions/pi-voice-stt/README.md +201 -0
- package/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.pi/harnesses/agent-hub/README.md +562 -0
- package/.pi/harnesses/agent-hub/artifacts.js +92 -0
- package/.pi/harnesses/agent-hub/backend-policy.js +153 -0
- package/.pi/harnesses/agent-hub/delegate.ts +363 -0
- package/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.pi/harnesses/agent-hub/helpers.ts +165 -0
- package/.pi/harnesses/agent-hub/index.ts +7098 -0
- package/.pi/harnesses/agent-hub/package.json +6 -0
- package/.pi/harnesses/agent-hub/return-contract.js +215 -0
- package/.pi/harnesses/agent-hub/scope-gate.js +103 -0
- package/.pi/harnesses/agent-hub/spawn.ts +179 -0
- package/.pi/harnesses/ask-user-remote/README.md +10 -0
- package/.pi/harnesses/ask-user-remote/index.ts +253 -0
- package/.pi/harnesses/ask-user-remote/race-core.js +106 -0
- package/.pi/harnesses/coms/README.md +71 -0
- package/.pi/harnesses/coms/index.ts +1743 -0
- package/.pi/harnesses/coms/package.json +6 -0
- package/.pi/harnesses/damage-control/README.md +65 -0
- package/.pi/harnesses/damage-control/index.ts +250 -0
- package/.pi/harnesses/damage-control/package.json +6 -0
- package/.pi/harnesses/damage-control/shared.ts +183 -0
- package/.pi/harnesses/damage-control-continue/README.md +116 -0
- package/.pi/harnesses/damage-control-continue/index.ts +522 -0
- package/.pi/harnesses/damage-control-continue/package.json +6 -0
- package/.pi/harnesses/lib/herdr-client.ts +458 -0
- package/.pi/harnesses/lib/herdr-presence.ts +288 -0
- package/.pi/harnesses/package-lock.json +35 -0
- package/.pi/harnesses/package.json +9 -0
- package/.pi/prompts/build.md +24 -0
- package/.pi/prompts/code-simplify.md +22 -0
- package/.pi/prompts/doctor-agent-fleet.md +15 -0
- package/.pi/prompts/plan.md +16 -0
- package/.pi/prompts/review.md +16 -0
- package/.pi/prompts/setup-agent-fleet.md +27 -0
- package/.pi/prompts/ship.md +17 -0
- package/.pi/prompts/spec.md +15 -0
- package/.pi/prompts/test.md +19 -0
- package/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/0.0.1/.claude/commands/build.md +44 -0
- package/.versions/0.0.1/.claude/commands/code-simplify.md +22 -0
- package/.versions/0.0.1/.claude/commands/design-agent.md +14 -0
- package/.versions/0.0.1/.claude/commands/doctor-agent-fleet.md +17 -0
- package/.versions/0.0.1/.claude/commands/orchestrate.md +112 -0
- package/.versions/0.0.1/.claude/commands/plan.md +16 -0
- package/.versions/0.0.1/.claude/commands/prime.md +22 -0
- package/.versions/0.0.1/.claude/commands/review.md +16 -0
- package/.versions/0.0.1/.claude/commands/setup-agent-fleet.md +25 -0
- package/.versions/0.0.1/.claude/commands/ship.md +72 -0
- package/.versions/0.0.1/.claude/commands/spec.md +15 -0
- package/.versions/0.0.1/.claude/commands/test.md +19 -0
- package/.versions/0.0.1/.claude/commands/webperf.md +32 -0
- package/.versions/0.0.1/.claude/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.1/.opencode/commands/af-build.md +17 -0
- package/.versions/0.0.1/.opencode/commands/af-code-simplify.md +16 -0
- package/.versions/0.0.1/.opencode/commands/af-compound.md +16 -0
- package/.versions/0.0.1/.opencode/commands/af-design-agent.md +15 -0
- package/.versions/0.0.1/.opencode/commands/af-doctor-agent-fleet.md +15 -0
- package/.versions/0.0.1/.opencode/commands/af-orchestrate.md +112 -0
- package/.versions/0.0.1/.opencode/commands/af-plan.md +16 -0
- package/.versions/0.0.1/.opencode/commands/af-prime.md +22 -0
- package/.versions/0.0.1/.opencode/commands/af-review.md +15 -0
- package/.versions/0.0.1/.opencode/commands/af-setup-agent-fleet.md +15 -0
- package/.versions/0.0.1/.opencode/commands/af-ship.md +16 -0
- package/.versions/0.0.1/.opencode/commands/af-spec.md +16 -0
- package/.versions/0.0.1/.opencode/commands/af-test.md +21 -0
- package/.versions/0.0.1/.opencode/commands/af-webperf.md +32 -0
- package/.versions/0.0.1/.opencode/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.1/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/0.0.1/.pi/agents/model-profiles.yaml +20 -0
- package/.versions/0.0.1/.pi/agents/peers.yaml +142 -0
- package/.versions/0.0.1/.pi/agents/teams.yaml +39 -0
- package/.versions/0.0.1/.pi/damage-control-rules.yaml +297 -0
- package/.versions/0.0.1/.pi/extensions/agent-fleet-update-check/README.md +58 -0
- package/.versions/0.0.1/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
- package/.versions/0.0.1/.pi/extensions/agent-fleet-update-check/package.json +6 -0
- package/.versions/0.0.1/.pi/extensions/btw/README.md +118 -0
- package/.versions/0.0.1/.pi/extensions/btw/index.ts +917 -0
- package/.versions/0.0.1/.pi/extensions/btw/package.json +6 -0
- package/.versions/0.0.1/.pi/extensions/btw/state.js +179 -0
- package/.versions/0.0.1/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
- package/.versions/0.0.1/.pi/extensions/chrome-devtools-mcp/index.ts +92 -0
- package/.versions/0.0.1/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.0.1/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.0.1/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.0.1/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.0.1/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.0.1/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.0.1/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.0.1/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.0.1/.pi/extensions/package.json +9 -0
- package/.versions/0.0.1/.pi/extensions/pi-voice-stt/README.md +201 -0
- package/.versions/0.0.1/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/0.0.1/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/0.0.1/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/0.0.1/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/0.0.1/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/0.0.1/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/README.md +562 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/artifacts.js +92 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/backend-policy.js +153 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/delegate.ts +363 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/helpers.ts +165 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/index.ts +7098 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/package.json +6 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/return-contract.js +215 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/scope-gate.js +103 -0
- package/.versions/0.0.1/.pi/harnesses/agent-hub/spawn.ts +179 -0
- package/.versions/0.0.1/.pi/harnesses/ask-user-remote/README.md +10 -0
- package/.versions/0.0.1/.pi/harnesses/ask-user-remote/index.ts +253 -0
- package/.versions/0.0.1/.pi/harnesses/ask-user-remote/race-core.js +106 -0
- package/.versions/0.0.1/.pi/harnesses/coms/README.md +71 -0
- package/.versions/0.0.1/.pi/harnesses/coms/index.ts +1743 -0
- package/.versions/0.0.1/.pi/harnesses/coms/package.json +6 -0
- package/.versions/0.0.1/.pi/harnesses/damage-control/README.md +65 -0
- package/.versions/0.0.1/.pi/harnesses/damage-control/index.ts +250 -0
- package/.versions/0.0.1/.pi/harnesses/damage-control/package.json +6 -0
- package/.versions/0.0.1/.pi/harnesses/damage-control/shared.ts +183 -0
- package/.versions/0.0.1/.pi/harnesses/damage-control-continue/README.md +116 -0
- package/.versions/0.0.1/.pi/harnesses/damage-control-continue/index.ts +522 -0
- package/.versions/0.0.1/.pi/harnesses/damage-control-continue/package.json +6 -0
- package/.versions/0.0.1/.pi/harnesses/lib/herdr-client.ts +458 -0
- package/.versions/0.0.1/.pi/harnesses/lib/herdr-presence.ts +288 -0
- package/.versions/0.0.1/.pi/harnesses/package-lock.json +35 -0
- package/.versions/0.0.1/.pi/harnesses/package.json +9 -0
- package/.versions/0.0.1/.pi/prompts/build.md +24 -0
- package/.versions/0.0.1/.pi/prompts/code-simplify.md +22 -0
- package/.versions/0.0.1/.pi/prompts/doctor-agent-fleet.md +15 -0
- package/.versions/0.0.1/.pi/prompts/plan.md +16 -0
- package/.versions/0.0.1/.pi/prompts/review.md +16 -0
- package/.versions/0.0.1/.pi/prompts/setup-agent-fleet.md +27 -0
- package/.versions/0.0.1/.pi/prompts/ship.md +17 -0
- package/.versions/0.0.1/.pi/prompts/spec.md +15 -0
- package/.versions/0.0.1/.pi/prompts/test.md +19 -0
- package/.versions/0.0.1/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/0.0.1/.version +1 -0
- package/.versions/0.0.1/agents/architect.md +21 -0
- package/.versions/0.0.1/agents/bowser.md +25 -0
- package/.versions/0.0.1/agents/builder.md +52 -0
- package/.versions/0.0.1/agents/code-reviewer.md +205 -0
- package/.versions/0.0.1/agents/deep-researcher.md +31 -0
- package/.versions/0.0.1/agents/documenter.md +16 -0
- package/.versions/0.0.1/agents/orchestrator.md +43 -0
- package/.versions/0.0.1/agents/plan-reviewer.md +60 -0
- package/.versions/0.0.1/agents/planner.md +69 -0
- package/.versions/0.0.1/agents/releaser.md +22 -0
- package/.versions/0.0.1/agents/researcher.md +28 -0
- package/.versions/0.0.1/agents/security-auditor.md +166 -0
- package/.versions/0.0.1/agents/test-engineer.md +144 -0
- package/.versions/0.0.1/agents/web-debugger.md +42 -0
- package/.versions/0.0.1/agents/web-performance-auditor.md +192 -0
- package/.versions/0.0.1/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/.versions/0.0.1/hooks/coms-stop-hook.mjs +73 -0
- package/.versions/0.0.1/hooks/hooks.json +14 -0
- package/.versions/0.0.1/hooks/session-start.sh +74 -0
- package/.versions/0.0.1/hooks/simplify-ignore.sh +302 -0
- package/.versions/0.0.1/justfile +143 -0
- package/.versions/0.0.1/references/accessibility-checklist.md +160 -0
- package/.versions/0.0.1/references/definition-of-done.md +67 -0
- package/.versions/0.0.1/references/fleet-coordination-patterns.md +151 -0
- package/.versions/0.0.1/references/observability-checklist.md +91 -0
- package/.versions/0.0.1/references/orchestration-patterns.md +370 -0
- package/.versions/0.0.1/references/performance-checklist.md +153 -0
- package/.versions/0.0.1/references/prompting-patterns.md +380 -0
- package/.versions/0.0.1/references/security-checklist.md +179 -0
- package/.versions/0.0.1/references/testing-patterns.md +236 -0
- package/.versions/0.0.1/scripts/coms-claude-bridge.ts +286 -0
- package/.versions/0.0.1/scripts/coms-cli.ts +372 -0
- package/.versions/0.0.1/scripts/coms-hermes-bridge.ts +399 -0
- package/.versions/0.0.1/scripts/lib/claude-bridge-core.ts +100 -0
- package/.versions/0.0.1/scripts/lib/coms-envelope.ts +494 -0
- package/.versions/0.0.1/scripts/lib/herdr-layout.ts +235 -0
- package/.versions/0.0.1/scripts/lib/hermes-bridge-core.ts +238 -0
- package/.versions/0.0.1/scripts/lib/persona-banner.ts +62 -0
- package/.versions/0.0.1/scripts/lib/team-project.ts +75 -0
- package/.versions/0.0.1/scripts/lib/team-snapshot.ts +146 -0
- package/.versions/0.0.1/scripts/peer-banner.ts +40 -0
- package/.versions/0.0.1/scripts/team-snapshot.ts +221 -0
- package/.versions/0.0.1/scripts/team-up.ts +245 -0
- package/.versions/0.0.1/skills/_internal/grilling.md +11 -0
- package/.versions/0.0.1/skills/browser-testing-with-devtools/SKILL.md +352 -0
- package/.versions/0.0.1/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/0.0.1/skills/compound-learning/SKILL.md +137 -0
- package/.versions/0.0.1/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.0.1/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.0.1/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.0.1/skills/designing-agents/pi-harness-authoring.md +209 -0
- package/.versions/0.0.1/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.1/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.0.1/skills/guided-workspace-setup/SKILL.md +506 -0
- package/.versions/0.0.1/skills/idea-refine/SKILL.md +182 -0
- package/.versions/0.0.1/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.1/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.1/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.1/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.1/skills/incremental-implementation/SKILL.md +287 -0
- package/.versions/0.0.1/skills/interview-me/SKILL.md +226 -0
- package/.versions/0.0.1/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/0.0.1/skills/peer-coms/SKILL.md +81 -0
- package/.versions/0.0.1/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.1/skills/planning-and-task-breakdown/SKILL.md +236 -0
- package/.versions/0.0.1/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/0.0.1/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/0.0.1/skills/using-agent-skills/SKILL.md +199 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/0.0.1/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- package/CHANGELOG.md +65 -0
- package/LICENSE +21 -0
- package/README.md +458 -0
- package/agents/architect.md +21 -0
- package/agents/bowser.md +25 -0
- package/agents/builder.md +52 -0
- package/agents/code-reviewer.md +205 -0
- package/agents/deep-researcher.md +31 -0
- package/agents/documenter.md +16 -0
- package/agents/orchestrator.md +43 -0
- package/agents/plan-reviewer.md +60 -0
- package/agents/planner.md +69 -0
- package/agents/releaser.md +22 -0
- package/agents/researcher.md +28 -0
- package/agents/security-auditor.md +166 -0
- package/agents/test-engineer.md +144 -0
- package/agents/web-debugger.md +42 -0
- package/agents/web-performance-auditor.md +192 -0
- package/bin/cli.js +633 -0
- package/bin/force-patch-changesets.js +44 -0
- package/bin/lib/bootstrap.js +323 -0
- package/bin/lib/detect-agent.js +49 -0
- package/bin/lib/doctor.js +302 -0
- package/bin/lib/transform-persona.js +180 -0
- package/bin/lib/update-notifier.js +195 -0
- package/bin/lib/validate-overrides.js +229 -0
- package/bin/snapshot-version.js +91 -0
- package/docs/agent-fleet-setup.md +355 -0
- package/docs/claude-code-coms-bridge.md +93 -0
- package/docs/getting-started.md +169 -0
- package/docs/npm-install.md +335 -0
- package/docs/opencode-setup.md +248 -0
- package/docs/pi-extensions.md +237 -0
- package/docs/pi-setup.md +455 -0
- package/docs/skill-anatomy.md +150 -0
- package/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/hooks/coms-stop-hook.mjs +73 -0
- package/hooks/hooks.json +14 -0
- package/hooks/session-start.sh +74 -0
- package/hooks/simplify-ignore.sh +302 -0
- package/justfile +143 -0
- package/node_modules/pi-ask-user/LICENSE +21 -0
- package/node_modules/pi-ask-user/README.md +156 -0
- package/node_modules/pi-ask-user/index.ts +1795 -0
- package/node_modules/pi-ask-user/package.json +51 -0
- package/node_modules/pi-ask-user/single-select-layout.ts +203 -0
- package/node_modules/pi-ask-user/skills/ask-user/SKILL.md +162 -0
- package/node_modules/pi-ask-user/skills/ask-user/references/ask-user-skill-extension-spec.md +96 -0
- package/package.json +121 -0
- package/references/accessibility-checklist.md +160 -0
- package/references/definition-of-done.md +67 -0
- package/references/fleet-coordination-patterns.md +151 -0
- package/references/observability-checklist.md +91 -0
- package/references/orchestration-patterns.md +370 -0
- package/references/performance-checklist.md +153 -0
- package/references/prompting-patterns.md +380 -0
- package/references/security-checklist.md +179 -0
- package/references/testing-patterns.md +236 -0
- package/scripts/coms-claude-bridge.ts +286 -0
- package/scripts/coms-cli.ts +372 -0
- package/scripts/coms-hermes-bridge.ts +399 -0
- package/scripts/lib/claude-bridge-core.ts +100 -0
- package/scripts/lib/coms-envelope.ts +494 -0
- package/scripts/lib/herdr-layout.ts +235 -0
- package/scripts/lib/hermes-bridge-core.ts +238 -0
- package/scripts/lib/persona-banner.ts +62 -0
- package/scripts/lib/team-project.ts +75 -0
- package/scripts/lib/team-snapshot.ts +146 -0
- package/scripts/peer-banner.ts +40 -0
- package/scripts/team-snapshot.ts +221 -0
- package/scripts/team-up.ts +245 -0
- package/skills/_internal/grilling.md +11 -0
- package/skills/browser-testing-with-devtools/SKILL.md +352 -0
- package/skills/code-review-and-quality/SKILL.md +381 -0
- package/skills/compound-learning/SKILL.md +137 -0
- package/skills/context-engineering/SKILL.md +291 -0
- package/skills/deprecation-and-migration/SKILL.md +206 -0
- package/skills/designing-agents/SKILL.md +394 -0
- package/skills/designing-agents/pi-harness-authoring.md +209 -0
- package/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/skills/guided-workspace-setup/SKILL.md +506 -0
- package/skills/idea-refine/SKILL.md +182 -0
- package/skills/idea-refine/examples.md +238 -0
- package/skills/idea-refine/frameworks.md +99 -0
- package/skills/idea-refine/refinement-criteria.md +113 -0
- package/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/skills/incremental-implementation/SKILL.md +287 -0
- package/skills/interview-me/SKILL.md +226 -0
- package/skills/orchestration-verification/SKILL.md +181 -0
- package/skills/peer-coms/SKILL.md +81 -0
- package/skills/performance-optimization/SKILL.md +350 -0
- package/skills/planning-and-task-breakdown/SKILL.md +236 -0
- package/skills/security-and-hardening/SKILL.md +461 -0
- package/skills/spec-driven-development/SKILL.md +245 -0
- package/skills/using-agent-skills/SKILL.md +199 -0
- package/vendor/agent-skills-upstream/LICENSE +21 -0
- package/vendor/agent-skills-upstream/README.md +11 -0
- package/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
package/bin/cli.js
ADDED
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// agent-fleet — thin dispatcher into the LLM-driven guided setup.
|
|
3
|
+
//
|
|
4
|
+
// Main commands:
|
|
5
|
+
// init materialize the package, detect the coding agent, hand off to /setup-agent-fleet
|
|
6
|
+
// doctor deterministic preflight scan (broken symlinks, stale persona refs)
|
|
7
|
+
// update refresh the package, then hand off to /setup-agent-fleet for the version-diff
|
|
8
|
+
// transform-persona generate per-agent subagent files from the canonical agents/*.md
|
|
9
|
+
//
|
|
10
|
+
// The CLI itself never decides which skills to install or what to overwrite —
|
|
11
|
+
// that is the job of the guided-workspace-setup skill, run by the user's
|
|
12
|
+
// coding agent. We just put the source files where the agent can find them
|
|
13
|
+
// and print the next-step command.
|
|
14
|
+
|
|
15
|
+
import { readFileSync, existsSync, statSync, mkdirSync, writeFileSync } from "node:fs";
|
|
16
|
+
import { fileURLToPath } from "node:url";
|
|
17
|
+
import { dirname, join, resolve, relative } from "node:path";
|
|
18
|
+
import { spawnSync } from "node:child_process";
|
|
19
|
+
import { parseArgs } from "node:util";
|
|
20
|
+
import { createInterface } from "node:readline/promises";
|
|
21
|
+
import { stdin, stdout, exit } from "node:process";
|
|
22
|
+
|
|
23
|
+
import { runDoctor } from "./lib/doctor.js";
|
|
24
|
+
import { listPersonas, transformPersona } from "./lib/transform-persona.js";
|
|
25
|
+
import { detectAgent, agentLabel, AGENTS } from "./lib/detect-agent.js";
|
|
26
|
+
import { checkAndNotify } from "./lib/update-notifier.js";
|
|
27
|
+
import { bootstrap, cleanupInstaller, readBootstrapMarker } from "./lib/bootstrap.js";
|
|
28
|
+
|
|
29
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
30
|
+
const pkgRoot = resolve(__dirname, "..");
|
|
31
|
+
const pkg = JSON.parse(readFileSync(join(pkgRoot, "package.json"), "utf8"));
|
|
32
|
+
|
|
33
|
+
// ── argv parsing ──────────────────────────────────────────────────────────
|
|
34
|
+
|
|
35
|
+
const argv = process.argv.slice(2);
|
|
36
|
+
const sub = argv[0];
|
|
37
|
+
|
|
38
|
+
if (!sub || sub === "--help" || sub === "-h" || sub === "help") {
|
|
39
|
+
printHelp();
|
|
40
|
+
exit(0);
|
|
41
|
+
}
|
|
42
|
+
if (sub === "--version" || sub === "-v" || sub === "version") {
|
|
43
|
+
console.log(pkg.version);
|
|
44
|
+
exit(0);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const parsed = (() => {
|
|
48
|
+
try {
|
|
49
|
+
return parseArgs({
|
|
50
|
+
args: argv.slice(1),
|
|
51
|
+
allowPositionals: true,
|
|
52
|
+
options: {
|
|
53
|
+
agent: { type: "string" },
|
|
54
|
+
method: { type: "string" },
|
|
55
|
+
workspace: { type: "string" },
|
|
56
|
+
yes: { type: "boolean", short: "y" },
|
|
57
|
+
"dry-run": { type: "boolean" },
|
|
58
|
+
launch: { type: "boolean" },
|
|
59
|
+
all: { type: "boolean" },
|
|
60
|
+
list: { type: "boolean" },
|
|
61
|
+
help: { type: "boolean", short: "h" },
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
} catch (err) {
|
|
65
|
+
fail(err.message);
|
|
66
|
+
}
|
|
67
|
+
})();
|
|
68
|
+
|
|
69
|
+
const opts = parsed.values;
|
|
70
|
+
const workspace = resolve(opts.workspace ?? process.cwd());
|
|
71
|
+
|
|
72
|
+
if (opts.help) {
|
|
73
|
+
printHelp(sub);
|
|
74
|
+
exit(0);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ── dispatch ──────────────────────────────────────────────────────────────
|
|
78
|
+
|
|
79
|
+
// Update check runs first — if the cache is fresh and shows an upgrade,
|
|
80
|
+
// the banner prints to stderr before the command output. If the cache is
|
|
81
|
+
// stale, a background fetch refreshes it for the next invocation.
|
|
82
|
+
// `update` skips this since it has its own version-delta reporting.
|
|
83
|
+
if (sub !== "update" && sub !== "check-update") {
|
|
84
|
+
checkAndNotify(pkg.version);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
switch (sub) {
|
|
88
|
+
case "init": await cmdInit(); break;
|
|
89
|
+
case "doctor": await cmdDoctor(); break;
|
|
90
|
+
case "update": await cmdUpdate(); break;
|
|
91
|
+
case "check-update": await cmdCheckUpdate(); break;
|
|
92
|
+
case "cleanup-installer": await cmdCleanupInstaller(); break;
|
|
93
|
+
case "transform-persona": await cmdTransformPersona(); break;
|
|
94
|
+
default: fail(`unknown command: ${sub}\n\nRun "agent-fleet --help" for usage.`);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// ── commands ──────────────────────────────────────────────────────────────
|
|
98
|
+
|
|
99
|
+
async function cmdInit() {
|
|
100
|
+
await mustBeDirectory(workspace, "workspace");
|
|
101
|
+
|
|
102
|
+
printBanner(`agent-fleet v${pkg.version} — guided init`);
|
|
103
|
+
console.log(`Workspace: ${workspace}`);
|
|
104
|
+
console.log(`Source: ${pkgRoot}`);
|
|
105
|
+
console.log();
|
|
106
|
+
|
|
107
|
+
const agent = await chooseAgent(opts.agent);
|
|
108
|
+
console.log(`Coding agent: ${agentLabel(agent)}`);
|
|
109
|
+
|
|
110
|
+
const method = opts.method ?? "copy";
|
|
111
|
+
if (!["copy", "symlink"].includes(method)) {
|
|
112
|
+
fail(`--method must be "copy" or "symlink" (got "${method}")`);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Bootstrap the installer artifacts (setup + doctor + the skill they invoke).
|
|
116
|
+
// Without this, the agent has no /setup-agent-fleet command to hand off to — the
|
|
117
|
+
// /setup-agent-fleet command is itself one of the files this writes. The rest of the
|
|
118
|
+
// catalogue (skills, personas, etc.) is the job of /setup-agent-fleet running inside
|
|
119
|
+
// the agent; we only drop the plumbing it needs to exist.
|
|
120
|
+
printSection("Bootstrap installer");
|
|
121
|
+
const { written, skipped, removed, warnings } = bootstrap({
|
|
122
|
+
agent,
|
|
123
|
+
sourceRoot: pkgRoot,
|
|
124
|
+
workspace,
|
|
125
|
+
method,
|
|
126
|
+
dryRun: opts["dry-run"],
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
for (const w of warnings) console.log(` ⚠ ${w}`);
|
|
130
|
+
for (const p of removed) {
|
|
131
|
+
const tag = opts["dry-run"] ? "would remove (legacy)" : "removed legacy";
|
|
132
|
+
console.log(` − ${tag}: ${relative(workspace, p)}`);
|
|
133
|
+
}
|
|
134
|
+
for (const f of written) {
|
|
135
|
+
const tag = opts["dry-run"] ? "would write" : (method === "symlink" ? "linked" : "wrote");
|
|
136
|
+
console.log(` ✓ ${tag}: ${relative(workspace, f.dest)}`);
|
|
137
|
+
}
|
|
138
|
+
for (const f of skipped) {
|
|
139
|
+
console.log(` ✗ skipped: ${relative(workspace, f.dest)} — ${f.error}`);
|
|
140
|
+
}
|
|
141
|
+
if (written.length === 0 && skipped.length === 0 && removed.length === 0) {
|
|
142
|
+
console.log(" (nothing to do — sources missing from package)");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
printSection("Next step");
|
|
146
|
+
printHandoff({ agent, method, workspace, source: pkgRoot, version: pkg.version });
|
|
147
|
+
|
|
148
|
+
if (opts.launch) {
|
|
149
|
+
tryLaunch(agent, workspace);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
async function cmdDoctor() {
|
|
154
|
+
await mustBeDirectory(workspace, "workspace");
|
|
155
|
+
|
|
156
|
+
printBanner(`agent-fleet v${pkg.version} — doctor scan`);
|
|
157
|
+
console.log(`Workspace: ${workspace}`);
|
|
158
|
+
console.log();
|
|
159
|
+
|
|
160
|
+
const findings = await runDoctor({ workspace, sourceRoot: pkgRoot });
|
|
161
|
+
|
|
162
|
+
if (findings.length === 0) {
|
|
163
|
+
console.log("✓ No broken symlinks, stale persona references, malformed peer entries, or overrides-file problems found.");
|
|
164
|
+
exit(0);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
console.log(`Found ${findings.length} issue(s):\n`);
|
|
168
|
+
console.log(formatFindingsTable(findings));
|
|
169
|
+
console.log();
|
|
170
|
+
|
|
171
|
+
// Overrides and yaml-shape findings are advisory: reported above, but the
|
|
172
|
+
// fix is always a hand edit of the flagged file — never applied by the doctor.
|
|
173
|
+
const ADVISORY_TYPES = new Set(["overrides", "yaml-shape"]);
|
|
174
|
+
const fixable = findings.filter((f) => !ADVISORY_TYPES.has(f.type));
|
|
175
|
+
const advisory = findings.length - fixable.length;
|
|
176
|
+
if (advisory > 0) {
|
|
177
|
+
console.log(`(${advisory} advisory finding(s) — fix by hand per the suggestions above)`);
|
|
178
|
+
}
|
|
179
|
+
if (fixable.length === 0) {
|
|
180
|
+
exit(0);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (opts["dry-run"]) {
|
|
184
|
+
console.log("(--dry-run set: no fixes applied)");
|
|
185
|
+
exit(0);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const apply = opts.yes
|
|
189
|
+
? true
|
|
190
|
+
: await confirm(`Apply the ${fixable.length} suggested fix(es) now? [y/N] `);
|
|
191
|
+
|
|
192
|
+
if (!apply) {
|
|
193
|
+
console.log("No changes made. Re-run without --dry-run to apply.");
|
|
194
|
+
exit(0);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const { repaired, deleted, skipped } = await runDoctor({
|
|
198
|
+
workspace,
|
|
199
|
+
sourceRoot: pkgRoot,
|
|
200
|
+
apply: true,
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
console.log(
|
|
204
|
+
`\n✓ Doctor finished — repaired ${repaired}, deleted ${deleted}, skipped ${skipped}.`,
|
|
205
|
+
);
|
|
206
|
+
console.log(
|
|
207
|
+
"Re-run /setup-agent-fleet inside your coding agent if you also want to add or remove artifacts.",
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
async function cmdUpdate() {
|
|
212
|
+
await mustBeDirectory(workspace, "workspace");
|
|
213
|
+
|
|
214
|
+
printBanner(`agent-fleet v${pkg.version} — update`);
|
|
215
|
+
console.log(`Workspace: ${workspace}`);
|
|
216
|
+
console.log();
|
|
217
|
+
|
|
218
|
+
// npm itself does the package upgrade. The CLI's job here is to read the
|
|
219
|
+
// workspace's install record, surface the version delta, re-install the
|
|
220
|
+
// /setup-agent-fleet command, and hand off to the skill for the diff-aware
|
|
221
|
+
// refresh.
|
|
222
|
+
const recordPath = join(workspace, ".ai", "agent-fleet-setup.md");
|
|
223
|
+
if (!existsSync(recordPath)) {
|
|
224
|
+
console.log("This workspace has no .ai/agent-fleet-setup.md install record.");
|
|
225
|
+
console.log("Run `npx agent-fleet init` first, then re-run `update` later.");
|
|
226
|
+
exit(1);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const recorded = readRecordedVersion(recordPath);
|
|
230
|
+
const current = pkg.version;
|
|
231
|
+
|
|
232
|
+
console.log(`Recorded in workspace: v${recorded ?? "(pre-versioning)"}`);
|
|
233
|
+
console.log(`Installed package: v${current}`);
|
|
234
|
+
console.log();
|
|
235
|
+
|
|
236
|
+
// Re-bootstrap the installer artifacts so /setup-agent-fleet is present
|
|
237
|
+
// after the update. guided-workspace-setup removes these at the end of a
|
|
238
|
+
// run by default (Step 10b / cleanupInstaller), so a workspace that has
|
|
239
|
+
// completed setup once no longer has the command — and `update` used to
|
|
240
|
+
// only print "run /setup-agent-fleet" while pointing at a command that no
|
|
241
|
+
// longer existed. The marker recovers the agent/method from init time; if
|
|
242
|
+
// it was cleaned up too, fall back to detection (and prompt if ambiguous).
|
|
243
|
+
const marker = readBootstrapMarker(workspace);
|
|
244
|
+
let agent = opts.agent ?? marker?.agent
|
|
245
|
+
?? detectAgent({ workspace, env: process.env, preferWorkspaceHints: true });
|
|
246
|
+
if (agent && !AGENTS.includes(agent)) agent = null;
|
|
247
|
+
if (!agent) agent = await chooseAgent(opts.agent);
|
|
248
|
+
|
|
249
|
+
const method = opts.method ?? marker?.method ?? "copy";
|
|
250
|
+
if (!["copy", "symlink"].includes(method)) {
|
|
251
|
+
fail(`--method must be "copy" or "symlink" (got "${method}")`);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
printSection("Refresh installer command");
|
|
255
|
+
const { written, skipped, removed, warnings } = bootstrap({
|
|
256
|
+
agent,
|
|
257
|
+
sourceRoot: pkgRoot,
|
|
258
|
+
workspace,
|
|
259
|
+
method,
|
|
260
|
+
dryRun: opts["dry-run"],
|
|
261
|
+
});
|
|
262
|
+
for (const w of warnings) console.log(` ⚠ ${w}`);
|
|
263
|
+
for (const p of removed) {
|
|
264
|
+
const tag = opts["dry-run"] ? "would remove (legacy)" : "removed legacy";
|
|
265
|
+
console.log(` − ${tag}: ${relative(workspace, p)}`);
|
|
266
|
+
}
|
|
267
|
+
for (const f of written) {
|
|
268
|
+
const tag = opts["dry-run"] ? "would write" : (method === "symlink" ? "linked" : "wrote");
|
|
269
|
+
console.log(` ✓ ${tag}: ${relative(workspace, f.dest)}`);
|
|
270
|
+
}
|
|
271
|
+
for (const f of skipped) {
|
|
272
|
+
console.log(` ✗ skipped: ${relative(workspace, f.dest)} — ${f.error}`);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const setupCmd = agent === "opencode" ? "/af-setup-agent-fleet" : "/setup-agent-fleet";
|
|
276
|
+
|
|
277
|
+
printSection("Next step");
|
|
278
|
+
if (recorded === current) {
|
|
279
|
+
console.log(`Recorded version (${recorded}) matches the installed package — no version delta.`);
|
|
280
|
+
console.log(`${setupCmd} is back in your workspace; run it inside ${agentLabel(agent)} if you`);
|
|
281
|
+
console.log("want to re-review your artifacts. To upgrade the package itself, run:");
|
|
282
|
+
console.log(" npm install -g @chankov/agent-fleet@latest # global");
|
|
283
|
+
console.log(" npx @chankov/agent-fleet@latest update # one-shot");
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
console.log(`Open ${agentLaunchHint(agent)} in this directory and run:`);
|
|
287
|
+
console.log();
|
|
288
|
+
console.log(` ${setupCmd}`);
|
|
289
|
+
console.log();
|
|
290
|
+
console.log("The guided-workspace-setup skill will detect the version delta, show the");
|
|
291
|
+
console.log("CHANGELOG between the two versions, and offer a per-artifact three-way diff");
|
|
292
|
+
console.log("before touching any file.");
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
async function cmdCleanupInstaller() {
|
|
296
|
+
// Removes the bootstrap artifacts (setup-agent-fleet, doctor-agent-fleet,
|
|
297
|
+
// guided-workspace-setup skill body) from the workspace. Invoked by the
|
|
298
|
+
// skill itself at the end of Step 10 — keeps the workspace's slash-command
|
|
299
|
+
// list clean. Re-running `init` brings them back.
|
|
300
|
+
await mustBeDirectory(workspace, "workspace");
|
|
301
|
+
|
|
302
|
+
const agent = opts.agent ?? detectAgent({ workspace, env: process.env });
|
|
303
|
+
if (!agent || !AGENTS.includes(agent)) {
|
|
304
|
+
fail(`cleanup-installer needs --agent (one of: ${AGENTS.join(", ")})`);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const { removed, kept, warnings } = cleanupInstaller({
|
|
308
|
+
agent,
|
|
309
|
+
workspace,
|
|
310
|
+
dryRun: opts["dry-run"],
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
for (const w of warnings) console.log(` ⚠ ${w}`);
|
|
314
|
+
for (const p of removed) {
|
|
315
|
+
const tag = opts["dry-run"] ? "would remove" : "removed";
|
|
316
|
+
console.log(` − ${tag}: ${relative(workspace, p)}`);
|
|
317
|
+
}
|
|
318
|
+
if (removed.length === 0 && warnings.length === 0) {
|
|
319
|
+
console.log("Nothing to clean up — installer files already absent.");
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
async function cmdTransformPersona() {
|
|
324
|
+
// Generates per-agent subagent definitions from the canonical agents/*.md.
|
|
325
|
+
// The guided-workspace-setup skill calls this during apply, so the
|
|
326
|
+
// frontmatter mapping stays deterministic and under test (lib/transform-persona.js).
|
|
327
|
+
const agent = opts.agent;
|
|
328
|
+
if (!agent || !AGENTS.includes(agent)) {
|
|
329
|
+
fail(`transform-persona needs --agent (one of: ${AGENTS.join(", ")})`);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const available = listPersonas(pkgRoot, { agent });
|
|
333
|
+
|
|
334
|
+
if (opts.list) {
|
|
335
|
+
for (const p of available) console.log(`${p.name} → ${p.targetRelPath}`);
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const names = opts.all ? available.map((p) => p.name) : parsed.positionals;
|
|
340
|
+
if (names.length === 0) {
|
|
341
|
+
fail("name one or more personas, or pass --all / --list");
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// Writing only happens when --workspace is given explicitly; otherwise the
|
|
345
|
+
// transformed content goes to stdout (workspace would default to cwd, which
|
|
346
|
+
// is too easy to splat by accident).
|
|
347
|
+
const wantsWrite = opts.workspace !== undefined;
|
|
348
|
+
if (wantsWrite) await mustBeDirectory(workspace, "workspace");
|
|
349
|
+
|
|
350
|
+
for (const name of names) {
|
|
351
|
+
const sourcePath = join(pkgRoot, "agents", `${name}.md`);
|
|
352
|
+
if (!existsSync(sourcePath)) {
|
|
353
|
+
fail(`unknown persona "${name}" — run \`agent-fleet transform-persona --list --agent ${agent}\``);
|
|
354
|
+
}
|
|
355
|
+
let out;
|
|
356
|
+
try {
|
|
357
|
+
out = transformPersona(readFileSync(sourcePath, "utf8"), { agent });
|
|
358
|
+
} catch (err) {
|
|
359
|
+
fail(err.message); // e.g. pi-only persona requested for claude-code/opencode
|
|
360
|
+
}
|
|
361
|
+
if (wantsWrite) {
|
|
362
|
+
const dest = join(workspace, out.targetRelPath);
|
|
363
|
+
if (opts["dry-run"]) {
|
|
364
|
+
console.log(` ✓ would write: ${out.targetRelPath}`);
|
|
365
|
+
} else {
|
|
366
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
367
|
+
writeFileSync(dest, out.content);
|
|
368
|
+
console.log(` ✓ wrote: ${out.targetRelPath}`);
|
|
369
|
+
}
|
|
370
|
+
} else {
|
|
371
|
+
process.stdout.write(out.content);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
async function cmdCheckUpdate() {
|
|
377
|
+
// Entry point for hook scripts and pi extensions. Blocks on a single
|
|
378
|
+
// registry fetch (short timeout); emits a one-line banner to stdout if an
|
|
379
|
+
// upgrade is available, otherwise prints nothing. Always exits 0 so a
|
|
380
|
+
// failed check never breaks the calling hook.
|
|
381
|
+
const { fetchLatestSync, readCacheStatus, formatBanner, gt } =
|
|
382
|
+
await import("./lib/update-notifier.js");
|
|
383
|
+
|
|
384
|
+
let latest = readCacheStatus();
|
|
385
|
+
if (!latest || latest.stale) {
|
|
386
|
+
const fetched = await fetchLatestSync(2000);
|
|
387
|
+
if (fetched) latest = { latest: fetched };
|
|
388
|
+
}
|
|
389
|
+
if (latest?.latest && gt(latest.latest, pkg.version)) {
|
|
390
|
+
process.stdout.write(formatBanner(pkg.version, latest.latest) + "\n");
|
|
391
|
+
}
|
|
392
|
+
exit(0);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// ── helpers ───────────────────────────────────────────────────────────────
|
|
396
|
+
|
|
397
|
+
async function chooseAgent(supplied) {
|
|
398
|
+
if (supplied) {
|
|
399
|
+
if (!AGENTS.includes(supplied)) {
|
|
400
|
+
fail(`--agent must be one of: ${AGENTS.join(", ")} (got "${supplied}")`);
|
|
401
|
+
}
|
|
402
|
+
return supplied;
|
|
403
|
+
}
|
|
404
|
+
const detected = detectAgent({ workspace, env: process.env });
|
|
405
|
+
if (detected) return detected;
|
|
406
|
+
|
|
407
|
+
console.log("Could not auto-detect your coding agent.");
|
|
408
|
+
const answer = (await prompt(
|
|
409
|
+
`Which coding agent? [${AGENTS.join("/")}] (claude-code): `,
|
|
410
|
+
)).trim() || "claude-code";
|
|
411
|
+
|
|
412
|
+
if (!AGENTS.includes(answer)) {
|
|
413
|
+
fail(`Unknown agent "${answer}". Allowed: ${AGENTS.join(", ")}`);
|
|
414
|
+
}
|
|
415
|
+
return answer;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function printHandoff({ agent, method, workspace, source, version }) {
|
|
419
|
+
const rel = relative(process.cwd(), workspace) || ".";
|
|
420
|
+
const setupCmd =
|
|
421
|
+
agent === "opencode" ? "/af-setup-agent-fleet" : "/setup-agent-fleet";
|
|
422
|
+
const lines = [
|
|
423
|
+
`agent-fleet v${version} is ready.`,
|
|
424
|
+
"",
|
|
425
|
+
`Workspace: ${rel}`,
|
|
426
|
+
`Coding agent: ${agentLabel(agent)}`,
|
|
427
|
+
`Install method: ${method}`,
|
|
428
|
+
`Source root: ${source}`,
|
|
429
|
+
"",
|
|
430
|
+
`Open ${agentLaunchHint(agent)} in this directory and run:`,
|
|
431
|
+
"",
|
|
432
|
+
` ${setupCmd}`,
|
|
433
|
+
"",
|
|
434
|
+
"The guided-workspace-setup skill will:",
|
|
435
|
+
" • analyse the workspace",
|
|
436
|
+
" • show grouped install menus with recommendations",
|
|
437
|
+
" • offer project overrides",
|
|
438
|
+
" • confirm everything before writing a single file",
|
|
439
|
+
" • remove the installer commands from your workspace at the end so",
|
|
440
|
+
" they don't pollute your agent's command list (reply 'keep' in",
|
|
441
|
+
" Step 9 if you'd rather leave them in)",
|
|
442
|
+
"",
|
|
443
|
+
];
|
|
444
|
+
if (agent === "opencode") {
|
|
445
|
+
lines.push(
|
|
446
|
+
"OpenCode note: project-local skill discovery is limited. If",
|
|
447
|
+
"/af-setup-agent-fleet does not load the skill, follow",
|
|
448
|
+
"docs/opencode-setup.md to link it into ~/.config/opencode/skills/",
|
|
449
|
+
"and add a reference in AGENTS.md.",
|
|
450
|
+
"",
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
lines.push("Re-run `npx @chankov/agent-fleet init` later to re-bootstrap (commands are removed by default once setup completes).");
|
|
454
|
+
for (const line of lines) console.log(line);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
function agentLaunchHint(agent) {
|
|
458
|
+
return { "claude-code": "Claude Code (`claude`)", "opencode": "OpenCode (`opencode`)", "pi": "pi (`pi`)" }[agent] || agent;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
function tryLaunch(agent, cwd) {
|
|
462
|
+
const cmd = { "claude-code": "claude", "opencode": "opencode", "pi": "pi" }[agent];
|
|
463
|
+
if (!cmd) return;
|
|
464
|
+
console.log(`\nLaunching: ${cmd} (cwd: ${cwd})`);
|
|
465
|
+
const r = spawnSync(cmd, [], { cwd, stdio: "inherit" });
|
|
466
|
+
if (r.error) {
|
|
467
|
+
console.log(`(could not launch ${cmd}: ${r.error.message})`);
|
|
468
|
+
console.log(`Open ${cmd} manually and run /setup-agent-fleet.`);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
function readRecordedVersion(path) {
|
|
473
|
+
const text = readFileSync(path, "utf8");
|
|
474
|
+
const m = text.match(/^version:\s*([^\s#]+)/m);
|
|
475
|
+
return m ? m[1].trim() : null;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
function formatFindingsTable(findings) {
|
|
479
|
+
const rows = findings.map((f, i) => [
|
|
480
|
+
String(i + 1),
|
|
481
|
+
f.path,
|
|
482
|
+
f.issue,
|
|
483
|
+
f.fix,
|
|
484
|
+
]);
|
|
485
|
+
const headers = ["#", "Path", "Issue", "Suggested fix"];
|
|
486
|
+
const widths = headers.map((h, i) =>
|
|
487
|
+
Math.max(h.length, ...rows.map((r) => r[i].length)),
|
|
488
|
+
);
|
|
489
|
+
const pad = (cells) =>
|
|
490
|
+
cells.map((c, i) => c.padEnd(widths[i])).join(" ");
|
|
491
|
+
return [
|
|
492
|
+
pad(headers),
|
|
493
|
+
pad(widths.map((w) => "─".repeat(w))),
|
|
494
|
+
...rows.map(pad),
|
|
495
|
+
].join("\n");
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
async function mustBeDirectory(p, label) {
|
|
499
|
+
if (!existsSync(p) || !statSync(p).isDirectory()) {
|
|
500
|
+
fail(`${label} is not a directory: ${p}`);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
async function prompt(question) {
|
|
505
|
+
const rl = createInterface({ input: stdin, output: stdout });
|
|
506
|
+
try { return await rl.question(question); }
|
|
507
|
+
finally { rl.close(); }
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
async function confirm(question) {
|
|
511
|
+
const ans = (await prompt(question)).trim().toLowerCase();
|
|
512
|
+
return ans === "y" || ans === "yes";
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
function printBanner(text) {
|
|
516
|
+
const bar = "─".repeat(Math.min(text.length, 70));
|
|
517
|
+
console.log(`\n${text}\n${bar}`);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
function printSection(text) {
|
|
521
|
+
console.log(`\n── ${text} ${"─".repeat(Math.max(0, 60 - text.length))}`);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
function fail(msg) {
|
|
525
|
+
console.error(`agent-fleet: ${msg}`);
|
|
526
|
+
exit(1);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
function printHelp(sub) {
|
|
530
|
+
if (sub === "init") {
|
|
531
|
+
console.log(`agent-fleet init [options]
|
|
532
|
+
|
|
533
|
+
Materialize the package and hand off to the LLM-driven /setup-agent-fleet skill.
|
|
534
|
+
|
|
535
|
+
Options:
|
|
536
|
+
--agent <claude-code|opencode|pi> Skip the agent auto-detection
|
|
537
|
+
--method <copy|symlink> Default install method (default: copy)
|
|
538
|
+
--workspace <path> Target workspace (default: cwd)
|
|
539
|
+
--launch Attempt to launch the coding agent after init
|
|
540
|
+
-h, --help Show this help
|
|
541
|
+
`);
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
if (sub === "doctor") {
|
|
545
|
+
console.log(`agent-fleet doctor [options]
|
|
546
|
+
|
|
547
|
+
Scan the workspace for broken symlinks and stale persona references.
|
|
548
|
+
|
|
549
|
+
Options:
|
|
550
|
+
--workspace <path> Target workspace (default: cwd)
|
|
551
|
+
--dry-run Show findings, do not apply fixes
|
|
552
|
+
-y, --yes Apply all suggested fixes without prompting
|
|
553
|
+
-h, --help Show this help
|
|
554
|
+
`);
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
if (sub === "transform-persona") {
|
|
558
|
+
console.log(`agent-fleet transform-persona --agent <agent> [options] [persona…]
|
|
559
|
+
|
|
560
|
+
Generate per-agent subagent definitions from the canonical agents/*.md
|
|
561
|
+
personas. pi gets the canonical file unchanged; claude-code and opencode get
|
|
562
|
+
a transformed copy (tools/model translated, agent-hub-only keys dropped).
|
|
563
|
+
pi-only personas (bowser, orchestrator) are refused for other agents.
|
|
564
|
+
|
|
565
|
+
Options:
|
|
566
|
+
--agent <claude-code|opencode|pi> Target agent (required)
|
|
567
|
+
--list List available personas + target paths
|
|
568
|
+
--all Transform every available persona
|
|
569
|
+
--workspace <path> Write into <path>/<target>; omit to print to stdout
|
|
570
|
+
--dry-run With --workspace: show what would be written
|
|
571
|
+
-h, --help Show this help
|
|
572
|
+
|
|
573
|
+
Examples:
|
|
574
|
+
agent-fleet transform-persona --list --agent claude-code
|
|
575
|
+
agent-fleet transform-persona --agent claude-code code-reviewer
|
|
576
|
+
agent-fleet transform-persona --agent opencode --all --workspace ~/projects/foo
|
|
577
|
+
`);
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
if (sub === "update") {
|
|
581
|
+
console.log(`agent-fleet update [options]
|
|
582
|
+
|
|
583
|
+
Surface the version delta and re-install the /setup-agent-fleet command so
|
|
584
|
+
it is always present after an update (guided-workspace-setup removes it at
|
|
585
|
+
the end of a run by default). The actual diff-aware refresh then runs inside
|
|
586
|
+
your coding agent via /setup-agent-fleet.
|
|
587
|
+
|
|
588
|
+
Options:
|
|
589
|
+
--agent <claude-code|opencode|pi> Override the agent (default: marker → auto-detect)
|
|
590
|
+
--method <copy|symlink> Install method for the command (default: copy)
|
|
591
|
+
--workspace <path> Target workspace (default: cwd)
|
|
592
|
+
--dry-run Show what would be written; touch nothing
|
|
593
|
+
-h, --help Show this help
|
|
594
|
+
|
|
595
|
+
To upgrade the package itself first:
|
|
596
|
+
npm install -g @chankov/agent-fleet@latest
|
|
597
|
+
npx @chankov/agent-fleet@latest update
|
|
598
|
+
`);
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
console.log(`agent-fleet v${pkg.version}
|
|
602
|
+
|
|
603
|
+
Usage:
|
|
604
|
+
npx agent-fleet <command> [options]
|
|
605
|
+
|
|
606
|
+
Commands:
|
|
607
|
+
init Bootstrap installer files + hand off to /setup-agent-fleet
|
|
608
|
+
doctor Scan for broken symlinks and stale persona references
|
|
609
|
+
update Surface the version delta + hand off to /setup-agent-fleet
|
|
610
|
+
check-update One-line registry check (used by session hooks; safe to script)
|
|
611
|
+
cleanup-installer Remove the installer slash commands from a workspace (used
|
|
612
|
+
by the skill at end of setup; safe to run by hand)
|
|
613
|
+
transform-persona Generate per-agent subagent files from the canonical
|
|
614
|
+
agents/*.md personas (used by the setup skill during apply)
|
|
615
|
+
|
|
616
|
+
Options:
|
|
617
|
+
-v, --version Print the package version
|
|
618
|
+
-h, --help Print this help (or per-command help)
|
|
619
|
+
|
|
620
|
+
Examples:
|
|
621
|
+
npx agent-fleet init
|
|
622
|
+
npx agent-fleet init --agent claude-code --method copy
|
|
623
|
+
npx agent-fleet doctor --workspace ~/projects/foo
|
|
624
|
+
npx agent-fleet update
|
|
625
|
+
|
|
626
|
+
Environment:
|
|
627
|
+
AGENT_SKILLS_NO_UPDATE_CHECK=1 Disable the background update check
|
|
628
|
+
NO_UPDATE_NOTIFIER=1 Same (conventional opt-out, also honoured)
|
|
629
|
+
CI=true Auto-disables the update check
|
|
630
|
+
|
|
631
|
+
Docs: https://github.com/chankov/agent-fleet#readme
|
|
632
|
+
`);
|
|
633
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// force-patch-changesets.js
|
|
3
|
+
//
|
|
4
|
+
// Rewrite every pending changeset's bump level to `patch` so the following
|
|
5
|
+
// `changeset version` always produces a revision bump (x.y.Z+1), never a
|
|
6
|
+
// minor/major one — regardless of how the changesets were authored.
|
|
7
|
+
//
|
|
8
|
+
// Wired in ahead of `changeset version` in both the local `version` npm script
|
|
9
|
+
// and the CI release workflow's changesets/action `version` command, so local
|
|
10
|
+
// and CI releases agree. Remove this step (and the `minor|major` lines stay
|
|
11
|
+
// honored) if you ever want changeset-authored semver back.
|
|
12
|
+
|
|
13
|
+
import { readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
15
|
+
import { dirname, join, resolve } from "node:path";
|
|
16
|
+
|
|
17
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
const changesetDir = resolve(__dirname, "..", ".changeset");
|
|
19
|
+
|
|
20
|
+
// Frontmatter bump lines look like: "@scope/pkg": minor
|
|
21
|
+
// Only the value after the colon is rewritten; the package name is preserved.
|
|
22
|
+
const BUMP_LINE = /^(\s*(?:"[^"]+"|[^:\s]+)\s*:\s*)(minor|major)(\s*)$/gm;
|
|
23
|
+
|
|
24
|
+
let changed = 0;
|
|
25
|
+
let scanned = 0;
|
|
26
|
+
|
|
27
|
+
for (const name of readdirSync(changesetDir)) {
|
|
28
|
+
if (!name.endsWith(".md") || name === "README.md") continue;
|
|
29
|
+
scanned++;
|
|
30
|
+
const file = join(changesetDir, name);
|
|
31
|
+
const text = readFileSync(file, "utf8");
|
|
32
|
+
const next = text.replace(BUMP_LINE, "$1patch$3");
|
|
33
|
+
if (next !== text) {
|
|
34
|
+
writeFileSync(file, next, "utf8");
|
|
35
|
+
changed++;
|
|
36
|
+
console.log(`force-patch: ${name} → patch`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
console.log(
|
|
41
|
+
changed > 0
|
|
42
|
+
? `force-patch: rewrote ${changed} of ${scanned} changeset(s) to patch`
|
|
43
|
+
: `force-patch: no minor/major changesets to downgrade (${scanned} scanned)`,
|
|
44
|
+
);
|