marcos-ai-bootstrap 0.1.2 → 0.1.4

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.
Files changed (47) hide show
  1. package/README.md +24 -24
  2. package/package.json +7 -6
  3. package/{.agents → src/.agents}/skills/initialize/SKILL.md +1 -1
  4. package/{.claude → src/.claude}/agents/infra-claude.md +1 -1
  5. package/{.claude → src/.claude}/agents/planner-claude.md +7 -1
  6. package/{.claude → src/.claude}/agents/planner-discovery-claude.md +1 -0
  7. package/{.claude → src/.claude}/skills/initialize/SKILL.md +1 -1
  8. package/{.codex → src/.codex}/agents/infra-codex.toml +1 -1
  9. package/{.codex → src/.codex}/agents/planner-codex.toml +7 -1
  10. package/{.codex → src/.codex}/agents/planner-discovery-codex.toml +1 -0
  11. package/{.github → src/.github}/agents/infra-copilot.agent.md +1 -1
  12. package/{.github → src/.github}/agents/planner-copilot.agent.md +7 -1
  13. package/{.github → src/.github}/agents/planner-discovery-copilot.agent.md +1 -0
  14. package/{.github → src/.github}/skills/initialize/SKILL.md +1 -1
  15. package/src/AGENTS.md +80 -5
  16. package/src/documents/templates/plan-template.md +47 -0
  17. package/src/lib/materialize.js +23 -6
  18. /package/{.agents → src/.agents}/skills/implement/SKILL.md +0 -0
  19. /package/{.agents → src/.agents}/skills/planner/SKILL.md +0 -0
  20. /package/{.agents → src/.agents}/skills/watch-ci/SKILL.md +0 -0
  21. /package/{.claude → src/.claude}/agents/code-claude.md +0 -0
  22. /package/{.claude → src/.claude}/agents/docs-claude.md +0 -0
  23. /package/{.claude → src/.claude}/agents/explorer-claude.md +0 -0
  24. /package/{.claude → src/.claude}/agents/investigate-claude.md +0 -0
  25. /package/{.claude → src/.claude}/agents/log-reader-claude.md +0 -0
  26. /package/{.claude → src/.claude}/agents/test-runner-claude.md +0 -0
  27. /package/{.claude → src/.claude}/agents/triage-claude.md +0 -0
  28. /package/{.claude → src/.claude}/skills/implement/SKILL.md +0 -0
  29. /package/{.claude → src/.claude}/skills/planner/SKILL.md +0 -0
  30. /package/{.claude → src/.claude}/skills/watch-ci/SKILL.md +0 -0
  31. /package/{.codex → src/.codex}/agents/code-codex.toml +0 -0
  32. /package/{.codex → src/.codex}/agents/docs-codex.toml +0 -0
  33. /package/{.codex → src/.codex}/agents/explorer-codex.toml +0 -0
  34. /package/{.codex → src/.codex}/agents/investigate-codex.toml +0 -0
  35. /package/{.codex → src/.codex}/agents/log-reader-codex.toml +0 -0
  36. /package/{.codex → src/.codex}/agents/test-runner-codex.toml +0 -0
  37. /package/{.codex → src/.codex}/agents/triage-codex.toml +0 -0
  38. /package/{.github → src/.github}/agents/code-copilot.agent.md +0 -0
  39. /package/{.github → src/.github}/agents/docs-copilot.agent.md +0 -0
  40. /package/{.github → src/.github}/agents/explorer-copilot.agent.md +0 -0
  41. /package/{.github → src/.github}/agents/investigate-copilot.agent.md +0 -0
  42. /package/{.github → src/.github}/agents/log-reader-copilot.agent.md +0 -0
  43. /package/{.github → src/.github}/agents/test-runner-copilot.agent.md +0 -0
  44. /package/{.github → src/.github}/agents/triage-copilot.agent.md +0 -0
  45. /package/{.github → src/.github}/skills/implement/SKILL.md +0 -0
  46. /package/{.github → src/.github}/skills/planner/SKILL.md +0 -0
  47. /package/{.github → src/.github}/skills/watch-ci/SKILL.md +0 -0
package/README.md CHANGED
@@ -22,9 +22,11 @@ npx marcos-ai-bootstrap --claude --codex # combine any subset
22
22
  npx marcos-ai-bootstrap --all # every tool at once
