squadfoundry 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +76 -0
- package/PROJECT.md +79 -0
- package/README.md +255 -0
- package/dist/orchestrator/adapters/context/IContextAdapter.d.ts +65 -0
- package/dist/orchestrator/adapters/context/IContextAdapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/context/IContextAdapter.js +12 -0
- package/dist/orchestrator/adapters/context/IContextAdapter.js.map +1 -0
- package/dist/orchestrator/adapters/context/filesystem.context-adapter.d.ts +33 -0
- package/dist/orchestrator/adapters/context/filesystem.context-adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/context/filesystem.context-adapter.js +179 -0
- package/dist/orchestrator/adapters/context/filesystem.context-adapter.js.map +1 -0
- package/dist/orchestrator/adapters/deploy/IDeployAdapter.d.ts +78 -0
- package/dist/orchestrator/adapters/deploy/IDeployAdapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/deploy/IDeployAdapter.js +14 -0
- package/dist/orchestrator/adapters/deploy/IDeployAdapter.js.map +1 -0
- package/dist/orchestrator/adapters/deploy/vercel.adapter.d.ts +31 -0
- package/dist/orchestrator/adapters/deploy/vercel.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/deploy/vercel.adapter.js +83 -0
- package/dist/orchestrator/adapters/deploy/vercel.adapter.js.map +1 -0
- package/dist/orchestrator/adapters/host/IHostAdapter.d.ts +89 -0
- package/dist/orchestrator/adapters/host/IHostAdapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/host/IHostAdapter.js +10 -0
- package/dist/orchestrator/adapters/host/IHostAdapter.js.map +1 -0
- package/dist/orchestrator/adapters/host/anthropic.adapter.d.ts +27 -0
- package/dist/orchestrator/adapters/host/anthropic.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/host/anthropic.adapter.js +118 -0
- package/dist/orchestrator/adapters/host/anthropic.adapter.js.map +1 -0
- package/dist/orchestrator/adapters/host/antigravity.adapter.d.ts +53 -0
- package/dist/orchestrator/adapters/host/antigravity.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/host/antigravity.adapter.js +148 -0
- package/dist/orchestrator/adapters/host/antigravity.adapter.js.map +1 -0
- package/dist/orchestrator/adapters/host/claude-code.adapter.d.ts +13 -0
- package/dist/orchestrator/adapters/host/claude-code.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/host/claude-code.adapter.js +27 -0
- package/dist/orchestrator/adapters/host/claude-code.adapter.js.map +1 -0
- package/dist/orchestrator/adapters/host/command-model-invoker.d.ts +8 -0
- package/dist/orchestrator/adapters/host/command-model-invoker.d.ts.map +1 -0
- package/dist/orchestrator/adapters/host/command-model-invoker.js +46 -0
- package/dist/orchestrator/adapters/host/command-model-invoker.js.map +1 -0
- package/dist/orchestrator/adapters/host/ide.adapter.d.ts +61 -0
- package/dist/orchestrator/adapters/host/ide.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/host/ide.adapter.js +173 -0
- package/dist/orchestrator/adapters/host/ide.adapter.js.map +1 -0
- package/dist/orchestrator/adapters/host/local.adapter.d.ts +26 -0
- package/dist/orchestrator/adapters/host/local.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/host/local.adapter.js +82 -0
- package/dist/orchestrator/adapters/host/local.adapter.js.map +1 -0
- package/dist/orchestrator/adapters/host/openai.adapter.d.ts +26 -0
- package/dist/orchestrator/adapters/host/openai.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/host/openai.adapter.js +77 -0
- package/dist/orchestrator/adapters/host/openai.adapter.js.map +1 -0
- package/dist/orchestrator/adapters/host/opencode.adapter.d.ts +13 -0
- package/dist/orchestrator/adapters/host/opencode.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/host/opencode.adapter.js +27 -0
- package/dist/orchestrator/adapters/host/opencode.adapter.js.map +1 -0
- package/dist/orchestrator/adapters/model/IModelAdapter.d.ts +68 -0
- package/dist/orchestrator/adapters/model/IModelAdapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/model/IModelAdapter.js +11 -0
- package/dist/orchestrator/adapters/model/IModelAdapter.js.map +1 -0
- package/dist/orchestrator/adapters/publishing/ISocialMediaAdapter.d.ts +93 -0
- package/dist/orchestrator/adapters/publishing/ISocialMediaAdapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/publishing/ISocialMediaAdapter.js +10 -0
- package/dist/orchestrator/adapters/publishing/ISocialMediaAdapter.js.map +1 -0
- package/dist/orchestrator/adapters/publishing/instagram.adapter.d.ts +34 -0
- package/dist/orchestrator/adapters/publishing/instagram.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/publishing/instagram.adapter.js +105 -0
- package/dist/orchestrator/adapters/publishing/instagram.adapter.js.map +1 -0
- package/dist/orchestrator/adapters/tools/IToolAdapter.d.ts +52 -0
- package/dist/orchestrator/adapters/tools/IToolAdapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/tools/IToolAdapter.js +10 -0
- package/dist/orchestrator/adapters/tools/IToolAdapter.js.map +1 -0
- package/dist/orchestrator/adapters/vcs/IVCSAdapter.d.ts +89 -0
- package/dist/orchestrator/adapters/vcs/IVCSAdapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/vcs/IVCSAdapter.js +11 -0
- package/dist/orchestrator/adapters/vcs/IVCSAdapter.js.map +1 -0
- package/dist/orchestrator/adapters/vcs/github.adapter.d.ts +36 -0
- package/dist/orchestrator/adapters/vcs/github.adapter.d.ts.map +1 -0
- package/dist/orchestrator/adapters/vcs/github.adapter.js +110 -0
- package/dist/orchestrator/adapters/vcs/github.adapter.js.map +1 -0
- package/dist/orchestrator/artifacts/artifact-store.d.ts +47 -0
- package/dist/orchestrator/artifacts/artifact-store.d.ts.map +1 -0
- package/dist/orchestrator/artifacts/artifact-store.js +135 -0
- package/dist/orchestrator/artifacts/artifact-store.js.map +1 -0
- package/dist/orchestrator/builder/domain-classifier.d.ts +24 -0
- package/dist/orchestrator/builder/domain-classifier.d.ts.map +1 -0
- package/dist/orchestrator/builder/domain-classifier.js +156 -0
- package/dist/orchestrator/builder/domain-classifier.js.map +1 -0
- package/dist/orchestrator/builder/interview-questions.d.ts +13 -0
- package/dist/orchestrator/builder/interview-questions.d.ts.map +1 -0
- package/dist/orchestrator/builder/interview-questions.js +127 -0
- package/dist/orchestrator/builder/interview-questions.js.map +1 -0
- package/dist/orchestrator/builder/squad-builder.d.ts +53 -0
- package/dist/orchestrator/builder/squad-builder.d.ts.map +1 -0
- package/dist/orchestrator/builder/squad-builder.js +107 -0
- package/dist/orchestrator/builder/squad-builder.js.map +1 -0
- package/dist/orchestrator/builder/squad-generator.d.ts +33 -0
- package/dist/orchestrator/builder/squad-generator.d.ts.map +1 -0
- package/dist/orchestrator/builder/squad-generator.js +360 -0
- package/dist/orchestrator/builder/squad-generator.js.map +1 -0
- package/dist/orchestrator/cli/index.d.ts +3 -0
- package/dist/orchestrator/cli/index.d.ts.map +1 -0
- package/dist/orchestrator/cli/index.js +8 -0
- package/dist/orchestrator/cli/index.js.map +1 -0
- package/dist/orchestrator/context/context-index.d.ts +48 -0
- package/dist/orchestrator/context/context-index.d.ts.map +1 -0
- package/dist/orchestrator/context/context-index.js +116 -0
- package/dist/orchestrator/context/context-index.js.map +1 -0
- package/dist/orchestrator/context/context-loader.d.ts +49 -0
- package/dist/orchestrator/context/context-loader.d.ts.map +1 -0
- package/dist/orchestrator/context/context-loader.js +111 -0
- package/dist/orchestrator/context/context-loader.js.map +1 -0
- package/dist/orchestrator/core/guardrails.d.ts +33 -0
- package/dist/orchestrator/core/guardrails.d.ts.map +1 -0
- package/dist/orchestrator/core/guardrails.js +272 -0
- package/dist/orchestrator/core/guardrails.js.map +1 -0
- package/dist/orchestrator/core/state-machine.d.ts +65 -0
- package/dist/orchestrator/core/state-machine.d.ts.map +1 -0
- package/dist/orchestrator/core/state-machine.js +227 -0
- package/dist/orchestrator/core/state-machine.js.map +1 -0
- package/dist/orchestrator/core/types.d.ts +364 -0
- package/dist/orchestrator/core/types.d.ts.map +1 -0
- package/dist/orchestrator/core/types.js +10 -0
- package/dist/orchestrator/core/types.js.map +1 -0
- package/dist/orchestrator/index.d.ts +75 -0
- package/dist/orchestrator/index.d.ts.map +1 -0
- package/dist/orchestrator/index.js +64 -0
- package/dist/orchestrator/index.js.map +1 -0
- package/dist/orchestrator/mcp/server.d.ts +35 -0
- package/dist/orchestrator/mcp/server.d.ts.map +1 -0
- package/dist/orchestrator/mcp/server.js +378 -0
- package/dist/orchestrator/mcp/server.js.map +1 -0
- package/dist/orchestrator/runtime/agent-dispatcher.d.ts +25 -0
- package/dist/orchestrator/runtime/agent-dispatcher.d.ts.map +1 -0
- package/dist/orchestrator/runtime/agent-dispatcher.js +82 -0
- package/dist/orchestrator/runtime/agent-dispatcher.js.map +1 -0
- package/dist/orchestrator/runtime/approval-gate.d.ts +55 -0
- package/dist/orchestrator/runtime/approval-gate.d.ts.map +1 -0
- package/dist/orchestrator/runtime/approval-gate.js +104 -0
- package/dist/orchestrator/runtime/approval-gate.js.map +1 -0
- package/dist/orchestrator/runtime/handoff-manager.d.ts +29 -0
- package/dist/orchestrator/runtime/handoff-manager.d.ts.map +1 -0
- package/dist/orchestrator/runtime/handoff-manager.js +80 -0
- package/dist/orchestrator/runtime/handoff-manager.js.map +1 -0
- package/dist/orchestrator/runtime/job-manager.d.ts +39 -0
- package/dist/orchestrator/runtime/job-manager.d.ts.map +1 -0
- package/dist/orchestrator/runtime/job-manager.js +132 -0
- package/dist/orchestrator/runtime/job-manager.js.map +1 -0
- package/dist/orchestrator/runtime/squad-runtime.d.ts +70 -0
- package/dist/orchestrator/runtime/squad-runtime.d.ts.map +1 -0
- package/dist/orchestrator/runtime/squad-runtime.js +249 -0
- package/dist/orchestrator/runtime/squad-runtime.js.map +1 -0
- package/dist/orchestrator/shell/cli.d.ts +4 -0
- package/dist/orchestrator/shell/cli.d.ts.map +1 -0
- package/dist/orchestrator/shell/cli.js +27 -0
- package/dist/orchestrator/shell/cli.js.map +1 -0
- package/dist/orchestrator/shell/commands/create.command.d.ts +3 -0
- package/dist/orchestrator/shell/commands/create.command.d.ts.map +1 -0
- package/dist/orchestrator/shell/commands/create.command.js +41 -0
- package/dist/orchestrator/shell/commands/create.command.js.map +1 -0
- package/dist/orchestrator/shell/commands/edit.command.d.ts +3 -0
- package/dist/orchestrator/shell/commands/edit.command.d.ts.map +1 -0
- package/dist/orchestrator/shell/commands/edit.command.js +49 -0
- package/dist/orchestrator/shell/commands/edit.command.js.map +1 -0
- package/dist/orchestrator/shell/commands/hosts.command.d.ts +3 -0
- package/dist/orchestrator/shell/commands/hosts.command.d.ts.map +1 -0
- package/dist/orchestrator/shell/commands/hosts.command.js +27 -0
- package/dist/orchestrator/shell/commands/hosts.command.js.map +1 -0
- package/dist/orchestrator/shell/commands/init.command.d.ts +3 -0
- package/dist/orchestrator/shell/commands/init.command.d.ts.map +1 -0
- package/dist/orchestrator/shell/commands/init.command.js +13 -0
- package/dist/orchestrator/shell/commands/init.command.js.map +1 -0
- package/dist/orchestrator/shell/commands/list.command.d.ts +3 -0
- package/dist/orchestrator/shell/commands/list.command.d.ts.map +1 -0
- package/dist/orchestrator/shell/commands/list.command.js +18 -0
- package/dist/orchestrator/shell/commands/list.command.js.map +1 -0
- package/dist/orchestrator/shell/commands/run.command.d.ts +3 -0
- package/dist/orchestrator/shell/commands/run.command.d.ts.map +1 -0
- package/dist/orchestrator/shell/commands/run.command.js +71 -0
- package/dist/orchestrator/shell/commands/run.command.js.map +1 -0
- package/dist/orchestrator/shell/commands/status.command.d.ts +3 -0
- package/dist/orchestrator/shell/commands/status.command.d.ts.map +1 -0
- package/dist/orchestrator/shell/commands/status.command.js +29 -0
- package/dist/orchestrator/shell/commands/status.command.js.map +1 -0
- package/dist/orchestrator/shell/services/active-host-detector.service.d.ts +25 -0
- package/dist/orchestrator/shell/services/active-host-detector.service.d.ts.map +1 -0
- package/dist/orchestrator/shell/services/active-host-detector.service.js +128 -0
- package/dist/orchestrator/shell/services/active-host-detector.service.js.map +1 -0
- package/dist/orchestrator/shell/services/host-resolution.service.d.ts +42 -0
- package/dist/orchestrator/shell/services/host-resolution.service.d.ts.map +1 -0
- package/dist/orchestrator/shell/services/host-resolution.service.js +108 -0
- package/dist/orchestrator/shell/services/host-resolution.service.js.map +1 -0
- package/dist/orchestrator/shell/services/host-runtime.service.d.ts +23 -0
- package/dist/orchestrator/shell/services/host-runtime.service.d.ts.map +1 -0
- package/dist/orchestrator/shell/services/host-runtime.service.js +167 -0
- package/dist/orchestrator/shell/services/host-runtime.service.js.map +1 -0
- package/dist/orchestrator/shell/services/interview-host-bridge.service.d.ts +14 -0
- package/dist/orchestrator/shell/services/interview-host-bridge.service.d.ts.map +1 -0
- package/dist/orchestrator/shell/services/interview-host-bridge.service.js +16 -0
- package/dist/orchestrator/shell/services/interview-host-bridge.service.js.map +1 -0
- package/dist/orchestrator/shell/services/job-execution.service.d.ts +22 -0
- package/dist/orchestrator/shell/services/job-execution.service.d.ts.map +1 -0
- package/dist/orchestrator/shell/services/job-execution.service.js +39 -0
- package/dist/orchestrator/shell/services/job-execution.service.js.map +1 -0
- package/dist/orchestrator/shell/services/project-bootstrap.service.d.ts +6 -0
- package/dist/orchestrator/shell/services/project-bootstrap.service.d.ts.map +1 -0
- package/dist/orchestrator/shell/services/project-bootstrap.service.js +111 -0
- package/dist/orchestrator/shell/services/project-bootstrap.service.js.map +1 -0
- package/dist/orchestrator/shell/services/squad-scaffold.service.d.ts +3 -0
- package/dist/orchestrator/shell/services/squad-scaffold.service.d.ts.map +1 -0
- package/dist/orchestrator/shell/services/squad-scaffold.service.js +30 -0
- package/dist/orchestrator/shell/services/squad-scaffold.service.js.map +1 -0
- package/dist/tests/integration/instagram-squad.test.d.ts +8 -0
- package/dist/tests/integration/instagram-squad.test.d.ts.map +1 -0
- package/dist/tests/integration/instagram-squad.test.js +187 -0
- package/dist/tests/integration/instagram-squad.test.js.map +1 -0
- package/dist/tests/integration/shell/cli-run-host-native.test.d.ts +2 -0
- package/dist/tests/integration/shell/cli-run-host-native.test.d.ts.map +1 -0
- package/dist/tests/integration/shell/cli-run-host-native.test.js +42 -0
- package/dist/tests/integration/shell/cli-run-host-native.test.js.map +1 -0
- package/dist/tests/integration/software-squad.test.d.ts +8 -0
- package/dist/tests/integration/software-squad.test.d.ts.map +1 -0
- package/dist/tests/integration/software-squad.test.js +207 -0
- package/dist/tests/integration/software-squad.test.js.map +1 -0
- package/dist/tests/unit/artifact-store.test.d.ts +2 -0
- package/dist/tests/unit/artifact-store.test.d.ts.map +1 -0
- package/dist/tests/unit/artifact-store.test.js +137 -0
- package/dist/tests/unit/artifact-store.test.js.map +1 -0
- package/dist/tests/unit/context-loader.test.d.ts +2 -0
- package/dist/tests/unit/context-loader.test.d.ts.map +1 -0
- package/dist/tests/unit/context-loader.test.js +109 -0
- package/dist/tests/unit/context-loader.test.js.map +1 -0
- package/dist/tests/unit/docs/host-native-docs.test.d.ts +2 -0
- package/dist/tests/unit/docs/host-native-docs.test.d.ts.map +1 -0
- package/dist/tests/unit/docs/host-native-docs.test.js +18 -0
- package/dist/tests/unit/docs/host-native-docs.test.js.map +1 -0
- package/dist/tests/unit/guardrails.test.d.ts +2 -0
- package/dist/tests/unit/guardrails.test.d.ts.map +1 -0
- package/dist/tests/unit/guardrails.test.js +202 -0
- package/dist/tests/unit/guardrails.test.js.map +1 -0
- package/dist/tests/unit/host/host-adapter-contract.test.d.ts +2 -0
- package/dist/tests/unit/host/host-adapter-contract.test.d.ts.map +1 -0
- package/dist/tests/unit/host/host-adapter-contract.test.js +53 -0
- package/dist/tests/unit/host/host-adapter-contract.test.js.map +1 -0
- package/dist/tests/unit/host/ide.adapter.test.d.ts +2 -0
- package/dist/tests/unit/host/ide.adapter.test.d.ts.map +1 -0
- package/dist/tests/unit/host/ide.adapter.test.js +17 -0
- package/dist/tests/unit/host/ide.adapter.test.js.map +1 -0
- package/dist/tests/unit/host/native-ide-adapters.test.d.ts +2 -0
- package/dist/tests/unit/host/native-ide-adapters.test.d.ts.map +1 -0
- package/dist/tests/unit/host/native-ide-adapters.test.js +26 -0
- package/dist/tests/unit/host/native-ide-adapters.test.js.map +1 -0
- package/dist/tests/unit/runtime/squad-runtime-host-metadata.test.d.ts +2 -0
- package/dist/tests/unit/runtime/squad-runtime-host-metadata.test.d.ts.map +1 -0
- package/dist/tests/unit/runtime/squad-runtime-host-metadata.test.js +128 -0
- package/dist/tests/unit/runtime/squad-runtime-host-metadata.test.js.map +1 -0
- package/dist/tests/unit/shell/active-host-detector.test.d.ts +2 -0
- package/dist/tests/unit/shell/active-host-detector.test.d.ts.map +1 -0
- package/dist/tests/unit/shell/active-host-detector.test.js +85 -0
- package/dist/tests/unit/shell/active-host-detector.test.js.map +1 -0
- package/dist/tests/unit/shell/host-resolution.service.test.d.ts +2 -0
- package/dist/tests/unit/shell/host-resolution.service.test.d.ts.map +1 -0
- package/dist/tests/unit/shell/host-resolution.service.test.js +252 -0
- package/dist/tests/unit/shell/host-resolution.service.test.js.map +1 -0
- package/dist/tests/unit/shell/interview-host-bridge.test.d.ts +2 -0
- package/dist/tests/unit/shell/interview-host-bridge.test.d.ts.map +1 -0
- package/dist/tests/unit/shell/interview-host-bridge.test.js +58 -0
- package/dist/tests/unit/shell/interview-host-bridge.test.js.map +1 -0
- package/dist/tests/unit/shell/project-bootstrap.service.test.d.ts +2 -0
- package/dist/tests/unit/shell/project-bootstrap.service.test.d.ts.map +1 -0
- package/dist/tests/unit/shell/project-bootstrap.service.test.js +58 -0
- package/dist/tests/unit/shell/project-bootstrap.service.test.js.map +1 -0
- package/dist/tests/unit/shell/squad-scaffold.service.test.d.ts +2 -0
- package/dist/tests/unit/shell/squad-scaffold.service.test.d.ts.map +1 -0
- package/dist/tests/unit/shell/squad-scaffold.service.test.js +40 -0
- package/dist/tests/unit/shell/squad-scaffold.service.test.js.map +1 -0
- package/dist/tests/unit/squad-builder.test.d.ts +2 -0
- package/dist/tests/unit/squad-builder.test.d.ts.map +1 -0
- package/dist/tests/unit/squad-builder.test.js +126 -0
- package/dist/tests/unit/squad-builder.test.js.map +1 -0
- package/dist/tests/unit/state-machine.test.d.ts +2 -0
- package/dist/tests/unit/state-machine.test.d.ts.map +1 -0
- package/dist/tests/unit/state-machine.test.js +133 -0
- package/dist/tests/unit/state-machine.test.js.map +1 -0
- package/docs/architecture/overview.md +115 -0
- package/docs/development/adding-agents.md +75 -0
- package/docs/development/adding-hosts.md +104 -0
- package/docs/development/adding-integrations.md +83 -0
- package/docs/development/host-detection-and-resolution.md +59 -0
- package/docs/squads/how-to-create.md +85 -0
- package/docs/squads/how-to-execute.md +139 -0
- package/docs/superpowers/plans/2026-04-01-host-native-cli-shell-implementation.md +617 -0
- package/docs/superpowers/specs/2026-04-01-host-native-cli-shell-design.md +253 -0
- package/package.json +103 -0
- package/squads/examples/instagram-content/AGENTS.md +63 -0
- package/squads/examples/instagram-content/POLICIES.md +45 -0
- package/squads/examples/instagram-content/SQUAD.md +63 -0
- package/squads/examples/instagram-content/WORKFLOW.md +58 -0
- package/squads/examples/instagram-content/config/squad.json +474 -0
- package/squads/examples/software-development/AGENTS.md +88 -0
- package/squads/examples/software-development/POLICIES.md +44 -0
- package/squads/examples/software-development/SQUAD.md +65 -0
- package/squads/examples/software-development/WORKFLOW.md +78 -0
- package/squads/examples/software-development/config/squad.json +442 -0
- package/templates/AGENTS.md +46 -0
- package/templates/POLICIES.md +24 -0
- package/templates/PROJECT.md +52 -0
- package/templates/SQUAD.md +52 -0
- package/templates/TASKS.md +31 -0
- package/templates/WORKFLOW.md +35 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# Squad Foundry Design Spec: Host-Native CLI Shell
|
|
2
|
+
|
|
3
|
+
Date: 2026-04-01
|
|
4
|
+
Status: Draft (design approved in conversation)
|
|
5
|
+
Owner: Squad Foundry
|
|
6
|
+
|
|
7
|
+
## 1) Context and Goal
|
|
8
|
+
|
|
9
|
+
Squad Foundry already has a strong architecture in `orchestrator/core`, `orchestrator/runtime`, and `orchestrator/builder`, with clear adapter interfaces and test coverage. The product goal for this phase is to deliver an experience similar in usability to OpenSquad (command-first, low-friction workflow) while preserving Squad Foundry's own identity and architecture.
|
|
10
|
+
|
|
11
|
+
This phase is explicitly CLI-first. MCP remains available but is secondary.
|
|
12
|
+
|
|
13
|
+
Primary outcomes:
|
|
14
|
+
- Keep the core host/model/tool/domain agnostic.
|
|
15
|
+
- Provide a command flow that feels native in real IDE usage.
|
|
16
|
+
- Use the active IDE model for guided interviews (`create`/`edit`) and runtime execution (`run`).
|
|
17
|
+
- Avoid mandatory API key setup for the primary host-native workflow.
|
|
18
|
+
|
|
19
|
+
## 2) Product Principles
|
|
20
|
+
|
|
21
|
+
1. **Do not copy OpenSquad internals**: borrow interaction ergonomics only.
|
|
22
|
+
2. **Core remains pure**: `orchestrator/core/*` and runtime internals do not hardcode host vendors.
|
|
23
|
+
3. **Host-native first**: if running inside Claude Code, OpenCode, Codex, Antigravity, Zed, etc., use that host's active model.
|
|
24
|
+
4. **No silent fallback to API-key providers**: fallback is explicit and user-visible.
|
|
25
|
+
5. **Deterministic traceability**: every job records chosen host, model, confidence, and fallback reasons.
|
|
26
|
+
|
|
27
|
+
## 3) Scope
|
|
28
|
+
|
|
29
|
+
### In Scope
|
|
30
|
+
- New CLI shell layer for command UX.
|
|
31
|
+
- Host detection and host resolution with confidence scoring.
|
|
32
|
+
- Assisted host selection when auto-detection is ambiguous or fails.
|
|
33
|
+
- Interview bridge using host-native model for `create` and `edit`.
|
|
34
|
+
- Runtime invocation through resolved host adapter.
|
|
35
|
+
- Improved CLI diagnostics and run reporting.
|
|
36
|
+
- Tests and docs for the new flow.
|
|
37
|
+
|
|
38
|
+
### Out of Scope (This Phase)
|
|
39
|
+
- Replacing the core state machine or guardrail engine.
|
|
40
|
+
- MCP as primary transport.
|
|
41
|
+
- Full parity across every host on day one.
|
|
42
|
+
- Real deploy/publish side effects without explicit approval gates.
|
|
43
|
+
|
|
44
|
+
## 4) Target User Experience
|
|
45
|
+
|
|
46
|
+
### Core Commands
|
|
47
|
+
- `squad-foundry init`
|
|
48
|
+
- `squad-foundry create`
|
|
49
|
+
- `squad-foundry edit <squad-id>`
|
|
50
|
+
- `squad-foundry run <squad-id>`
|
|
51
|
+
- `squad-foundry list`
|
|
52
|
+
- `squad-foundry status <squad-id> <job-id>`
|
|
53
|
+
- `squad-foundry hosts`
|
|
54
|
+
|
|
55
|
+
### UX Guarantees
|
|
56
|
+
- `init` configures project for host-native usage first.
|
|
57
|
+
- `create` and `edit` interview turns run on the active IDE model.
|
|
58
|
+
- `run` uses the same resolved host unless user overrides.
|
|
59
|
+
- If host is not confidently detected, CLI asks user which IDE to use and persists that decision.
|
|
60
|
+
|
|
61
|
+
## 5) Architecture
|
|
62
|
+
|
|
63
|
+
### 5.1 Existing Layers (Preserved)
|
|
64
|
+
- `orchestrator/core/*`
|
|
65
|
+
- `orchestrator/runtime/*`
|
|
66
|
+
- `orchestrator/builder/*`
|
|
67
|
+
- `orchestrator/adapters/*`
|
|
68
|
+
- `orchestrator/context/*`
|
|
69
|
+
- `orchestrator/artifacts/*`
|
|
70
|
+
|
|
71
|
+
### 5.2 New CLI Shell Layer
|
|
72
|
+
Add:
|
|
73
|
+
- `orchestrator/shell/cli.ts`
|
|
74
|
+
- `orchestrator/shell/commands/init.command.ts`
|
|
75
|
+
- `orchestrator/shell/commands/create.command.ts`
|
|
76
|
+
- `orchestrator/shell/commands/edit.command.ts`
|
|
77
|
+
- `orchestrator/shell/commands/run.command.ts`
|
|
78
|
+
- `orchestrator/shell/commands/list.command.ts`
|
|
79
|
+
- `orchestrator/shell/commands/status.command.ts`
|
|
80
|
+
- `orchestrator/shell/commands/hosts.command.ts`
|
|
81
|
+
|
|
82
|
+
Support services:
|
|
83
|
+
- `orchestrator/shell/services/project-bootstrap.service.ts`
|
|
84
|
+
- `orchestrator/shell/services/squad-scaffold.service.ts`
|
|
85
|
+
- `orchestrator/shell/services/job-execution.service.ts`
|
|
86
|
+
- `orchestrator/shell/services/active-host-detector.service.ts`
|
|
87
|
+
- `orchestrator/shell/services/host-resolution.service.ts`
|
|
88
|
+
- `orchestrator/shell/services/interview-host-bridge.service.ts`
|
|
89
|
+
|
|
90
|
+
### 5.3 Config Files
|
|
91
|
+
- `squad-foundry.config.json`
|
|
92
|
+
- `squad-foundry.hosts.json`
|
|
93
|
+
|
|
94
|
+
`squads/<id>/config/squad.json` remains source of truth for squad definitions.
|
|
95
|
+
|
|
96
|
+
## 6) Host-Native Strategy
|
|
97
|
+
|
|
98
|
+
### 6.1 Detection Model
|
|
99
|
+
`ActiveHostDetector` scores candidate hosts using:
|
|
100
|
+
- Strong signals: host-specific command context / known workspace entrypoints.
|
|
101
|
+
- Medium signals: host config files in repo.
|
|
102
|
+
- Weak signals: environment/process hints.
|
|
103
|
+
|
|
104
|
+
Output:
|
|
105
|
+
- `detectedHostId`
|
|
106
|
+
- `confidence` (`high | medium | low`)
|
|
107
|
+
- `reasons[]`
|
|
108
|
+
|
|
109
|
+
### 6.2 Resolution Flow
|
|
110
|
+
1. If confidence is high, use detected host.
|
|
111
|
+
2. If confidence is medium and a previously validated host exists and matches current host-family signals, use it; otherwise prompt user.
|
|
112
|
+
3. If confidence is low, always run assisted selection prompt.
|
|
113
|
+
4. Persist selected host and last-validation metadata (timestamp + matched signals).
|
|
114
|
+
|
|
115
|
+
Persisted host validity requirements:
|
|
116
|
+
- adapter initializes successfully;
|
|
117
|
+
- capability check passes for requested command;
|
|
118
|
+
- at least one current medium/strong detection signal matches prior validation.
|
|
119
|
+
|
|
120
|
+
If any validity requirement fails, force assisted selection.
|
|
121
|
+
|
|
122
|
+
### 6.3 Mandatory User Prompt on Uncertain Detection
|
|
123
|
+
When no host reaches required confidence:
|
|
124
|
+
- Prompt user with supported options (installed and configured hosts first).
|
|
125
|
+
- Configure or install bridge files for the selected host.
|
|
126
|
+
- Continue flow using that host.
|
|
127
|
+
|
|
128
|
+
### 6.4 Model Selection Rule
|
|
129
|
+
`create`, `edit`, and `run` must all use the active model provided by resolved host adapter when available. If model cannot be read, log `model=host-default` in reports.
|
|
130
|
+
|
|
131
|
+
## 7) Adapter Contract Updates
|
|
132
|
+
|
|
133
|
+
`IHostAdapter` must support both interview and runtime paths:
|
|
134
|
+
- `detect(context): DetectionResult`
|
|
135
|
+
- `initialize(): Promise<void>`
|
|
136
|
+
- `runInterviewTurn(input, state): Promise<InterviewTurnResult>`
|
|
137
|
+
- `sendPrompt(prompt, agent, job, step, options?): Promise<AgentResponse>`
|
|
138
|
+
- `getCapabilities(): HostCapabilities`
|
|
139
|
+
- `getActiveModel(): Promise<string | null>`
|
|
140
|
+
|
|
141
|
+
Notes:
|
|
142
|
+
- Runtime core still consumes `AgentResponse` only.
|
|
143
|
+
- Shell owns resolution logic; runtime must never hardcode host selection.
|
|
144
|
+
|
|
145
|
+
## 8) Priority Support Matrix
|
|
146
|
+
|
|
147
|
+
Tier 1 (this cycle):
|
|
148
|
+
1. `claude-code`
|
|
149
|
+
2. `opencode`
|
|
150
|
+
|
|
151
|
+
Tier 2 (next cycle):
|
|
152
|
+
- `codex`
|
|
153
|
+
- `antigravity`
|
|
154
|
+
- `zed`
|
|
155
|
+
|
|
156
|
+
Tier 3:
|
|
157
|
+
- `cursor`
|
|
158
|
+
- `vscode-copilot`
|
|
159
|
+
- additional hosts via plugin adapters
|
|
160
|
+
|
|
161
|
+
## 9) Known Issues to Fix in Existing Code
|
|
162
|
+
|
|
163
|
+
1. **MCP host hardcode**: remove forced `AntigravityHostAdapter` behavior and route through normal resolution.
|
|
164
|
+
2. **IDE handoff parsing bug**: fix `IDEHostAdapter` handoff extraction logic (agent list source).
|
|
165
|
+
3. **CLI squad path mismatch**: support `squads/examples/*` and generated squads consistently.
|
|
166
|
+
|
|
167
|
+
## 10) Error Handling and Observability
|
|
168
|
+
|
|
169
|
+
Standardized CLI error categories:
|
|
170
|
+
- `host_detection_error`
|
|
171
|
+
- `host_execution_error`
|
|
172
|
+
- `invalid_squad_config`
|
|
173
|
+
- `guardrail_block`
|
|
174
|
+
- `approval_pending`
|
|
175
|
+
|
|
176
|
+
For each error, present:
|
|
177
|
+
- human-readable summary
|
|
178
|
+
- technical cause
|
|
179
|
+
- actionable next step
|
|
180
|
+
|
|
181
|
+
Each job report includes:
|
|
182
|
+
- resolved host
|
|
183
|
+
- detection confidence and reasons
|
|
184
|
+
- active model (or `host-default`)
|
|
185
|
+
- fallback path (if used)
|
|
186
|
+
|
|
187
|
+
## 11) Testing Strategy
|
|
188
|
+
|
|
189
|
+
Add tests for:
|
|
190
|
+
- host detection scoring and tie-break rules
|
|
191
|
+
- assisted host selection path
|
|
192
|
+
- host-native interview flow in `create` and `edit`
|
|
193
|
+
- runtime execution through resolved host
|
|
194
|
+
- fallback behavior without silent API-key switching
|
|
195
|
+
- path resolution for examples and generated squads
|
|
196
|
+
|
|
197
|
+
Keep existing unit/integration tests green.
|
|
198
|
+
|
|
199
|
+
## 12) Implementation Plan (Phased)
|
|
200
|
+
|
|
201
|
+
Phase 1:
|
|
202
|
+
- Add CLI shell command structure.
|
|
203
|
+
- Wire existing runtime/builder through shell services.
|
|
204
|
+
|
|
205
|
+
Phase 2:
|
|
206
|
+
- Implement detector + resolver + persisted host preferences.
|
|
207
|
+
|
|
208
|
+
Phase 3:
|
|
209
|
+
- Implement interview host bridge for `create` and `edit`.
|
|
210
|
+
|
|
211
|
+
Phase 4:
|
|
212
|
+
- Harden Tier 1 adapters (Claude Code then OpenCode).
|
|
213
|
+
- Fix known bugs (handoff, pathing, MCP hardcode).
|
|
214
|
+
|
|
215
|
+
Phase 5:
|
|
216
|
+
- Improve CLI diagnostics and run status reporting.
|
|
217
|
+
|
|
218
|
+
Phase 6:
|
|
219
|
+
- Add tests and docs updates.
|
|
220
|
+
|
|
221
|
+
## 13) Risks and Mitigations
|
|
222
|
+
|
|
223
|
+
Risks:
|
|
224
|
+
- Host capability differences can create uneven UX.
|
|
225
|
+
- Ambiguous environments can reduce detection reliability.
|
|
226
|
+
- Upstream IDE changes may break adapters.
|
|
227
|
+
|
|
228
|
+
Mitigations:
|
|
229
|
+
- Capability negotiation via adapter contract.
|
|
230
|
+
- Assisted selection as required fallback.
|
|
231
|
+
- Compatibility docs and adapter tests per host.
|
|
232
|
+
|
|
233
|
+
## 14) Definition of Done
|
|
234
|
+
|
|
235
|
+
Done means:
|
|
236
|
+
1. `init/create/edit/run` work through the new shell layer.
|
|
237
|
+
2. Interviews use active IDE model through resolved host adapter.
|
|
238
|
+
3. `run` uses resolved host and records host/model provenance.
|
|
239
|
+
4. Uncertain host detection triggers user selection and persistence.
|
|
240
|
+
5. No silent fallback to API-key provider paths.
|
|
241
|
+
6. Existing tests pass; new host-shell tests pass.
|
|
242
|
+
7. Documentation explains setup, operation, and extension.
|
|
243
|
+
8. Acceptance checks in CI:
|
|
244
|
+
- `npm test` includes shell detection/resolution/interview/runtime/fallback coverage.
|
|
245
|
+
- E2E verifies `init -> create -> run -> status` for Tier 1 hosts.
|
|
246
|
+
- Golden report assertions include `resolvedHost`, `confidence`, `reasons[]`, `activeModel`, and `fallbackPath`.
|
|
247
|
+
|
|
248
|
+
## 15) Non-Goals and Guardrails
|
|
249
|
+
|
|
250
|
+
- Do not embed host-vendor logic into core state machine or guardrails.
|
|
251
|
+
- Do not claim unsupported host integrations as complete.
|
|
252
|
+
- Do not auto-execute deploy/publish side effects without explicit approvals.
|
|
253
|
+
- Do not break domain-agnostic squad behavior.
|
package/package.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "squadfoundry",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Local extensible multi-agent squad orchestration platform — model-agnostic, host-agnostic, domain-agnostic",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/orchestrator/index.js",
|
|
7
|
+
"types": "./dist/orchestrator/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/orchestrator/index.js",
|
|
11
|
+
"types": "./dist/orchestrator/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./adapters/host/ide": {
|
|
14
|
+
"import": "./dist/orchestrator/adapters/host/ide.adapter.js",
|
|
15
|
+
"types": "./dist/orchestrator/adapters/host/ide.adapter.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./adapters/host/claude-code": {
|
|
18
|
+
"import": "./dist/orchestrator/adapters/host/claude-code.adapter.js",
|
|
19
|
+
"types": "./dist/orchestrator/adapters/host/claude-code.adapter.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./adapters/host/opencode": {
|
|
22
|
+
"import": "./dist/orchestrator/adapters/host/opencode.adapter.js",
|
|
23
|
+
"types": "./dist/orchestrator/adapters/host/opencode.adapter.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./adapters/host/anthropic": {
|
|
26
|
+
"import": "./dist/orchestrator/adapters/host/anthropic.adapter.js",
|
|
27
|
+
"types": "./dist/orchestrator/adapters/host/anthropic.adapter.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./adapters/host/openai": {
|
|
30
|
+
"import": "./dist/orchestrator/adapters/host/openai.adapter.js",
|
|
31
|
+
"types": "./dist/orchestrator/adapters/host/openai.adapter.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./adapters/host/local": {
|
|
34
|
+
"import": "./dist/orchestrator/adapters/host/local.adapter.js",
|
|
35
|
+
"types": "./dist/orchestrator/adapters/host/local.adapter.d.ts"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"bin": {
|
|
39
|
+
"squadfoundry": "./dist/orchestrator/cli/index.js"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist/",
|
|
43
|
+
"squads/",
|
|
44
|
+
"templates/",
|
|
45
|
+
"docs/",
|
|
46
|
+
"README.md",
|
|
47
|
+
"PROJECT.md",
|
|
48
|
+
"AGENTS.md"
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsc",
|
|
52
|
+
"dev": "tsc --watch",
|
|
53
|
+
"test": "vitest run",
|
|
54
|
+
"test:watch": "vitest",
|
|
55
|
+
"test:unit": "vitest run tests/unit",
|
|
56
|
+
"test:integration": "vitest run tests/integration",
|
|
57
|
+
"test:coverage": "vitest run --coverage",
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"cli": "node dist/orchestrator/cli/index.js",
|
|
60
|
+
"dev:cli": "tsx orchestrator/cli/index.ts",
|
|
61
|
+
"prepublishOnly": "npm run build && npm test"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@anthropic-ai/sdk": "^0.82.0",
|
|
65
|
+
"commander": "^12.1.0",
|
|
66
|
+
"glob": "^11.0.0",
|
|
67
|
+
"zod": "^3.23.8"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
71
|
+
"@types/node": "^22.0.0",
|
|
72
|
+
"@vitest/coverage-v8": "^2.0.0",
|
|
73
|
+
"tsx": "^4.21.0",
|
|
74
|
+
"typescript": "^5.5.0",
|
|
75
|
+
"vitest": "^2.0.0"
|
|
76
|
+
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=20.0.0"
|
|
79
|
+
},
|
|
80
|
+
"keywords": [
|
|
81
|
+
"agents",
|
|
82
|
+
"multi-agent",
|
|
83
|
+
"orchestration",
|
|
84
|
+
"squad",
|
|
85
|
+
"ai",
|
|
86
|
+
"automation",
|
|
87
|
+
"workflow",
|
|
88
|
+
"claude-code",
|
|
89
|
+
"opencode",
|
|
90
|
+
"cursor",
|
|
91
|
+
"codex",
|
|
92
|
+
"ai-native"
|
|
93
|
+
],
|
|
94
|
+
"repository": {
|
|
95
|
+
"type": "git",
|
|
96
|
+
"url": "https://github.com/cubocompany/squadfoundry"
|
|
97
|
+
},
|
|
98
|
+
"homepage": "https://github.com/cubocompany/squadfoundry",
|
|
99
|
+
"bugs": {
|
|
100
|
+
"url": "https://github.com/cubocompany/squadfoundry/issues"
|
|
101
|
+
},
|
|
102
|
+
"license": "MIT"
|
|
103
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Agents — Instagram Content Squad
|
|
2
|
+
|
|
3
|
+
## Strategy Agent
|
|
4
|
+
|
|
5
|
+
**ID:** `strategy-agent` | **Role:** Content Strategist
|
|
6
|
+
|
|
7
|
+
Defines target audience, tone of voice, content pillars, post objective, and success metrics. Does not write captions.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Research Agent
|
|
12
|
+
|
|
13
|
+
**ID:** `research-agent` | **Role:** Content Researcher
|
|
14
|
+
|
|
15
|
+
Researches trending hashtags, competitor content, and audience insights. Never fabricates statistics.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Copy Agent
|
|
20
|
+
|
|
21
|
+
**ID:** `copy-agent` | **Role:** Copywriter
|
|
22
|
+
|
|
23
|
+
Writes Instagram caption within constraints: max 2200 chars, max 30 hashtags, must include CTA, must follow brand voice. This agent is the revision hub — loops back from review failures.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Creative Review Agent
|
|
28
|
+
|
|
29
|
+
**ID:** `creative-review-agent` | **Role:** Creative Director
|
|
30
|
+
|
|
31
|
+
Reviews for creativity, engagement, and tone. Issues PASS or REVISE. Does not rewrite — provides specific feedback. Loops back to Copy Agent on REVISE.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Brand/Compliance Agent
|
|
36
|
+
|
|
37
|
+
**ID:** `brand-agent` | **Role:** Brand Guardian
|
|
38
|
+
|
|
39
|
+
Validates against brand guidelines (reads brand/** context files). Checks: prohibited words, legal risks, hashtag policy, brand voice. Issues PASS or FAIL.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Approval Agent
|
|
44
|
+
|
|
45
|
+
**ID:** `approval-agent` | **Role:** Human Approval Coordinator
|
|
46
|
+
|
|
47
|
+
Presents the full content package to the human. NEVER auto-approves. Waits for explicit APPROVE or REJECT. Records decision with timestamp.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Publisher Agent
|
|
52
|
+
|
|
53
|
+
**ID:** `publisher-agent` | **Role:** Content Publisher
|
|
54
|
+
|
|
55
|
+
Publishes content to Instagram ONLY after human approval is recorded. Never publishes if approval is missing. Reports post URL and metadata.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Analytics Agent
|
|
60
|
+
|
|
61
|
+
**ID:** `analytics-agent` | **Role:** Performance Analyst
|
|
62
|
+
|
|
63
|
+
Retrieves post analytics and generates a performance report with recommendations. Reports "not yet available" honestly if data isn't ready.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Policies — Instagram Content Squad
|
|
2
|
+
|
|
3
|
+
## Guardrails
|
|
4
|
+
|
|
5
|
+
### 1. Require Minimum Context (`grail-min-context`)
|
|
6
|
+
- **Severity:** warn
|
|
7
|
+
- **Rule:** `require_minimum_context`
|
|
8
|
+
- **Description:** Brand guidelines context recommended (brand/** files)
|
|
9
|
+
|
|
10
|
+
### 2. Require Approval Before Publish (`grail-approval-publish`)
|
|
11
|
+
- **Severity:** block
|
|
12
|
+
- **Rule:** `require_approval_before_publish`
|
|
13
|
+
- **Description:** No content is ever published without explicit human approval
|
|
14
|
+
|
|
15
|
+
## Prohibited Actions
|
|
16
|
+
|
|
17
|
+
- Auto-publish without human approval
|
|
18
|
+
- Post content that fails brand compliance check
|
|
19
|
+
- Use more than 30 hashtags
|
|
20
|
+
- Post content rejected by Creative Review
|
|
21
|
+
- Delete published posts automatically
|
|
22
|
+
- Fabricate engagement metrics or statistics
|
|
23
|
+
- Use competitor brand names in captions without approval
|
|
24
|
+
|
|
25
|
+
## Required Approvals
|
|
26
|
+
|
|
27
|
+
| Action | Requirement |
|
|
28
|
+
|--------|-------------|
|
|
29
|
+
| publish | Human must see full caption and explicitly approve before any Instagram post is created |
|
|
30
|
+
|
|
31
|
+
## Brand Guidelines
|
|
32
|
+
|
|
33
|
+
All agents should read from `brand/**` context files when available, including:
|
|
34
|
+
- `brand/voice-guidelines.md`
|
|
35
|
+
- `brand/prohibited-words.md`
|
|
36
|
+
- `brand/hashtag-policy.md`
|
|
37
|
+
- `brand/visual-guidelines.md`
|
|
38
|
+
|
|
39
|
+
## Caption Rules
|
|
40
|
+
|
|
41
|
+
- Maximum 2,200 characters
|
|
42
|
+
- Maximum 30 hashtags
|
|
43
|
+
- Must include a clear call-to-action
|
|
44
|
+
- Must match brand tone of voice
|
|
45
|
+
- No promotional claims without compliance review
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Instagram Content Squad
|
|
2
|
+
|
|
3
|
+
**ID:** `instagram-content`
|
|
4
|
+
**Domain:** social-media
|
|
5
|
+
**Version:** 1.0.0
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Create, review, approve, and publish high-quality Instagram content from concept to post.
|
|
10
|
+
|
|
11
|
+
## Agents
|
|
12
|
+
|
|
13
|
+
| Agent | Role | Responsibility |
|
|
14
|
+
|-------|------|---------------|
|
|
15
|
+
| Strategy Agent | Content Strategist | Define content strategy and brief |
|
|
16
|
+
| Research Agent | Content Researcher | Hashtags, trends, audience insights |
|
|
17
|
+
| Copy Agent | Copywriter | Write Instagram caption + CTA |
|
|
18
|
+
| Creative Review Agent | Creative Director | Review for engagement and tone |
|
|
19
|
+
| Brand/Compliance Agent | Brand Guardian | Check brand guidelines and compliance |
|
|
20
|
+
| Approval Agent | Human Coordinator | Present to human for final sign-off |
|
|
21
|
+
| Publisher Agent | Content Publisher | Publish to Instagram (never without approval) |
|
|
22
|
+
| Analytics Agent | Performance Analyst | Track and report post performance |
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Campaign Brief
|
|
28
|
+
↓
|
|
29
|
+
Strategy Agent → Strategy Brief
|
|
30
|
+
↓
|
|
31
|
+
Research Agent → Research Summary + Hashtags
|
|
32
|
+
↓
|
|
33
|
+
Copy Agent → Caption Draft
|
|
34
|
+
↓
|
|
35
|
+
Creative Review Agent → PASS or REVISE (loops to Copy Agent)
|
|
36
|
+
↓
|
|
37
|
+
Brand/Compliance Agent → PASS or FAIL (loops to Copy Agent)
|
|
38
|
+
↓
|
|
39
|
+
[HUMAN APPROVAL REQUIRED]
|
|
40
|
+
↓
|
|
41
|
+
Publisher Agent → Published Post
|
|
42
|
+
↓
|
|
43
|
+
Analytics Agent → Performance Report
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Key Policies
|
|
47
|
+
|
|
48
|
+
- **No auto-publish**: Content is never published without explicit human approval
|
|
49
|
+
- **Brand compliance gate**: All content must pass brand/compliance review
|
|
50
|
+
- **Caption limits**: Max 2200 characters, max 30 hashtags
|
|
51
|
+
- **Revision loop**: Copy Agent loops until creative + compliance review passes
|
|
52
|
+
- **Analytics follow-up**: Every published post is tracked and reported
|
|
53
|
+
|
|
54
|
+
## Guardrails
|
|
55
|
+
|
|
56
|
+
- `require_minimum_context` — Brand guidelines context recommended
|
|
57
|
+
- `require_approval_before_publish` — Blocks publishing without human approval
|
|
58
|
+
|
|
59
|
+
## Integrations
|
|
60
|
+
|
|
61
|
+
| Integration | Status |
|
|
62
|
+
|-------------|--------|
|
|
63
|
+
| Instagram Graph API | stub |
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Workflow: Instagram Content Pipeline
|
|
2
|
+
|
|
3
|
+
End-to-end content workflow with review loops and a mandatory human approval gate before publishing.
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
### 1. Content Strategy (`step-strategy`)
|
|
8
|
+
- **Agent:** Strategy Agent
|
|
9
|
+
- **Input:** Campaign brief or topic request
|
|
10
|
+
- **Output:** strategy_brief.md
|
|
11
|
+
- **Approval:** None
|
|
12
|
+
|
|
13
|
+
### 2. Research (`step-research`)
|
|
14
|
+
- **Agent:** Research Agent
|
|
15
|
+
- **Input:** Strategy brief
|
|
16
|
+
- **Output:** research_summary.md (hashtags, trends, insights)
|
|
17
|
+
- **Approval:** None
|
|
18
|
+
|
|
19
|
+
### 3. Copywriting (`step-copy`)
|
|
20
|
+
- **Agent:** Copy Agent
|
|
21
|
+
- **Input:** Strategy brief, research summary
|
|
22
|
+
- **Output:** caption_draft.md
|
|
23
|
+
- **Approval:** None
|
|
24
|
+
- **Loop:** Returns here from Creative Review (REVISE) or Compliance (FAIL)
|
|
25
|
+
|
|
26
|
+
### 4. Creative Review (`step-creative-review`)
|
|
27
|
+
- **Agent:** Creative Review Agent
|
|
28
|
+
- **Input:** Caption draft, strategy brief
|
|
29
|
+
- **Output:** creative_review.md (PASS or REVISE)
|
|
30
|
+
- **Approval:** None
|
|
31
|
+
- **Loop:** REVISE → Copy Agent
|
|
32
|
+
|
|
33
|
+
### 5. Brand & Compliance Review (`step-brand`)
|
|
34
|
+
- **Agent:** Brand/Compliance Agent
|
|
35
|
+
- **Input:** Caption draft, creative review
|
|
36
|
+
- **Output:** compliance_review.md (PASS or FAIL)
|
|
37
|
+
- **Approval:** None
|
|
38
|
+
- **Loop:** FAIL → Copy Agent
|
|
39
|
+
|
|
40
|
+
### 6. Human Approval (`step-approval`)
|
|
41
|
+
- **Agent:** Approval Agent
|
|
42
|
+
- **Input:** Caption draft, compliance review
|
|
43
|
+
- **Output:** approval_decision.json
|
|
44
|
+
- **Approval:** **REQUIRED** — human must explicitly approve
|
|
45
|
+
- **Guardrail:** `require_approval_before_publish`
|
|
46
|
+
|
|
47
|
+
### 7. Publishing (`step-publish`)
|
|
48
|
+
- **Agent:** Publisher Agent
|
|
49
|
+
- **Input:** Caption draft, approval_decision
|
|
50
|
+
- **Output:** published_post.json
|
|
51
|
+
- **Approval:** **REQUIRED** — publish gate blocks without approval record
|
|
52
|
+
- **Guardrail:** `require_approval_before_publish`
|
|
53
|
+
|
|
54
|
+
### 8. Analytics (`step-analytics`)
|
|
55
|
+
- **Agent:** Analytics Agent
|
|
56
|
+
- **Input:** Published post metadata
|
|
57
|
+
- **Output:** analytics_report.md
|
|
58
|
+
- **Approval:** None
|