marcos-ai-bootstrap 0.1.0 → 0.1.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.
Files changed (49) hide show
  1. package/.agents/skills/implement/SKILL.md +48 -48
  2. package/.agents/skills/initialize/SKILL.md +50 -50
  3. package/.agents/skills/planner/SKILL.md +30 -30
  4. package/.agents/skills/watch-ci/SKILL.md +49 -49
  5. package/.claude/agents/code-claude.md +18 -18
  6. package/.claude/agents/docs-claude.md +14 -14
  7. package/.claude/agents/explorer-claude.md +14 -14
  8. package/.claude/agents/infra-claude.md +17 -17
  9. package/.claude/agents/investigate-claude.md +25 -25
  10. package/.claude/agents/log-reader-claude.md +21 -21
  11. package/.claude/agents/planner-claude.md +37 -37
  12. package/.claude/agents/planner-discovery-claude.md +24 -24
  13. package/.claude/agents/test-runner-claude.md +16 -16
  14. package/.claude/agents/triage-claude.md +46 -46
  15. package/.claude/skills/implement/SKILL.md +48 -48
  16. package/.claude/skills/initialize/SKILL.md +50 -50
  17. package/.claude/skills/planner/SKILL.md +30 -30
  18. package/.claude/skills/watch-ci/SKILL.md +49 -49
  19. package/.codex/agents/code-codex.toml +19 -19
  20. package/.codex/agents/docs-codex.toml +16 -16
  21. package/.codex/agents/explorer-codex.toml +15 -15
  22. package/.codex/agents/infra-codex.toml +18 -18
  23. package/.codex/agents/investigate-codex.toml +25 -25
  24. package/.codex/agents/log-reader-codex.toml +22 -22
  25. package/.codex/agents/planner-codex.toml +37 -37
  26. package/.codex/agents/planner-discovery-codex.toml +24 -24
  27. package/.codex/agents/test-runner-codex.toml +17 -17
  28. package/.codex/agents/triage-codex.toml +46 -46
  29. package/.github/agents/code-copilot.agent.md +18 -18
  30. package/.github/agents/docs-copilot.agent.md +14 -14
  31. package/.github/agents/explorer-copilot.agent.md +14 -14
  32. package/.github/agents/infra-copilot.agent.md +17 -17
  33. package/.github/agents/investigate-copilot.agent.md +25 -25
  34. package/.github/agents/log-reader-copilot.agent.md +21 -21
  35. package/.github/agents/planner-copilot.agent.md +37 -37
  36. package/.github/agents/planner-discovery-copilot.agent.md +24 -24
  37. package/.github/agents/test-runner-copilot.agent.md +16 -16
  38. package/.github/agents/triage-copilot.agent.md +46 -46
  39. package/.github/skills/implement/SKILL.md +44 -44
  40. package/.github/skills/initialize/SKILL.md +52 -52
  41. package/.github/skills/planner/SKILL.md +30 -30
  42. package/.github/skills/watch-ci/SKILL.md +47 -47
  43. package/LICENSE +21 -21
  44. package/README.md +116 -117
  45. package/package.json +37 -37
  46. package/src/AGENTS.md +200 -200
  47. package/src/HUMAN.md +31 -31
  48. package/src/bin/ai-bootstrap.js +115 -115
  49. package/src/lib/materialize.js +140 -140