23
23
  ```
24
24
 
25
- Run it from the root of the repository you want to bootstrap. It writes `AGENTS.md`
26
- and `HUMAN.md` (the tool-agnostic rules + human guide) alongside
27
- the agent/skill files for whichever tool(s) you selected:
25
+ Run it from the root of the repository you want to bootstrap. It writes three always-present
26
+ core files—`AGENTS.md`, `HUMAN.md` (the tool-agnostic rules + human guide), and
27
+ `documents/templates/plan-template.md` (an empty scaffold for future implementation plans)—alongside
28
+ the agent/skill files for whichever tool(s) you selected. The Stage-2 planner agents
29
+ (planner-copilot, planner-claude, planner-codex) read the plan template before writing plans.
28
30
 
29
31
  | Flag | Writes |
30
32
  |---|---|
@@ -55,32 +57,30 @@ marcos-ai-bootstrap --all
55
57
 
56
58
  ## Repository layout
57
59
 
58
- - `src/AGENTS.md`, `src/HUMAN.md` the **canonical, shipped** copies. These are the source
59
- of truth the CLI reads and writes into target repos (as root-level `AGENTS.md`/`HUMAN.md`).
60
- - `AGENTS.md`, `HUMAN.md` (repo root) — this repository's **own self-hosting** copies, used
61
- by the agent network running against this repo. Kept separate from the shipped `src/` copies
62
- and not published to npm.
63
- - `.claude/`, `.codex/`, `.github/`, `.agents/` — the already-materialised, checked-in
64
- agent/skill files for this repo itself, and the templates the `marcos-ai-bootstrap` CLI ships
65
- and copies into other repositories.
60
+ **Everything the CLI materialises into a target repo is shipped from `src/`; `src/` is the single source of truth.**
61
+
62
+ **Shipped source of truth files (in `src/`):**
63
+ - `src/AGENTS.md`, `src/HUMAN.md` — canonical agent network and human workflow rules.
64
+ - `src/documents/templates/plan-template.md` canonical plan template scaffold.
65
+ - `src/.claude/agents/`, `src/.claude/skills/`, `src/.codex/agents/`, `src/.codex/`, `src/.github/agents/`, `src/.github/skills/`, `src/.agents/skills/` — tool agent/skill template files materialised by the CLI.
66
+
67
+ **Self-hosted copies (repo root) — NOT published to npm:**
68
+ - `AGENTS.md`, `HUMAN.md` (repo root) — this repository's own self-hosted copies, used by the agent network running against this repo.
69
+ - `documents/templates/plan-template.md`, `.claude/`, `.codex/`, `.github/agents/`, `.github/skills/`, `.agents/skills/` — regenerated from `src/` for this repo's own agents (not shipped).
70
+ - `.github/workflows/` — this repo's own CI/CD; not shipped.
71
+
72
+ **Tooling:**
66
73
  - `src/bin/ai-bootstrap.js`, `src/lib/materialize.js` — the CLI implementation.
67
- - `src/AGENTS-BOOTSTRAP.md` — maintainer-only source of truth for each tool's
68
- materialised agent/skill prompt bodies, model tier mappings, and MCP server
69
- discovery/policy flow. **Not published to npm and not copied into target repos** —
70
- the materialised agent/skill files under `.claude/`, `.codex/`, `.github/`, `.agents/`
71
- are the shipped source of truth.
72
- - `src/extract-agents.py` — maintainer tool: regenerates the `.claude/`, `.codex/`,
73
- `.github/`, `.agents/` template files at the repo root from `src/AGENTS-BOOTSTRAP.md`
74
- after editing it. Run this after changing `src/AGENTS-BOOTSTRAP.md`, then commit the
75
- regenerated templates so `marcos-ai-bootstrap` ships the update.
74
+ - `src/AGENTS-BOOTSTRAP.md` — maintainer-only source of truth for each tool's materialised agent/skill prompt bodies and model tier mappings. References the MCP server discovery flow from the shipped `AGENTS.md`. Not published to npm.
75
+ - `src/extract-agents.py` — maintainer tool: regenerates the shipped agent/skill template files under `src/.claude/`, `src/.codex/`, `src/.github/agents/`, `src/.github/skills/`, `src/.agents/skills/` from `src/AGENTS-BOOTSTRAP.md` after editing. Run this after changing `src/AGENTS-BOOTSTRAP.md`.
76
76
 
77
77
  ## Maintaining this repo
78
78
 
79
79
  1. Edit `src/AGENTS-BOOTSTRAP.md` (the source of truth for agent/skill prompt bodies).
80
- 2. Run `python src/extract-agents.py` to regenerate the materialised template files.
81
- 3. Run `node src/bin/ai-bootstrap.js --all --dry-run --dest <scratch-dir>` to sanity-check
82
- the CLI still packages everything correctly.
83
- 4. Commit the changes.
80
+ 2. Run `python src/extract-agents.py` to regenerate the shipped agent/skill templates under `src/.claude/`, `src/.codex/`, `src/.github/agents/`, `src/.github/skills/`, `src/.agents/skills/`.
81
+ 3. Run `node src/bin/ai-bootstrap.js --all --force --dest .` to regenerate this repo's root self-hosted copies from `src/`.
82
+ 4. Run `node src/bin/ai-bootstrap.js --all --dry-run --dest <scratch-dir>` to sanity-check the CLI packages everything correctly.
83
+ 5. Commit the changes.
84
84
 
85
85
  ## Releasing to npm
86
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marcos-ai-bootstrap",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Materialise the AI-Bootstrap agent/skill network (Claude Code, Codex, GitHub Copilot CLI) into any repository from the command line.",
5
5
  "bin": {
6
6
  "marcos-ai-bootstrap": "src/bin/ai-bootstrap.js"
@@ -11,11 +11,12 @@
11
11
  "src/lib",
12
12
  "src/AGENTS.md",
13
13
  "src/HUMAN.md",
14
- ".claude",
15
- ".codex",
16
- ".agents",
17
- ".github/agents",
18
- ".github/skills"
14
+ "src/documents/templates",
15
+ "src/.claude",
16
+ "src/.codex",
17
+ "src/.agents",
18
+ "src/.github/agents",
19
+ "src/.github/skills"
19
20
  ],
20
21
  "engines": {
21
22
  "node": ">=16"
@@ -7,7 +7,7 @@ You are the initialize orchestrator. Reconcile this repo's agent network with th
7
7
 
8
8
  ## Phase 1 - MCP server discovery & wiring
9
9
 
10
- 1. Run the discovery -> policy-check -> install/verify flow from the "MCP Servers" section of `AGENTS-BOOTSTRAP.md` (Steps 1-4). Inspect repo docs, IAC/config, and dependency manifests to infer the platform footprint and map it to candidate servers.
10
+ 1. Run the discovery -> policy-check -> install/verify flow from the "MCP Servers" section of `AGENTS.md` (Steps 1-4). Inspect repo docs, IAC/config, and dependency manifests to infer the platform footprint and map it to candidate servers.
11
11
  2. Present the candidate servers to the user. Apply the Step 2 policy check and honour the most restrictive source. Never install a policy-blocked server. Install only servers the user explicitly confirms.
12
12
  3. Configure each approved server in `~/.codex/config.toml` (or the project-scoped `.codex`) under `[mcp_servers.<name>]`, then verify with `codex mcp list`.
13
13
  4. Wire the approved servers into the agents:
@@ -11,7 +11,7 @@ You are the infra agent. You modify infrastructure as code only.
11
11
  - Never commit to main. Always work on the branch specified in the task.
12
12
  - Never run manual CLI commands (az, aws, gcloud, kubectl) against shared or production environments.
13
13
  - All changes must be made in IAC files and applied through the deployment pipeline.
14
- - Use the discovered, policy-approved MCP servers that match the platform a task touches (e.g. `azure` for Azure/IAC, `cloudflare` for Workers/DNS/edge) plus any read-only docs server for reference material, whenever they are available. See the MCP Servers section for the discovery and policy-check flow.
14
+ - Use the discovered, policy-approved MCP servers that match the platform a task touches (e.g. `azure` for Azure/IAC, `cloudflare` for Workers/DNS/edge) plus any read-only docs server for reference material, whenever they are available. See the MCP Servers section of `AGENTS.md` for the discovery and policy-check flow.
15
15
  - Validate IAC (e.g. az bicep build) before declaring done.
16
16
  - Delegate documentation updates to the docs agent.
17
17
  - Do not change application code — that belongs to the code agent.
@@ -9,7 +9,13 @@ You are the planner. You run Stage 2 of the two-stage planning process.
9
9
 
10
10
  ## Your job
11
11
  Take the approved outline from Stage 1 and produce a complete implementation plan written to documents/plans/<YYYYMMDD>-<topic>.md (e.g. documents/plans/20260408-calendar.md).
12
- Before drafting the plan, check whether any discovered, policy-approved MCP servers are relevant to the task; initialize or use the relevant ones where available, and incorporate what you learn into the plan. Query the server that matches each platform the plan touches (e.g. `azure` for Azure/IAC work, `cloudflare` for Cloudflare Workers/DNS/edge work) and fold its findings into the plan. See the MCP Servers section for the discovery and policy-check flow.
12
+ Before drafting the plan, check whether any discovered, policy-approved MCP servers are relevant to the task; initialize or use the relevant ones where available, and incorporate what you learn into the plan. Query the server that matches each platform the plan touches (e.g. `azure` for Azure/IAC work, `cloudflare` for Cloudflare Workers/DNS/edge work) and fold its findings into the plan. See the MCP Servers section of `AGENTS.md` for the discovery and policy-check flow.
13
+
14
+ ## Plan template
15
+ Before drafting, read `documents/templates/plan-template.md` and follow its
16
+ section structure exactly (title, metadata block, Goal, Constraints +
17
+ Cross-references, Phases, Open questions, Risks). If the template is missing
18
+ from the target repo, fall back to the "Plan structure" section below.
13
19
 
14
20
  ## File naming
15
21
  - Name the plan file `<YYYYMMDD>-<topic>.md` using today's date with no separators in the date, e.g. `20260408-calendar.md`.
@@ -15,6 +15,7 @@ You are the planner-discovery agent. You run Stage 1 of the two-stage planning p
15
15
  - High-level phases (name + one-sentence objective each)
16
16
  - Open questions still needing user input
17
17
  - Proposed plan filename in the form `<YYYYMMDD>-<topic>.md` (e.g. `20260408-calendar.md`) for the planner agent to use.
18
+ For reference, the final plan will follow the structure in `documents/templates/plan-template.md`.
18
19
  4. Present the outline to the user and explicitly ask for approval before Stage 2 begins.
19
20
 
20
21
  ## Rules
@@ -7,7 +7,7 @@ You are the initialize orchestrator. Reconcile this repo's agent network with th
7
7
 
8
8
  ## Phase 1 — MCP server discovery & wiring
9
9
 
10
- 1. Run the discovery → policy-check → install/verify flow from the "MCP Servers" section of `AGENTS-BOOTSTRAP.md` (Steps 1–4). Inspect repo docs, IAC/config, and dependency manifests to infer the platform footprint and map it to candidate servers.
10
+ 1. Run the discovery → policy-check → install/verify flow from the "MCP Servers" section of `AGENTS.md` (Steps 1–4). Inspect repo docs, IAC/config, and dependency manifests to infer the platform footprint and map it to candidate servers.
11
11
  2. Present the candidate servers to the user. Apply the Step 2 policy check and honour the most restrictive source. Never install a policy-blocked server. Install only servers the user explicitly confirms.
12
12
  3. Install each approved server with `claude mcp add <name> -- <command...>` and verify with `claude mcp list`.
13
13
  4. Wire the approved servers into the agents:
@@ -10,7 +10,7 @@ You are the infra agent. You modify infrastructure as code only.
10
10
  - Never commit to main. Always work on the branch specified in the task.
11
11
  - Never run manual CLI commands (az, aws, gcloud, kubectl) against shared or production environments.
12
12
  - All changes must be made in IAC files and applied through the deployment pipeline.
13
- - Use the discovered, policy-approved MCP servers that match the platform a task touches (e.g. `azure` for Azure/IAC, `cloudflare` for Workers/DNS/edge) plus any read-only docs server for reference material, whenever they are available. See the MCP Servers section for the discovery and policy-check flow.
13
+ - Use the discovered, policy-approved MCP servers that match the platform a task touches (e.g. `azure` for Azure/IAC, `cloudflare` for Workers/DNS/edge) plus any read-only docs server for reference material, whenever they are available. See the MCP Servers section of `AGENTS.md` for the discovery and policy-check flow.
14
14
  - Validate IAC (e.g. az bicep build) before declaring done.
15
15
  - Delegate documentation updates to the docs agent.
16
16
  - Do not change application code — that belongs to the code agent.
@@ -8,7 +8,13 @@ You are the planner. You run Stage 2 of the two-stage planning process.
8
8
 
9
9
  ## Your job
10
10
  Take the approved outline from Stage 1 and produce a complete implementation plan written to documents/plans/<YYYYMMDD>-<topic>.md (e.g. documents/plans/20260408-calendar.md).
11
- Before drafting the plan, check whether any discovered, policy-approved MCP servers are relevant to the task; initialize or use the relevant ones where available, and incorporate what you learn into the plan. Query the server that matches each platform the plan touches (e.g. `azure` for Azure/IAC work, `cloudflare` for Cloudflare Workers/DNS/edge work) and fold its findings into the plan. See the MCP Servers section for the discovery and policy-check flow.
11
+ Before drafting the plan, check whether any discovered, policy-approved MCP servers are relevant to the task; initialize or use the relevant ones where available, and incorporate what you learn into the plan. Query the server that matches each platform the plan touches (e.g. `azure` for Azure/IAC work, `cloudflare` for Cloudflare Workers/DNS/edge work) and fold its findings into the plan. See the MCP Servers section of `AGENTS.md` for the discovery and policy-check flow.
12
+
13
+ ## Plan template
14
+ Before drafting, read `documents/templates/plan-template.md` and follow its
15
+ section structure exactly (title, metadata block, Goal, Constraints +
16
+ Cross-references, Phases, Open questions, Risks). If the template is missing
17
+ from the target repo, fall back to the "Plan structure" section below.
12
18
 
13
19
  ## File naming
14
20
  - Name the plan file `<YYYYMMDD>-<topic>.md` using today's date with no separators in the date, e.g. `20260408-calendar.md`.
@@ -14,6 +14,7 @@ You are the planner-discovery agent. You run Stage 1 of the two-stage planning p
14
14
  - High-level phases (name + one-sentence objective each)
15
15
  - Open questions still needing user input
16
16
  - Proposed plan filename in the form `<YYYYMMDD>-<topic>.md` (e.g. `20260408-calendar.md`) for the planner agent to use.
17
+ For reference, the final plan will follow the structure in `documents/templates/plan-template.md`.
17
18
  4. Present the outline to the user and explicitly ask for approval before Stage 2 begins.
18
19
 
19
20
  ## Rules
@@ -11,7 +11,7 @@ You are the infra-copilot agent. You modify infrastructure as code only.
11
11
  - Never commit to main. Always work on the branch specified in the task.
12
12
  - Never run manual CLI commands (az, aws, gcloud, kubectl) against shared or production environments.
13
13
  - All changes must be made in IAC files and applied through the deployment pipeline.
14
- - Use the discovered, policy-approved MCP servers that match the platform a task touches (e.g. `azure` for Azure/IAC, `cloudflare` for Workers/DNS/edge) plus any read-only docs server for reference material, whenever they are available. See the MCP Servers section for the discovery and policy-check flow.
14
+ - Use the discovered, policy-approved MCP servers that match the platform a task touches (e.g. `azure` for Azure/IAC, `cloudflare` for Workers/DNS/edge) plus any read-only docs server for reference material, whenever they are available. See the MCP Servers section of `AGENTS.md` for the discovery and policy-check flow.
15
15
  - Validate IAC (e.g. az bicep build) before declaring done.
16
16
  - Delegate documentation updates to the docs-copilot agent.
17
17
  - Do not change application code — that belongs to the code-copilot agent.
@@ -9,7 +9,13 @@ You are the planner-copilot agent. You run Stage 2 of the two-stage planning pro
9
9
 
10
10
  ## Your job
11
11
  Take the approved outline from Stage 1 and produce a complete implementation plan written to documents/plans/<YYYYMMDD>-<topic>.md (e.g. documents/plans/20260408-calendar.md).
12
- Before drafting the plan, check whether any discovered, policy-approved MCP servers are relevant to the task; initialize or use the relevant ones where available, and incorporate what you learn into the plan. Query the server that matches each platform the plan touches (e.g. `azure` for Azure/IAC work, `cloudflare` for Cloudflare Workers/DNS/edge work) and fold its findings into the plan. See the MCP Servers section for the discovery and policy-check flow.
12
+ Before drafting the plan, check whether any discovered, policy-approved MCP servers are relevant to the task; initialize or use the relevant ones where available, and incorporate what you learn into the plan. Query the server that matches each platform the plan touches (e.g. `azure` for Azure/IAC work, `cloudflare` for Cloudflare Workers/DNS/edge work) and fold its findings into the plan. See the MCP Servers section of `AGENTS.md` for the discovery and policy-check flow.
13
+
14
+ ## Plan template
15
+ Before drafting, read `documents/templates/plan-template.md` and follow its
16
+ section structure exactly (title, metadata block, Goal, Constraints +
17
+ Cross-references, Phases, Open questions, Risks). If the template is missing
18
+ from the target repo, fall back to the "Plan structure" section below.
13
19
 
14
20
  ## File naming
15
21
  - Name the plan file `<YYYYMMDD>-<topic>.md` using today's date with no separators in the date, e.g. `20260408-calendar.md`.
@@ -15,6 +15,7 @@ You are the planner-discovery-copilot agent. You run Stage 1 of the two-stage pl
15
15
  - High-level phases (name + one-sentence objective each)
16
16
  - Open questions still needing user input
17
17
  - Proposed plan filename in the form `<YYYYMMDD>-<topic>.md` (e.g. `20260408-calendar.md`) for the planner-copilot agent to use.
18
+ For reference, the final plan will follow the structure in `documents/templates/plan-template.md`.
18
19
  4. Present the outline to the user and explicitly ask for approval before Stage 2 begins.
19
20
 
20
21
  ## Rules
@@ -7,7 +7,7 @@ You are the initialize orchestrator. Reconcile this repo's agent network with th
7
7
 
8
8
  ## Phase 1 — MCP server discovery & wiring
9
9
 
10
- 1. Run the discovery → policy-check → install/verify flow from the "MCP Servers" section of `AGENTS-BOOTSTRAP.md` (Steps 1–4). Inspect repo docs, IAC/config, and dependency manifests to infer the platform footprint and map it to candidate servers.
10
+ 1. Run the discovery → policy-check → install/verify flow from the "MCP Servers" section of `AGENTS.md` (Steps 1–4). Inspect repo docs, IAC/config, and dependency manifests to infer the platform footprint and map it to candidate servers.
11
11
  2. Present the candidate servers to the user. Apply the Step 2 policy check and honour the most restrictive source. Never install a policy-blocked server. Install only servers the user explicitly confirms.
12
12
  3. Configure each approved server in `~/.copilot/mcp-config.json` (or the project-scoped equivalent) under `mcpServers`, then verify with `/mcp`.
13
13
  4. Wire the approved servers into the agents:
package/src/AGENTS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This file is tool-agnostic. Drop it into any repository and reference it from your AI tool's config entry-point (e.g. `CLAUDE.md` via `@AGENTS.md`, `.github/copilot-instructions.md`, `.opencode/instructions.md`) to immediately apply these rules and bootstrap the agent network.
4
4
 
5
- For tool-specific agent materialisation instructions (file templates, model IDs, config paths), see `AGENTS-BOOTSTRAP.md`.
5
+ The agent and skill files for your specific tool are materialised into the repository by the `marcos-ai-bootstrap` CLI (under `.claude/`, `.codex/`, `.github/`, or `.agents/`). This file is the tool-agnostic source of truth for the rules, the MCP server flow, and the canonical agent/skill roles.
6
6
 
7
7
  ---
8
8
 
@@ -11,8 +11,83 @@ For tool-specific agent materialisation instructions (file templates, model IDs,
11
11
  At the start of every session:
12
12
  1. Confirm this file has been read.
13
13
  2. Identify which tool you are running under.
14
- 3. Follow the bootstrap instructions in `AGENTS-BOOTSTRAP.md` for that tool to verify the agent network **and the skill network** are fully materialised. Create any missing agents or skills before starting any other work.
15
- 4. Discover, policy-check, and configure the applicable **MCP servers** as described in the MCP Servers section of `AGENTS-BOOTSTRAP.md`. Use MCP servers wherever applicable — prefer them for authoritative, live platform access (e.g. Azure, Cloudflare) over guessing or stale knowledge, subject to organization policy.
14
+ 3. Verify the agent network **and the skill network** for that tool are present the materialised agent/skill files under `.claude/`, `.codex/`, `.github/`, or `.agents/`. If any are missing, re-run the `marcos-ai-bootstrap` CLI for your tool to restore them before starting any other work.
15
+ 4. Discover, policy-check, and configure the applicable **MCP servers** as described in the [MCP Servers](#mcp-servers) section below. Use MCP servers wherever applicable — prefer them for authoritative, live platform access (e.g. Azure, Cloudflare) over guessing or stale knowledge, subject to organization policy.
16
+
17
+ ---
18
+
19
+ ## MCP Servers
20
+
21
+ MCP servers give the infra and planner agents authoritative, live access to the platforms a project actually uses. Rather than hardcoding a fixed list, the bootstrap **discovers** which servers are applicable to the current repository and **respects organization policy** on what may be installed. At the start of every session, after confirming the agent network is present, run the discovery → policy-check → install/verify flow below.
22
+
23
+ ### Step 1 — Discover applicable servers
24
+
25
+ Infer the project's platform footprint before installing anything. Inspect, in order:
26
+
27
+ 1. **Repository docs** — root `README.md`, service-level `README.md` files, `CLAUDE.md` / `AGENTS.md`, `docs/`, and `documents/plans/`. Look for named platforms and tooling (e.g. Azure, Cloudflare, AWS, GCP, GitHub, PostgreSQL, Stripe, Sentry).
28
+ 2. **IAC and config** — `*.bicep`, `*.tf`, `wrangler.toml`, `docker-compose*.yml`, pipeline YAML under `.github/workflows/` or `.azure/`, and environment-variable tables. These reveal the deploy targets an infra agent will touch.
29
+ 3. **Dependency manifests** — `package.json`, provider SDKs, and CLIs already vendored in the repo.
30
+
31
+ Map the footprint to candidate MCP servers. Common mappings (extend as the ecosystem grows):
32
+
33
+ | Signal in repo | Candidate MCP server | Package / endpoint |
34
+ |---|---|---|
35
+ | Azure services, Bicep, `az`, `DefaultAzureCredential` | `azure` | `npx -y @azure/mcp@latest server start` |
36
+ | Azure/Microsoft docs reference need | `microsoft-learn` (read-only docs) | hosted — `https://learn.microsoft.com/api/mcp` |
37
+ | Cloudflare Workers, `wrangler.toml`, DNS/edge | `cloudflare` | `npx -y mcp-remote https://docs.mcp.cloudflare.com/sse` (docs); other Cloudflare servers use `https://<name>.mcp.cloudflare.com/sse` |
38
+ | GitHub-centric workflows / PR automation | `github` | `npx -y @modelcontextprotocol/server-github` |
39
+
40
+ If the repo shows no clear signal for a platform, **do not install its server** — surface it as a suggestion to the user instead of adding it silently.
41
+
42
+ ### Step 2 — Check organization policy
43
+
44
+ Before installing any discovered server, confirm it is permitted. Check, in order, and honour the most restrictive:
45
+
46
+ 1. **Repo-scoped allowlist** — an `mcp-allowlist` / `mcp-policy` entry in `AGENTS.md`, a `.mcp-policy.json` / `.mcp-allowed.json` file at the repo root, or an `mcp` section in the tool's project config.
47
+ 2. **Tool/user-scoped policy** — the tool's own managed-settings or enterprise policy (e.g. Claude Code managed settings, Copilot org policy, Codex config). If a tool exposes an allowed/blocked MCP list, treat it as authoritative.
48
+ 3. **Explicit user confirmation** — if no policy source exists, list the servers you intend to install and ask the user to confirm before adding any that require network access or credentials.
49
+
50
+ Never install a server that policy blocks. If a needed server is blocked, note the limitation to the user and continue without it.
51
+
52
+ ### Step 3 — Which agents use them
53
+
54
+ - **infra agents** (`infra-claude`, `infra-copilot`, `infra-codex`) — use the discovered, policy-approved servers matching the platform a task touches (e.g. `azure` for Bicep, `cloudflare` for Workers/DNS), alongside any read-only docs server for reference material.
55
+ - **planner agents** (`planner-claude`, `planner-copilot`, `planner-codex`) — check which approved servers are relevant to the plan, query them, and fold the findings into the plan.
56
+
57
+ ### Step 4 — Verify and install per tool
58
+
59
+ Install only servers that passed Steps 1–2. Substitute the discovered server name/package for the `<name>` / `<package>` placeholders.
60
+
61
+ **Claude Code** — check with `claude mcp list`, then:
62
+
63
+ ```powershell
64
+ claude mcp add <name> -- <command...>
65
+ # e.g. claude mcp add azure -- npx -y @azure/mcp@latest server start
66
+ ```
67
+
68
+ **GitHub Copilot CLI** — configure in `~/.copilot/mcp-config.json` (or project-scoped equivalent), verify with `/mcp`:
69
+
70
+ ```json
71
+ {
72
+ "mcpServers": {
73
+ "<name>": { "command": "npx", "args": ["-y", "<package>", "..."] }
74
+ }
75
+ }
76
+ ```
77
+
78
+ **Codex** — configure in `~/.codex/config.toml` (or project-scoped `.codex`), verify with `codex mcp list`:
79
+
80
+ ```toml
81
+ [mcp_servers.<name>]
82
+ command = "npx"
83
+ args = ["-y", "<package>", "..."]
84
+ ```
85
+
86
+ ### Notes
87
+
88
+ - The Azure MCP server authenticates with your existing Azure credential chain (Azure CLI login / managed identity / `DefaultAzureCredential`). Ensure you are signed in before relying on it.
89
+ - Cloudflare remote servers prompt for OAuth authorization on first connect via `mcp-remote`.
90
+ - Never let an MCP server perform manual mutating operations against shared or production environments — the infra guardrails (all changes go through IAC and pipelines) still apply. Use these servers for reference, inspection, and planning.
16
91
 
