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.
- package/README.md +24 -25
- package/package.json +7 -6
- package/{.claude → src/.claude}/agents/planner-claude.md +6 -0
- package/{.claude → src/.claude}/agents/planner-discovery-claude.md +1 -0
- package/{.codex → src/.codex}/agents/planner-codex.toml +6 -0
- package/{.codex → src/.codex}/agents/planner-discovery-codex.toml +1 -0
- package/{.github → src/.github}/agents/planner-copilot.agent.md +6 -0
- package/{.github → src/.github}/agents/planner-discovery-copilot.agent.md +1 -0
- package/src/documents/templates/plan-template.md +47 -0
- package/src/lib/materialize.js +23 -6
- /package/{.agents → src/.agents}/skills/implement/SKILL.md +0 -0
- /package/{.agents → src/.agents}/skills/initialize/SKILL.md +0 -0
- /package/{.agents → src/.agents}/skills/planner/SKILL.md +0 -0
- /package/{.agents → src/.agents}/skills/watch-ci/SKILL.md +0 -0
- /package/{.claude → src/.claude}/agents/code-claude.md +0 -0
- /package/{.claude → src/.claude}/agents/docs-claude.md +0 -0
- /package/{.claude → src/.claude}/agents/explorer-claude.md +0 -0
- /package/{.claude → src/.claude}/agents/infra-claude.md +0 -0
- /package/{.claude → src/.claude}/agents/investigate-claude.md +0 -0
- /package/{.claude → src/.claude}/agents/log-reader-claude.md +0 -0
- /package/{.claude → src/.claude}/agents/test-runner-claude.md +0 -0
- /package/{.claude → src/.claude}/agents/triage-claude.md +0 -0
- /package/{.claude → src/.claude}/skills/implement/SKILL.md +0 -0
- /package/{.claude → src/.claude}/skills/initialize/SKILL.md +0 -0
- /package/{.claude → src/.claude}/skills/planner/SKILL.md +0 -0
- /package/{.claude → src/.claude}/skills/watch-ci/SKILL.md +0 -0
- /package/{.codex → src/.codex}/agents/code-codex.toml +0 -0
- /package/{.codex → src/.codex}/agents/docs-codex.toml +0 -0
- /package/{.codex → src/.codex}/agents/explorer-codex.toml +0 -0
- /package/{.codex → src/.codex}/agents/infra-codex.toml +0 -0
- /package/{.codex → src/.codex}/agents/investigate-codex.toml +0 -0
- /package/{.codex → src/.codex}/agents/log-reader-codex.toml +0 -0
- /package/{.codex → src/.codex}/agents/test-runner-codex.toml +0 -0
- /package/{.codex → src/.codex}/agents/triage-codex.toml +0 -0
- /package/{.github → src/.github}/agents/code-copilot.agent.md +0 -0
- /package/{.github → src/.github}/agents/docs-copilot.agent.md +0 -0
- /package/{.github → src/.github}/agents/explorer-copilot.agent.md +0 -0
- /package/{.github → src/.github}/agents/infra-copilot.agent.md +0 -0
- /package/{.github → src/.github}/agents/investigate-copilot.agent.md +0 -0
- /package/{.github → src/.github}/agents/log-reader-copilot.agent.md +0 -0
- /package/{.github → src/.github}/agents/test-runner-copilot.agent.md +0 -0
- /package/{.github → src/.github}/agents/triage-copilot.agent.md +0 -0
- /package/{.github → src/.github}/skills/implement/SKILL.md +0 -0
- /package/{.github → src/.github}/skills/initialize/SKILL.md +0 -0
- /package/{.github → src/.github}/skills/planner/SKILL.md +0 -0
- /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
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
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
|
|
82
|
-
3. Run `node src/bin/ai-bootstrap.js --all --
|
|
83
|
-
|
|
84
|
-
|
|
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
|
+
"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
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
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>
|
package/src/lib/materialize.js
CHANGED
|
@@ -5,12 +5,25 @@ const path = require("path");
|
|
|
5
5
|
|
|
6
6
|
const PACKAGE_ROOT = path.resolve(__dirname, "..", "..");
|
|
7
7
|
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
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
|
-
|
|
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
|
|
129
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|