marcos-ai-bootstrap 0.1.3 → 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 (46) hide show
  1. package/README.md +24 -25
  2. package/package.json +7 -6
  3. package/{.claude → src/.claude}/agents/planner-claude.md +6 -0
  4. package/{.claude → src/.claude}/agents/planner-discovery-claude.md +1 -0
  5. package/{.codex → src/.codex}/agents/planner-codex.toml +6 -0
  6. package/{.codex → src/.codex}/agents/planner-discovery-codex.toml +1 -0
  7. package/{.github → src/.github}/agents/planner-copilot.agent.md +6 -0
  8. package/{.github → src/.github}/agents/planner-discovery-copilot.agent.md +1 -0
  9. package/src/documents/templates/plan-template.md +47 -0
  10. package/src/lib/materialize.js +23 -6
  11. /package/{.agents → src/.agents}/skills/implement/SKILL.md +0 -0
  12. /package/{.agents → src/.agents}/skills/initialize/SKILL.md +0 -0
  13. /package/{.agents → src/.agents}/skills/planner/SKILL.md +0 -0
  14. /package/{.agents → src/.agents}/skills/watch-ci/SKILL.md +0 -0
  15. /package/{.claude → src/.claude}/agents/code-claude.md +0 -0
  16. /package/{.claude → src/.claude}/agents/docs-claude.md +0 -0
  17. /package/{.claude → src/.claude}/agents/explorer-claude.md +0 -0
  18. /package/{.claude → src/.claude}/agents/infra-claude.md +0 -0
  19. /package/{.claude → src/.claude}/agents/investigate-claude.md +0 -0
  20. /package/{.claude → src/.claude}/agents/log-reader-claude.md +0 -0
  21. /package/{.claude → src/.claude}/agents/test-runner-claude.md +0 -0
  22. /package/{.claude → src/.claude}/agents/triage-claude.md +0 -0
  23. /package/{.claude → src/.claude}/skills/implement/SKILL.md +0 -0
  24. /package/{.claude → src/.claude}/skills/initialize/SKILL.md +0 -0
  25. /package/{.claude → src/.claude}/skills/planner/SKILL.md +0 -0
  26. /package/{.claude → src/.claude}/skills/watch-ci/SKILL.md +0 -0
  27. /package/{.codex → src/.codex}/agents/code-codex.toml +0 -0
  28. /package/{.codex → src/.codex}/agents/docs-codex.toml +0 -0
  29. /package/{.codex → src/.codex}/agents/explorer-codex.toml +0 -0
  30. /package/{.codex → src/.codex}/agents/infra-codex.toml +0 -0
  31. /package/{.codex → src/.codex}/agents/investigate-codex.toml +0 -0
  32. /package/{.codex → src/.codex}/agents/log-reader-codex.toml +0 -0
  33. /package/{.codex → src/.codex}/agents/test-runner-codex.toml +0 -0
  34. /package/{.codex → src/.codex}/agents/triage-codex.toml +0 -0
  35. /package/{.github → src/.github}/agents/code-copilot.agent.md +0 -0
  36. /package/{.github → src/.github}/agents/docs-copilot.agent.md +0 -0
  37. /package/{.github → src/.github}/agents/explorer-copilot.agent.md +0 -0
  38. /package/{.github → src/.github}/agents/infra-copilot.agent.md +0 -0
  39. /package/{.github → src/.github}/agents/investigate-copilot.agent.md +0 -0
  40. /package/{.github → src/.github}/agents/log-reader-copilot.agent.md +0 -0
  41. /package/{.github → src/.github}/agents/test-runner-copilot.agent.md +0 -0
  42. /package/{.github → src/.github}/agents/triage-copilot.agent.md +0 -0
  43. /package/{.github → src/.github}/skills/implement/SKILL.md +0 -0
  44. /package/{.github → src/.github}/skills/initialize/SKILL.md +0 -0
  45. /package/{.github → src/.github}/skills/planner/SKILL.md +0 -0
  46. /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,33 +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 and model tier mappings. The MCP server
69
- discovery/policy flow now lives in the **MCP Servers** section of `AGENTS.md` (which
70
- is shipped); this file references it. **Not published to npm and not copied into target
71
- repos** — the materialised agent/skill files under `.claude/`, `.codex/`, `.github/`,
72
- `.agents/` are the shipped source of truth.
73
- - `src/extract-agents.py` — maintainer tool: regenerates the `.claude/`, `.codex/`,
74
- `.github/`, `.agents/` template files at the repo root from `src/AGENTS-BOOTSTRAP.md`
75
- after editing it. Run this after changing `src/AGENTS-BOOTSTRAP.md`, then commit the
76
- 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`.
77
76
 
78
77
  ## Maintaining this repo
79
78
 
80
79
  1. Edit `src/AGENTS-BOOTSTRAP.md` (the source of truth for agent/skill prompt bodies).
81
- 2. Run `python src/extract-agents.py` to regenerate the materialised template files.
82
- 3. Run `node src/bin/ai-bootstrap.js --all --dry-run --dest <scratch-dir>` to sanity-check
83
- the CLI still packages everything correctly.
84
- 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.
85
84
 
86
85
  ## Releasing to npm
87
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marcos-ai-bootstrap",
3
- "version": "0.1.3",
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"
@@ -11,6 +11,12 @@ You are the planner. You run Stage 2 of the two-stage planning process.
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
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
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.
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`.
16
22
  - Use a short, kebab-case topic slug.
@@ -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
@@ -10,6 +10,12 @@ You are the planner. You run Stage 2 of the two-stage planning process.
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
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
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.
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`.
15
21
  - Use a short, kebab-case topic slug.
@@ -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,6 +11,12 @@ You are the planner-copilot agent. You run Stage 2 of the two-stage planning pro
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
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
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.
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`.
16
22
  - Use a short, kebab-case topic slug.
@@ -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
@@ -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
File without changes
File without changes