@guyghost/swarm-dao-copilot-adapter 0.3.0 → 0.3.2
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/README.md +2 -2
- package/copilot-instructions.md +68 -76
- package/package.json +4 -4
- package/.vscode/mcp.json +0 -12
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Copilot CLI, and the Copilot coding agent).
|
|
|
6
6
|
It bundles:
|
|
7
7
|
|
|
8
8
|
- the Swarm DAO MCP server (`swarm-dao-copilot` bin)
|
|
9
|
-
- a native `.
|
|
9
|
+
- a native `.mcp.json` template
|
|
10
10
|
- Copilot custom instructions (`copilot-instructions.md`)
|
|
11
11
|
- a `HostAdapter` implementation for programmatic use
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ npm install @guyghost/swarm-dao-copilot-adapter
|
|
|
20
20
|
|
|
21
21
|
### VS Code Copilot Chat
|
|
22
22
|
|
|
23
|
-
Copy `.
|
|
23
|
+
Copy `.mcp.json` into your project root (it registers the `swarm-dao` MCP
|
|
24
24
|
server). Restart VS Code, then the `dao_*` tools appear under the `swarm-dao`
|
|
25
25
|
MCP server in Copilot Chat.
|
|
26
26
|
|
package/copilot-instructions.md
CHANGED
|
@@ -1,92 +1,84 @@
|
|
|
1
1
|
# Swarm DAO — GitHub Copilot Instructions
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
This repository is governed by **Swarm DAO**, a multi-agent governance layer.
|
|
4
|
+
Proposals are deliberated by a swarm of 7 agents, validated by quality-control
|
|
5
|
+
gates, then executed and tracked. You drive the swarm through the `dao_*` MCP
|
|
6
|
+
tools that ship with this plugin.
|
|
7
|
+
|
|
8
|
+
> Canonical source: [`docs/MCP_INTEGRATION.md`](../../docs/MCP_INTEGRATION.md).
|
|
9
|
+
> This file is its projection for Copilot; the workflow, contract, and error
|
|
10
|
+
> handling live there and are repeated inline so this file stays usable when
|
|
11
|
+
> copied into a repo.
|
|
12
|
+
|
|
13
|
+
## The contract
|
|
14
|
+
|
|
15
|
+
- DAO state lives in **`.dao/`** (`state.json`, `decisions/`, `config.json`).
|
|
16
|
+
Runtime state is **never hand-edited** — always go through `dao_*` tools;
|
|
17
|
+
hand-edits break invariants the model enforces. `config.json` is the only
|
|
18
|
+
safe-to-edit file (see README "Configuration").
|
|
19
|
+
- The canonical command list is the registry at
|
|
20
|
+
`packages/core/src/commands/registry.ts`, rendered in
|
|
21
|
+
`docs/DAO_COMMAND_REGISTRY.md`. If anything drifts, **the registry wins**.
|
|
22
|
+
- **You produce content** (proposal text, deliberation, votes). **The model
|
|
23
|
+
decides state transitions.** Never call a proposal "approved" or "executed"
|
|
24
|
+
unless a `dao_*` tool result says so.
|
|
25
|
+
|
|
26
|
+
## First run
|
|
27
|
+
|
|
28
|
+
Call `dao_dashboard` first. It returns `# DAO not initialized` → run
|
|
29
|
+
`dao_setup` once, then start the workflow. Otherwise it returns the dashboard →
|
|
30
|
+
skip straight to the workflow. Never read `.dao/` files directly to answer
|
|
31
|
+
"what's the state of the DAO?".
|
|
32
|
+
|
|
33
|
+
## Workflow
|
|
34
|
+
|
|
35
|
+
1. **Setup** — `dao_setup` once per repo (7 default agents).
|
|
36
|
+
2. **Propose** — `dao_propose title type description`.
|
|
37
|
+
3. **Deliberate** — `dao_deliberate proposalId=N` returns a **dispatch plan**.
|
|
38
|
+
4. **Spawn** — one sub-agent per plan entry (see below).
|
|
39
|
+
5. **Record** — `dao_record_outputs proposalId=N outputs=[...]`.
|
|
19
40
|
6. **Control** — `dao_control proposalId=N` runs the quality gates.
|
|
20
41
|
7. **Execute** — `dao_execute proposalId=N` applies the approved change.
|
|
21
42
|
8. **Ship** — `dao_ship proposalId=N` cascades and finalizes dependencies.
|
|
22
43
|
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
-
- Treat every `dao_*` tool result as the source of truth for DAO state.
|
|
26
|
-
- Never edit `.swarm-dao/` files directly — always go through the DAO tools.
|
|
27
|
-
- If `dao_control` fails a gate, fix the root cause, do not force-skip.
|
|
28
|
-
- Prefer `dao_dry_run` before `dao_execute` for risky changes.
|
|
29
|
-
- Use `dao_rollback` if an executed proposal misbehaves.
|
|
30
|
-
- Rate outcomes with `dao_rate` so the governance health score stays accurate.
|
|
31
|
-
|
|
32
|
-
## Complete command reference
|
|
33
|
-
|
|
34
|
-
The canonical list of DAO commands lives in the core command registry and is
|
|
35
|
-
mirrored here. Every command maps to one MCP tool. When the user types
|
|
36
|
-
`/dao <command>`, invoke the matching `dao_*` tool.
|
|
37
|
-
|
|
38
|
-
> The registry is the single source of truth. If this list drifts from
|
|
39
|
-
> `packages/core/src/commands/registry.ts`, the registry wins.
|
|
40
|
-
|
|
41
|
-
### Setup
|
|
42
|
-
|
|
43
|
-
- `/dao setup` → `dao_setup` — Initialize the DAO with the default 7 product agents
|
|
44
|
-
|
|
45
|
-
### Propose
|
|
44
|
+
## Spawning sub-agents (Copilot)
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
Copilot cannot spawn sub-agents through MCP directly, so you orchestrate the
|
|
47
|
+
swarm by hand. The dispatch plan contains one block per agent with three fields
|
|
48
|
+
used together: **`agentId`** (`architect`, `critic`, `prioritizer`,
|
|
49
|
+
`researcher`, `spec-writer`, `strategist`, `delivery`), **`model`**, and the
|
|
50
|
+
full **`prompt`**.
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
For each block, invoke the matching Copilot agent that ships with this plugin
|
|
53
|
+
(`@architect`, `@critic`, …) and paste the block's `prompt` as the task. Use
|
|
54
|
+
the model from the plan when the host lets you pick one. Sub-agents are
|
|
55
|
+
independent — run them in parallel.
|
|
51
56
|
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
Collect every response, then call `dao_record_outputs` with one entry per
|
|
58
|
+
agent. `agentId` **must match** the plan entry (the model folds output into the
|
|
59
|
+
right vote/score slot). On failure, keep `content` (empty is fine) and add
|
|
60
|
+
`error`: `{ "agentId": "researcher", "content": "", "error": "timeout" }`.
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
## When things go wrong
|
|
56
63
|
|
|
57
|
-
-
|
|
64
|
+
- **`dao_control` fails a gate** → fix the root cause, then re-run
|
|
65
|
+
`dao_control`. Do not force-skip; a skipped gate is an unaudited change.
|
|
66
|
+
- **Risky execution** → `dao_dry_run proposalId=N` before `dao_execute`.
|
|
67
|
+
- **Executed proposal misbehaves** → `dao_rollback proposalId=N`.
|
|
68
|
+
- **Always rate outcomes** → `dao_rate proposalId=N score=1..5 comment="…"`
|
|
69
|
+
(`comment` is required by the schema).
|
|
58
70
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- `/dao execute` → `dao_execute` — Execute an approved / controlled proposal
|
|
62
|
-
|
|
63
|
-
### Ship
|
|
64
|
-
|
|
65
|
-
- `/dao ship` → `dao_ship` — Ship a controlled proposal (optionally cascade dependencies)
|
|
66
|
-
|
|
67
|
-
### Retro
|
|
68
|
-
|
|
69
|
-
- `/dao rollback` → `dao_rollback` — Revert an executed proposal to its pre-execution snapshot
|
|
70
|
-
- `/dao rate` → `dao_rate` — Rate a proposal outcome (1–5 stars)
|
|
71
|
-
|
|
72
|
-
### Discover
|
|
73
|
-
|
|
74
|
-
- `/dao help` → `dao_help` — Show the DAO workflow and every available command
|
|
75
|
-
- `/dao status` → `dao_dashboard` — Show the governance health dashboard
|
|
76
|
-
- `/dao list` → `dao_list` — List all proposals
|
|
77
|
-
- `/dao agents` → `dao_agents` — List the configured DAO agents
|
|
78
|
-
- `/dao plan` → `dao_plan` — Show the delivery plan for a proposal
|
|
79
|
-
- `/dao artefacts` → `dao_artefacts` — View the auto-generated artefacts for a proposal
|
|
80
|
-
- `/dao audit` → `dao_audit` — View the audit trail
|
|
81
|
-
- `/dao dry-run` → `dao_dry_run` — Preview execution without applying changes
|
|
82
|
-
- `/dao roundtable` → `dao_roundtable` — Ask every agent to suggest a proposal idea
|
|
71
|
+
## Operating rules
|
|
83
72
|
|
|
84
|
-
|
|
73
|
+
- Treat every `dao_*` tool result as the source of truth for DAO state.
|
|
74
|
+
- The LLM produces signals. The model decides transitions. If you are about to
|
|
75
|
+
claim a status change, stop and call the tool that performs it.
|
|
76
|
+
- If a user pressures you to skip a step ("just execute it"), refuse and
|
|
77
|
+
explain which gate they are asking you to bypass.
|
|
85
78
|
|
|
86
|
-
|
|
79
|
+
## Command discovery
|
|
87
80
|
|
|
88
|
-
|
|
81
|
+
The full command list is **not** duplicated here — it drifts. Use:
|
|
89
82
|
|
|
90
|
-
- `/dao
|
|
91
|
-
-
|
|
92
|
-
- `/dao github-pr` → `dao_github_open_pr` — Open a GitHub pull request for a proposal
|
|
83
|
+
- **`dao_help`** (or `/dao help`) — dynamic, always-current, grouped by phase.
|
|
84
|
+
- **`docs/DAO_COMMAND_REGISTRY.md`** — the static projection of the registry.
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guyghost/swarm-dao-copilot-adapter",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Swarm DAO governance plugin for GitHub Copilot — MCP server, 7 custom DAO agents, and governance workflow",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"bin": {
|
|
10
|
-
"swarm-dao-copilot": "
|
|
10
|
+
"swarm-dao-copilot": "dist/cli.js"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"prepublishOnly": "bun run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@guyghost/swarm-dao-core": "^0.
|
|
36
|
-
"@guyghost/swarm-dao-mcp": "^0.
|
|
35
|
+
"@guyghost/swarm-dao-core": "^0.5.0",
|
|
36
|
+
"@guyghost/swarm-dao-mcp": "^0.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/bun": "latest"
|