discipline-md 0.1.0
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/LICENSE +21 -0
- package/README.md +80 -0
- package/bin/discipline.js +587 -0
- package/package.json +40 -0
- package/templates/.claude/settings.json +58 -0
- package/templates/AGENTS.md +463 -0
- package/templates/AGENT_TRACKER.md +138 -0
- package/templates/API_REFERENCE.md +131 -0
- package/templates/ARCHITECTURE.md +89 -0
- package/templates/ASSETS.md +90 -0
- package/templates/AUTONOMOUS_QUEUE.md +119 -0
- package/templates/BUILD_PLAN.md +89 -0
- package/templates/CHANGELOG.md +90 -0
- package/templates/CLAUDE.md +89 -0
- package/templates/CREDITS.md +109 -0
- package/templates/DATA_MODEL.md +88 -0
- package/templates/DECISIONS.md +120 -0
- package/templates/DEPLOYMENT.md +342 -0
- package/templates/HANDOFF.md +289 -0
- package/templates/IMPROVEMENT_LOOP.md +103 -0
- package/templates/INVESTIGATION.md +154 -0
- package/templates/LICENSE +68 -0
- package/templates/NOTICE +55 -0
- package/templates/OPEN_DECISIONS.md +61 -0
- package/templates/PLAYBOOK_FEEDBACK.md +87 -0
- package/templates/PROJECT_CONTEXT.md +91 -0
- package/templates/README.md +60 -0
- package/templates/ROADMAP.md +96 -0
- package/templates/SECURITY_AUDIT.md +235 -0
- package/templates/SETUP.md +162 -0
- package/templates/SPEC.md +105 -0
- package/templates/SPEC_WORKFLOW.md +173 -0
- package/templates/TODO.md +118 -0
- package/templates/USAGE.md +153 -0
- package/templates/VERIFICATION_GATE.md +68 -0
- package/templates/agents/CROSS_REPO_SYNC.md +124 -0
- package/templates/agents/DEBUGGER.md +112 -0
- package/templates/agents/PLANNER.md +111 -0
- package/templates/agents/README.md +64 -0
- package/templates/agents/RECON.md +99 -0
- package/templates/agents/SECURITY_REVIEWER.md +123 -0
- package/templates/agents/SPEC_ARCHITECT.md +133 -0
- package/templates/agents/STAKEHOLDER.md +197 -0
- package/templates/agents/_TEMPLATE.md +116 -0
- package/templates/agents/optional/ARCHITECT.md +109 -0
- package/templates/agents/optional/BACKEND_IMPACT.md +108 -0
- package/templates/agents/optional/DOC_AUDIT.md +108 -0
- package/templates/agents/optional/FRONTEND_IMPACT.md +109 -0
- package/templates/agents/optional/QUEUE_CURATOR.md +114 -0
- package/templates/agents/optional/TEST_STRATEGIST.md +107 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Discipline optional template. Install with: npx discipline-md add IMPROVEMENT_LOOP
|
|
3
|
+
Pairs with VERIFICATION_GATE.md (the ground-truth signal the loop is built on).
|
|
4
|
+
This is a COLD-PATH doc — read it when running or wiring the loop, not every session.
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Improvement Loop
|
|
8
|
+
|
|
9
|
+
A closed, recursive loop that uses AI subagents to **discover → execute → verify → evaluate → integrate → repeat** on this project. The recursion is that the discovery phase re-runs on the now-improved system, so the loop generates its own next work-list instead of waiting for a human to hand-write one.
|
|
10
|
+
|
|
11
|
+
This doc is mostly **composition, not new machinery** — the loop wires together Discipline primitives you already have:
|
|
12
|
+
|
|
13
|
+
- `AUTONOMOUS_QUEUE.md` — the work-list (discovery output / execution input).
|
|
14
|
+
- autonomy tags (`[autonomy: safe|review|needs-human-collab]`) + the curated queue — the two-gate human-judgment control.
|
|
15
|
+
- `DECISIONS.md` / `OPEN_DECISIONS.md` — judgment record + the inbox where the loop parks decisions it isn't allowed to make.
|
|
16
|
+
- `CHANGELOG.md` — completed work.
|
|
17
|
+
- `PLAYBOOK_FEEDBACK.md` — where the loop proposes improvements to *itself* (meta-recursion).
|
|
18
|
+
- the role roster in `AGENTS.md` / `agents/*` — `RECON` fans out for discovery; `SECURITY_REVIEWER` / `TEST_STRATEGIST` / `DEBUGGER` for adversarial evaluation. **The loop adds no new roles.**
|
|
19
|
+
|
|
20
|
+
The **one genuinely new primitive** is `VERIFICATION_GATE.md` — the machine-checkable ground-truth signal. Without it the loop optimizes "sounds done" instead of "is done" and silently rots. **Do not run the loop on any step that has no verification gate** — that step is judgment, not execution; escalate it.
|
|
21
|
+
|
|
22
|
+
## The two non-negotiables
|
|
23
|
+
|
|
24
|
+
1. **A ground-truth gate** (`VERIFICATION_GATE.md`). Every iteration must prove itself against a signal a human didn't generate — compile/test/run, an eval suite, a reproduction harness. The gate is what catches the agents' *own* mistakes (a fix that breaks a test, a "done" that doesn't build). No gate → no loop.
|
|
25
|
+
2. **Human judgment gates.** The loop is only allowed to act where (1) exists; every consequential, taste-dependent, or hard-to-reverse fork escalates to `OPEN_DECISIONS.md` and stops. Automate execution and adversarial evaluation; keep humans on *what's worth doing*.
|
|
26
|
+
|
|
27
|
+
## The cycle
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
1. DISCOVER fan out read-only RECON agents across dimensions (correctness /
|
|
31
|
+
lifetime / UX / robustness / security). Each returns STRUCTURED
|
|
32
|
+
findings (severity, location, fix-sketch, confidence). Dedup →
|
|
33
|
+
append to AUTONOMOUS_QUEUE.md with honest autonomy tags.
|
|
34
|
+
|
|
35
|
+
2. SELECT take the highest-severity items tagged [autonomy: safe] that are
|
|
36
|
+
also IN the queue (two-gate). Anything [needs-human-collab] →
|
|
37
|
+
OPEN_DECISIONS.md and STOP that item.
|
|
38
|
+
|
|
39
|
+
3. EXECUTE fan out implementation agents. Disjoint files run in parallel
|
|
40
|
+
(worktrees if they'd conflict); shared files run serially.
|
|
41
|
+
|
|
42
|
+
4. GATE run VERIFICATION_GATE. FAIL → loop-fix → re-gate (inner loop)
|
|
43
|
+
until green. Never trust an agent's "done" — re-run the gate.
|
|
44
|
+
|
|
45
|
+
5. EVALUATE fan out adversarial reviewers prompted to REFUTE the change
|
|
46
|
+
(multiple lenses, confidence vote). New findings → back to the
|
|
47
|
+
queue. The reviewer is NEVER the agent that wrote the code.
|
|
48
|
+
|
|
49
|
+
6. INTEGRATE commit; delete shipped items from TODO/queue and log them in
|
|
50
|
+
CHANGELOG (cleanup gate); record durable choices in DECISIONS.
|
|
51
|
+
|
|
52
|
+
7. CONVERGE repeat from 1. Stop when a DISCOVER pass is "dry" (K consecutive
|
|
53
|
+
rounds with no new finding above the severity floor) OR a budget /
|
|
54
|
+
iteration cap is hit OR the only remaining items are judgment.
|
|
55
|
+
|
|
56
|
+
8. REFLECT propose improvements to the loop's OWN contracts via
|
|
57
|
+
PLAYBOOK_FEEDBACK.md — human-reviewed, never auto-applied.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Stages 1→7 are the object-level recursion (the improved system gets re-scanned). Stage 8 is the meta-recursion (the framework improving how it improves). All loop state lives in the Markdown ledgers, so the loop is inspectable, diffable, and resumable from any point.
|
|
61
|
+
|
|
62
|
+
## Tier routing (see `AGENTS.md`)
|
|
63
|
+
|
|
64
|
+
- **DISCOVER / EVALUATE** read-only fan-out → **Recon** tier (cheap, broad). Bound expensive spend to where it pays.
|
|
65
|
+
- **EXECUTE** → **Workhorse** tier.
|
|
66
|
+
- **Architecture decisions, security-sensitive fixes, the verification-gate design itself** → **Frontier** tier.
|
|
67
|
+
|
|
68
|
+
The host stays at Workhorse and spawns Frontier subagents only for the hard subtask — never run the whole loop at Frontier tier.
|
|
69
|
+
|
|
70
|
+
## Convergence rules
|
|
71
|
+
|
|
72
|
+
- **Loop-until-dry, not fixed-N.** A simple "do 5 rounds" misses the tail; a single round misses the recursion. Stop after K consecutive empty DISCOVER passes (K=2 is a sane default).
|
|
73
|
+
- **Severity floor.** Only spend EXECUTE tokens on findings above a bar; log + defer the rest so cheap discovery is most of the cost, not expensive fix-fanout.
|
|
74
|
+
- **Hard budget cap.** A token/iteration ceiling the loop cannot exceed — the runaway backstop.
|
|
75
|
+
- **No silent truncation.** If the loop caps coverage (top-N, sampling, deferred items), it must LOG what it dropped. "Covered everything" must never quietly mean "covered the easy 80%."
|
|
76
|
+
|
|
77
|
+
## Failure modes this loop is designed against
|
|
78
|
+
|
|
79
|
+
- **Reward hacking** — optimizing the gate instead of the goal (deletes the failing test rather than fixing the bug). Mitigation: gate on *behavior / reproduction*, not self-reported success; a separate adversary confirms the fix is real; spot-check.
|
|
80
|
+
- **Drift** — wandering from intent over many iterations. Mitigation: re-state the goal + constraints in each iteration's context; a completeness-critic pass ("are we still solving the original problem?"); human re-anchoring at chapter boundaries.
|
|
81
|
+
- **"Looks done but isn't"** — the most common one. Mitigation: re-run the gate every iteration; an agent's "done" is intent, not proof.
|
|
82
|
+
- **Compounding error** — small mistakes amplify across rounds. Mitigation: gate every iteration (not every N); keep iterations small/atomic; isolate parallel work.
|
|
83
|
+
- **Cost runaway** — fan-out × loops. Mitigation: the convergence rules above; run on a cadence (manual or scheduled), not always-on.
|
|
84
|
+
|
|
85
|
+
## Running it
|
|
86
|
+
|
|
87
|
+
Harness-agnostic: the host follows the cycle above, using the roster in `AGENTS.md` for fan-out and `VERIFICATION_GATE.md` for the gate. For a Claude Code convenience wrapper (a `/improve-loop` skill + a cleanup-gate Stop hook), see `HARNESS_INTEGRATION.md` "deep mapping" — opt-in, adoption-gated, never required.
|
|
88
|
+
|
|
89
|
+
## Stop conditions (hand back to the human)
|
|
90
|
+
|
|
91
|
+
- A DISCOVER finding implies a scope/product change beyond the funded spec → `OPEN_DECISIONS.md`.
|
|
92
|
+
- A fix needs a design decision with no ground-truth answer → `OPEN_DECISIONS.md`.
|
|
93
|
+
- The verification gate itself is unreliable or missing for a needed step → fix the gate first; do not loop without it.
|
|
94
|
+
- Discovery keeps outpacing execution → surface to the stakeholder for a re-pitch.
|
|
95
|
+
|
|
96
|
+
## Inputs
|
|
97
|
+
|
|
98
|
+
- `AUTONOMOUS_QUEUE.md`, `TODO.md`, `PROJECT_CONTEXT.md`, `DECISIONS.md`, the role roster.
|
|
99
|
+
- `VERIFICATION_GATE.md` (required).
|
|
100
|
+
|
|
101
|
+
## Outputs
|
|
102
|
+
|
|
103
|
+
- A refilled, prioritized queue; shipped fixes logged in `CHANGELOG.md`; judgment forks parked in `OPEN_DECISIONS.md`; loop-self-improvements proposed in `PLAYBOOK_FEEDBACK.md`.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
TEMPLATE: INVESTIGATION.md (Tier B4 — bounded research writeup)
|
|
3
|
+
|
|
4
|
+
WHEN TO USE:
|
|
5
|
+
- Before committing to a tech-stack pick, hosting choice, framework migration,
|
|
6
|
+
or any other "we have to choose between N options" decision that benefits
|
|
7
|
+
from a structured side-by-side rather than an in-line discussion.
|
|
8
|
+
- When a question has been raised that's bigger than a TODO line item but
|
|
9
|
+
smaller than a full architectural decision (which would land in DECISIONS.md).
|
|
10
|
+
- When you need to record an investigation where the OPERATOR is the one who
|
|
11
|
+
ultimately picks — an investigation produces a recommendation, not a fait
|
|
12
|
+
accompli.
|
|
13
|
+
|
|
14
|
+
HOW TO USE:
|
|
15
|
+
1. Copy this file into the project's `docs/` directory.
|
|
16
|
+
2. Rename to the convention: INVESTIGATION_<TOPIC>.md
|
|
17
|
+
(UPPER_SNAKE_CASE topic, one file per investigation; e.g.
|
|
18
|
+
INVESTIGATION_DASHBOARD_TECH_STACK.md, INVESTIGATION_LLM_HOSTING.md).
|
|
19
|
+
3. Replace every <placeholder> with project-specific content.
|
|
20
|
+
4. When the operator picks, leave this file in place as a record. Add a
|
|
21
|
+
one-line "Decision: <picked> on <YYYY-MM-DD>; see DECISIONS.md#<anchor>"
|
|
22
|
+
at the top so future readers can trace from investigation to outcome.
|
|
23
|
+
5. Investigations are CHEAP TO ABANDON — if the operator picks differently
|
|
24
|
+
than recommended, that's fine; the value is in the record of options
|
|
25
|
+
considered, not in being right.
|
|
26
|
+
|
|
27
|
+
RELATED:
|
|
28
|
+
- Pairs with DECISIONS.md (where the final, locked decision lives).
|
|
29
|
+
- Pairs with OPEN_DECISIONS.md (where pending picks are tracked).
|
|
30
|
+
-->
|
|
31
|
+
|
|
32
|
+
# Investigation — <topic>
|
|
33
|
+
|
|
34
|
+
Status: <investigation in progress | investigation complete; operator decision pending | resolved YYYY-MM-DD — see DECISIONS.md#<anchor>>
|
|
35
|
+
|
|
36
|
+
> Note on sources: <state explicitly whether live web access (WebFetch / WebSearch)
|
|
37
|
+
> was available during the investigation. If not, note that version numbers and
|
|
38
|
+
> "active maintenance" claims may need a spot-check before the operator commits.>
|
|
39
|
+
|
|
40
|
+
## TL;DR
|
|
41
|
+
|
|
42
|
+
<two-to-four-sentence summary: which option to pick, why, what to avoid, what the
|
|
43
|
+
runner-up is. The operator should be able to read this section and stop if they
|
|
44
|
+
already trust the framing.>
|
|
45
|
+
|
|
46
|
+
## Background — why this came up
|
|
47
|
+
|
|
48
|
+
<one-to-three paragraphs: what triggered the investigation. The TODO line that
|
|
49
|
+
spawned it, the milestone it gates, the decision that's blocked on it. Include
|
|
50
|
+
enough context that a reader six months from now can re-derive the question.>
|
|
51
|
+
|
|
52
|
+
## Requirements
|
|
53
|
+
|
|
54
|
+
<bulleted list — the hard constraints the option must meet. Cite the source doc
|
|
55
|
+
that anchors each constraint where possible (e.g. "Single operator — per
|
|
56
|
+
PROJECT_CONTEXT.md §Non-Goals").>
|
|
57
|
+
|
|
58
|
+
- <constraint 1, with citation if applicable>
|
|
59
|
+
- <constraint 2>
|
|
60
|
+
- <constraint 3>
|
|
61
|
+
- <…>
|
|
62
|
+
|
|
63
|
+
## Candidates Compared
|
|
64
|
+
|
|
65
|
+
### <Option A>
|
|
66
|
+
|
|
67
|
+
**Elevator pitch.** <one-to-two-sentence description of the option.>
|
|
68
|
+
|
|
69
|
+
**Learning curve.** <hours / days / weeks to a working prototype, with what assumed prerequisites.>
|
|
70
|
+
|
|
71
|
+
**Ecosystem.** <maintenance status, community size, recent release cadence, vendor stability.>
|
|
72
|
+
|
|
73
|
+
**<criterion-1, e.g. Charting | Performance | Pydantic reuse>.** <how the option handles it.>
|
|
74
|
+
|
|
75
|
+
**<criterion-2>.** <…>
|
|
76
|
+
|
|
77
|
+
**Deployment.** <where it can run, free-tier options, self-host viability.>
|
|
78
|
+
|
|
79
|
+
**Footguns.** <bulleted list of gotchas — known weak points, surprises, things that bite teams who pick this option.>
|
|
80
|
+
|
|
81
|
+
**Verdict.** <one-paragraph judgment for THIS use case.>
|
|
82
|
+
|
|
83
|
+
### <Option B>
|
|
84
|
+
|
|
85
|
+
(same shape as Option A)
|
|
86
|
+
|
|
87
|
+
### <Option C>
|
|
88
|
+
|
|
89
|
+
(same shape)
|
|
90
|
+
|
|
91
|
+
### <Option D — optional, only if it's a real candidate>
|
|
92
|
+
|
|
93
|
+
(same shape)
|
|
94
|
+
|
|
95
|
+
## Comparison table
|
|
96
|
+
|
|
97
|
+
| Option | <criterion-1> | <criterion-2> | <criterion-3> | <criterion-4> | Maturity | Verdict for this use case |
|
|
98
|
+
| ------------- | ------------- | ------------- | ------------- | ------------- | ---------- | ------------------------------------ |
|
|
99
|
+
| <Option A> | <…> | <…> | <…> | <…> | <…> | **Recommended** |
|
|
100
|
+
| <Option B> | <…> | <…> | <…> | <…> | <…> | <runner-up | overkill | wrong-fit> |
|
|
101
|
+
| <Option C> | <…> | <…> | <…> | <…> | <…> | <…> |
|
|
102
|
+
| <Option D> | <…> | <…> | <…> | <…> | <…> | <avoid for this build> |
|
|
103
|
+
|
|
104
|
+
## Verdict / Recommendation
|
|
105
|
+
|
|
106
|
+
**<Option A>.** The decision is driven by <number> concrete properties of this
|
|
107
|
+
use case, not by general popularity:
|
|
108
|
+
|
|
109
|
+
1. **<property-1>.** <one paragraph linking the property to why option A wins on it.>
|
|
110
|
+
2. **<property-2>.** <…>
|
|
111
|
+
3. **<property-3>.** <…>
|
|
112
|
+
|
|
113
|
+
If the operator finds <Option A> limiting after the MVP ships
|
|
114
|
+
(e.g. <concrete trigger>), **migrating to <Option B> later is straightforward**
|
|
115
|
+
because <reason — usually a shared substrate, e.g. "both are Python + Plotly,
|
|
116
|
+
the schema imports don't change">.
|
|
117
|
+
|
|
118
|
+
## Operator Decision Pending
|
|
119
|
+
|
|
120
|
+
- **Pending?** <yes | no — if no, skip this section>
|
|
121
|
+
- **What's needed:** <a sentence stating exactly what the operator must do — pick A vs. B vs. C, or sign off on the recommendation, or provide info that the investigation could not get.>
|
|
122
|
+
- **Blocking:** <what work is blocked by this decision, if anything>
|
|
123
|
+
- **Default if no decision:** <what the project does in absence of a pick — proceed with recommendation? wait? something else?>
|
|
124
|
+
|
|
125
|
+
## Next Steps
|
|
126
|
+
|
|
127
|
+
<assuming the recommendation is accepted, the concrete steps to act on it.
|
|
128
|
+
Numbered list. Each step is short and actionable.>
|
|
129
|
+
|
|
130
|
+
1. <step 1, e.g. "Provision the chosen hosting tier and capture the project ID in DEPLOYMENT.md.">
|
|
131
|
+
2. <step 2>
|
|
132
|
+
3. <step 3>
|
|
133
|
+
4. <…>
|
|
134
|
+
|
|
135
|
+
## Open Questions
|
|
136
|
+
|
|
137
|
+
<questions the investigation could NOT answer from available materials —
|
|
138
|
+
operator follow-up, vendor outreach, or a spike on the operator's own account.
|
|
139
|
+
Be honest about the unknowns so the operator can decide whether to spend the
|
|
140
|
+
time to close them or to ship under uncertainty.>
|
|
141
|
+
|
|
142
|
+
- <unknown 1 — what would close it>
|
|
143
|
+
- <unknown 2>
|
|
144
|
+
- <…>
|
|
145
|
+
|
|
146
|
+
## Sources Consulted
|
|
147
|
+
|
|
148
|
+
<short list of docs read / URLs hit / project files inspected. If live web
|
|
149
|
+
access was denied, name what would have been consulted and recommend a
|
|
150
|
+
verification step.>
|
|
151
|
+
|
|
152
|
+
- <source 1>
|
|
153
|
+
- <source 2>
|
|
154
|
+
- <…>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
### LICENSE — STARTER (replace the placeholders before publishing)
|
|
2
|
+
###
|
|
3
|
+
### This file goes at the REPO ROOT, not in `docs/`. When you copy
|
|
4
|
+
### `templates/*` into a new project, move LICENSE and NOTICE up to
|
|
5
|
+
### the project root.
|
|
6
|
+
###
|
|
7
|
+
### **Default: All Rights Reserved** (below). This is intentional: the
|
|
8
|
+
### framework defaults to closed-source so that open-sourcing is an
|
|
9
|
+
### explicit, conscious decision rather than an accident. Replace
|
|
10
|
+
### <YEAR> and <COPYRIGHT_HOLDER>, delete this header block, and you're
|
|
11
|
+
### done.
|
|
12
|
+
###
|
|
13
|
+
### **Switch to an open-source license when:**
|
|
14
|
+
###
|
|
15
|
+
### - The project incorporates copyleft code (GPL, AGPL) — your project
|
|
16
|
+
### MUST be open-sourced under a compatible license.
|
|
17
|
+
### - The project incorporates code under a license that requires
|
|
18
|
+
### propagation of attribution / source distribution at scale.
|
|
19
|
+
### - You consciously choose to open-source for community / collaboration
|
|
20
|
+
### reasons.
|
|
21
|
+
###
|
|
22
|
+
### **Common alternatives** (replace the All Rights Reserved body
|
|
23
|
+
### below with the chosen license's verbatim text — do not paraphrase;
|
|
24
|
+
### courts read the exact words):
|
|
25
|
+
###
|
|
26
|
+
### - **MIT** — permissive, most common for open source. Lets anyone do
|
|
27
|
+
### anything as long as they preserve the copyright notice.
|
|
28
|
+
### - **Apache-2.0** — permissive + explicit patent grant. If you choose
|
|
29
|
+
### this, ALSO ship a `NOTICE` file at repo root (see `templates/NOTICE`).
|
|
30
|
+
### - **BSD-3-Clause** — permissive, similar to MIT plus a non-endorsement
|
|
31
|
+
### clause.
|
|
32
|
+
### - **GPL-3.0 / AGPL-3.0** — copyleft. Derivatives must be open-sourced
|
|
33
|
+
### under the same license. AGPL extends copyleft to network-served
|
|
34
|
+
### software.
|
|
35
|
+
### - **CC0 / CC-BY / CC-BY-SA** — for content (text, art, media).
|
|
36
|
+
### Use alongside a code license, not in place of one.
|
|
37
|
+
###
|
|
38
|
+
### Full text for each: https://choosealicense.com or https://spdx.org/licenses
|
|
39
|
+
###
|
|
40
|
+
### **Mixed-license projects** (code + copyrighted media, e.g. games /
|
|
41
|
+
### ARGs / creative content): keep "All Rights Reserved" for media and
|
|
42
|
+
### state any open-source code license boundary explicitly at the top
|
|
43
|
+
### of the file before the license body. Example:
|
|
44
|
+
###
|
|
45
|
+
### The source code in this repository (files under `src/`,
|
|
46
|
+
### `backend/`, etc.) is licensed under the MIT License (text
|
|
47
|
+
### below). Audio, artwork, and other media assets are All Rights
|
|
48
|
+
### Reserved by <HOLDER> and are NOT covered by that license.
|
|
49
|
+
###
|
|
50
|
+
### Once filled in, the rest of this file should read as a plain license
|
|
51
|
+
### statement with no comment markers.
|
|
52
|
+
|
|
53
|
+
Copyright (c) <YEAR> <COPYRIGHT_HOLDER>
|
|
54
|
+
All Rights Reserved.
|
|
55
|
+
|
|
56
|
+
No part of this software, its documentation, or its associated assets
|
|
57
|
+
may be reproduced, distributed, transmitted, modified, or used to
|
|
58
|
+
prepare derivative works in any form or by any means, electronic or
|
|
59
|
+
mechanical, without the prior written permission of the copyright
|
|
60
|
+
holder, except as permitted by applicable law (e.g. fair use, fair
|
|
61
|
+
dealing) or by the terms of any separate written agreement.
|
|
62
|
+
|
|
63
|
+
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
64
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
65
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
66
|
+
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM,
|
|
67
|
+
DAMAGES, OR OTHER LIABILITY ARISING FROM THE USE OF OR INABILITY TO
|
|
68
|
+
USE THIS SOFTWARE.
|
package/templates/NOTICE
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
### NOTICE — STARTER (replace before publishing)
|
|
2
|
+
###
|
|
3
|
+
### This file goes at the REPO ROOT, not in `docs/`. When you copy
|
|
4
|
+
### `templates/*` into a new project, move LICENSE and NOTICE up to
|
|
5
|
+
### the project root.
|
|
6
|
+
###
|
|
7
|
+
### What this file is:
|
|
8
|
+
###
|
|
9
|
+
### NOTICE is a human-readable summary of the third-party components
|
|
10
|
+
### bundled or distributed with this project, with their copyright
|
|
11
|
+
### notices and license types. It satisfies attribution obligations for
|
|
12
|
+
### dependencies whose licenses require them (Apache-2.0 explicitly;
|
|
13
|
+
### BSD-3-Clause non-endorsement; some MIT-style licenses by convention).
|
|
14
|
+
###
|
|
15
|
+
### **Apache-2.0 specifically requires a NOTICE file** at the root of
|
|
16
|
+
### the distribution if any included Apache-2.0 component shipped one.
|
|
17
|
+
### NOTICE is not optional in that case — it must propagate.
|
|
18
|
+
###
|
|
19
|
+
### **CREDITS vs NOTICE**: `docs/CREDITS.md` is the human-friendly
|
|
20
|
+
### attribution surface (what each library is, why it's used, where it
|
|
21
|
+
### lives in the project). NOTICE is the legal-flavor summary that
|
|
22
|
+
### travels with distributions. Both can exist; CREDITS is for
|
|
23
|
+
### contributors and curiosity, NOTICE is for license compliance.
|
|
24
|
+
###
|
|
25
|
+
### Replace the placeholders below, populate the components list from
|
|
26
|
+
### your actual dependencies, and DELETE this header before shipping.
|
|
27
|
+
|
|
28
|
+
<PROJECT_NAME>
|
|
29
|
+
Copyright (c) <YEAR> <COPYRIGHT_HOLDER>
|
|
30
|
+
|
|
31
|
+
This product includes software developed by third parties. The full
|
|
32
|
+
list of dependencies, their sources, and their licenses lives in
|
|
33
|
+
`docs/CREDITS.md`. Components whose licenses require notice-level
|
|
34
|
+
attribution are listed below with the required text verbatim.
|
|
35
|
+
|
|
36
|
+
----
|
|
37
|
+
|
|
38
|
+
### <Component name> (<License SPDX-id>)
|
|
39
|
+
|
|
40
|
+
Copyright notice from upstream, copied verbatim if the license requires
|
|
41
|
+
it. For Apache-2.0 components, copy the upstream NOTICE file's contents
|
|
42
|
+
into a sub-block here.
|
|
43
|
+
|
|
44
|
+
----
|
|
45
|
+
|
|
46
|
+
### <Second component name> (<License SPDX-id>)
|
|
47
|
+
|
|
48
|
+
Copyright notice...
|
|
49
|
+
|
|
50
|
+
----
|
|
51
|
+
|
|
52
|
+
(Add one block per component that requires notice-level attribution.
|
|
53
|
+
Components under permissive licenses with no NOTICE requirement —
|
|
54
|
+
plain MIT without an explicit NOTICE file upstream — do not need to
|
|
55
|
+
appear here; CREDITS.md is enough for them.)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Open Decisions
|
|
2
|
+
|
|
3
|
+
Staging file for design or product decisions that block active work and need user input before implementation can proceed. Sits between "a decision arose during a session" and "the decision is recorded in `docs/DECISIONS.md`" (durable architecture) or folded into a `docs/TODO.md` entry (implementation detail).
|
|
4
|
+
|
|
5
|
+
When this file holds only the heading, the project is unblocked.
|
|
6
|
+
|
|
7
|
+
## When to add an entry
|
|
8
|
+
|
|
9
|
+
- A paired session with the user produced a concrete question that needs an answer before the next session can ship its work.
|
|
10
|
+
- An autonomous run hit a fork in the road that required user judgment beyond the autonomy gate (`[autonomy: needs-human-collab]` work).
|
|
11
|
+
- An ambiguity surfaced that, if resolved by the agent unilaterally, would lock in an architectural choice the user should make.
|
|
12
|
+
|
|
13
|
+
## When NOT to add an entry
|
|
14
|
+
|
|
15
|
+
- Implementation details that don't change observable behavior — pick the cleanest option and note it in the relevant TODO.
|
|
16
|
+
- Trivial decisions where the user has already given a directive in conversation — write the answer directly into the affected doc / code.
|
|
17
|
+
- Speculative "we might want to think about X someday" entries that aren't blocking active work — those belong in `docs/ROADMAP.md` or the relevant TODO.
|
|
18
|
+
- Wording or formatting preferences — pick one and move on.
|
|
19
|
+
|
|
20
|
+
The file is a staging inbox, not a wishlist. Bloat here makes it useless as a blocker surface.
|
|
21
|
+
|
|
22
|
+
## When to remove an entry
|
|
23
|
+
|
|
24
|
+
Remove the entry once the user has answered AND the answer has been folded into:
|
|
25
|
+
|
|
26
|
+
- `docs/DECISIONS.md` if the decision is durable architecture worth recording for future maintainers.
|
|
27
|
+
- The relevant `docs/TODO.md` entry if it's an implementation detail.
|
|
28
|
+
- The kickoff prompt for the next session if it's session-scoped guidance.
|
|
29
|
+
|
|
30
|
+
Don't leave answered entries here as a log — that's what `docs/CHANGELOG.md` and `docs/DECISIONS.md` are for.
|
|
31
|
+
|
|
32
|
+
## Format
|
|
33
|
+
|
|
34
|
+
Each entry follows this template. Numbering is project-defined — match prior conversation references where possible so the user can trace decisions back to the discussion that surfaced them.
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
### #N. Short title
|
|
38
|
+
|
|
39
|
+
**Context**: brief statement of why this is blocking and what work is gated on it.
|
|
40
|
+
|
|
41
|
+
**Options**:
|
|
42
|
+
- (a) Option A.
|
|
43
|
+
- (b) Option B.
|
|
44
|
+
|
|
45
|
+
**Recommendation**: (X) — short reason.
|
|
46
|
+
|
|
47
|
+
**Asymmetry** (optional): what the worst case looks like if the user picks differently.
|
|
48
|
+
|
|
49
|
+
> **Your answer**:
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Group entries by topic (Operational, [feature area], etc.) when more than ~6 are open at once. Use letters (`A`, `B`, ...) for cross-cutting operational decisions and numbers (`#11`, `#12`, ...) for feature-area decisions if the project benefits from the distinction.
|
|
53
|
+
|
|
54
|
+
## Open decisions
|
|
55
|
+
|
|
56
|
+
*(empty — add entries here as they arise.)*
|
|
57
|
+
|
|
58
|
+
## Notes
|
|
59
|
+
|
|
60
|
+
- This file is project-local. Patterns that prove themselves cross-project should be promoted into the framework template via the playbook improvement loop (`docs/PLAYBOOK_FEEDBACK.md`).
|
|
61
|
+
- If an entry has been open for >2 weeks without movement, surface it to the user explicitly rather than letting it fossilize. Stale blockers are worse than visible blockers.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Playbook Feedback
|
|
2
|
+
|
|
3
|
+
Staging file for proposed improvements to the project's workflow docs (`docs/AGENTS.md`, `docs/HANDOFF.md`, `docs/TODO.md` conventions, completion gate, etc.) and for proposed promotions of project-local patterns to the framework template at `the framework's canonical templates/`.
|
|
4
|
+
|
|
5
|
+
This file is the **inbox** between "the agent noticed something" and "the canonical doc gets edited." Direct edits to AGENTS / HANDOFF / etc. without going through this file skip the user review gate.
|
|
6
|
+
|
|
7
|
+
See `docs/AGENTS.md` (Playbook Improvement Loop section) for the full lifecycle.
|
|
8
|
+
|
|
9
|
+
## Workflow-impact discipline (hard rule)
|
|
10
|
+
|
|
11
|
+
**Do not propose changes just to check a box.** Improvement-theater is the failure mode — adding aspirational language because language is easy. Stale aspirational guidance is worse than absent guidance.
|
|
12
|
+
|
|
13
|
+
A proposal must satisfy at least one of:
|
|
14
|
+
|
|
15
|
+
1. **A real friction point in this session would have been prevented or reduced** by the change.
|
|
16
|
+
2. **A real friction point is foreseeable in upcoming work** and the change prevents it.
|
|
17
|
+
3. **A pattern showed up multiple times** and is worth codifying so future agents don't re-derive it.
|
|
18
|
+
4. **A subagent role's contract had to be bent** to fit a real situation, suggesting the contract needs tuning.
|
|
19
|
+
|
|
20
|
+
If none of these apply, do not propose. Note the observation in your end-of-session summary if useful, but do not add it here.
|
|
21
|
+
|
|
22
|
+
## Two kinds of proposal
|
|
23
|
+
|
|
24
|
+
- **Local improvements** — edits to project-local docs (this repo's `AGENTS.md`, `HANDOFF.md`, TODO conventions, completion gate, etc.). Most proposals are local.
|
|
25
|
+
- **Template promotions** — a pattern that started project-local has proved general enough to push back to `the framework's canonical templates/`. Higher bar: the pattern should have shipped at least once in this project and demonstrably worked. Don't promote untested ideas.
|
|
26
|
+
|
|
27
|
+
## Lifecycle
|
|
28
|
+
|
|
29
|
+
1. **Propose** — agent adds an entry below under Proposed Local Improvements or Proposed Template Promotions, with rationale + the specific friction point that motivated it.
|
|
30
|
+
2. **Review** — user reads the proposal, accepts / rejects / asks for revision.
|
|
31
|
+
3. **Apply** — on accept, agent edits the canonical doc (project-local AGENTS/HANDOFF/etc., or framework template), adds a `docs/CHANGELOG.md` entry, moves the PLAYBOOK_FEEDBACK entry to "Applied (recent)" **with the friction it was meant to kill recorded inline** (so a later session can check whether it actually worked).
|
|
32
|
+
4. **Trim** — once the CHANGELOG entry exists, the "Applied (recent)" entry can be deleted from this file on the next cleanup pass.
|
|
33
|
+
5. **Verify (closes the loop — later, not the same session)** — the next session that works in the changed area checks whether the recorded friction is actually gone. Gone → the change earned its keep; let it stand. The rule is being ignored, worked around, or the friction recurs → that is improvement-theater surfacing late: propose the rule's *removal* or revision. A loop that only ever adds guidance becomes the rot it was built to prevent; this step is what lets it subtract.
|
|
34
|
+
|
|
35
|
+
Rejected proposals get a brief one-line note under "Rejected (recent)" so the same idea does not get re-proposed by a future session.
|
|
36
|
+
|
|
37
|
+
## Proposed Local Improvements
|
|
38
|
+
|
|
39
|
+
<!--
|
|
40
|
+
Format:
|
|
41
|
+
### YYYY-MM-DD — Short title
|
|
42
|
+
|
|
43
|
+
**Trigger:** the friction point or pattern that motivated this proposal. Be specific.
|
|
44
|
+
**Proposed change:** exact edit (which doc, what wording).
|
|
45
|
+
**Workflow impact:** what would change for next session if this lands.
|
|
46
|
+
**Tier:** small / medium / large (rough effort to write up).
|
|
47
|
+
-->
|
|
48
|
+
|
|
49
|
+
(none yet)
|
|
50
|
+
|
|
51
|
+
## Proposed Template Promotions
|
|
52
|
+
|
|
53
|
+
<!--
|
|
54
|
+
Format:
|
|
55
|
+
### YYYY-MM-DD — Short title
|
|
56
|
+
|
|
57
|
+
**Project pattern:** the project-local doc/section that has proved its worth.
|
|
58
|
+
**Track record:** what specifically demonstrated the pattern works (sessions / commits / measurable improvement).
|
|
59
|
+
**Proposed promotion:** exact edit to the framework template (file path under `the framework's canonical templates/`).
|
|
60
|
+
**Generality check:** would another project (different domain) benefit from this without modification?
|
|
61
|
+
-->
|
|
62
|
+
|
|
63
|
+
(none yet)
|
|
64
|
+
|
|
65
|
+
## Applied (recent)
|
|
66
|
+
|
|
67
|
+
<!--
|
|
68
|
+
Once a proposal is approved and the canonical doc is edited + CHANGELOG entry added, move the entry here briefly. Trim on the next cleanup pass once CHANGELOG covers it.
|
|
69
|
+
|
|
70
|
+
### YYYY-MM-DD — Short title (applied)
|
|
71
|
+
**Friction it killed:** the specific friction this change was meant to remove (carried over from the proposal's Trigger).
|
|
72
|
+
**Verify by:** the next session that touches <area/doc> — confirm the friction is gone (let it stand) or recurring (re-propose removal/revision per Lifecycle step 5).
|
|
73
|
+
Brief note + CHANGELOG date reference.
|
|
74
|
+
-->
|
|
75
|
+
|
|
76
|
+
(none yet)
|
|
77
|
+
|
|
78
|
+
## Rejected (recent)
|
|
79
|
+
|
|
80
|
+
<!--
|
|
81
|
+
Brief note so future agents don't re-propose the same idea.
|
|
82
|
+
|
|
83
|
+
### YYYY-MM-DD — Short title (rejected)
|
|
84
|
+
One-line reason the user rejected.
|
|
85
|
+
-->
|
|
86
|
+
|
|
87
|
+
(none yet)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Project Context
|
|
2
|
+
|
|
3
|
+
Update this document when product direction, user audience, design language, runtime shape, constraints, or non-obvious intent changes.
|
|
4
|
+
|
|
5
|
+
## Elevator Pitch
|
|
6
|
+
|
|
7
|
+
One paragraph. What this is, who it serves, what problem it solves. The hook a future contributor reads first.
|
|
8
|
+
|
|
9
|
+
## What This Project Is
|
|
10
|
+
|
|
11
|
+
*One paragraph: what it is, who it serves, what problem it solves. Expand on the elevator pitch above with one level more detail. Not a feature list — that lives in CHANGELOG and the cold-path docs.*
|
|
12
|
+
|
|
13
|
+
Describe the product, application, library, or system.
|
|
14
|
+
|
|
15
|
+
## Runtime Shape
|
|
16
|
+
|
|
17
|
+
*High-level system overview. Point readers at deeper docs (`ARCHITECTURE.md`, `DATA_MODEL.md`, `API_REFERENCE.md`) rather than restating their content.*
|
|
18
|
+
|
|
19
|
+
- Frontend / client surface: (web app, CLI, library, mobile, embedded — or "n/a")
|
|
20
|
+
- Backend / server: (Express on Railway, serverless functions, none)
|
|
21
|
+
- Persistence: (Postgres, SQLite file, no persistent state)
|
|
22
|
+
- Build step: (yes / no — keeps setup expectations clear)
|
|
23
|
+
|
|
24
|
+
Delete or rename rows that don't apply. A pure-source library may have only a "Build step" row.
|
|
25
|
+
|
|
26
|
+
## Goals
|
|
27
|
+
|
|
28
|
+
*Outcomes the project aims to achieve, not features it ships.*
|
|
29
|
+
|
|
30
|
+
- Goal 1
|
|
31
|
+
- Goal 2
|
|
32
|
+
- Goal 3
|
|
33
|
+
|
|
34
|
+
## Users / Audience
|
|
35
|
+
|
|
36
|
+
*Personas and their needs. Not feature lists.*
|
|
37
|
+
|
|
38
|
+
Describe who uses this and what they need.
|
|
39
|
+
|
|
40
|
+
## Product Principles
|
|
41
|
+
|
|
42
|
+
*The "feel" or quality bar. What good looks like.*
|
|
43
|
+
|
|
44
|
+
- Principle 1
|
|
45
|
+
- Principle 2
|
|
46
|
+
|
|
47
|
+
## Design / UX Direction
|
|
48
|
+
|
|
49
|
+
*Visual language, interaction patterns, tone, and accessibility requirements. Libraries / CLIs may rename this section to "API Surface Style" (naming conventions, error message tone, output format) or delete it if the project has no UI.*
|
|
50
|
+
|
|
51
|
+
Describe visual language, interaction patterns, tone, and accessibility requirements.
|
|
52
|
+
|
|
53
|
+
## Important Constraints
|
|
54
|
+
|
|
55
|
+
*Limits the project must respect. Sub-categorize when the list grows:*
|
|
56
|
+
|
|
57
|
+
### Technical
|
|
58
|
+
- Constraint.
|
|
59
|
+
|
|
60
|
+
### Regulatory / Compliance
|
|
61
|
+
- Constraint.
|
|
62
|
+
|
|
63
|
+
### Resource (time, budget, team size)
|
|
64
|
+
- Constraint.
|
|
65
|
+
|
|
66
|
+
(Drop sub-categories if a flat list of 2–4 items is enough.)
|
|
67
|
+
|
|
68
|
+
## Non-Goals
|
|
69
|
+
|
|
70
|
+
*What this project explicitly does NOT do. Prevents scope creep and clarifies the project's edges.*
|
|
71
|
+
|
|
72
|
+
- Non-goal 1
|
|
73
|
+
- Non-goal 2
|
|
74
|
+
|
|
75
|
+
## Known Open Questions
|
|
76
|
+
|
|
77
|
+
*Decisions deferred, ambiguity worth surfacing. Resolve over time; once resolved, the answer lands in `DECISIONS.md`.*
|
|
78
|
+
|
|
79
|
+
- Question 1
|
|
80
|
+
- Question 2
|
|
81
|
+
|
|
82
|
+
## Related Documents
|
|
83
|
+
|
|
84
|
+
This file is meant to be a thin index, not a deep reference. For specifics:
|
|
85
|
+
|
|
86
|
+
- Persistence and data shape: `docs/DATA_MODEL.md`
|
|
87
|
+
- API endpoints / public surface: `docs/API_REFERENCE.md`
|
|
88
|
+
- Runtime architecture: `docs/ARCHITECTURE.md`
|
|
89
|
+
- Deployment + operations: `docs/DEPLOYMENT.md`
|
|
90
|
+
- Decision history: `docs/DECISIONS.md`
|
|
91
|
+
- Long-term planning: `docs/ROADMAP.md`
|