17
92
  ---
18
93
 
@@ -29,7 +104,7 @@ At the start of every session:
29
104
 
30
105
  ## Skills
31
106
 
32
- Skills are reusable, user-invocable orchestration workflows (slash commands) that drive the agent network. They are tool-specific in how they are materialised — see `AGENTS-BOOTSTRAP.md` for file templates, paths, and discovery rules for your tool.
107
+ Skills are reusable, user-invocable orchestration workflows (slash commands) that drive the agent network. The `marcos-ai-bootstrap` CLI materialises them for your tool (e.g. `.claude/skills/`, `.github/skills/`, `.agents/skills/`).
33
108
 
34
109
  Canonical skills:
35
110
 
@@ -97,7 +172,7 @@ Canonical skills:
97
172
 
98
173
  ## Agent Network
99
174
 
100
- These are the canonical agent roles. They are defined here without tool-specific syntax. See `AGENTS-BOOTSTRAP.md` for how to materialise them in your specific tool.
175
+ These are the canonical agent roles. They are defined here without tool-specific syntax. The `marcos-ai-bootstrap` CLI materialises them for your specific tool.
101
176
 
102
177
  Model tiers used below:
103
178
  - **High** — most capable; use for planning and complex cross-file reasoning (e.g. Opus-class)
@@ -0,0 +1,47 @@
1
+ # <Plan title>
2
+
3
+ **Date:** <YYYY-MM-DD>
4
+ **Branch:** <type/YYYYMMDD-topic-slug>
5
+ **Mode:** <planning mode / stage>
6
+
7
+ ## 1. Goal
8
+
9
+ <!-- One paragraph describing what success looks like when this plan is complete. -->
10
+
11
+ ## 2. Constraints
12
+
13
+ <!-- Bullet list of guardrails, dependencies, deadlines, and the feature branch name. Never commit to main. -->
14
+ - <constraint>
15
+
16
+ ### Cross-references
17
+
18
+ <!-- Link related notes under agents/ and existing plans under documents/plans/. -->
19
+ - <path or link>
20
+
21
+ ## 3. Phases
22
+
23
+ <!-- Ordered phases. Duplicate the block below per phase. Name the specific -copilot/-claude/-codex custom agent. -->
24
+
25
+ ### Phase 1 — <title>
26
+
27
+ **Objective:** <what this phase achieves>
28
+
29
+ **Agent:** <docs-copilot | code-copilot | test-runner-copilot | ...>
30
+
31
+ **Files to change:**
32
+ - <path>
33
+
34
+ **Design:** <!-- optional: fenced code snippets for load-bearing changes -->
35
+
36
+ **Acceptance criteria:**
37
+ - <verifiable outcome>
38
+
39
+ ## Open questions
40
+
41
+ <!-- Anything still needing user input before implementation. -->
42
+ - <question>
43
+
44
+ ## Risks
45
+
46
+ <!-- Known unknowns or risky assumptions. -->
47
+ - <risk>
@@ -5,12 +5,25 @@ const path = require("path");
5
5
 
