fileplan 0.5.0__tar.gz
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.
- fileplan-0.5.0/LICENSE +28 -0
- fileplan-0.5.0/PKG-INFO +301 -0
- fileplan-0.5.0/README.md +275 -0
- fileplan-0.5.0/pyproject.toml +53 -0
- fileplan-0.5.0/pyproject.toml.orig +63 -0
- fileplan-0.5.0/src/fileplan/__init__.py +8 -0
- fileplan-0.5.0/src/fileplan/__main__.py +7 -0
- fileplan-0.5.0/src/fileplan/claim.py +343 -0
- fileplan-0.5.0/src/fileplan/cli.py +1568 -0
- fileplan-0.5.0/src/fileplan/declaration.py +2039 -0
- fileplan-0.5.0/src/fileplan/depends.py +166 -0
- fileplan-0.5.0/src/fileplan/item.py +395 -0
- fileplan-0.5.0/src/fileplan/lock.py +82 -0
- fileplan-0.5.0/src/fileplan/numbered.py +263 -0
- fileplan-0.5.0/src/fileplan/py.typed +0 -0
- fileplan-0.5.0/src/fileplan/queued.py +178 -0
- fileplan-0.5.0/src/fileplan/read.py +838 -0
- fileplan-0.5.0/src/fileplan/render.py +114 -0
- fileplan-0.5.0/src/fileplan/scaffold.py +134 -0
- fileplan-0.5.0/src/fileplan/skills/do-next/SKILL.md +175 -0
- fileplan-0.5.0/src/fileplan/skills/fileplan/SKILL.md +106 -0
- fileplan-0.5.0/src/fileplan/stale.py +154 -0
- fileplan-0.5.0/src/fileplan/starter/docs/archive.md +3 -0
- fileplan-0.5.0/src/fileplan/starter/docs/method.md +67 -0
- fileplan-0.5.0/src/fileplan/starter/docs/procedures.md +25 -0
- fileplan-0.5.0/src/fileplan/starter/plan.toml +88 -0
- fileplan-0.5.0/src/fileplan/subphase.py +931 -0
- fileplan-0.5.0/src/fileplan/transition.py +1260 -0
fileplan-0.5.0/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 John Borwick
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
16
|
+
may be used to endorse or promote products derived from this software
|
|
17
|
+
without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
fileplan-0.5.0/PKG-INFO
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fileplan
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: A plan.toml interpreter: declared states, transitions and keys for filing work across sessions
|
|
5
|
+
Author: John Borwick
|
|
6
|
+
Author-email: John Borwick <john_borwick@pobox.com>
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Software Development
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
Requires-Dist: click>=8.1
|
|
19
|
+
Requires-Dist: dulwich>=1.2.14
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Project-URL: Homepage, https://github.com/borwick/fileplan
|
|
22
|
+
Project-URL: Repository, https://github.com/borwick/fileplan
|
|
23
|
+
Project-URL: Documentation, https://github.com/borwick/fileplan/blob/main/docs/index.md
|
|
24
|
+
Project-URL: Issues, https://github.com/borwick/fileplan/issues
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# fileplan
|
|
28
|
+
|
|
29
|
+
This project is primarily designed for AI-assisted development workflows. I didn't want to set up beads, basically.
|
|
30
|
+
|
|
31
|
+
Track project plans in directories and files rather than PLAN.md. This lets multiple agents simultaneously develop code, and reduces the cost and churn of adding, reordering, or cancelling work.
|
|
32
|
+
|
|
33
|
+
## Key elements
|
|
34
|
+
|
|
35
|
+
Create a plan file for each "phase" or set of work you want to do. The plan file is markdown with TOML frontmatter, e.g.
|
|
36
|
+
|
|
37
|
+
todo/new-work.md:
|
|
38
|
+
+++
|
|
39
|
+
title = "This is a new piece of work"
|
|
40
|
+
+++
|
|
41
|
+
|
|
42
|
+
Description of work.
|
|
43
|
+
|
|
44
|
+
Then, `fileplan` reads a `plan.toml` file that defines your workflow. A `plan.toml` can be composed of:
|
|
45
|
+
|
|
46
|
+
- states
|
|
47
|
+
- "paths" (directories) assigned to states
|
|
48
|
+
- "doc" - documentation for this state
|
|
49
|
+
- capabilities
|
|
50
|
+
- keys
|
|
51
|
+
- attributes related to a plan file
|
|
52
|
+
- transitions
|
|
53
|
+
- from state
|
|
54
|
+
- to state
|
|
55
|
+
- "doc" - documentation for this transition
|
|
56
|
+
- "identity"
|
|
57
|
+
- "doc" - documentation on how agents set their identities and "claim" items
|
|
58
|
+
- "pid" - environment variables to use to derive agent ID
|
|
59
|
+
|
|
60
|
+
## Getting started
|
|
61
|
+
|
|
62
|
+
Start with the default workflow:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
$ fileplan init .
|
|
66
|
+
inbox
|
|
67
|
+
plan
|
|
68
|
+
docs
|
|
69
|
+
docs/archive.md
|
|
70
|
+
docs/method.md
|
|
71
|
+
docs/procedures.md
|
|
72
|
+
plan.toml
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Create an item:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
$ fileplan capture "Rename the states" --body "The names init wrote are placeholders."
|
|
79
|
+
inbox/rename-the-states.md
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`capture` writes the plan file:
|
|
83
|
+
|
|
84
|
+
$ cat inbox/rename-the-states.md
|
|
85
|
+
+++
|
|
86
|
+
title = "Rename the states"
|
|
87
|
+
+++
|
|
88
|
+
|
|
89
|
+
The names init wrote are placeholders.
|
|
90
|
+
|
|
91
|
+
The plan file can then be found and managed via `fileplan`:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
$ fileplan list
|
|
95
|
+
rename-the-states inbox
|
|
96
|
+
title Rename the states
|
|
97
|
+
path inbox/rename-the-states.md
|
|
98
|
+
|
|
99
|
+
showing 1 of 1 items
|
|
100
|
+
register plan: floor 1, nothing held yet, in docs/archive.md
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Transition the plan file with the `queue` transition:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
$ fileplan queue rename-the-states
|
|
107
|
+
plan/rename-the-states.md
|
|
108
|
+
|
|
109
|
+
$ fileplan list
|
|
110
|
+
rename-the-states plan
|
|
111
|
+
position 100
|
|
112
|
+
number 1
|
|
113
|
+
title Rename the states
|
|
114
|
+
path plan/rename-the-states.md
|
|
115
|
+
|
|
116
|
+
showing 1 of 1 items
|
|
117
|
+
register plan: floor 1, highest 1, in docs/archive.md
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Mark the plan file as in progress:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
$ fileplan work rename-the-states --status "in progress"
|
|
124
|
+
plan/rename-the-states.md
|
|
125
|
+
|
|
126
|
+
$ fileplan work rename-the-states --status nobody
|
|
127
|
+
Usage: fileplan work [OPTIONS] ITEM
|
|
128
|
+
Try 'fileplan work --help' for help.
|
|
129
|
+
|
|
130
|
+
Error: Invalid value for '--status': 'nobody' is not one of 'in progress', 'waiting'.
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Mark it done with `archive`:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
$ fileplan archive rename-the-states --record "Renamed everything to our own words."
|
|
137
|
+
docs/archive.md: filed `## 1. Rename the states` at its place in the register, with the record under it
|
|
138
|
+
plan/rename-the-states.md is gone: archive took it away
|
|
139
|
+
docs/archive.md
|
|
140
|
+
|
|
141
|
+
$ cat docs/archive.md
|
|
142
|
+
# Archive
|
|
143
|
+
|
|
144
|
+
Closed items are filed here, newest last. Each one goes under its own number.
|
|
145
|
+
|
|
146
|
+
## 1. Rename the states
|
|
147
|
+
|
|
148
|
+
Renamed everything to our own words.
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## The plan.toml behind it
|
|
152
|
+
|
|
153
|
+
Here is the `plan.toml` for the workflow above, without the documentation
|
|
154
|
+
pointers:
|
|
155
|
+
|
|
156
|
+
```toml
|
|
157
|
+
[states.inbox]
|
|
158
|
+
path = "inbox"
|
|
159
|
+
|
|
160
|
+
[states.plan]
|
|
161
|
+
path = "plan"
|
|
162
|
+
capabilities = ["queued", "numbered"]
|
|
163
|
+
|
|
164
|
+
[keys.status]
|
|
165
|
+
help = "How the work is going."
|
|
166
|
+
values = ["in progress", "waiting"]
|
|
167
|
+
|
|
168
|
+
[transitions.capture]
|
|
169
|
+
help = "Log an idea in the inbox."
|
|
170
|
+
to = "inbox"
|
|
171
|
+
|
|
172
|
+
[transitions.queue]
|
|
173
|
+
help = "Commit to an idea: move it into the plan."
|
|
174
|
+
from = "inbox"
|
|
175
|
+
to = "plan"
|
|
176
|
+
|
|
177
|
+
[transitions.work]
|
|
178
|
+
help = "Say how the work is going."
|
|
179
|
+
from = "plan"
|
|
180
|
+
to = "plan"
|
|
181
|
+
sets = ["status"]
|
|
182
|
+
|
|
183
|
+
[transitions.archive]
|
|
184
|
+
help = "Close an item out: file its entry and remove the item."
|
|
185
|
+
from = "plan"
|
|
186
|
+
archives = true
|
|
187
|
+
dissolves = true
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Every name in that file is a placeholder. `inbox`, `plan`, `capture`, `queue`,
|
|
191
|
+
`work` and `archive` are not fileplan's words. Rename each one to the word your
|
|
192
|
+
own work already uses.
|
|
193
|
+
|
|
194
|
+
A transition's `from` and `to` decide what the transition does:
|
|
195
|
+
|
|
196
|
+
- No `from` creates a new plan file.
|
|
197
|
+
- A `from` and a `to` move the plan file to another directory.
|
|
198
|
+
- A `from` and a `to` that match leave the plan file where it is, and write a
|
|
199
|
+
key into the plan file's frontmatter.
|
|
200
|
+
|
|
201
|
+
`archives = true` writes the closing entry into an archive document.
|
|
202
|
+
`dissolves = true` deletes the plan file, which is why `archive` declares no
|
|
203
|
+
`to`.
|
|
204
|
+
|
|
205
|
+
Capabilities give a state extra behaviour. The `plan` state above declares
|
|
206
|
+
`queued` and `numbered`, which is why the plan file picked up a position and a
|
|
207
|
+
number when it arrived there. The `register` line in the listing says which
|
|
208
|
+
numbers the archive document has taken.
|
|
209
|
+
|
|
210
|
+
## Asking fileplan about your workflow
|
|
211
|
+
|
|
212
|
+
The workflow above is one example. To see your own, ask fileplan rather than
|
|
213
|
+
a document.
|
|
214
|
+
|
|
215
|
+
Run `fileplan` with no arguments to see what your `plan.toml` declares:
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
$ fileplan
|
|
219
|
+
/private/tmp/fileplan-example/plan.toml
|
|
220
|
+
|
|
221
|
+
States
|
|
222
|
+
inbox inbox/
|
|
223
|
+
plan plan/
|
|
224
|
+
|
|
225
|
+
Transitions
|
|
226
|
+
capture Log an idea in the inbox.
|
|
227
|
+
queue Commit to an idea: move it into the plan.
|
|
228
|
+
work Say how the work is going.
|
|
229
|
+
archive Close an item out: file its entry and remove the item.
|
|
230
|
+
|
|
231
|
+
Declares
|
|
232
|
+
archive archives, dissolves
|
|
233
|
+
|
|
234
|
+
Run `fileplan list` to see what is filed.
|
|
235
|
+
Run `fileplan next COMMAND` to see what COMMAND could take right now.
|
|
236
|
+
Run `fileplan show ITEM` to see one item's row.
|
|
237
|
+
Run `fileplan COMMAND --help` to see what COMMAND takes.
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
`Declares` lists the transitions that do more than move a plan file.
|
|
241
|
+
|
|
242
|
+
Ask one transition what it takes:
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
$ fileplan work --help
|
|
246
|
+
Usage: fileplan work [OPTIONS] ITEM
|
|
247
|
+
|
|
248
|
+
Say how the work is going.
|
|
249
|
+
|
|
250
|
+
Options:
|
|
251
|
+
--status [in progress|waiting] How the work is going.
|
|
252
|
+
--check Say what this run would do, and stop before
|
|
253
|
+
writing anything. A refusal under --check is
|
|
254
|
+
the refusal a real run gives.
|
|
255
|
+
--help Show this message and exit.
|
|
256
|
+
|
|
257
|
+
Where the item goes
|
|
258
|
+
stays in plan
|
|
259
|
+
|
|
260
|
+
Reading
|
|
261
|
+
work docs/method.md#work
|
|
262
|
+
status docs/method.md#status
|
|
263
|
+
|
|
264
|
+
Running it
|
|
265
|
+
docs/procedures.md#working-an-item
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
`Reading` and `Running it` are the `doc` and `policy` pointers from your
|
|
269
|
+
`plan.toml`, resolved to the sections they name. The sections are in your own
|
|
270
|
+
documentation. fileplan prints the pointers and never writes the prose behind
|
|
271
|
+
them.
|
|
272
|
+
|
|
273
|
+
Add `--check` to any transition to print what the transition would do, and stop
|
|
274
|
+
before writing anything.
|
|
275
|
+
|
|
276
|
+
`fileplan --json` prints every transition at once, for a script or an agent
|
|
277
|
+
rather than for a person.
|
|
278
|
+
|
|
279
|
+
## Where to go next
|
|
280
|
+
|
|
281
|
+
- [Initializing fileplan](https://github.com/borwick/fileplan/blob/main/docs/initialization.md) — the full walk, from
|
|
282
|
+
installing fileplan to handing an agent the skills. Every command in it was
|
|
283
|
+
run and its output pasted.
|
|
284
|
+
- [Retrofitting fileplan](https://github.com/borwick/fileplan/blob/main/docs/retrofit.md) — the walk for a tree that
|
|
285
|
+
already has work in it, where `init` is the wrong first command.
|
|
286
|
+
- [The method](https://github.com/borwick/fileplan/blob/main/docs/method.md) — the reference for every word a `plan.toml`
|
|
287
|
+
can hold.
|
|
288
|
+
- [The documents](https://github.com/borwick/fileplan/blob/main/docs/index.md) — everything under `docs/`, plus the two
|
|
289
|
+
skills an agent reads.
|
|
290
|
+
|
|
291
|
+
## Status
|
|
292
|
+
|
|
293
|
+
`uv build` produces a wheel that installs and runs. Check the package index for
|
|
294
|
+
which versions are published.
|
|
295
|
+
|
|
296
|
+
## AI disclosure
|
|
297
|
+
|
|
298
|
+
`fileplan` was written with Claude Code, under John Borwick's direction and
|
|
299
|
+
review. [How this was written](https://github.com/borwick/fileplan/blob/main/docs/ai-disclosure.md) covers the disclosure
|
|
300
|
+
level, who did what, and why the git history does not record it. Anthropic did
|
|
301
|
+
not build this tool and does not endorse it.
|
fileplan-0.5.0/README.md
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# fileplan
|
|
2
|
+
|
|
3
|
+
This project is primarily designed for AI-assisted development workflows. I didn't want to set up beads, basically.
|
|
4
|
+
|
|
5
|
+
Track project plans in directories and files rather than PLAN.md. This lets multiple agents simultaneously develop code, and reduces the cost and churn of adding, reordering, or cancelling work.
|
|
6
|
+
|
|
7
|
+
## Key elements
|
|
8
|
+
|
|
9
|
+
Create a plan file for each "phase" or set of work you want to do. The plan file is markdown with TOML frontmatter, e.g.
|
|
10
|
+
|
|
11
|
+
todo/new-work.md:
|
|
12
|
+
+++
|
|
13
|
+
title = "This is a new piece of work"
|
|
14
|
+
+++
|
|
15
|
+
|
|
16
|
+
Description of work.
|
|
17
|
+
|
|
18
|
+
Then, `fileplan` reads a `plan.toml` file that defines your workflow. A `plan.toml` can be composed of:
|
|
19
|
+
|
|
20
|
+
- states
|
|
21
|
+
- "paths" (directories) assigned to states
|
|
22
|
+
- "doc" - documentation for this state
|
|
23
|
+
- capabilities
|
|
24
|
+
- keys
|
|
25
|
+
- attributes related to a plan file
|
|
26
|
+
- transitions
|
|
27
|
+
- from state
|
|
28
|
+
- to state
|
|
29
|
+
- "doc" - documentation for this transition
|
|
30
|
+
- "identity"
|
|
31
|
+
- "doc" - documentation on how agents set their identities and "claim" items
|
|
32
|
+
- "pid" - environment variables to use to derive agent ID
|
|
33
|
+
|
|
34
|
+
## Getting started
|
|
35
|
+
|
|
36
|
+
Start with the default workflow:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
$ fileplan init .
|
|
40
|
+
inbox
|
|
41
|
+
plan
|
|
42
|
+
docs
|
|
43
|
+
docs/archive.md
|
|
44
|
+
docs/method.md
|
|
45
|
+
docs/procedures.md
|
|
46
|
+
plan.toml
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Create an item:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
$ fileplan capture "Rename the states" --body "The names init wrote are placeholders."
|
|
53
|
+
inbox/rename-the-states.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`capture` writes the plan file:
|
|
57
|
+
|
|
58
|
+
$ cat inbox/rename-the-states.md
|
|
59
|
+
+++
|
|
60
|
+
title = "Rename the states"
|
|
61
|
+
+++
|
|
62
|
+
|
|
63
|
+
The names init wrote are placeholders.
|
|
64
|
+
|
|
65
|
+
The plan file can then be found and managed via `fileplan`:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
$ fileplan list
|
|
69
|
+
rename-the-states inbox
|
|
70
|
+
title Rename the states
|
|
71
|
+
path inbox/rename-the-states.md
|
|
72
|
+
|
|
73
|
+
showing 1 of 1 items
|
|
74
|
+
register plan: floor 1, nothing held yet, in docs/archive.md
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Transition the plan file with the `queue` transition:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
$ fileplan queue rename-the-states
|
|
81
|
+
plan/rename-the-states.md
|
|
82
|
+
|
|
83
|
+
$ fileplan list
|
|
84
|
+
rename-the-states plan
|
|
85
|
+
position 100
|
|
86
|
+
number 1
|
|
87
|
+
title Rename the states
|
|
88
|
+
path plan/rename-the-states.md
|
|
89
|
+
|
|
90
|
+
showing 1 of 1 items
|
|
91
|
+
register plan: floor 1, highest 1, in docs/archive.md
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Mark the plan file as in progress:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
$ fileplan work rename-the-states --status "in progress"
|
|
98
|
+
plan/rename-the-states.md
|
|
99
|
+
|
|
100
|
+
$ fileplan work rename-the-states --status nobody
|
|
101
|
+
Usage: fileplan work [OPTIONS] ITEM
|
|
102
|
+
Try 'fileplan work --help' for help.
|
|
103
|
+
|
|
104
|
+
Error: Invalid value for '--status': 'nobody' is not one of 'in progress', 'waiting'.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Mark it done with `archive`:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
$ fileplan archive rename-the-states --record "Renamed everything to our own words."
|
|
111
|
+
docs/archive.md: filed `## 1. Rename the states` at its place in the register, with the record under it
|
|
112
|
+
plan/rename-the-states.md is gone: archive took it away
|
|
113
|
+
docs/archive.md
|
|
114
|
+
|
|
115
|
+
$ cat docs/archive.md
|
|
116
|
+
# Archive
|
|
117
|
+
|
|
118
|
+
Closed items are filed here, newest last. Each one goes under its own number.
|
|
119
|
+
|
|
120
|
+
## 1. Rename the states
|
|
121
|
+
|
|
122
|
+
Renamed everything to our own words.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## The plan.toml behind it
|
|
126
|
+
|
|
127
|
+
Here is the `plan.toml` for the workflow above, without the documentation
|
|
128
|
+
pointers:
|
|
129
|
+
|
|
130
|
+
```toml
|
|
131
|
+
[states.inbox]
|
|
132
|
+
path = "inbox"
|
|
133
|
+
|
|
134
|
+
[states.plan]
|
|
135
|
+
path = "plan"
|
|
136
|
+
capabilities = ["queued", "numbered"]
|
|
137
|
+
|
|
138
|
+
[keys.status]
|
|
139
|
+
help = "How the work is going."
|
|
140
|
+
values = ["in progress", "waiting"]
|
|
141
|
+
|
|
142
|
+
[transitions.capture]
|
|
143
|
+
help = "Log an idea in the inbox."
|
|
144
|
+
to = "inbox"
|
|
145
|
+
|
|
146
|
+
[transitions.queue]
|
|
147
|
+
help = "Commit to an idea: move it into the plan."
|
|
148
|
+
from = "inbox"
|
|
149
|
+
to = "plan"
|
|
150
|
+
|
|
151
|
+
[transitions.work]
|
|
152
|
+
help = "Say how the work is going."
|
|
153
|
+
from = "plan"
|
|
154
|
+
to = "plan"
|
|
155
|
+
sets = ["status"]
|
|
156
|
+
|
|
157
|
+
[transitions.archive]
|
|
158
|
+
help = "Close an item out: file its entry and remove the item."
|
|
159
|
+
from = "plan"
|
|
160
|
+
archives = true
|
|
161
|
+
dissolves = true
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Every name in that file is a placeholder. `inbox`, `plan`, `capture`, `queue`,
|
|
165
|
+
`work` and `archive` are not fileplan's words. Rename each one to the word your
|
|
166
|
+
own work already uses.
|
|
167
|
+
|
|
168
|
+
A transition's `from` and `to` decide what the transition does:
|
|
169
|
+
|
|
170
|
+
- No `from` creates a new plan file.
|
|
171
|
+
- A `from` and a `to` move the plan file to another directory.
|
|
172
|
+
- A `from` and a `to` that match leave the plan file where it is, and write a
|
|
173
|
+
key into the plan file's frontmatter.
|
|
174
|
+
|
|
175
|
+
`archives = true` writes the closing entry into an archive document.
|
|
176
|
+
`dissolves = true` deletes the plan file, which is why `archive` declares no
|
|
177
|
+
`to`.
|
|
178
|
+
|
|
179
|
+
Capabilities give a state extra behaviour. The `plan` state above declares
|
|
180
|
+
`queued` and `numbered`, which is why the plan file picked up a position and a
|
|
181
|
+
number when it arrived there. The `register` line in the listing says which
|
|
182
|
+
numbers the archive document has taken.
|
|
183
|
+
|
|
184
|
+
## Asking fileplan about your workflow
|
|
185
|
+
|
|
186
|
+
The workflow above is one example. To see your own, ask fileplan rather than
|
|
187
|
+
a document.
|
|
188
|
+
|
|
189
|
+
Run `fileplan` with no arguments to see what your `plan.toml` declares:
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
$ fileplan
|
|
193
|
+
/private/tmp/fileplan-example/plan.toml
|
|
194
|
+
|
|
195
|
+
States
|
|
196
|
+
inbox inbox/
|
|
197
|
+
plan plan/
|
|
198
|
+
|
|
199
|
+
Transitions
|
|
200
|
+
capture Log an idea in the inbox.
|
|
201
|
+
queue Commit to an idea: move it into the plan.
|
|
202
|
+
work Say how the work is going.
|
|
203
|
+
archive Close an item out: file its entry and remove the item.
|
|
204
|
+
|
|
205
|
+
Declares
|
|
206
|
+
archive archives, dissolves
|
|
207
|
+
|
|
208
|
+
Run `fileplan list` to see what is filed.
|
|
209
|
+
Run `fileplan next COMMAND` to see what COMMAND could take right now.
|
|
210
|
+
Run `fileplan show ITEM` to see one item's row.
|
|
211
|
+
Run `fileplan COMMAND --help` to see what COMMAND takes.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
`Declares` lists the transitions that do more than move a plan file.
|
|
215
|
+
|
|
216
|
+
Ask one transition what it takes:
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
$ fileplan work --help
|
|
220
|
+
Usage: fileplan work [OPTIONS] ITEM
|
|
221
|
+
|
|
222
|
+
Say how the work is going.
|
|
223
|
+
|
|
224
|
+
Options:
|
|
225
|
+
--status [in progress|waiting] How the work is going.
|
|
226
|
+
--check Say what this run would do, and stop before
|
|
227
|
+
writing anything. A refusal under --check is
|
|
228
|
+
the refusal a real run gives.
|
|
229
|
+
--help Show this message and exit.
|
|
230
|
+
|
|
231
|
+
Where the item goes
|
|
232
|
+
stays in plan
|
|
233
|
+
|
|
234
|
+
Reading
|
|
235
|
+
work docs/method.md#work
|
|
236
|
+
status docs/method.md#status
|
|
237
|
+
|
|
238
|
+
Running it
|
|
239
|
+
docs/procedures.md#working-an-item
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
`Reading` and `Running it` are the `doc` and `policy` pointers from your
|
|
243
|
+
`plan.toml`, resolved to the sections they name. The sections are in your own
|
|
244
|
+
documentation. fileplan prints the pointers and never writes the prose behind
|
|
245
|
+
them.
|
|
246
|
+
|
|
247
|
+
Add `--check` to any transition to print what the transition would do, and stop
|
|
248
|
+
before writing anything.
|
|
249
|
+
|
|
250
|
+
`fileplan --json` prints every transition at once, for a script or an agent
|
|
251
|
+
rather than for a person.
|
|
252
|
+
|
|
253
|
+
## Where to go next
|
|
254
|
+
|
|
255
|
+
- [Initializing fileplan](https://github.com/borwick/fileplan/blob/main/docs/initialization.md) — the full walk, from
|
|
256
|
+
installing fileplan to handing an agent the skills. Every command in it was
|
|
257
|
+
run and its output pasted.
|
|
258
|
+
- [Retrofitting fileplan](https://github.com/borwick/fileplan/blob/main/docs/retrofit.md) — the walk for a tree that
|
|
259
|
+
already has work in it, where `init` is the wrong first command.
|
|
260
|
+
- [The method](https://github.com/borwick/fileplan/blob/main/docs/method.md) — the reference for every word a `plan.toml`
|
|
261
|
+
can hold.
|
|
262
|
+
- [The documents](https://github.com/borwick/fileplan/blob/main/docs/index.md) — everything under `docs/`, plus the two
|
|
263
|
+
skills an agent reads.
|
|
264
|
+
|
|
265
|
+
## Status
|
|
266
|
+
|
|
267
|
+
`uv build` produces a wheel that installs and runs. Check the package index for
|
|
268
|
+
which versions are published.
|
|
269
|
+
|
|
270
|
+
## AI disclosure
|
|
271
|
+
|
|
272
|
+
`fileplan` was written with Claude Code, under John Borwick's direction and
|
|
273
|
+
review. [How this was written](https://github.com/borwick/fileplan/blob/main/docs/ai-disclosure.md) covers the disclosure
|
|
274
|
+
level, who did what, and why the git history does not record it. Anthropic did
|
|
275
|
+
not build this tool and does not endorse it.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "fileplan"
|
|
3
|
+
version = "0.5.0"
|
|
4
|
+
description = "A plan.toml interpreter: declared states, transitions and keys for filing work across sessions"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"click>=8.1",
|
|
9
|
+
"dulwich>=1.2.14",
|
|
10
|
+
]
|
|
11
|
+
license = "BSD-3-Clause"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Programming Language :: Python :: 3.13",
|
|
21
|
+
"Topic :: Software Development",
|
|
22
|
+
"Typing :: Typed",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[[project.authors]]
|
|
26
|
+
name = "John Borwick"
|
|
27
|
+
email = "john_borwick@pobox.com"
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/borwick/fileplan"
|
|
31
|
+
Repository = "https://github.com/borwick/fileplan"
|
|
32
|
+
Documentation = "https://github.com/borwick/fileplan/blob/main/docs/index.md"
|
|
33
|
+
Issues = "https://github.com/borwick/fileplan/issues"
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
fileplan = "fileplan.cli:console_main"
|
|
37
|
+
|
|
38
|
+
[build-system]
|
|
39
|
+
requires = ["uv_build>=0.12.3,<0.13.0"]
|
|
40
|
+
build-backend = "uv_build"
|
|
41
|
+
|
|
42
|
+
[dependency-groups]
|
|
43
|
+
dev = ["pytest>=8.0"]
|
|
44
|
+
|
|
45
|
+
[tool.pytest.ini_options]
|
|
46
|
+
testpaths = ["tests"]
|
|
47
|
+
|
|
48
|
+
[tool.pysmelly]
|
|
49
|
+
exclude = [
|
|
50
|
+
"tests/",
|
|
51
|
+
"test_*",
|
|
52
|
+
"conftest.py",
|
|
53
|
+
]
|