@chinhae/atw-cli 0.3.6 → 0.4.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/README.md +188 -15
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +25 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +154 -17
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mode.d.ts +21 -0
- package/dist/commands/mode.d.ts.map +1 -0
- package/dist/commands/mode.js +401 -0
- package/dist/commands/mode.js.map +1 -0
- package/dist/commands/update.d.ts +7 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +20 -13
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts +17 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +9 -3
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/claude.d.ts +3 -2
- package/dist/configurators/claude.d.ts.map +1 -1
- package/dist/configurators/claude.js +3 -3
- package/dist/configurators/claude.js.map +1 -1
- package/dist/configurators/codex.d.ts +4 -3
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +10 -10
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/index.d.ts +9 -3
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +95 -17
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +13 -0
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +25 -0
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +15 -1
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +23 -5
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/configurators/zcode.d.ts +1 -1
- package/dist/configurators/zcode.d.ts.map +1 -1
- package/dist/configurators/zcode.js +2 -2
- package/dist/configurators/zcode.js.map +1 -1
- package/dist/constants/paths.d.ts +4 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +4 -0
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.4.0.json +9 -0
- package/dist/templates/atw/index.d.ts +10 -1
- package/dist/templates/atw/index.d.ts.map +1 -1
- package/dist/templates/atw/index.js +11 -1
- package/dist/templates/atw/index.js.map +1 -1
- package/dist/templates/atw/scripts/add_session.py +34 -13
- package/dist/templates/atw/scripts/common/active_task.py +2 -2
- package/dist/templates/atw/scripts/common/config.py +13 -0
- package/dist/templates/atw/scripts/common/developer.py +15 -4
- package/dist/templates/atw/scripts/common/noob_mode.py +35 -15
- package/dist/templates/atw/scripts/common/packages_context.py +16 -3
- package/dist/templates/atw/scripts/common/session_context.py +77 -19
- package/dist/templates/atw/scripts/common/task_store.py +78 -27
- package/dist/templates/atw/scripts/noob_mode.py +16 -4
- package/dist/templates/atw/scripts/task.py +99 -38
- package/dist/templates/atw/workflow-general.md +554 -0
- package/dist/templates/atw/workflow.md +1 -1
- package/dist/templates/codex/hooks/session-start.py +69 -18
- package/dist/templates/common/bundled-skills/atw-noob-mode/SKILL.md +6 -4
- package/dist/templates/common/commands/start.md +43 -0
- package/dist/templates/copilot/hooks/session-start.py +69 -18
- package/dist/templates/dsh/DSH.md +43 -0
- package/dist/templates/markdown/agents.md +11 -0
- package/dist/templates/markdown/index.d.ts +9 -0
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +14 -1
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/spec/conventions.md.txt +13 -0
- package/dist/templates/opencode/lib/atw-context.js +19 -0
- package/dist/templates/opencode/lib/session-utils.js +79 -24
- package/dist/templates/opencode/plugins/inject-workflow-state.js +18 -8
- package/dist/templates/pi/extensions/atw/index.ts.txt +20 -9
- package/dist/templates/shared-hooks/inject-shell-session-context.py +3 -3
- package/dist/templates/shared-hooks/inject-workflow-state.py +21 -2
- package/dist/templates/shared-hooks/session-start.py +70 -22
- package/dist/templates/snow/SNOW.md +30 -0
- package/dist/templates/snow/hooks/write-atw-context.py +64 -0
- package/dist/utils/manifest-prune.d.ts +2 -1
- package/dist/utils/manifest-prune.d.ts.map +1 -1
- package/dist/utils/manifest-prune.js +10 -7
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/optional-skills.d.ts.map +1 -1
- package/dist/utils/optional-skills.js +2 -1
- package/dist/utils/optional-skills.js.map +1 -1
- package/dist/utils/project-mode.d.ts +30 -0
- package/dist/utils/project-mode.d.ts.map +1 -0
- package/dist/utils/project-mode.js +86 -0
- package/dist/utils/project-mode.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +9 -5
- package/dist/utils/workflow-resolver.d.ts.map +1 -1
- package/dist/utils/workflow-resolver.js +25 -11
- package/dist/utils/workflow-resolver.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
# General Workflow
|
|
2
|
+
|
|
3
|
+
For work that is not code: writing, research, organizing material, planning.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Core Principles
|
|
8
|
+
|
|
9
|
+
1. **The user talks, you run the process** — they say what they want in their own words. Creating a task, moving it along, archiving it and writing the journal are yours to do. Never ask the user to type a command to move the work forward.
|
|
10
|
+
2. **Agree before doing** — for anything beyond a small request, write down what will be done, what will not be done, and what counts as done, and let the user confirm it before you start.
|
|
11
|
+
3. **Check against what was agreed** — when the work is finished, go through what counts as done item by item, with evidence. The user decides whether to accept it.
|
|
12
|
+
4. **Two decisions are the user's, and only two** — whether what you wrote down is right, and whether the result is accepted. Everything in between is yours to advance without asking.
|
|
13
|
+
5. **Write it to files** — tasks, conventions and the journal outlast the conversation; what was only said in chat is gone in the next session.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## ATW System
|
|
18
|
+
|
|
19
|
+
### Developer Identity
|
|
20
|
+
|
|
21
|
+
On first use, initialize your identity:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
python3 ./.atw/scripts/init_developer.py <your-name>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Creates `.atw/.developer` (gitignored) + `.atw/workspace/<your-name>/`.
|
|
28
|
+
|
|
29
|
+
### Noob Mode
|
|
30
|
+
|
|
31
|
+
For a user who is not an engineer. While it is on, every reply in every stage is in plain language: terms explained where they appear, each action explained before it happens (what, why, how risky, what approving or declining leads to), errors and results retold with what they affect and what comes next. The full rules are `/atw-noob-mode`.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python3 ./.atw/scripts/noob_mode.py on|off|status
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The user switches it by saying "开启小白模式" / "关闭小白模式" or running `/atw-noob-mode`; the skill runs the script. Their choice — on or off — is one line in that user's own `.atw/.developer`, so it is personal and never committed. A user who has never chosen gets the project mode's default: on when `.atw/config.yaml` says `mode: general`, off when it says `mode: dev` or has no `mode` entry. Switching off is recorded as a choice, so neither the default nor a change of project mode turns it back on; `status` says which of the two is in effect. It changes how the AI talks to the user — not the stages, the stops, or what goes into task files.
|
|
38
|
+
|
|
39
|
+
### Conventions
|
|
40
|
+
|
|
41
|
+
`.atw/spec/conventions.md` is the one place this project keeps what the user asked for more than once: how they want things written, named, laid out or checked, and what they do not want. Its content is handed to you at the start of every session inside `<conventions>`. Follow it in every reply. You also add to it yourself — see "Keeping Conventions" below.
|
|
42
|
+
|
|
43
|
+
### Task System
|
|
44
|
+
|
|
45
|
+
Work that is more than a small request gets a task: a directory under `.atw/tasks/`.
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
.atw/tasks/MM-DD-<slug>/
|
|
49
|
+
├── task.json task record (status and metadata)
|
|
50
|
+
├── prd.md what was agreed: what will be done, what will not, what counts as done
|
|
51
|
+
└── research/ notes from looking things up, one file per topic
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`task.json.status` moves through five stages in this workflow:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
discover → specify → implement → accept → completed
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
A sixth status, `slice`, belongs to the `dev` workflow. A task only carries it here when the project was switched over from `dev`; step 1.4 says how to continue one.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
python3 ./.atw/scripts/task.py create "<title>" --description "<one line>" --slug <name>
|
|
64
|
+
python3 ./.atw/scripts/task.py set-status <task> <status> # move between stages
|
|
65
|
+
python3 ./.atw/scripts/task.py start <task> # make it this session's current task; discover / specify / slice → implement
|
|
66
|
+
python3 ./.atw/scripts/task.py resume <task> # make it this session's current task; its status stays as it is
|
|
67
|
+
python3 ./.atw/scripts/task.py current --source # this session's current task
|
|
68
|
+
python3 ./.atw/scripts/task.py list --mine # open tasks and their status
|
|
69
|
+
python3 ./.atw/scripts/task.py archive <task> --skip-branch-validation # → completed, moved to archive/{year-month}/
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Current task**: each session has its own. `task.py create` makes the new task this session's current task; `task.py start` and `task.py resume` do the same for an existing one — `start` also moves a task still at `discover`, `specify` or `slice` on to `implement`, `resume` changes nothing else. `task.py set-status` changes the stage and leaves the current task alone. A new session starts with none. The reminder you get on every turn is chosen by the current task's status.
|
|
73
|
+
|
|
74
|
+
### Workspace System
|
|
75
|
+
|
|
76
|
+
A journal of sessions, kept per person under `.atw/workspace/<developer>/`, so a later session can see what was done.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
python3 ./.atw/scripts/add_session.py --title "<title>" --summary "<what was done>"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Context Script
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
python3 ./.atw/scripts/get_context.py # who you are working with, current task, open tasks, conventions
|
|
86
|
+
python3 ./.atw/scripts/get_context.py --mode phase # the Phase Index below
|
|
87
|
+
python3 ./.atw/scripts/get_context.py --mode phase --step <X.Y> # one step in full
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
<!--
|
|
93
|
+
WORKFLOW-STATE BLOCK CONTRACT (read this before editing the tag blocks below)
|
|
94
|
+
|
|
95
|
+
The [workflow-state:STATUS] blocks inside the ## Phase Index section are the
|
|
96
|
+
only source of the per-turn `<workflow-state>` reminder: the per-turn hook of
|
|
97
|
+
every platform looks a block up by the current task's status and injects its
|
|
98
|
+
body. The scripts hold no fallback text. When a block is missing the reminder
|
|
99
|
+
degrades to "Refer to workflow.md for current step."
|
|
100
|
+
|
|
101
|
+
STATUS is matched against `task.json.status` verbatim, so the six stage tags
|
|
102
|
+
must stay spelled `discover` / `specify` / `slice` / `implement` / `accept` /
|
|
103
|
+
`completed`.
|
|
104
|
+
|
|
105
|
+
[workflow-state:no_task] → the session has no current task
|
|
106
|
+
[workflow-state:task_error] → the current task's record cannot be read
|
|
107
|
+
[workflow-state:noob_mode] → appended to every reminder while this user has noob mode on; not a status
|
|
108
|
+
[workflow-state:discover] → step 1.1 (the status `task.py create` writes)
|
|
109
|
+
[workflow-state:specify] → steps 1.2–1.3
|
|
110
|
+
[workflow-state:slice] → step 1.4; only a task brought over from `dev` carries it
|
|
111
|
+
[workflow-state:implement] → Phase 2 (`task.py start` sets it)
|
|
112
|
+
[workflow-state:accept] → Phase 3, up to the archive
|
|
113
|
+
[workflow-state:completed] → the archive was interrupted; task still under .atw/tasks/
|
|
114
|
+
|
|
115
|
+
The reminder is the only thing the AI hears on every turn. Anything it must
|
|
116
|
+
do at a status has to be said in that status's block, not only in the step.
|
|
117
|
+
|
|
118
|
+
Keep comments out of the Phase Index section itself: platforms without a
|
|
119
|
+
session-start hook print that section as it is.
|
|
120
|
+
|
|
121
|
+
The heading `## Phase Index`, the heading `## Phase 1: Plan` and the step
|
|
122
|
+
headings `#### X.Y` are compared literally by the scripts.
|
|
123
|
+
`packages/cli/test/scripts/workflow-structure.test.ts` guards them.
|
|
124
|
+
|
|
125
|
+
A step ends at the next line that starts with `#### ` or `## `, or that is
|
|
126
|
+
`---`. Keep such lines out of a step's body, code examples included, or the
|
|
127
|
+
step comes back cut short.
|
|
128
|
+
-->
|
|
129
|
+
|
|
130
|
+
## Phase Index
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
Phase 1: Plan → talk it through, write down what was agreed, the user confirms it
|
|
134
|
+
Phase 2: Do → do the work that was agreed
|
|
135
|
+
Phase 3: Finish → check the result against what was agreed, the user accepts it, then archive and journal
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Small Request or Task
|
|
139
|
+
|
|
140
|
+
You decide this yourself. Do not ask the user whether to create a task.
|
|
141
|
+
|
|
142
|
+
| The request | What you do |
|
|
143
|
+
|---|---|
|
|
144
|
+
| Small — you can finish it in this reply and the user can judge the result at a glance: a question, a lookup, a quick fix to a sentence, a rename | Just do it. No task, no record. |
|
|
145
|
+
| Anything larger — several steps, more than one sitting, a result the user will keep or pass on (a document, a plan, a report, a reorganized folder), or "done" is not obvious | Create a task yourself, right away, and say so in one sentence. Then Phase 1. |
|
|
146
|
+
|
|
147
|
+
When unsure, create the task. The cost is a few lines for the user to confirm; the cost of skipping it is work that drifts with nothing written down to check it against.
|
|
148
|
+
|
|
149
|
+
### The Two Stops
|
|
150
|
+
|
|
151
|
+
Outside these two, you advance on your own. Do not stop to ask "shall I go on?", and do not ask the user to run anything.
|
|
152
|
+
|
|
153
|
+
| # | Where | Whose call |
|
|
154
|
+
|---|---|---|
|
|
155
|
+
| ① | After you have written down what was agreed | Is it right — the user's |
|
|
156
|
+
| ② | After you have checked the finished work against it | Is it accepted — the user's |
|
|
157
|
+
|
|
158
|
+
### What To Do At Each Status
|
|
159
|
+
|
|
160
|
+
| Current task | What you do | Step |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| none | Small request: do it. Larger: create a task. Earlier unfinished work the user wants to go on with: pick it up (below). | 1.0 |
|
|
163
|
+
| `discover` | Ask until what the user wants is clear, then move to `specify`. | 1.1 |
|
|
164
|
+
| `specify` | Write `prd.md`; stop ①. Once confirmed, start the work. | 1.2, 1.3 |
|
|
165
|
+
| `slice` | A task brought over from `dev`. Cut no tickets; carry on from its `prd.md`. | 1.4 |
|
|
166
|
+
| `implement` | Do the work, then move to `accept`. | 2.1 |
|
|
167
|
+
| `accept` | Check item by item; stop ②. Once accepted, tick what was met, archive and write the journal. | 3.1, 3.2 |
|
|
168
|
+
| `completed`, still under `.atw/tasks/` | The archive was interrupted. Run it again. | 3.2 |
|
|
169
|
+
|
|
170
|
+
### Picking Up Unfinished Work
|
|
171
|
+
|
|
172
|
+
A new session starts with no current task, even when earlier work is unfinished — the session context says how many tasks are still open. When the user says "continue" / "接着做", or what they ask for clearly belongs to an open task, pick that task up instead of creating a new one:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
python3 ./.atw/scripts/task.py list --mine # open tasks and their status
|
|
176
|
+
python3 ./.atw/scripts/task.py resume <task> # make it this session's current task
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Use `resume`, not `start`: `resume` leaves the task at the status it had, while `start` would move a task still at `discover`, `specify` or `slice` on to `implement` — the work would read as started before it was agreed. Then read its `prd.md`, tell the user in a sentence or two where things stand, and continue from the table above. With several open tasks and no way to tell which one is meant, ask which.
|
|
180
|
+
|
|
181
|
+
### Keeping Conventions
|
|
182
|
+
|
|
183
|
+
When the user corrects you, or states a preference for the second time — how to write, name, lay out or check things, or what they do not want — write the lasting rule behind it into `.atw/spec/conventions.md` in the same turn: one short line under `## 说定的事 / What we agreed`. Do not ask first; tell them in one sentence that you noted it, so they never have to say it again.
|
|
184
|
+
|
|
185
|
+
A correction that only concerns the piece of work in hand (a wrong date, a missing section) is not a convention: fix the work. If it changes what was agreed, that goes through step 2.2 first.
|
|
186
|
+
|
|
187
|
+
### Looking Things Up
|
|
188
|
+
|
|
189
|
+
Look things up yourself, in this conversation. `atw-research` is written to hand the reading to a background agent; in this workflow you do that agent's job yourself — primary sources, each claim with its source, the notes saved in `{TASK_DIR}/research/`. A small lookup with no task has no notes to keep: the answer and where it comes from go in the reply. With `atw-research` too, do not hand the looking-up to a background agent or any other helper.
|
|
190
|
+
|
|
191
|
+
A helper works out of sight and may not be allowed the tools it needs; the user waits a turn and gets nothing. Looking yourself, you know in the same reply whether it worked.
|
|
192
|
+
|
|
193
|
+
If it comes back with nothing — the tool is blocked, or no source you can trust says it — tell the user in the same reply and offer other ways to go on. Do not leave them waiting for a result that is not coming. For a blocked tool, see "When A Tool Is Blocked".
|
|
194
|
+
|
|
195
|
+
### When A Tool Is Blocked
|
|
196
|
+
|
|
197
|
+
The platform may refuse a tool you want: going online, running a program, writing a file. When a tool you want is blocked, tell the user what you cannot do and why, offer ways to go on that do not need that tool, and wait for them to choose.
|
|
198
|
+
|
|
199
|
+
Do not ask them to type a slash command, or anything else meant for the platform: in this workflow the user never types a command to move the work forward. And do not edit, or offer to edit, the platform's permission or settings files — not even when they ask you to sort it out. Access is not yours to give yourself: say so, and offer again the ways that do not need the tool.
|
|
200
|
+
|
|
201
|
+
This is not a third stop. It is a question you cannot go on without, like the ones in step 1.1, and it only comes up when a tool is blocked. Before the work is agreed, the user's answer settles it. Once the work is agreed, their answer is not yet a confirmation. Going on another way changes what was agreed: what they choose goes through step 2.2 like any other change, before you act on it.
|
|
202
|
+
|
|
203
|
+
### Before You Delete Or Overwrite A File
|
|
204
|
+
|
|
205
|
+
Before you delete any file in the user's folder, or overwrite a file you did not create in this piece of work, tell the user which file, why, and whether it can be got back afterwards, and wait for them to agree. This holds whether noob mode is on or off.
|
|
206
|
+
|
|
207
|
+
Their agreement has to be to the deleting or the overwriting itself. "Replace it with the new version" or "tidy this up" is not agreement to delete or overwrite: they agreed to a result, and may not know that a file goes with it. If a file is to go or be written over, say so in those words and name the file. What they have clearly agreed to, do not ask again.
|
|
208
|
+
|
|
209
|
+
Updating a file you made in this piece of work, to what was agreed, needs no asking; deleting it does. A draft you wrote sits in the user's folder like any other file, and they may still want it. Files under `.atw/` that this workflow manages are outside this: task records, conventions, the journal.
|
|
210
|
+
|
|
211
|
+
Asking this is not a third stop. Like a blocked tool, it is a question you cannot go on without, and it only comes up when a file would be deleted or overwritten. Everything else in the work you still advance on your own.
|
|
212
|
+
|
|
213
|
+
### Skills
|
|
214
|
+
|
|
215
|
+
Six skills come with this workflow. Use the first four yourself when the situation calls for one; the last two start only when the user types them.
|
|
216
|
+
|
|
217
|
+
- `atw-interview` — ask until what the user wants is clear. Yours to use in `discover`, without being told.
|
|
218
|
+
- `atw-research` — look up outside facts from sources that can be trusted; keep the notes in `{TASK_DIR}/research/`. You do the looking-up yourself (see "Looking Things Up").
|
|
219
|
+
- `atw-session-insight` — find what was said or decided in earlier conversations.
|
|
220
|
+
- `atw-noob-mode` — the plain-language rules; also when the user says "开启小白模式" / "关闭小白模式".
|
|
221
|
+
- `/atw-askme` — the user asking to be questioned about a plan. It leads to the same questioning as `atw-interview`.
|
|
222
|
+
- `/atw-handoff` — the user asking for a handoff document for another session.
|
|
223
|
+
|
|
224
|
+
[workflow-state:no_task]
|
|
225
|
+
No current task. Decide from the request itself; do not ask the user whether to create a task.
|
|
226
|
+
Small — you can finish it in this reply and the user can judge the result at a glance: just do it. No task, no record.
|
|
227
|
+
Anything larger — several steps, more than one sitting, a result the user will keep, or "done" is not obvious: run `task.py create "<title>" --description "<one line>" --slug <name>` yourself now, tell the user in one sentence that you are keeping a record of this, and continue in discover. When unsure, create it.
|
|
228
|
+
The user wants to go on with earlier unfinished work ("continue" / "接着做", or the request belongs to an open task): run `task.py list --mine`, then `task.py resume <task>` — not `start`, which would move a task that is still being discussed on to `implement`. The task stays at the status it had; continue from there. Do not create a second task for the same work.
|
|
229
|
+
Look things up yourself, in this conversation. With `atw-research` too, do not hand the looking-up to a background agent or any other helper: do the reading yourself. If it comes back with nothing, tell the user in the same reply and offer other ways to go on.
|
|
230
|
+
When a tool you want is blocked, tell the user what you cannot do and why, offer ways to go on that do not need that tool, and wait for them to choose. Do not ask them to type a slash command, and do not edit, or offer to edit, the platform's permission or settings files — not even when they ask you to sort it out.
|
|
231
|
+
Before you delete any file in the user's folder, or overwrite a file you did not create in this piece of work, tell the user which file, why, and whether it can be got back afterwards, and wait for them to agree. "Replace it with the new version" or "tidy this up" is not agreement to delete or overwrite. What they have clearly agreed to, do not ask again. Updating a file you made in this piece of work, to what was agreed, needs no asking; deleting it does. Files under `.atw/` that this workflow manages are outside this.
|
|
232
|
+
[/workflow-state:no_task]
|
|
233
|
+
|
|
234
|
+
[workflow-state:task_error]
|
|
235
|
+
The current task's record could not be read. Do not create or start another task.
|
|
236
|
+
Inspect the task directory named above and repair its task.json. It must be a valid JSON object with a non-empty status.
|
|
237
|
+
Preserve existing task fields and files. If the correct status cannot be determined safely, ask the user before reconstructing the record.
|
|
238
|
+
[/workflow-state:task_error]
|
|
239
|
+
|
|
240
|
+
[workflow-state:noob_mode]
|
|
241
|
+
Noob mode is ON — this user is not an engineer. The full rules are `/atw-noob-mode`: if their text is not in front of you in this conversation, load it before you reply. The lines below are only its core; hold to them in every reply, in every stage:
|
|
242
|
+
- Plain words in the user's language. Explain any unavoidable term, command, path or flag in the same sentence it appears in.
|
|
243
|
+
- Another skill's question list, table or report keeps its shape, but every word in it that reaches the user follows these rules. The project's own glossary words are jargon to this user too.
|
|
244
|
+
- Before anything they must approve or that is hard to undo: what will happen, why, how risky it is, and what approving or declining leads to.
|
|
245
|
+
- Say who did what, what you actually ran versus what you only expect, and every decision you made for them.
|
|
246
|
+
- Retell command output, research results and errors the same way: what happened, what it affects, what comes next.
|
|
247
|
+
This workflow adds two rules; where a skill says otherwise, these come first:
|
|
248
|
+
- Per round, ask the user for at most three answers, one per question: no second ask in it or its suggested answer. Count ones without ❓ and each to ask someone else. Reported decisions do not, unless one changes the result with no safe default: ask. Rest later despite `atw-interview`.
|
|
249
|
+
- Keep the task folder and file paths out of your replies: say what you did and show the content, even where `/atw-noob-mode` says to point to the file. Give a path only for a file the user has to open themselves, and say in the same sentence what that file is.
|
|
250
|
+
Only the user turns it off ("关闭小白模式" / "turn off noob mode"): run `python3 ./.atw/scripts/noob_mode.py off`.
|
|
251
|
+
[/workflow-state:noob_mode]
|
|
252
|
+
|
|
253
|
+
### Phase 1: Plan
|
|
254
|
+
|
|
255
|
+
- 1.0 Create the task `[larger requests · once]` (your call; no stop)
|
|
256
|
+
- 1.1 Talk it through `[required · repeatable]` (status `discover`)
|
|
257
|
+
- 1.2 Write it down `[required · once]` (status `specify`; `prd.md`, then stop ①)
|
|
258
|
+
- 1.3 Start the work `[required · once]` (`task.py start`; status → `implement`)
|
|
259
|
+
- 1.4 Continue a task brought over from `dev` `[only for status slice]`
|
|
260
|
+
|
|
261
|
+
[workflow-state:discover]
|
|
262
|
+
Do not start the work yet. First make sure you know what the user wants: the goal, who or what it is for, how far it goes, and how they will tell it is done.
|
|
263
|
+
If any of that is unclear, ask — use the `atw-interview` skill yourself. Never tell the user to run a command in order to be asked. If everything is already clear from what they said, do not question them for form's sake.
|
|
264
|
+
Use `atw-research` for outside facts you need before the work can be agreed, and `atw-session-insight` when the user refers to something from an earlier conversation.
|
|
265
|
+
Look things up yourself, in this conversation. With `atw-research` too, do not hand the looking-up to a background agent or any other helper: do the reading yourself. If it comes back with nothing, tell the user in the same reply and offer other ways to go on.
|
|
266
|
+
When a tool you want is blocked, tell the user what you cannot do and why, offer ways to go on that do not need that tool, and wait for them to choose. Do not ask them to type a slash command, and do not edit, or offer to edit, the platform's permission or settings files — not even when they ask you to sort it out.
|
|
267
|
+
Before you delete any file in the user's folder, or overwrite a file you did not create in this piece of work, tell the user which file, why, and whether it can be got back afterwards, and wait for them to agree. "Replace it with the new version" or "tidy this up" is not agreement to delete or overwrite. What they have clearly agreed to, do not ask again. Updating a file you made in this piece of work, to what was agreed, needs no asking; deleting it does. Files under `.atw/` that this workflow manages are outside this.
|
|
268
|
+
Gate out of discover: not one question you raised may still be unanswered. If one is open, ask it now instead of advancing.
|
|
269
|
+
When clear, run `task.py set-status <task> specify` yourself — this is not a stop.
|
|
270
|
+
[/workflow-state:discover]
|
|
271
|
+
|
|
272
|
+
[workflow-state:specify]
|
|
273
|
+
Write `{TASK_DIR}/prd.md` yourself, now, in the user's language and in plain words. Three parts: what will be done, what will not be done, and what counts as done — a short list of checks the user could verify themselves. Replace the placeholder text the file was created with.
|
|
274
|
+
Stop ①: show the user what you wrote — the content, not just the file name — and wait for them to confirm it. Do not start on your own judgement that it looks right. If they change anything, update `prd.md` and show it again. If they agree to part of it and say nothing about the rest, only that part is confirmed: ask about the rest before you start.
|
|
275
|
+
Once they confirm, run `task.py start <task>` yourself and begin the work in the same turn. Do not ask them to start anything.
|
|
276
|
+
Look things up yourself, in this conversation. With `atw-research` too, do not hand the looking-up to a background agent or any other helper: do the reading yourself. If it comes back with nothing, tell the user in the same reply and offer other ways to go on.
|
|
277
|
+
When a tool you want is blocked, tell the user what you cannot do and why, offer ways to go on that do not need that tool, and wait for them to choose. Do not ask them to type a slash command, and do not edit, or offer to edit, the platform's permission or settings files — not even when they ask you to sort it out.
|
|
278
|
+
Before you delete any file in the user's folder, or overwrite a file you did not create in this piece of work, tell the user which file, why, and whether it can be got back afterwards, and wait for them to agree. "Replace it with the new version" or "tidy this up" is not agreement to delete or overwrite. What they have clearly agreed to, do not ask again. Updating a file you made in this piece of work, to what was agreed, needs no asking; deleting it does. Files under `.atw/` that this workflow manages are outside this.
|
|
279
|
+
[/workflow-state:specify]
|
|
280
|
+
|
|
281
|
+
[workflow-state:slice]
|
|
282
|
+
This task was brought over from a `dev` project. `slice` is the `dev` stage where a confirmed `prd.md` is cut into tickets; this workflow has no such stage. Do not cut tickets and do not ask the user to run anything.
|
|
283
|
+
Read `{TASK_DIR}/prd.md`, and read any tickets already in `{TASK_DIR}/issues/` as a plain list of the parts of the work. Tell the user in a sentence or two what this task is and where it stands.
|
|
284
|
+
If `prd.md` says what will be done, what will not, and what counts as done: the user confirmed it before the task got here, so run `task.py start <task>` and continue in implement.
|
|
285
|
+
If it does not: run `task.py set-status <task> specify` and write that down first, for the user to confirm.
|
|
286
|
+
Before you delete any file in the user's folder, or overwrite a file you did not create in this piece of work, tell the user which file, why, and whether it can be got back afterwards, and wait for them to agree. "Replace it with the new version" or "tidy this up" is not agreement to delete or overwrite. What they have clearly agreed to, do not ask again. Updating a file you made in this piece of work, to what was agreed, needs no asking; deleting it does. Files under `.atw/` that this workflow manages are outside this.
|
|
287
|
+
[/workflow-state:slice]
|
|
288
|
+
|
|
289
|
+
### Phase 2: Do
|
|
290
|
+
|
|
291
|
+
- 2.1 Do the work `[required]` (status `implement`; no stop)
|
|
292
|
+
- 2.2 Go back when what was agreed has to change `[on demand]`
|
|
293
|
+
|
|
294
|
+
[workflow-state:implement]
|
|
295
|
+
The user has confirmed `{TASK_DIR}/prd.md`. Do the work now, yourself. There is no stop here and nothing for the user to run.
|
|
296
|
+
Stay inside what was agreed. Any change to it is confirmed before you act on it: a change the user asks for, and equally one you propose yourself because something cannot be done as written (another format, another source, a part left out). Go back: run `task.py set-status <task> specify`, update `prd.md`, show the user each change, and wait for them to confirm — this is stop ① again. Do not carry on with the work in the same turn.
|
|
297
|
+
If the user agreed to some of the changes, only those are confirmed. Anything else you changed is still open: point it out and ask about it before you start again. Telling the user afterwards is not confirmation.
|
|
298
|
+
Look things up yourself, in this conversation. With `atw-research` too, do not hand the looking-up to a background agent or any other helper: do the reading yourself. If it comes back with nothing, tell the user in the same reply and offer other ways to go on.
|
|
299
|
+
When a tool you want is blocked, tell the user what you cannot do and why, offer ways to go on that do not need that tool, and wait for them to choose. Do not ask them to type a slash command, and do not edit, or offer to edit, the platform's permission or settings files — not even when they ask you to sort it out. Going on another way changes what was agreed: what they choose is confirmed like any other change, as above.
|
|
300
|
+
Before you delete any file in the user's folder, or overwrite a file you did not create in this piece of work, tell the user which file, why, and whether it can be got back afterwards, and wait for them to agree. "Replace it with the new version" or "tidy this up" is not agreement to delete or overwrite. What they have clearly agreed to, do not ask again. Updating a file you made in this piece of work, to what was agreed, needs no asking; deleting it does. Files under `.atw/` that this workflow manages are outside this.
|
|
301
|
+
A task brought over from a `dev` project may have tickets in `{TASK_DIR}/issues/`: read them as a list of the parts of the work. Do not claim them and do not ask the user to run anything for them.
|
|
302
|
+
When everything in `prd.md` is done, run `task.py set-status <task> accept` yourself and go straight on to the check.
|
|
303
|
+
[/workflow-state:implement]
|
|
304
|
+
|
|
305
|
+
### Phase 3: Finish
|
|
306
|
+
|
|
307
|
+
- 3.1 Check against what was agreed `[required · once]` (status `accept`; then stop ②)
|
|
308
|
+
- 3.2 Archive and write the journal `[required · once]` (after the user accepts; no stop)
|
|
309
|
+
|
|
310
|
+
[workflow-state:accept]
|
|
311
|
+
Go through "what counts as done" in `{TASK_DIR}/prd.md` one item at a time. For each item say whether it is met and give the evidence: where the user can see it for themselves — the file, the section, the figure, the source.
|
|
312
|
+
Report what you actually checked, not what you expect. If an item is not met and you can finish it within what was agreed, run `task.py set-status <task> implement`, finish it, and come back to this check.
|
|
313
|
+
Look things up yourself, in this conversation. With `atw-research` too, do not hand the looking-up to a background agent or any other helper: do the reading yourself. If it comes back with nothing, tell the user in the same reply and offer other ways to go on.
|
|
314
|
+
When a tool you want is blocked, tell the user what you cannot do and why, offer ways to go on that do not need that tool, and wait for them to choose. Do not ask them to type a slash command, and do not edit, or offer to edit, the platform's permission or settings files — not even when they ask you to sort it out.
|
|
315
|
+
Before you delete any file in the user's folder, or overwrite a file you did not create in this piece of work, tell the user which file, why, and whether it can be got back afterwards, and wait for them to agree. "Replace it with the new version" or "tidy this up" is not agreement to delete or overwrite. What they have clearly agreed to, do not ask again. Updating a file you made in this piece of work, to what was agreed, needs no asking; deleting it does. Files under `.atw/` that this workflow manages are outside this.
|
|
316
|
+
Stop ②: present the item-by-item result and wait. Whether the work is done is the user's judgement, not yours. If they want changes, run `task.py set-status <task> implement`, make them, then check again.
|
|
317
|
+
Once they accept, do the rest yourself, without asking, in this order. First record the result in `{TASK_DIR}/prd.md`: under "what counts as done", tick each item your check found met (`- [x]`). An item you found not met, or could not verify in full, stays unticked, with the reason on a line under it. Tick by what the check found, not because the user accepted, and change no other wording. If the item-by-item result is not in front of you in this conversation — the user accepts in a later session — go through the items again before you tick.
|
|
318
|
+
Then `task.py archive <task> --skip-branch-validation`, then `add_session.py --title "<title>" --summary "<what was done>"`. Tell them in one sentence that it is filed.
|
|
319
|
+
[/workflow-state:accept]
|
|
320
|
+
|
|
321
|
+
[workflow-state:completed]
|
|
322
|
+
The archive was interrupted. `task.py archive` writes `completed` to `task.json` first and moves the directory last, and it does not roll back — so a task still under `.atw/tasks/` with this status means the move never happened.
|
|
323
|
+
Re-run `task.py archive <task> --skip-branch-validation` to finish it; the steps before the move are safe to repeat. Then write the journal entry with `add_session.py` if this task does not have one yet.
|
|
324
|
+
Do not open new work on this task, do not create another task for it, and do not move the directory by hand. If the re-run fails, tell the user what happened instead of working around it.
|
|
325
|
+
[/workflow-state:completed]
|
|
326
|
+
|
|
327
|
+
### Rules
|
|
328
|
+
|
|
329
|
+
1. Find the current task's status, then do what the table above says for it
|
|
330
|
+
2. Stops ① and ② are the user's calls. Never pass one by inferring the answer
|
|
331
|
+
3. Everything else you advance yourself: no "shall I go on?", and nothing for the user to type
|
|
332
|
+
4. A status can go back (the work shows that what was agreed is wrong → `set-status specify`, fix `prd.md`, confirm again)
|
|
333
|
+
5. A task without `prd.md` content the user confirmed is not ready to be worked on
|
|
334
|
+
|
|
335
|
+
### Loading Step Detail
|
|
336
|
+
|
|
337
|
+
At each step, run this to read it in full:
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
python3 ./.atw/scripts/get_context.py --mode phase --step <step>
|
|
341
|
+
# e.g. python3 ./.atw/scripts/get_context.py --mode phase --step 1.2
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Phase 1: Plan
|
|
347
|
+
|
|
348
|
+
Goal: know what the user wants, and have it written down and confirmed.
|
|
349
|
+
|
|
350
|
+
#### 1.0 Create the task `[larger requests · once]`
|
|
351
|
+
|
|
352
|
+
Create a task as soon as you see the request is more than a small one (see "Small Request or Task"). This is your call — do not ask the user first. Tell them in one sentence that you are keeping a record of this piece of work.
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
python3 ./.atw/scripts/task.py create "<task title>" --description "<one-line description>" --slug <name>
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
`--slug` is a short readable name only. Do not include the `MM-DD-` date prefix; `task.py create` adds it.
|
|
359
|
+
|
|
360
|
+
The command sets the status to `discover`, writes `task.json`, creates a placeholder `prd.md`, and makes the new task this session's current task. From the next turn the reminder is the one for `discover`.
|
|
361
|
+
|
|
362
|
+
Run only `create` here. `start` moves the status straight to `implement`, which skips agreeing on the work; it belongs to step 1.3.
|
|
363
|
+
|
|
364
|
+
Skip this step when `python3 ./.atw/scripts/task.py current --source` already points to a task, and when the user is going on with earlier work — pick that task up instead (see "Picking Up Unfinished Work").
|
|
365
|
+
|
|
366
|
+
#### 1.1 Talk it through `[required · repeatable]`
|
|
367
|
+
|
|
368
|
+
Goal: remove the unknowns before anything is written down as agreed.
|
|
369
|
+
|
|
370
|
+
You need to know four things: what the result is, who or what it is for, how far it goes (and where it stops), and how the user will tell it is done. If any of them is unclear, ask.
|
|
371
|
+
|
|
372
|
+
- Use the `atw-interview` skill yourself to do the asking. The user does not have to type anything to be asked, and you do not tell them to.
|
|
373
|
+
- Use `atw-research` when the open question is about outside facts — what a source says, what the options are — rather than about what the user wants. Keep the notes in `{TASK_DIR}/research/`, one file per topic. You do the looking-up yourself (see "Looking Things Up").
|
|
374
|
+
- Use `atw-session-insight` when the user refers to something said or decided in an earlier conversation.
|
|
375
|
+
|
|
376
|
+
When the request is already clear, do not question the user for form's sake. Go straight on.
|
|
377
|
+
|
|
378
|
+
**Gate out of discover**: not one question you raised may still be unanswered. An unanswered question becomes a guess, and a guess becomes something the user rejects at the end. When the gate is clear:
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
python3 ./.atw/scripts/task.py set-status <task> specify
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
This is not a stop — advance on your own judgement.
|
|
385
|
+
|
|
386
|
+
#### 1.2 Write it down `[required · once]`
|
|
387
|
+
|
|
388
|
+
Write `{TASK_DIR}/prd.md` yourself, replacing the placeholder the task was created with. Use the user's language and plain words — this is the page they confirm, so they must be able to read it without help.
|
|
389
|
+
|
|
390
|
+
Give it three sections, each under its own heading, in this order:
|
|
391
|
+
|
|
392
|
+
- **What will be done** — the result, concretely: which document, which list, which decision.
|
|
393
|
+
- **What will not be done** — what someone could reasonably expect but is left out. This is where misunderstandings get caught cheaply.
|
|
394
|
+
- **What counts as done** — a short checklist the user could verify themselves. Phase 3 goes through exactly this list, so each item has to be something you can show evidence for.
|
|
395
|
+
|
|
396
|
+
**Stop ①**: show the user what you wrote — the content itself, not just the file name — and wait for them to confirm it. This is the last cheap place to be wrong. Do not advance on your own judgement that it looks right. If they change anything, update `prd.md` and show it again. If they agree to part of it and say nothing about the rest, only that part is confirmed: ask about the rest before you start.
|
|
397
|
+
|
|
398
|
+
Come back to this step whenever what was agreed changes, including from Phase 2 (step 2.2).
|
|
399
|
+
|
|
400
|
+
#### 1.3 Start the work `[required · once]`
|
|
401
|
+
|
|
402
|
+
As soon as the user has confirmed `prd.md` (stop ①), start — in the same turn, without asking them to do anything:
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
python3 ./.atw/scripts/task.py start <task>
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
This makes the task this session's current task and moves its status to `implement`.
|
|
409
|
+
|
|
410
|
+
If `task.py start` says the session identity is not available, it has still moved the status; carry on from the conversation.
|
|
411
|
+
|
|
412
|
+
#### 1.4 Continue a task brought over from `dev` `[only for status slice]`
|
|
413
|
+
|
|
414
|
+
A task at `slice` was created while this project was in `dev` mode. There, `slice` is the stage where a confirmed `prd.md` is cut into tickets under `{TASK_DIR}/issues/`. This workflow has no such stage: do not cut tickets, and do not ask the user to run anything.
|
|
415
|
+
|
|
416
|
+
1. Read `{TASK_DIR}/prd.md`. If there are tickets in `{TASK_DIR}/issues/`, read them as a plain list of the parts of the work — some may already be finished.
|
|
417
|
+
2. Tell the user in a sentence or two what this task is and where it stands.
|
|
418
|
+
3. If `prd.md` says what will be done, what will not, and what counts as done, the user confirmed it before the task reached this status. Start the work:
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
python3 ./.atw/scripts/task.py start <task>
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
4. If it does not — it is missing, still a placeholder, or gives no way to tell when the work is done — go back and write that down first (step 1.2), for the user to confirm:
|
|
425
|
+
|
|
426
|
+
```bash
|
|
427
|
+
python3 ./.atw/scripts/task.py set-status <task> specify
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
The same reading applies to a task that arrives at `implement` with tickets in `issues/`: they are a list of the parts of the work, nothing to claim or close.
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
## Phase 2: Do
|
|
435
|
+
|
|
436
|
+
Goal: produce what was agreed.
|
|
437
|
+
|
|
438
|
+
#### 2.1 Do the work `[required]`
|
|
439
|
+
|
|
440
|
+
The user has confirmed `prd.md`. Do the work yourself, now. There is no stop in this phase and nothing for the user to run.
|
|
441
|
+
|
|
442
|
+
- Work from `prd.md`: what will be done is the scope, what will not be done is the fence.
|
|
443
|
+
- Follow `.atw/spec/conventions.md`, and add to it when the user corrects you or repeats a preference (see "Keeping Conventions").
|
|
444
|
+
- When you need outside facts, look them up (`atw-research`) rather than writing from memory, and keep what you found in `{TASK_DIR}/research/`. You do the looking-up yourself (see "Looking Things Up").
|
|
445
|
+
- When a tool you want is blocked, see "When A Tool Is Blocked". Going on another way is step 2.2.
|
|
446
|
+
- Before you delete or overwrite a file, see "Before You Delete Or Overwrite A File".
|
|
447
|
+
- If the work takes more than one session, the task stays open at `implement`; a later session picks it up (see "Picking Up Unfinished Work").
|
|
448
|
+
|
|
449
|
+
When everything in `prd.md` is done, move on yourself and go straight to the check (step 3.1):
|
|
450
|
+
|
|
451
|
+
```bash
|
|
452
|
+
python3 ./.atw/scripts/task.py set-status <task> accept
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
#### 2.2 Go back when what was agreed has to change `[on demand]`
|
|
456
|
+
|
|
457
|
+
Any change to what was agreed is confirmed before you act on it. Where the change comes from makes no difference:
|
|
458
|
+
|
|
459
|
+
- the user asks for something that changes it;
|
|
460
|
+
- the work shows it cannot be met as written;
|
|
461
|
+
- one you propose yourself — a tool is not available, a source cannot be reached, another format would read better. However reasonable your alternative looks, it is a change like any other. For a tool the platform blocked, the user chooses the way on first (see "When A Tool Is Blocked").
|
|
462
|
+
|
|
463
|
+
Do not quietly do something else. Go back to step 1.2: update `prd.md`, show the user each change, and wait for them to confirm (stop ①). Do not carry on with the work in the same turn:
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
python3 ./.atw/scripts/task.py set-status <task> specify
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
If the user agreed to some of the changes, only those are confirmed — picking one of the options you offered agrees to what that option said, nothing more. Anything else in the updated `prd.md` is still open: point it out and ask about it before you start again.
|
|
470
|
+
|
|
471
|
+
Telling the user afterwards is not confirmation. A change that reaches them as "a decision I made for you", once the work is done, was never agreed.
|
|
472
|
+
|
|
473
|
+
Once every change is confirmed, start again as in step 1.3. A small clarification that changes nothing in `prd.md` does not need this.
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## Phase 3: Finish
|
|
478
|
+
|
|
479
|
+
Goal: the user agrees the work is done, and it is filed.
|
|
480
|
+
|
|
481
|
+
#### 3.1 Check against what was agreed `[required · once]`
|
|
482
|
+
|
|
483
|
+
Go through "what counts as done" in `prd.md` one item at a time. For each item, say whether it is met and give the evidence: where the user can see it for themselves — the file, the section, the figure, the source. Also confirm nothing listed under "what will not be done" was done anyway.
|
|
484
|
+
|
|
485
|
+
Report what you actually checked, not what you expect to be true. You are checking your own work, so the user's acceptance is the real gate — make it easy for them to verify.
|
|
486
|
+
|
|
487
|
+
If an item is not met and you can finish it within what was agreed, finish it before presenting:
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
python3 ./.atw/scripts/task.py set-status <task> implement
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Then come back to this check. If it cannot be met, say so plainly in the report.
|
|
494
|
+
|
|
495
|
+
**Stop ②**: present the item-by-item result and wait. Whether the work is done is the user's judgement, not yours — you can report that every item is met, but you cannot accept on their behalf. If they want changes, set the status back to `implement` as above, make them, and check again.
|
|
496
|
+
|
|
497
|
+
#### 3.2 Archive and write the journal `[required · once]`
|
|
498
|
+
|
|
499
|
+
Once the user accepts, do the rest yourself, in this order, without asking and without telling them to run anything.
|
|
500
|
+
|
|
501
|
+
First record the result of the check in `prd.md`, while the task is still in place — the archive moves its directory. Under "what counts as done":
|
|
502
|
+
|
|
503
|
+
- tick each item your check found met (`- [x]`);
|
|
504
|
+
- an item you found not met, or could not verify in full, stays unticked, with the reason on a line under it. A caveat you gave about part of an item counts: that item is not verified in full.
|
|
505
|
+
|
|
506
|
+
Tick by what the check in step 3.1 found, not because the user accepted: they can accept the work with an item still open, and whoever opens the archived task later should read the same result you reported. Change no other wording — this records the outcome, it does not change what was agreed.
|
|
507
|
+
|
|
508
|
+
If the item-by-item result is not in front of you in this conversation — the user accepts in a later session — go through the items again before you tick, as in step 3.1.
|
|
509
|
+
|
|
510
|
+
Then archive and write the journal:
|
|
511
|
+
|
|
512
|
+
```bash
|
|
513
|
+
python3 ./.atw/scripts/task.py archive <task> --skip-branch-validation
|
|
514
|
+
python3 ./.atw/scripts/add_session.py --title "<title>" --summary "<what was done>"
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
`archive` writes `status=completed`, moves the directory to `archive/{year-month}/`, and clears the session's current task. `--skip-branch-validation` is needed because a task in this workflow is not tied to a branch or a pull request, which is what that check is about.
|
|
518
|
+
|
|
519
|
+
`add_session.py` adds an entry to your journal under `.atw/workspace/`, so the next session can see what was done. In a folder that is not a git repository both commands say so and carry on; that is not an error.
|
|
520
|
+
|
|
521
|
+
Then tell the user in one sentence that the work is filed.
|
|
522
|
+
|
|
523
|
+
If a task is found at `completed` but still under `.atw/tasks/`, the archive was interrupted: run the `archive` command again, then write the journal entry if the task does not have one yet.
|
|
524
|
+
|
|
525
|
+
---
|
|
526
|
+
|
|
527
|
+
## Customizing ATW (for forks)
|
|
528
|
+
|
|
529
|
+
This is the built-in workflow of `general` mode. `atw workflow --template native` in a general project restores it, and `atw update` keeps it current as long as the file has not been edited. All customization is done by editing this file; the scripts only parse it.
|
|
530
|
+
|
|
531
|
+
### What must stay true
|
|
532
|
+
|
|
533
|
+
- With no current task, a small request is just done and a larger one gets a task without the user being asked.
|
|
534
|
+
- Stops ① and ② stay reachable and stay the user's call. There is no third stop.
|
|
535
|
+
- Nothing here tells the user to type a command in order to move the work forward.
|
|
536
|
+
- Only skills that `general` mode installs are named.
|
|
537
|
+
|
|
538
|
+
Structure is guarded by `packages/cli/test/scripts/workflow-structure.test.ts`, which runs with `pnpm test`.
|
|
539
|
+
|
|
540
|
+
### Changing the per-turn reminder text
|
|
541
|
+
|
|
542
|
+
Edit the body of the matching `[workflow-state:STATUS]` block in the `## Phase Index` section. When you change a block, check the matching step for sync: the block is what the AI hears on every turn, the step is what it reads on demand.
|
|
543
|
+
|
|
544
|
+
| Scope | Block |
|
|
545
|
+
|---|---|
|
|
546
|
+
| No current task | `[workflow-state:no_task]` |
|
|
547
|
+
| Current task's record unreadable | `[workflow-state:task_error]` |
|
|
548
|
+
| Step 1.1 | `[workflow-state:discover]` |
|
|
549
|
+
| Steps 1.2–1.3 | `[workflow-state:specify]` |
|
|
550
|
+
| Step 1.4 — a task brought over from `dev` | `[workflow-state:slice]` |
|
|
551
|
+
| Phase 2 | `[workflow-state:implement]` |
|
|
552
|
+
| Phase 3 up to the archive | `[workflow-state:accept]` |
|
|
553
|
+
| Archive interrupted; task still under `.atw/tasks/` | `[workflow-state:completed]` |
|
|
554
|
+
| Any of the above, while the user has noob mode on (appended, not a status) | `[workflow-state:noob_mode]` |
|
|
@@ -32,7 +32,7 @@ For a user who is not an engineer. While it is on, every reply in every stage is
|
|
|
32
32
|
python3 ./.atw/scripts/noob_mode.py on|off|status
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
The user switches it by saying "开启小白模式" / "关闭小白模式" or running `/atw-noob-mode`; the skill runs the script.
|
|
35
|
+
The user switches it by saying "开启小白模式" / "关闭小白模式" or running `/atw-noob-mode`; the skill runs the script. Their choice — on or off — is one line in that user's own `.atw/.developer`, so it is personal and never committed. A user who has never chosen gets the project mode's default: on when `.atw/config.yaml` says `mode: general`, off when it says `mode: dev` or has no `mode` entry. Switching off is recorded as a choice, so neither the default nor a change of project mode turns it back on; `status` says which of the two is in effect. It changes how the AI talks to the user — not the stages, the stops, or what goes into task files.
|
|
36
36
|
|
|
37
37
|
### Spec System
|
|
38
38
|
|