6
6
  const PACKAGE_ROOT = path.resolve(__dirname, "..", "..");
7
7
 
8
- // Canonical, shipped source-of-truth core files live under src/ so they stay
9
- // separate from this repo's own self-hosting AGENTS.md/HUMAN.md at the root.
10
- // Each entry maps the package-relative source to the target-relative destination.
8
+ // Everything the CLI materialises into a target repo ships from a single
9
+ // source-of-truth directory: src/. The destination path is the source path with
10
+ // the leading "src/" stripped (e.g. src/AGENTS.md -> AGENTS.md, src/.github/
11
+ // agents/foo -> .github/agents/foo). This repo's own root-level self-hosting
12
+ // copies (AGENTS.md, .claude/, .github/agents, ...) are generated from these
13
+ // src/ sources and are not themselves published to npm.
14
+ const SRC_DIR = "src";
15
+
16
+ const toPosix = (p) => p.split(path.sep).join("/");
17
+
18
+ // Canonical, shipped source-of-truth core files. Each entry maps the
19
+ // package-relative source (under src/) to the target-relative destination.
11
20
  const CORE_FILES = [
12
21
  { src: "src/AGENTS.md", dest: "AGENTS.md" },
13
22
  { src: "src/HUMAN.md", dest: "HUMAN.md" },
23
+ {
24
+ src: "src/documents/templates/plan-template.md",
25
+ dest: "documents/templates/plan-template.md",
26
+ },
14
27
  ];
15
28
 
16
29
  const TOOLS = {
@@ -123,10 +136,14 @@ function materialize(tools, opts = {}) {
123
136
  const tool = TOOLS[toolName];
124
137
  if (!tool) continue;
125
138
  for (const dir of tool.dirs) {
126
- const files = listFiles(path.join(PACKAGE_ROOT, dir));
139
+ // Sources live under src/<dir>; the destination drops the src/ prefix.
140
+ const srcDir = path.join(PACKAGE_ROOT, SRC_DIR, dir);
141
+ const files = listFiles(srcDir);
127
142
  for (const abs of files) {
128
- const relPath = path.relative(PACKAGE_ROOT, abs);
129
- results.push(copyOne(relPath, relPath, destRoot, { force, dryRun }));
143
+ const rel = toPosix(path.relative(srcDir, abs));
144
+ const srcRel = path.posix.join(SRC_DIR, toPosix(dir), rel);
145
+ const destRel = path.posix.join(toPosix(dir), rel);
146
+ results.push(copyOne(srcRel, destRel, destRoot, { force, dryRun }));
130
147
  }
131
148
  }
132
149
  if (tool.entry) {
File without changes
File without changes
File without changes
File without changes
File without changes