bmad-method 6.10.1-next.50 → 6.10.1-next.52
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/package.json +1 -1
- package/src/bmm-skills/agents/bmad-agent-analyst/customize.toml +1 -1
- package/src/bmm-skills/module-help.csv +1 -1
- package/src/bmm-skills/plan/bmad-document-project/SKILL.md +6 -2
- package/src/bmm-skills/plan/bmad-generate-project-context/SKILL.md +2 -2
- package/src/bmm-skills/plan/bmad-project-context/SKILL.md +72 -37
- package/src/bmm-skills/plan/bmad-project-context/customize.toml +6 -7
- package/src/bmm-skills/plan/bmad-project-context/references/best-practices.md +65 -0
- package/src/bmm-skills/plan/bmad-project-context/references/template.md +55 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/scripts/__pycache__/sprint_plan.cpython-311.pyc +0 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/__pycache__/test_sprint_plan.cpython-311-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/ship/bmad-correct-course/SKILL.md +5 -6
- package/src/bmm-skills/ship/bmad-retrospective/scripts/__pycache__/sprint_status.cpython-311.pyc +0 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_git_evidence.cpython-311-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_sprint_status.cpython-311-pytest-9.1.1.pyc +0 -0
- package/src/core-skills/bmad-forge-idea/scripts/resolve_personas.py +3 -1
- package/src/scripts/__pycache__/config_utils.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_config_utils.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_resolve_config.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-311.pyc +0 -0
- package/src/bmm-skills/plan/bmad-project-context/evals/cases.json +0 -345
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-brownfield/AGENTS.md +0 -6
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-brownfield/_bmad/context.yaml +0 -2
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-brownfield/legacy/README.md +0 -3
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-brownfield/package.json +0 -18
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-brownfield/planning/decisions.md +0 -14
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-brownfield/pnpm-lock.yaml +0 -8
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-brownfield/src/lib/money.ts +0 -5
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-brownfield/src/repos/orders.ts +0 -11
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-brownfield/src/routes/webhooks.ts +0 -7
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-greenfield/spec.md +0 -15
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-monorepo/README.md +0 -4
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-monorepo/apps/web/package.json +0 -7
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-monorepo/apps/web/src/conventions.md +0 -2
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-monorepo/package.json +0 -12
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-monorepo/services/billing/package.json +0 -6
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-monorepo/services/billing/src/handlers.ts +0 -3
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-refresh/context/.memlog.md +0 -9
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-refresh/context/index.md +0 -4
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-refresh/context/integer-cents.md +0 -11
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-refresh/context/kernel.md +0 -8
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-refresh/context/repository-pattern.md +0 -10
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-refresh/package.json +0 -18
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-refresh/planning/decisions.md +0 -14
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-refresh/src/lib/currency.ts +0 -5
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-refresh/src/routes/webhooks.ts +0 -7
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-standalone/package.json +0 -18
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-standalone/planning/decisions.md +0 -14
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-standalone/src/lib/money.ts +0 -5
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-workspace/obeya/registry.yaml +0 -10
- package/src/bmm-skills/plan/bmad-project-context/evals/files/fixture-workspace/proj-a/src/client.ts +0 -2
- package/src/bmm-skills/plan/bmad-project-context/evals/triggers.json +0 -42
- package/src/bmm-skills/plan/bmad-project-context/references/bundle-contract.md +0 -48
- package/src/bmm-skills/plan/bmad-project-context/references/interrogation-guide.md +0 -11
- package/src/bmm-skills/plan/bmad-project-context/references/kernel-contract.md +0 -49
- package/src/bmm-skills/plan/bmad-project-context/references/placement.md +0 -13
- package/src/bmm-skills/plan/bmad-project-context/scripts/context.py +0 -657
- package/src/bmm-skills/plan/bmad-project-context/scripts/tests/test_context.py +0 -47
- package/src/scripts/context.py +0 -657
- package/src/scripts/tests/test_context.py +0 -572
package/package.json
CHANGED
|
@@ -101,5 +101,5 @@ skill = "bmad-prfaq"
|
|
|
101
101
|
|
|
102
102
|
[[agent.menu]]
|
|
103
103
|
code = "PC"
|
|
104
|
-
description = "
|
|
104
|
+
description = "Set up or refresh this repo's agent instructions — verified commands, policy, conventions, pitfalls (setup, refresh, record, audit)"
|
|
105
105
|
skill = "bmad-project-context"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module,skill,display-name,menu-code,description,action,args,phase,preceded-by,followed-by,required,output-location,outputs
|
|
2
2
|
BMad Method,_meta,,,,,,,,,false,https://docs.bmad-method.org/llms.txt,
|
|
3
|
-
BMad Method,bmad-project-context,Project Context,PC,"
|
|
3
|
+
BMad Method,bmad-project-context,Project Context,PC,"Set up or refresh a repo's agent instructions so AI agents work well in it: verified commands, policy, conventions that differ from defaults, and known pitfalls. Setup, refresh, record, and audit — replaces document-project and generate-project-context.",,,anytime,,,false,repo root,AGENTS.md managed block
|
|
4
4
|
BMad Method,bmad-build,Build,BD,Official Phase 4 implementation loop: clarify intent plan implement review and present.,,,ship,bmad-sprint-planning,bmad-code-review,true,implementation_artifacts,spec and project implementation
|
|
5
5
|
BMad Method,bmad-spec,Spec,SPC,"Use to distill any intent input (brief, PRD, transcript, brain dump, design folder, mixed multi-source) into a succinct, no-fluff SPEC.md contract + companions that downstream work derives from. Locks the WHAT before the HOW. Works for software, game design, research, editorial, policy, business, anything intent-bearing. Validation mode also available.",,[path],anytime,,,false,{output_folder}/specs/spec-{slug},SPEC.md + companion files
|
|
6
6
|
BMad Method,bmad-correct-course,Correct Course,CC,Navigate significant changes. May recommend start over update PRD redo architecture sprint planning or correct epics and stories.,,,anytime,,,false,planning_artifacts,change proposal
|
|
@@ -5,6 +5,10 @@ description: 'Deprecated — forwards to bmad-project-context. Use when the user
|
|
|
5
5
|
|
|
6
6
|
# DEPRECATED — forwards to bmad-project-context
|
|
7
7
|
|
|
8
|
-
Tell the user
|
|
8
|
+
Tell the user two things.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
First: this skill is deprecated. Generating documentation volume about a codebase made agents worse, not better — agents read code more accurately than prose describing code, and the generated set was stale on arrival. `bmad-project-context` owns what remains useful: a small verified block in the repo's `AGENTS.md` carrying what the code cannot say — required policy, conventions that differ from defaults, what running the project takes that no config file states, and known pitfalls.
|
|
11
|
+
|
|
12
|
+
Second, so they are not surprised by what they get: the deeper "explain this system, its rationale and its history" material is a different altitude and is not part of that block. It is coming as its own capability. If that is what they were after, say so plainly rather than producing a thin substitute.
|
|
13
|
+
|
|
14
|
+
Then invoke `bmad-project-context` with **setup** intent, forwarding the user's original request and any paths or documents they supplied, verbatim. It takes the workflow from here.
|
|
@@ -5,6 +5,6 @@ description: 'Deprecated — forwards to bmad-project-context. Use when the user
|
|
|
5
5
|
|
|
6
6
|
# DEPRECATED — forwards to bmad-project-context
|
|
7
7
|
|
|
8
|
-
Tell the user: this skill is deprecated — `bmad-project-context` now owns this job. Instead of one generated `project-context.md`, it
|
|
8
|
+
Tell the user: this skill is deprecated — `bmad-project-context` now owns this job. Instead of one generated `project-context.md`, it writes a small verified block inside the repo's `AGENTS.md`, and any existing `project-context.md` is offered up for absorption rather than left orphaned. Invoke `bmad-project-context` next time.
|
|
9
9
|
|
|
10
|
-
Then invoke `bmad-project-context` with **
|
|
10
|
+
Then invoke `bmad-project-context` with **setup** intent, forwarding the user's original request and any inputs they supplied (architecture doc, spec, standards, preferences), verbatim. It takes the workflow from here.
|
|
@@ -1,74 +1,109 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bmad-project-context
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Set up or refresh agent instructions so AI agents work well in it. Use when the user says "project context", "set up AGENTS.md", "document this project", "refresh context", "audit context", wants to apply coding standards or governance to a repo, or wants to record a mistake agents keep making'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Overview
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
A conversation that produces a repository's agent instructions: a small verified block inside `AGENTS.md`. The user brings rules they want followed — governance, security, standards — and the repository supplies the rest, verified.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Conversational always; the user approves every write.
|
|
11
11
|
|
|
12
|
-
**Args:** intent (`
|
|
12
|
+
**Args:** intent (`setup` | `refresh` | `record` | `audit`); a target repo or path; extra source paths or URLs. Supplied values skip their questions.
|
|
13
13
|
|
|
14
14
|
## Resolution rules
|
|
15
15
|
|
|
16
|
-
- Bare paths and `{skill-root}` (e.g. `references/
|
|
16
|
+
- Bare paths and `{skill-root}` (e.g. `references/best-practices.md`) resolve from this skill's installed directory.
|
|
17
17
|
- `{project-root}` → the project working directory.
|
|
18
|
+
- **Target** → the repository being described, defaulting to `{project-root}`. If it resolves to more than one working tree, or to one the user cannot commit in, ask before writing.
|
|
18
19
|
|
|
19
20
|
## On Activation
|
|
20
21
|
|
|
21
22
|
1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults. Execute `{workflow.activation_steps_prepend}`; treat `{workflow.persistent_facts}` entries as standing context (`file:` = paths/globs to load, others verbatim).
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
4.
|
|
25
|
-
5. Init or resume the memlog at `{project_knowledge}/.memlog.md` (`uv run {project-root}/_bmad/scripts/memlog.py init --path ...` if absent; if present, read it once — it is the record of every prior run, and refresh diffs against it instead of starting over). If `memlog.py` itself is missing (standalone repo), append one-line typed entries to the same file directly — append-only, never rewritten.
|
|
26
|
-
6. Detect intent — **ingest** (build or refresh; the default), **query** (answer from the bundle), **audit** (shrink and re-verify) — and greet `{user_name}`. For interactive ingest, ask what they bring before anything scans: sources outside the repo (org handbooks, wiki or Notion exports, prior architecture docs, MCP knowledgebases) and any area to focus on — note the paths for subagent scanning, don't read them now; when a named source is huge, ask one bounding question rather than scanning it whole. Fold `{workflow.external_sources}` entries into the same source list. Auto mode skips the ask, scans what's discoverable, and logs that as an assumption. Execute `{workflow.activation_steps_append}`.
|
|
23
|
+
2. Config: if `{project-root}/_bmad` exists, `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {project-root}` and read `{user_name}`, `{communication_language}` (use it every turn), `{output_folder}`. Standalone: skip.
|
|
24
|
+
3. **Load `references/best-practices.md` and `references/template.md` before anything else.** Every decision below is made against them.
|
|
25
|
+
4. Detect intent and greet `{user_name}`: **setup** (no block in the target — the default), **refresh** (a block exists), **record** (the user reports a mistake agents made), **audit** (re-verify and prune). Fold `{workflow.external_sources}` into the source list. Execute `{workflow.activation_steps_append}`.
|
|
27
26
|
|
|
28
|
-
##
|
|
27
|
+
## Setup and Refresh Steps
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
- **Orchestrate the scanning.** Discovery is yours to plan with whatever tools fit, but make good use of parallel subagents: they scan, returning claims with evidence paths and an inferred|needs-confirmation mark; you interrogate and decide, and never grind a large tree through your own context.
|
|
29
|
+
No writes until step 5!
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
### 1. Assess and report
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
- **Present truth only.** State what *is*, never the story of the edit — "we removed X because..." is banned prose. Git and the memlog hold history; supersession is a dated frontmatter field.
|
|
37
|
-
- **No reference without a link.** Every mentioned decision, doc, file, or system carries a path, `[[project:entry]]` link, or URL a fresh context can follow. "As previously discussed" is banned.
|
|
33
|
+
Read `AGENTS.md`, harness or agent specific rule files, docs folders, and any notes carrying lessons. Report what exists and how it measures up, per `best-practices.md`.
|
|
38
34
|
|
|
39
|
-
|
|
35
|
+
If the target contains separable units — a workspace manifest listing members, or directories carrying their own build manifest — name them and ask whether this run covers the root only, all of them, or which. Absent that evidence, do not ask. Sibling repositories are not children; each is its own target, offered in turn.
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
### 2. Ask what they bring
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
Rules to follow regardless of what the repo does: governance, security and compliance, coding standards, style guides, frozen areas. Ask for outside documents too — handbooks, wikis, architecture docs, MCP knowledgebases. Note the paths; do not read them yet.
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
Greenfield: this is the whole content. Brownfield: it is the half no scan reaches.
|
|
46
42
|
|
|
47
|
-
|
|
43
|
+
### 3. Discover and verify
|
|
48
44
|
|
|
49
|
-
|
|
45
|
+
Fan out with parallel subagents against what the sections need — executable config and CI for policy and for what they already state, tracked source for conventions and boundaries, targeted history for constraints whose reason must still hold.
|
|
50
46
|
|
|
51
|
-
|
|
47
|
+
`package.json`, a `Makefile`, `pyproject.toml`, and CI config are read to know what the block must not repeat. Their caveats come from the human in step 4. Path-check every claim naming a file.
|
|
52
48
|
|
|
53
|
-
|
|
49
|
+
Each child agreed in step 1 is scanned as its own scope, against its own manifests.
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
### 4. Interview the gaps
|
|
52
|
+
|
|
53
|
+
Only what no scan reaches: what agents keep getting wrong here, what is off limits, what a domain term means, why a constraint exists.
|
|
54
|
+
|
|
55
|
+
- Never ask what a scan could answer. Asking the user to confirm a path-checked claim, or one a config file already states, is a defect.
|
|
56
|
+
- Ask recall questions, not review lists. Never hand the user a selection problem a scan created.
|
|
57
|
+
- A mistake this session made and caught is observed evidence — offer it.
|
|
58
|
+
- Batches of at most eight; fewer is better. A batch yielding nothing new means write.
|
|
59
|
+
- When the repo contradicts the user, show the evidence and ask. Never write the claim as given, never drop it silently.
|
|
60
|
+
|
|
61
|
+
### 5. Show the block, then write it
|
|
62
|
+
|
|
63
|
+
Compose against `template.md`. For each candidate, ask first whether a hook, lint rule, or CI check enforces it better than prose; if so propose the check, and the line becomes the fallback if they decline.
|
|
64
|
+
|
|
65
|
+
**Show the complete block before writing it**, and every child block alongside it — one approval covers the set. On approval, splice between the markers, leaving everything outside them byte-identical. Fill each provenance line with today's date and the verified SHA.
|
|
66
|
+
|
|
67
|
+
Where an instruction elsewhere contradicts the block in a way that changes behavior — a stale `CLAUDE.md` line, a retired command — propose the fix to that file. Two live contradictory instructions is a defect.
|
|
68
|
+
|
|
69
|
+
Never commit.
|
|
70
|
+
|
|
71
|
+
### 6. Close
|
|
72
|
+
|
|
73
|
+
- What went in, and what was left out and why.
|
|
74
|
+
- Why, in the user's terms, from `best-practices.md` — why it is small, why what the repo already states stays out, why a pitfall line stays until its cause is gone.
|
|
75
|
+
- How it loads, and that other harness files can point at it.
|
|
76
|
+
- Maintenance: re-run after significant change, `record` the moment an agent gets something wrong, prefer a check over a new line.
|
|
77
|
+
- Rules repeating across their projects, or personal rather than the team's, belong in their global agent config.
|
|
56
78
|
|
|
57
|
-
|
|
79
|
+
### Refresh
|
|
58
80
|
|
|
59
|
-
|
|
81
|
+
Same steps, step 1 as a diff. Read the provenance line, re-verify every path and every caveat, and run `git log --diff-filter=DR --name-only` since the recorded SHA against every line — update or remove lines whose evidence is gone. Never re-ask what a prior run settled; the interview shrinks to what changed about how the team works. The block grows only on new evidence.
|
|
82
|
+
|
|
83
|
+
### Greenfield
|
|
84
|
+
|
|
85
|
+
Seeded from a spec or planning document, or interview alone. Commands that do not exist yet are written as explicit TODOs naming the decided stack, never a guessed invocation stated as fact, and verified on the first refresh after code exists. A genuinely contested design decision — real tradeoffs, multiple viable shapes — goes to `bmad-architecture`.
|
|
86
|
+
|
|
87
|
+
### Migration
|
|
88
|
+
|
|
89
|
+
If the target has a `project-context.md` from the retired skills, commonly under `{output_folder}`, read it in step 1 and offer to absorb its content. Do not delete it without agreement, and do not silently orphan it.
|
|
90
|
+
|
|
91
|
+
## Record
|
|
92
|
+
|
|
93
|
+
Capture one observed agent mistake as it happens — the only admissible source for a pitfall line.
|
|
94
|
+
|
|
95
|
+
Take the task, the mistake, the correction, and its evidence. Check the block for a line already covering it. One occurrence is noted; a recurring or costly mistake earns a line now — write it, show the diff. If it is mechanically preventable, propose the hook, lint rule, or CI check instead.
|
|
96
|
+
|
|
97
|
+
## Audit
|
|
60
98
|
|
|
61
|
-
|
|
99
|
+
Re-check every caveat, path-check every file, follow every pointer, and ask of every line whether removing it would change agent behavior. Check for contradictions with other instruction files.
|
|
62
100
|
|
|
63
|
-
|
|
64
|
-
{"status": "complete", "intent": "ingest", "kernel": "docs/kernel.md",
|
|
65
|
-
"bundle": "docs/", "memlog": "docs/.memlog.md", "placement": "agent-files"}
|
|
66
|
-
```
|
|
101
|
+
Failing lines move behind an observable trigger, get fixed, or are deleted — confirm deletions first. **A policy or pitfall line goes only when the thing it guards is gone or the user retires it; nothing failing lately is not grounds.** Audit ends smaller or equal.
|
|
67
102
|
|
|
68
|
-
##
|
|
103
|
+
## Children
|
|
69
104
|
|
|
70
|
-
|
|
105
|
+
A component, nested repository, or extracted rules file gets its own file under the same shape when work keeps landing there and its truths do not belong at the parent level. Rules bounded to a directory go in a nested `AGENTS.md` there, attached by location. Use a linked file only when the trigger is not a path.
|
|
71
106
|
|
|
72
|
-
|
|
107
|
+
A chosen child that ends with nothing its parent does not already say gets no file. Say so and move on.
|
|
73
108
|
|
|
74
|
-
|
|
109
|
+
List every child in the parent's **Where things are** with one line and its path. Discovery never depends on the harness finding it.
|
|
@@ -11,15 +11,14 @@
|
|
|
11
11
|
# --- Universal defaults ---
|
|
12
12
|
activation_steps_prepend = []
|
|
13
13
|
activation_steps_append = []
|
|
14
|
-
# Deliberately empty:
|
|
15
|
-
#
|
|
16
|
-
# this skill's own superseded output. Users append their own facts.
|
|
14
|
+
# Deliberately empty: this skill's own output (AGENTS.md) is loaded by the
|
|
15
|
+
# harness, not through this array. Users append their own standing facts.
|
|
17
16
|
persistent_facts = []
|
|
18
17
|
on_complete = ""
|
|
19
18
|
|
|
20
|
-
# Standing outside-the-repo sources
|
|
21
|
-
#
|
|
22
|
-
# Entries: "file:{project-root}/..." or "file:/abs/path" for
|
|
23
|
-
# "skill:name" to consult a skill, plain text for a standing fact,
|
|
19
|
+
# Standing outside-the-repo sources offered at every setup/refresh run
|
|
20
|
+
# (untrusted until verified against the repo or user-confirmed).
|
|
21
|
+
# Append-only. Entries: "file:{project-root}/..." or "file:/abs/path" for
|
|
22
|
+
# docs, "skill:name" to consult a skill, plain text for a standing fact,
|
|
24
23
|
# "tool:name" for an MCP knowledgebase.
|
|
25
24
|
external_sources = []
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# What belongs in a repo's agent instructions
|
|
2
|
+
|
|
3
|
+
Rules for deciding what goes in the block, for judging what a repo already has, and for explaining both to the user.
|
|
4
|
+
|
|
5
|
+
## The test
|
|
6
|
+
|
|
7
|
+
Can an agent derive this by reading the repository? If yes, leave it out — a stored copy is a stale duplicate of something the agent reads more accurately first-hand, and it is charged on every session. Write down what the code cannot say.
|
|
8
|
+
|
|
9
|
+
## Admit
|
|
10
|
+
|
|
11
|
+
- **Policy the code cannot express** — branch rules, frozen and protected paths, generated files, secrets, security and compliance. Stated by a human or read off an enforcing config, never inferred.
|
|
12
|
+
- **What a config file cannot say about running the project** — the root test script does nothing in this workspace, integration tests need a service up first, the suite takes eleven minutes so iterate on single files, the `Makefile` is the real entry point and `package.json` is vestigial, CI runs a typecheck the test script does not. The invocation itself is already stated in `package.json`, `Makefile`, `pyproject.toml`, or CI config and does not earn a line — the correction or the caveat does.
|
|
13
|
+
- **Conventions that differ from ecosystem defaults.** An agent follows the norm unless told otherwise, so only the divergences earn a line.
|
|
14
|
+
- **Pitfalls with observed evidence** — a recorded lesson, the maintainer's recollection, the same mistake fixed repeatedly in history, or one this session made and caught. A repo yields hundreds of trap-looking facts and none of them predict real mistakes; only observed behavior does. A surprising scan finding is a question to ask, not a line to write.
|
|
15
|
+
- **Runtime behavior invisible from the repo** — replaying webhooks, lying health endpoints, environment quirks — once a human confirms it.
|
|
16
|
+
- **Entry points and pointers** to where work lands.
|
|
17
|
+
|
|
18
|
+
Prefer prohibitions to advice, and name the permitted alternative in the same line.
|
|
19
|
+
|
|
20
|
+
## Exclude
|
|
21
|
+
|
|
22
|
+
| | Why |
|
|
23
|
+
|---|---|
|
|
24
|
+
| Repo overviews, directory trees, stack lists | Derived fresh, more accurately; stored copies rot |
|
|
25
|
+
| Anything included for being interesting | Interest is not need |
|
|
26
|
+
| Style rules an agent self-enforces | Belongs in a formatter, linter, hook, or CI check — propose the check instead |
|
|
27
|
+
| Platitudes | Already the default |
|
|
28
|
+
| Commands already stated in `package.json`, a `Makefile`, or CI config | Read from the source of truth; a copy drifts the moment a script is renamed |
|
|
29
|
+
| Pasted code, changelog content, fast-changing facts | Stale immediately |
|
|
30
|
+
| Aspirational state | Describe what is; intent belongs in specs |
|
|
31
|
+
| History and edit narration | Git holds it; state present truth |
|
|
32
|
+
|
|
33
|
+
## Retire
|
|
34
|
+
|
|
35
|
+
A policy or pitfall line goes only when the thing it guards is gone, or the user retires it. Nothing failing lately is not evidence — a working rule erases its own evidence.
|
|
36
|
+
|
|
37
|
+
Every other line faces one question at each write: would removing it change agent behavior? If no, cut it.
|
|
38
|
+
|
|
39
|
+
## Size
|
|
40
|
+
|
|
41
|
+
Every line is paid in every session, and instruction-following degrades as the loaded set grows. Count what other always-loaded files add. Over budget means cut the weakest lines or move them behind a trigger — never raise the budget. Ten lines of evidence means ten lines.
|
|
42
|
+
|
|
43
|
+
## Retrieval
|
|
44
|
+
|
|
45
|
+
An index the agent must choose to fetch gets skipped; one already in context does not. Keep everything load-bearing in the block. A pointer out of it names a trigger the agent can observe — a path, a file type, a named task — never one it must judge ("when the task is complex") or track about itself ("before your first edit").
|
|
46
|
+
|
|
47
|
+
Rules bounded to a directory go in a nested `AGENTS.md` there, attached by location rather than by pointer. Use a linked file only when the trigger is not a path.
|
|
48
|
+
|
|
49
|
+
## Maintain
|
|
50
|
+
|
|
51
|
+
- Re-check that caveats still hold — a slow suite that got fast, a workaround for a bug that was fixed.
|
|
52
|
+
- Diff deletions and renames since the verified SHA against every line.
|
|
53
|
+
- Record provenance in the block so the next run knows what it is diffing from.
|
|
54
|
+
- Capture mistakes when they happen, not at review time. One occurrence is a note; recurrence earns a line.
|
|
55
|
+
- Route anything mechanically preventable to a hook, lint rule, or CI check. A check that lands deletes its line.
|
|
56
|
+
|
|
57
|
+
## Repo or home directory
|
|
58
|
+
|
|
59
|
+
This block belongs committed: shared by the team, consistent across machines, versioned with the code it constrains.
|
|
60
|
+
|
|
61
|
+
Two things belong in the user's global agent config instead — rules repeating across all their projects, and personal preferences that are theirs rather than the team's.
|
|
62
|
+
|
|
63
|
+
## Judging an existing file
|
|
64
|
+
|
|
65
|
+
Report, in this order: what is derivable filler, what is unverifiable or stale, what is missing against the sections above, and what is already good. Keep recorded lessons by default — they are maintainer testimony, and are challenged only with evidence that the thing they name is gone or wrong.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Block shape
|
|
2
|
+
|
|
3
|
+
Sections in this order. Omit any section with nothing that passes its rule — never write an empty one. Admission rules: `best-practices.md`.
|
|
4
|
+
|
|
5
|
+
1. **Orientation** — three or four sentences: what this is, the stack, where planning and deeper docs live.
|
|
6
|
+
2. **Policy** — what the org requires.
|
|
7
|
+
3. **Where things are** — entry points, and pointers to children and linked files.
|
|
8
|
+
4. **Running and verifying** — only what `package.json`, a `Makefile`, or CI config does not already say.
|
|
9
|
+
5. **Conventions that differ from defaults**
|
|
10
|
+
6. **Known pitfalls**
|
|
11
|
+
|
|
12
|
+
Terse imperative lines under plain headings. No prose beyond Orientation, no introduction, no summary. A bare fact appears only as the justification clause of an instruction — "Exclude `vendor/` from searches, it is 60% of tracked files", never "`vendor/` is 60% of tracked files". A prohibition names the alternative. At most two emphasis markers in the whole block.
|
|
13
|
+
|
|
14
|
+
## Worked example
|
|
15
|
+
|
|
16
|
+
````markdown
|
|
17
|
+
<!-- bmad:context -->
|
|
18
|
+
<!-- Verified 2026-08-08 against a1b2c3d. Managed by bmad-project-context; edits inside this block are replaced on refresh. Keep anything you want preserved outside the markers. -->
|
|
19
|
+
|
|
20
|
+
## acme-billing
|
|
21
|
+
|
|
22
|
+
Payment processing for Acme storefronts. TypeScript/Node, pnpm, Postgres. Planning lives in `docs/planning/`, tickets in Linear (ACME board).
|
|
23
|
+
|
|
24
|
+
## Policy
|
|
25
|
+
|
|
26
|
+
- Never push to main; PRs only, one approval.
|
|
27
|
+
- Never modify `legacy/` — frozen, being replaced. New work goes in `src/`.
|
|
28
|
+
- Never hand-edit `src/generated/` — run `pnpm codegen`.
|
|
29
|
+
|
|
30
|
+
## Where things are
|
|
31
|
+
|
|
32
|
+
- Webhook handling: `src/routes/webhooks.ts`; conventions in `docs/webhooks.md`
|
|
33
|
+
- Writing a migration? Read `docs/db-rules.md` first — ordering, transaction boundaries, pool limits.
|
|
34
|
+
- Billing service has its own guide: `services/billing/AGENTS.md`
|
|
35
|
+
|
|
36
|
+
## Running and verifying
|
|
37
|
+
|
|
38
|
+
- Run single test files while iterating; the full suite takes ~11 minutes.
|
|
39
|
+
- Integration tests need `docker compose up -d` first, and fail confusingly without it.
|
|
40
|
+
- CI also runs `pnpm typecheck`, which `pnpm test` does not cover.
|
|
41
|
+
|
|
42
|
+
## Conventions that differ from defaults
|
|
43
|
+
|
|
44
|
+
- Money is integer cents (`amountCents`), never floats — `src/lib/money.ts`
|
|
45
|
+
- All DB access goes through repositories in `src/repos/`; never call the client directly.
|
|
46
|
+
|
|
47
|
+
## Known pitfalls
|
|
48
|
+
|
|
49
|
+
- Stripe webhooks replay in staging every 6h — handlers must be idempotent.
|
|
50
|
+
- Use vitest matchers, not jest — agents repeatedly add jest syntax here.
|
|
51
|
+
|
|
52
|
+
<!-- /bmad:context -->
|
|
53
|
+
````
|
|
54
|
+
|
|
55
|
+
Fill the provenance line with the real date and the commit SHA verified against. Refresh diffs from that SHA.
|
package/src/bmm-skills/plan/bmad-sprint-planning/scripts/__pycache__/sprint_plan.cpython-311.pyc
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -77,7 +77,7 @@ Activation is complete. If `activation_steps_prepend` or `activation_steps_appen
|
|
|
77
77
|
| Architecture | `{planning_artifacts}/*architecture*.md` (whole) or `{planning_artifacts}/*architecture*/*.md` (sharded) | FULL_LOAD |
|
|
78
78
|
| UX Design | `{planning_artifacts}/*ux*.md` (whole) or `{planning_artifacts}/*ux*/*.md` (sharded) | FULL_LOAD |
|
|
79
79
|
| Spec | `{planning_artifacts}/*spec-*.md` (whole) | FULL_LOAD |
|
|
80
|
-
|
|
|
80
|
+
| Project Context | `AGENTS.md` in the affected repo (the `bmad:context` block) | FULL_LOAD |
|
|
81
81
|
|
|
82
82
|
## Execution
|
|
83
83
|
|
|
@@ -95,12 +95,11 @@ Activation is complete. If `activation_steps_prepend` or `activation_steps_appen
|
|
|
95
95
|
- Process the combined content as a single document
|
|
96
96
|
4. **Priority**: If both whole and sharded versions exist, use the whole document
|
|
97
97
|
|
|
98
|
-
**Discovery Process for
|
|
98
|
+
**Discovery Process for Project Context:**
|
|
99
99
|
|
|
100
|
-
1. **
|
|
101
|
-
2. **
|
|
102
|
-
3. **
|
|
103
|
-
4. **This document is optional** — skip if `{project_knowledge}` does not exist (greenfield projects)
|
|
100
|
+
1. **Read `AGENTS.md`** in the repo the change affects — the block between the `bmad:context` markers carries the policy, frozen paths, and conventions a course correction must respect.
|
|
101
|
+
2. **Follow only the pointers that relate to the impacted areas** — nested component files or linked rule files listed under "Where things are". Do not load them all.
|
|
102
|
+
3. **This document is optional** — skip if the repo has no `AGENTS.md` (greenfield projects).
|
|
104
103
|
|
|
105
104
|
**Fuzzy matching**: Be flexible with document names — users may use variations like `prd.md`, `bmm-prd.md`, `product-requirements.md`, etc.
|
|
106
105
|
|
package/src/bmm-skills/ship/bmad-retrospective/scripts/__pycache__/sprint_status.cpython-311.pyc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -48,7 +48,9 @@ PARTY_SKILL = "bmad-party-mode"
|
|
|
48
48
|
def _run_json(cmd):
|
|
49
49
|
"""Run a resolver script and parse its JSON stdout. None on any failure."""
|
|
50
50
|
try:
|
|
51
|
-
out = subprocess.run(
|
|
51
|
+
out = subprocess.run(
|
|
52
|
+
cmd, capture_output=True, text=True, encoding="utf-8", timeout=60
|
|
53
|
+
)
|
|
52
54
|
except (OSError, subprocess.SubprocessError):
|
|
53
55
|
return None
|
|
54
56
|
if out.returncode != 0 or not out.stdout.strip():
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|