package/src/AGENTS.md CHANGED
@@ -1,200 +1,200 @@
1
- # Agent Rules
2
-
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
-
5
- For tool-specific agent materialisation instructions (file templates, model IDs, config paths), see `AGENTS-BOOTSTRAP.md`.
6
-
7
- ---
8
-
9
- ## Bootstrap
10
-
11
- At the start of every session:
12
- 1. Confirm this file has been read.
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.
16
-
17
- ---
18
-
19
- ## Guardrails
20
-
21
- - **No agent shall commit code.** Agents modify files and write changes; the user owns committing those changes to git.
22
- - Never commit to main
23
- - Never push to main
24
- - Always work on a feature / chore / bugfix branch
25
- - Never merge a Pull Request
26
- - Never update cloud infrastructure manually — all changes must go through IAC or deployment pipelines
27
-
28
- ---
29
-
30
- ## Skills
31
-
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.
33
-
34
- Canonical skills:
35
-
36
- ### watch-ci
37
- **Purpose:** Watch a GitHub Actions workflow, auto-fix failures through the agent pipeline, and re-trigger correctly until the build is green.
38
- **Target resolution:** Accepts nothing (current-branch PR), a PR number, or a pasted PR URL, workflow-run URL, or workflow-file URL. Parses `owner/repo` from URLs and passes `--repo` to `gh` for remote targets.
39
- **Trigger-aware re-runs:** Inspects the workflow's `on:` block and classifies the trigger as auto-on-push, manual-dispatch, scheduled, or other. Re-triggers by pushing (auto-on-push), by `gh workflow run` (manual-dispatch/other), or stops with an explanation when a scheduled-only workflow cannot be forced.
40
- **Pipeline:** `log-reader` → `triage` → (`investigate` if HARD) → `code`, then commit/push on the feature branch and loop (max 5 iterations).
41
- **Guardrails:** Never pushes to `main`, never force-pushes, never `--no-verify`. For remote-repo targets it cannot edit locally, so it watches, diagnoses, and reports the fix back to the user.
42
-
43
- ### planner
44
- **Purpose:** Formalise the two-stage planning flow into a single command. Runs the `planner-discovery` agent (Stage 1: clarifying questions + outline), gates on explicit user approval, then runs the `planner` agent (Stage 2: full implementation plan written to `documents/plans/<YYYYMMDD>-<topic>.md`).
45
- **Pipeline:** `planner-discovery` → (user approval) → `planner`.
46
- **Guardrails:** Never implements or writes code. Stage 2 runs only after the user approves the Stage 1 outline. Only the `planner` agent writes to `documents/plans/`. Hands off to the `implement` skill for execution.
47
-
48
- ### implement
49
- **Purpose:** Execute an existing plan from `documents/plans/` (path passed by the user, e.g. `documents/plans/20260622-ui-bugs.md`), dispatching each phase to the agent the plan designates and using the branch the plan names.
50
- **Target resolution:** Required plan file path. Parses branch, phases, designated agent per phase, files, and acceptance criteria from the plan.
51
- **Pipeline:** For each phase in order, route to the plan's designated canonical agent (`code` / `docs` / `infra` / `test-runner` / `explorer` / etc.); verify acceptance criteria before advancing.
52
- **Guardrails:** Never commits or pushes — agents edit files, the user commits. Never works on `main` (uses the plan's branch). Honours each phase's agent designation exactly; stops on a failed phase.
53
-
54
- ### initialize
55
- **Purpose:** One-time environment reconciliation. Discovers applicable MCP servers (via the MCP Servers discovery → policy-check → install flow) and, with user approval, installs and wires them into the `infra` and `planner` agents. Discovers where plan documents actually live in the repo and, after explicit user confirmation, wires the `planner`, `implement`, and `docs` agents/skills to that location. Then verifies every agent's configured model exists in the current tool and, for any missing model, prompts the user to pick the closest available match from a dropdown and rewrites the agent files.
56
- **Pipeline:** MCP discovery → user approval → install + wire agents → plans-location discovery → user confirmation → rewrite plan-location references → model availability check → user picks replacements → rewrite agent files.
57
- **Guardrails:** Never commits or pushes. Only edits agent/skill files and MCP config — never source code. Never installs a policy-blocked or unapproved server. Never changes the plans location without explicit user confirmation. Idempotent.
58
-
59
- ---
60
-
61
- ## Delivery Rules
62
-
63
- - Write or update tests first when a change can be covered by automated tests.
64
- - For bug fixes, add a regression test before changing the implementation.
65
- - Make the smallest change that fixes the root cause — no broad refactors unless that is the explicit task.
66
- - Validate each edited slice immediately with the narrowest relevant test, lint, or build command.
67
- - Do not declare a task done if relevant tests, lint, or type checks are failing (unless the user explicitly accepts that state).
68
-
69
- ---
70
-
71
- ## Documentation Rules
72
-
73
- - Update the root `README.md` on every change.
74
- - Update the service-level `README.md` inside the affected application on relevant changes.
75
- - Update documentation last — after implementation and verification are complete.
76
- - Never leave examples, commands, file paths, or architecture descriptions stale after a change.
77
-
78
- ---
79
-
80
- ## Change Discipline
81
-
82
- - Prefer focused patches over broad refactors.
83
- - Preserve existing conventions unless the task explicitly changes them.
84
- - Do not add dependencies without a concrete need and a corresponding documentation update.
85
- - If a subdirectory contains its own `AGENTS.md`, follow the more specific file in addition to this one.
86
-
87
- ---
88
-
89
- ## Memory Location
90
-
91
- - Store task notes, handoff notes, decisions, and implementation checklists as Markdown files under `agents/`.
92
- - Name files by date and topic, e.g. `agents/2026-05-22-feature-x.md`.
93
- - Remove or update stale notes when they no longer match the codebase.
94
- - Do not commit ephemeral scratch notes — only durable decisions and handoffs.
95
-
96
- ---
97
-
98
- ## Agent Network
99
-
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.
101
-
102
- Model tiers used below:
103
- - **High** — most capable; use for planning and complex cross-file reasoning (e.g. Opus-class)
104
- - **Standard** — fast and accurate; use for code, infra, tests, orchestration (e.g. Sonnet-class)
105
- - **Fast** — lightweight; use for docs and read-only research (e.g. Haiku-class)
106
-
107
- ---
108
-
109
- ### planner
110
- **Tiers:** Standard (Stage 1) → High (Stage 2)
111
- **Purpose:** Creates structured, phased implementation plans in two gated stages. Writes the final plan to `documents/plans/`. Does not implement — requires explicit user approval between stages and before any code is written.
112
-
113
- **Stage 1 — Discovery & Outline (Standard tier)**
114
- - Ask lots of clarifying questions — be exhaustive. The goal of Stage 1 is to find out everything about what the user has asked for: scope and boundaries, expected behaviour and edge cases, inputs and outputs, affected components, constraints, dependencies, and success criteria. Do not assume — surface every ambiguity and keep asking until nothing material about the task is left unknown.
115
- - Explore the codebase and any relevant context.
116
- - Produce a concise outline: goal, high-level phases, open questions.
117
- - Stop and present the outline. Ask the user for explicit approval to proceed to Stage 2.
118
-
119
- **Stage 2 — Full Implementation Plan (High tier)**
120
- - Using the approved outline, produce a complete plan written to `documents/plans/<date>-<topic>.md`.
121
- - Plan structure: Goal, Constraints, Phases (objective / agent / files / acceptance criteria), Open questions, Risks.
122
- - Stop and present the plan. Ask the user for explicit approval before any implementation begins.
123
-
124
- **Rules:**
125
- - Never begin implementation.
126
- - Specify a branch name in the plan.
127
- - Cross-reference related notes in `agents/` or existing plans in `documents/plans/`.
128
-
129
- ### code
130
- **Tier:** Standard
131
- **Purpose:** Implements focused code changes — features, bug fixes, explicit refactors.
132
- **Rules:**
133
- - Tests first; regression test before fixing a bug.
134
- - Smallest change that satisfies the requirement. No surrounding cleanup.
135
- - Validate with the narrowest relevant test or lint command after each edit.
136
- - Do not touch documentation — hand that off to the docs agent.
137
-
138
- ### docs
139
- **Tier:** Fast
140
- **Purpose:** Updates README files and documentation only. Runs after implementation is verified.
141
- **Rules:**
142
- - Never modifies code, config, or infrastructure files.
143
- - Keep examples, commands, paths, and architecture descriptions accurate.
144
- - Prefer bullet lists and tables over prose.
145
-
146
- ### infra
147
- **Tier:** Standard
148
- **Purpose:** Modifies infrastructure as code — Bicep, Terraform, pipeline YAML, IAC config.
149
- **Rules:**
150
- - Never runs manual CLI commands against shared or production environments.
151
- - All changes go through IAC files and deployment pipelines.
152
- - Lint/validate IAC before declaring done.
153
- - Do not change application code.
154
-
155
- ### explorer
156
- **Tier:** Fast
157
- **Purpose:** Read-only codebase research — finding files, tracing call paths, locating symbols, understanding architecture.
158
- **Rules:**
159
- - No file writes, edits, or state-modifying shell commands.
160
- - Return a concise, structured report.
161
- - Run independent searches in parallel.
162
-
163
- ### test-runner
164
- **Tier:** Standard
165
- **Purpose:** Runs tests, diagnoses failures, fixes broken tests, adds regression tests.
166
- **Rules:**
167
- - Run the narrowest test first (single file / single test) before the full suite.
168
- - Fix failures with the smallest code change possible.
169
- - Write a regression test before fixing a bug if one was not provided.
170
- - Do not change production code beyond what is needed to make tests pass.
171
- - Report final pass/fail counts before declaring done.
172
-
173
- ### log-reader
174
- **Tier:** Fast
175
- **Purpose:** Stage 1 of bug fix mode. Gathers logs, error messages, and diagnostics from the environment or provided context.
176
- **Rules:**
177
- - Read-only. Collect all relevant logs, stack traces, error messages, and diagnostic output.
178
- - Synthesize findings into a concise diagnostic report.
179
- - Pass all findings and context to the triage agent for classification.
180
- - Do not speculate on fixes — focus on accurate data collection and presentation.
181
-
182
- ### triage
183
- **Tier:** Standard
184
- **Purpose:** Stage between log-reader and investigate in CI fix mode. Classifies the failure as easy (fix is immediately obvious and targeted) or hard (requires deeper investigation).
185
- **Rules:**
186
- - Receive the diagnostic report from log-reader.
187
- - Explore the codebase as needed to understand the failing code.
188
- - Output EASY with a specific file/line fix suggestion, or HARD with starting points for the investigate agent.
189
- - Never implement the fix.
190
- - Classify as EASY only when confident the fix is a single targeted change.
191
-
192
- ### investigate
193
- **Tier:** High
194
- **Purpose:** Stage 2 of bug fix mode. Analyzes diagnostics from log-reader and pinpoints root cause.
195
- **Rules:**
196
- - Receive and analyze the diagnostic report from log-reader.
197
- - Explore the codebase to understand the affected systems and call paths.
198
- - Produce a concise root-cause analysis and recommended fix strategy.
199
- - Stop before implementation — hand off to the code agent to apply the fix.
200
- - Do not implement the fix yourself.
1
+ # Agent Rules
2
+
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
+
5
+ For tool-specific agent materialisation instructions (file templates, model IDs, config paths), see `AGENTS-BOOTSTRAP.md`.
6
+
7
+ ---
8
+
9
+ ## Bootstrap
10
+
11
+ At the start of every session:
12
+ 1. Confirm this file has been read.
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.
16
+
17
+ ---
18
+
19
+ ## Guardrails
20
+
21
+ - **No agent shall commit code.** Agents modify files and write changes; the user owns committing those changes to git.
22
+ - Never commit to main
23
+ - Never push to main
24
+ - Always work on a feature / chore / bugfix branch
25
+ - Never merge a Pull Request
26
+ - Never update cloud infrastructure manually — all changes must go through IAC or deployment pipelines
27
+
28
+ ---
29
+
30
+ ## Skills
31
+
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.
33
+
34
+ Canonical skills:
35
+
36
+ ### watch-ci
37
+ **Purpose:** Watch a GitHub Actions workflow, auto-fix failures through the agent pipeline, and re-trigger correctly until the build is green.
38
+ **Target resolution:** Accepts nothing (current-branch PR), a PR number, or a pasted PR URL, workflow-run URL, or workflow-file URL. Parses `owner/repo` from URLs and passes `--repo` to `gh` for remote targets.
39
+ **Trigger-aware re-runs:** Inspects the workflow's `on:` block and classifies the trigger as auto-on-push, manual-dispatch, scheduled, or other. Re-triggers by pushing (auto-on-push), by `gh workflow run` (manual-dispatch/other), or stops with an explanation when a scheduled-only workflow cannot be forced.
40
+ **Pipeline:** `log-reader` → `triage` → (`investigate` if HARD) → `code`, then commit/push on the feature branch and loop (max 5 iterations).
41
+ **Guardrails:** Never pushes to `main`, never force-pushes, never `--no-verify`. For remote-repo targets it cannot edit locally, so it watches, diagnoses, and reports the fix back to the user.
42
+
43
+ ### planner
44
+ **Purpose:** Formalise the two-stage planning flow into a single command. Runs the `planner-discovery` agent (Stage 1: clarifying questions + outline), gates on explicit user approval, then runs the `planner` agent (Stage 2: full implementation plan written to `documents/plans/<YYYYMMDD>-<topic>.md`).
45
+ **Pipeline:** `planner-discovery` → (user approval) → `planner`.
46
+ **Guardrails:** Never implements or writes code. Stage 2 runs only after the user approves the Stage 1 outline. Only the `planner` agent writes to `documents/plans/`. Hands off to the `implement` skill for execution.
47
+
48
+ ### implement
49
+ **Purpose:** Execute an existing plan from `documents/plans/` (path passed by the user, e.g. `documents/plans/20260622-ui-bugs.md`), dispatching each phase to the agent the plan designates and using the branch the plan names.
50
+ **Target resolution:** Required plan file path. Parses branch, phases, designated agent per phase, files, and acceptance criteria from the plan.
51
+ **Pipeline:** For each phase in order, route to the plan's designated canonical agent (`code` / `docs` / `infra` / `test-runner` / `explorer` / etc.); verify acceptance criteria before advancing.
52
+ **Guardrails:** Never commits or pushes — agents edit files, the user commits. Never works on `main` (uses the plan's branch). Honours each phase's agent designation exactly; stops on a failed phase.
53
+
54
+ ### initialize
55
+ **Purpose:** One-time environment reconciliation. Discovers applicable MCP servers (via the MCP Servers discovery → policy-check → install flow) and, with user approval, installs and wires them into the `infra` and `planner` agents. Discovers where plan documents actually live in the repo and, after explicit user confirmation, wires the `planner`, `implement`, and `docs` agents/skills to that location. Then verifies every agent's configured model exists in the current tool and, for any missing model, prompts the user to pick the closest available match from a dropdown and rewrites the agent files.
56
+ **Pipeline:** MCP discovery → user approval → install + wire agents → plans-location discovery → user confirmation → rewrite plan-location references → model availability check → user picks replacements → rewrite agent files.
57
+ **Guardrails:** Never commits or pushes. Only edits agent/skill files and MCP config — never source code. Never installs a policy-blocked or unapproved server. Never changes the plans location without explicit user confirmation. Idempotent.
58
+
59
+ ---
60
+
61
+ ## Delivery Rules
62
+
63
+ - Write or update tests first when a change can be covered by automated tests.
64
+ - For bug fixes, add a regression test before changing the implementation.
65
+ - Make the smallest change that fixes the root cause — no broad refactors unless that is the explicit task.
66
+ - Validate each edited slice immediately with the narrowest relevant test, lint, or build command.
67
+ - Do not declare a task done if relevant tests, lint, or type checks are failing (unless the user explicitly accepts that state).
68
+
69
+ ---
70
+
71
+ ## Documentation Rules
72
+
73
+ - Update the root `README.md` on every change.
74
+ - Update the service-level `README.md` inside the affected application on relevant changes.
75
+ - Update documentation last — after implementation and verification are complete.
76
+ - Never leave examples, commands, file paths, or architecture descriptions stale after a change.
77
+
78
+ ---
79
+
80
+ ## Change Discipline
81
+
82
+ - Prefer focused patches over broad refactors.
83
+ - Preserve existing conventions unless the task explicitly changes them.
84
+ - Do not add dependencies without a concrete need and a corresponding documentation update.
85
+ - If a subdirectory contains its own `AGENTS.md`, follow the more specific file in addition to this one.
86
+
87
+ ---
88
+
89
+ ## Memory Location
90
+
91
+ - Store task notes, handoff notes, decisions, and implementation checklists as Markdown files under `agents/`.
92
+ - Name files by date and topic, e.g. `agents/2026-05-22-feature-x.md`.
93
+ - Remove or update stale notes when they no longer match the codebase.
94
+ - Do not commit ephemeral scratch notes — only durable decisions and handoffs.
95
+
96
+ ---
97
+
98
+ ## Agent Network
99
+
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.
101
+
102
+ Model tiers used below:
103
+ - **High** — most capable; use for planning and complex cross-file reasoning (e.g. Opus-class)
104
+ - **Standard** — fast and accurate; use for code, infra, tests, orchestration (e.g. Sonnet-class)
105
+ - **Fast** — lightweight; use for docs and read-only research (e.g. Haiku-class)
106
+
107
+ ---
108
+
109
+ ### planner
110
+ **Tiers:** Standard (Stage 1) → High (Stage 2)
111
+ **Purpose:** Creates structured, phased implementation plans in two gated stages. Writes the final plan to `documents/plans/`. Does not implement — requires explicit user approval between stages and before any code is written.
112
+
113
+ **Stage 1 — Discovery & Outline (Standard tier)**
114
+ - Ask lots of clarifying questions — be exhaustive. The goal of Stage 1 is to find out everything about what the user has asked for: scope and boundaries, expected behaviour and edge cases, inputs and outputs, affected components, constraints, dependencies, and success criteria. Do not assume — surface every ambiguity and keep asking until nothing material about the task is left unknown.
115
+ - Explore the codebase and any relevant context.
116
+ - Produce a concise outline: goal, high-level phases, open questions.
117
+ - Stop and present the outline. Ask the user for explicit approval to proceed to Stage 2.
118
+
119
+ **Stage 2 — Full Implementation Plan (High tier)**
120
+ - Using the approved outline, produce a complete plan written to `documents/plans/<date>-<topic>.md`.
121
+ - Plan structure: Goal, Constraints, Phases (objective / agent / files / acceptance criteria), Open questions, Risks.
122
+ - Stop and present the plan. Ask the user for explicit approval before any implementation begins.
123
+
124
+ **Rules:**
125
+ - Never begin implementation.
126
+ - Specify a branch name in the plan.
127
+ - Cross-reference related notes in `agents/` or existing plans in `documents/plans/`.
128
+
129
+ ### code
130
+ **Tier:** Standard
131
+ **Purpose:** Implements focused code changes — features, bug fixes, explicit refactors.
132
+ **Rules:**
133
+ - Tests first; regression test before fixing a bug.
134
+ - Smallest change that satisfies the requirement. No surrounding cleanup.
135
+ - Validate with the narrowest relevant test or lint command after each edit.
136
+ - Do not touch documentation — hand that off to the docs agent.
137
+
138
+ ### docs
139
+ **Tier:** Fast
140
+ **Purpose:** Updates README files and documentation only. Runs after implementation is verified.
141
+ **Rules:**
142
+ - Never modifies code, config, or infrastructure files.
143
+ - Keep examples, commands, paths, and architecture descriptions accurate.
144
+ - Prefer bullet lists and tables over prose.
145
+
146
+ ### infra
147
+ **Tier:** Standard
148
+ **Purpose:** Modifies infrastructure as code — Bicep, Terraform, pipeline YAML, IAC config.
149
+ **Rules:**
150
+ - Never runs manual CLI commands against shared or production environments.
151
+ - All changes go through IAC files and deployment pipelines.
152
+ - Lint/validate IAC before declaring done.
153
+ - Do not change application code.
154
+
155
+ ### explorer
156
+ **Tier:** Fast
157
+ **Purpose:** Read-only codebase research — finding files, tracing call paths, locating symbols, understanding architecture.
158
+ **Rules:**
159
+ - No file writes, edits, or state-modifying shell commands.
160
+ - Return a concise, structured report.
161
+ - Run independent searches in parallel.
162
+
163
+ ### test-runner
164
+ **Tier:** Standard
165
+ **Purpose:** Runs tests, diagnoses failures, fixes broken tests, adds regression tests.
166
+ **Rules:**
167
+ - Run the narrowest test first (single file / single test) before the full suite.
168
+ - Fix failures with the smallest code change possible.
169
+ - Write a regression test before fixing a bug if one was not provided.
170
+ - Do not change production code beyond what is needed to make tests pass.
171
+ - Report final pass/fail counts before declaring done.
172
+
173
+ ### log-reader
174
+ **Tier:** Fast
175
+ **Purpose:** Stage 1 of bug fix mode. Gathers logs, error messages, and diagnostics from the environment or provided context.
176
+ **Rules:**
177
+ - Read-only. Collect all relevant logs, stack traces, error messages, and diagnostic output.
178
+ - Synthesize findings into a concise diagnostic report.
179
+ - Pass all findings and context to the triage agent for classification.
180
+ - Do not speculate on fixes — focus on accurate data collection and presentation.
181
+
182
+ ### triage
183
+ **Tier:** Standard
184
+ **Purpose:** Stage between log-reader and investigate in CI fix mode. Classifies the failure as easy (fix is immediately obvious and targeted) or hard (requires deeper investigation).
185
+ **Rules:**
186
+ - Receive the diagnostic report from log-reader.
187
+ - Explore the codebase as needed to understand the failing code.
188
+ - Output EASY with a specific file/line fix suggestion, or HARD with starting points for the investigate agent.
189
+ - Never implement the fix.
190
+ - Classify as EASY only when confident the fix is a single targeted change.
191
+
192
+ ### investigate
193
+ **Tier:** High
194
+ **Purpose:** Stage 2 of bug fix mode. Analyzes diagnostics from log-reader and pinpoints root cause.
195
+ **Rules:**
196
+ - Receive and analyze the diagnostic report from log-reader.
197
+ - Explore the codebase to understand the affected systems and call paths.
198
+ - Produce a concise root-cause analysis and recommended fix strategy.
199
+ - Stop before implementation — hand off to the code agent to apply the fix.
200
+ - Do not implement the fix yourself.
package/src/HUMAN.md CHANGED
@@ -1,31 +1,31 @@
1
- # Human Guide
2
-
3
- A quick reference for working with the AI agent network in this repository.
4
-
5
- ## First-time setup
6
-
7
- Fastest path — use the `marcos-ai-bootstrap` CLI (no AI turn required, works in any repo, any OS):
8
-
9
- ```powershell
10
- npx marcos-ai-bootstrap --copilot # or --claude, --codex, or --all
11
- ```
12
-
13
- This instantly writes `AGENTS.md`, `HUMAN.md`, and the fully materialised agent/skill
14
- files for the tool(s) you chose into the current directory. That's it — the agents and
15
- skills are ready to use immediately. See the root `README.md` for all flags (`--force`,
16
- `--dry-run`, `--dest`).
17
-
18
- Once the files are written:
19
-
20
- 1. Confirm `AGENTS.md`, `HUMAN.md`, and your tool's agent/skill files are present in the repo.
21
- 2. Switch to your most powerful model at medium effort using **`/model`** e.g. opus 4.8 @ medium effort
22
- 3. Run the **`/initialize`** skill once to reconcile MCP servers, plan-document location, and model IDs with your environment.
23
- 4. **`/clear`** — Clear the context window.
24
- 5. use **`/model`** to switch your model to your most powerful model @ low effort (to save tokens)
25
-
26
- ## Basic workflow
27
-
28
- 1. **`/planner`** — Give a basic outline of what you want to build. The agent asks clarifying questions and iterates until it has a complete plan for the feature, bugfix, or chore.
29
- 2. **`/clear`** — Clear the context window.
30
- 3. **`/implement`** — Paste the path to the plan that was created, e.g. `documents/plans/20260101-plan.md`.
31
- 4. **`/watch-ci`** — Paste the PR or GitHub Actions run. It watches the build to make sure everything passes, fixing bugs in real time if needed.
1
+ # Human Guide
2
+
3
+ A quick reference for working with the AI agent network in this repository.
4
+
5
+ ## First-time setup
6
+
7
+ Fastest path — use the `marcos-ai-bootstrap` CLI (no AI turn required, works in any repo, any OS):
8
+
9
+ ```powershell
10
+ npx marcos-ai-bootstrap --copilot # or --claude, --codex, or --all
11
+ ```
12
+
13
+ This instantly writes `AGENTS.md`, `HUMAN.md`, and the fully materialised agent/skill
14
+ files for the tool(s) you chose into the current directory. That's it — the agents and
15
+ skills are ready to use immediately. See the root `README.md` for all flags (`--force`,
16
+ `--dry-run`, `--dest`).
17
+
18
+ Once the files are written:
19
+
20
+ 1. Confirm `AGENTS.md`, `HUMAN.md`, and your tool's agent/skill files are present in the repo.
21
+ 2. Switch to your most powerful model at medium effort using **`/model`** e.g. opus 4.8 @ medium effort
22
+ 3. Run the **`/initialize`** skill once to reconcile MCP servers, plan-document location, and model IDs with your environment.
23
+ 4. **`/clear`** — Clear the context window.
24
+ 5. use **`/model`** to switch your model to your most powerful model @ low effort (to save tokens)
25
+
26
+ ## Basic workflow
27
+
28
+ 1. **`/planner`** — Give a basic outline of what you want to build. The agent asks clarifying questions and iterates until it has a complete plan for the feature, bugfix, or chore.
29
+ 2. **`/clear`** — Clear the context window.
30
+ 3. **`/implement`** — Paste the path to the plan that was created, e.g. `documents/plans/20260101-plan.md`.
31
+ 4. **`/watch-ci`** — Paste the PR or GitHub Actions run. It watches the build to make sure everything passes, fixing bugs in real time if needed.