You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PLANS.md
+42-42Lines changed: 42 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ This document describes the requirements for an execution plan ("ExecPlan"), a d
6
6
7
7
When authoring an executable specification (ExecPlan), follow PLANS.md _to the letter_. If it is not in your context, refresh your memory by reading the entire PLANS.md file. Be thorough in reading (and re-reading) source material to produce an accurate specification. When creating a spec, start from the skeleton and flesh it out as you do your research.
8
8
9
-
When implementing an executable specification (ExecPlan), do not prompt the user for "next steps"; always proceed to the next milestone. Keep all sections up to date, add or split entries in the list at every stopping point to affirmatively state the progress made and next steps. Resolve ambiguities autonomously and commit frequently.
9
+
When implementing an executable specification (ExecPlan), do not prompt the user for "next steps"; simply proceed to the next milestone. Keep all sections up to date, add or split entries in the list at every stopping point to affirmatively state the progress made and next steps. Resolve ambiguities autonomously, and commit frequently.
10
10
11
11
When discussing an executable specification (ExecPlan), record decisions in a log in the spec for posterity; it should be unambiguously clear why any change to the specification was made. ExecPlans are living documents, and it should always be possible to restart from _only_ the ExecPlan and no other work.
12
12
13
-
When researching a design with challenging requirements or significant unknowns, use milestones to implement proof of concepts, "toy implementations," etc., that allow validating whether the user's proposal is feasible. Read the source code of libraries by finding or acquiring them, research deeply, and include prototypes to guide a fuller implementation.
13
+
When researching a design with challenging requirements or significant unknowns, use milestones to implement proof of concepts, "toy implementations", etc., that allow validating whether the user's proposal is feasible. Read the source code of libraries by finding or acquiring them, research deeply, and include prototypes to guide a fuller implementation.
14
14
15
15
## Requirements
16
16
@@ -19,7 +19,7 @@ NON-NEGOTIABLE REQUIREMENTS:
19
19
* Every ExecPlan must be fully self-contained. Self-contained means that in its current form it contains all knowledge and instructions needed for a novice to succeed.
20
20
* Every ExecPlan is a living document. Contributors are required to revise it as progress is made, as discoveries occur, and as design decisions are finalized. Each revision must remain fully self-contained.
21
21
* Every ExecPlan must enable a complete novice to implement the feature end-to-end without prior knowledge of this repo.
22
-
* Every ExecPlan must produce a demonstrably working behavior, not merely code changes to "meet a definition."
22
+
* Every ExecPlan must produce a demonstrably working behavior, not merely code changes to "meet a definition".
23
23
* Every ExecPlan must define every term of art in plain language or do not use it.
24
24
25
25
Purpose and intent come first. Begin by explaining, in a few sentences, why the work matters from a user's perspective: what someone can do after this change that they could not do before, and how to see it working. Then guide the reader through the exact steps to achieve that outcome, including what to edit, what to run, and what they should observe.
@@ -28,21 +28,21 @@ The agent executing your plan can list files, read files, search, run the projec
28
28
29
29
## Formatting
30
30
31
-
Format and envelope are straightforward and strict. Each ExecPlan must be one single fenced code block labeled as `md` that begins and ends with triple backticks. Do not nest additional triple-backtick code fences inside; when you need to show commands, transcripts, diffs, or code, present them as indented blocks within that single fence. Use indentation for clarity rather than code fences inside an ExecPlan to avoid prematurely closing the ExecPlan's code fence. Use two newlines after every heading, use # and ## and so on, and correct syntax for ordered and unordered lists.
31
+
Format and envelope are simple and strict. Each ExecPlan must be one single fenced code block labeled as `md` that begins and ends with triple backticks. Do not nest additional triple-backtick code fences inside; when you need to show commands, transcripts, diffs, or code, present them as indented blocks within that single fence. Use indentation for clarity rather than code fences inside an ExecPlan to avoid prematurely closing the ExecPlan's code fence. Use two newlines after every heading, use # and ## and so on, and correct syntax for ordered and unordered lists.
32
32
33
33
When writing an ExecPlan to a Markdown (.md) file where the content of the file *is only* the single ExecPlan, you should omit the triple backticks.
34
34
35
-
Write in plain prose. Prefer sentences to lists. Avoid checklists, tables, and long enumerations unless brevity would obscure meaning. Checklists are permitted only in the `Progress` section, where they are mandatory. Narrative sections must remain prose-first.
35
+
Write in plain prose. Prefer sentences over lists. Avoid checklists, tables, and long enumerations unless brevity would obscure meaning. Checklists are permitted only in the `Progress` section, where they are mandatory. Narrative sections must remain prose-first.
36
36
37
37
## Guidelines
38
38
39
-
Self-containment and plain language are paramount. If you introduce a phrase that is not ordinary English ("daemon," "middleware," "RPC gateway," "filter graph"), define it immediately and remind the reader how it manifests in this repository (for example, by naming the files or commands where it appears). Do not say "as defined previously" or "according to the architecture doc." Include the necessary explanation here, even if you repeat yourself.
39
+
Self-containment and plain language are paramount. If you introduce a phrase that is not ordinary English ("daemon", "middleware", "RPC gateway", "filter graph"), define it immediately and remind the reader how it manifests in this repository (for example, by naming the files or commands where it appears). Do not say "as defined previously" or "according to the architecture doc." Include the needed explanation here, even if you repeat yourself.
40
40
41
41
Avoid common failure modes. Do not rely on undefined jargon. Do not describe "the letter of a feature" so narrowly that the resulting code compiles but does nothing meaningful. Do not outsource key decisions to the reader. When ambiguity exists, resolve it in the plan itself and explain why you chose that path. Err on the side of over-explaining user-visible effects and under-specifying incidental implementation details.
42
42
43
-
Anchor the plan with observable outcomes. State what the user can do after implementation, the commands to run, and the outputs they should see. Acceptance should be phrased as behavior a human can verify ("after starting the server, navigating to [http://localhost:8080/health](http://localhost:8080/health) returns HTTP 200 with body OK") rather than internal attributes ("added a health check struct"). If a change is internal, explain how its impact can still be demonstrated (for example, by running tests that fail before and pass after, and by showing a scenario that uses the new behavior).
43
+
Anchor the plan with observable outcomes. State what the user can do after implementation, the commands to run, and the outputs they should see. Acceptance should be phrased as behavior a human can verify ("after starting the server, navigating to [http://localhost:8080/health](http://localhost:8080/health) returns HTTP 200 with body OK") rather than internal attributes ("added a HealthCheck struct"). If a change is internal, explain how its impact can still be demonstrated (for example, by running tests that fail before and pass after, and by showing a scenario that uses the new behavior).
44
44
45
-
Specify the repository context explicitly. Name files with full repository-relative paths, name functions, and modules precisely, and describe where new files should be created. If touching multiple areas, include a short orientation paragraph that explains how those parts fit together so a novice can navigate confidently. When running commands, show the working directory and exact command line. When outcomes depend on environment, state the assumptions and provide alternatives when reasonable.
45
+
Specify repository context explicitly. Name files with full repository-relative paths, name functions and modules precisely, and describe where new files should be created. If touching multiple areas, include a short orientation paragraph that explains how those parts fit together so a novice can navigate confidently. When running commands, show the working directory and exact command line. When outcomes depend on environment, state the assumptions and provide alternatives when reasonable.
46
46
47
47
Be idempotent and safe. Write the steps so they can be run multiple times without causing damage or drift. If a step can fail halfway, include how to retry or adapt. If a migration or destructive operation is necessary, spell out backups or safe fallbacks. Prefer additive, testable changes that can be validated as you go.
48
48
@@ -74,79 +74,79 @@ Prefer additive code changes followed by subtractions that keep tests passing. P
74
74
75
75
```md
76
76
# <Short, action-oriented description>
77
-
77
+
78
78
This ExecPlan is a living document. The sections `Progress`, `Surprises & Discoveries`, `Decision Log`, and `Outcomes & Retrospective` must be kept up to date as work proceeds.
79
-
80
-
If the PLANS.md file is checked into the repo, reference the path to that file here from the repository root and note that this document must be maintained in accordance with PLANS.md.
81
-
79
+
80
+
If PLANS.md file is checked into the repo, reference the path to that file here from the repository root and note that this document must be maintained in accordance with PLANS.md.
81
+
82
82
## Purpose / Big Picture
83
-
83
+
84
84
Explain in a few sentences what someone gains after this change and how they can see it working. State the user-visible behavior you will enable.
85
-
85
+
86
86
## Progress
87
-
87
+
88
88
Use a list with checkboxes to summarize granular steps. Every stopping point must be documented here, even if it requires splitting a partially completed task into two (“done” vs. “remaining”). This section must always reflect the actual current state of the work.
89
-
89
+
90
90
-[x] (2025-10-01 13:00Z) Example completed step.
91
91
-[ ] Example incomplete step.
92
92
-[ ] Example partially completed step (completed: X; remaining: Y).
93
-
93
+
94
94
Use timestamps to measure rates of progress.
95
-
95
+
96
96
## Surprises & Discoveries
97
-
97
+
98
98
Document unexpected behaviors, bugs, optimizations, or insights discovered during implementation. Provide concise evidence.
99
-
99
+
100
100
- Observation: …
101
101
Evidence: …
102
-
102
+
103
103
## Decision Log
104
-
104
+
105
105
Record every decision made while working on the plan in the format:
106
-
106
+
107
107
- Decision: …
108
108
Rationale: …
109
109
Date/Author: …
110
-
110
+
111
111
## Outcomes & Retrospective
112
-
112
+
113
113
Summarize outcomes, gaps, and lessons learned at major milestones or at completion. Compare the result against the original purpose.
114
-
114
+
115
115
## Context and Orientation
116
-
116
+
117
117
Describe the current state relevant to this task as if the reader knows nothing. Name the key files and modules by full path. Define any non-obvious term you will use. Do not refer to prior plans.
118
-
118
+
119
119
## Plan of Work
120
-
120
+
121
121
Describe, in prose, the sequence of edits and additions. For each edit, name the file and location (function, module) and what to insert or change. Keep it concrete and minimal.
122
-
122
+
123
123
## Concrete Steps
124
-
124
+
125
125
State the exact commands to run and where to run them (working directory). When a command generates output, show a short expected transcript so the reader can compare. This section must be updated as work proceeds.
126
-
126
+
127
127
## Validation and Acceptance
128
-
128
+
129
129
Describe how to start or exercise the system and what to observe. Phrase acceptance as behavior, with specific inputs and outputs. If tests are involved, say "run <project’s test command> and expect <N> passed; the new test <name> fails before the change and passes after>".
130
-
130
+
131
131
## Idempotence and Recovery
132
-
132
+
133
133
If steps can be repeated safely, say so. If a step is risky, provide a safe retry or rollback path. Keep the environment clean after completion.
134
-
134
+
135
135
## Artifacts and Notes
136
-
136
+
137
137
Include the most important transcripts, diffs, or snippets as indented examples. Keep them concise and focused on what proves success.
138
-
138
+
139
139
## Interfaces and Dependencies
140
-
140
+
141
141
Be prescriptive. Name the libraries, modules, and services to use and why. Specify the types, traits/interfaces, and function signatures that must exist at the end of the milestone. Prefer stable names and paths such as `crate::module::function` or `package.submodule.Interface`. E.g.:
If you follow the guidance above, a single, stateless agent -- or a human novice -- can read your ExecPlan from top to bottom and produce a working, observable result. That is the bar: SELF-CONTAINED, SELF-SUFFICIENT, NOVICE-GUIDING, OUTCOME-FOCUSED.
151
151
152
-
When you revise a plan, you must ensure your changes are comprehensively reflected across all sections, including the living document sections. You must write a note at the bottom of the plan describing the change and the reason why. ExecPlans must describe not just what but why for almost everything.
152
+
When you revise a plan, you must ensure your changes are comprehensively reflected across all sections, including the living document sections, and you must write a note at the bottom of the plan describing the change and the reason why. ExecPlans must describe not just the what but the why for almost everything.
0 commit comments