@debonet/idd 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,223 @@
1
+ # Guidance: the session and its questions page
2
+
3
+ Statement ids: complete
4
+
5
+ ## Purpose
6
+
7
+ What the session that talks with the human does with its project's
8
+ questions page: at its start, each time it needs his decision, and while
9
+ answers are pending. Each `[o-…]` citation names an entry of
10
+ `~/@idd/observations.md`.
11
+
12
+ ## His words
13
+
14
+ > {#m-ja6m5r} From his instructions file `~/.claude/CLAUDE.md`, section
15
+ > "Questions for me go on a web questions page", as read 2026-11-04:
16
+ > "Whenever a session needs my decision on anything (a blocking question, an
17
+ > architect's question, a choice between options), put it on a questions page
18
+ > rather than only in the terminal."
19
+
20
+ > {#m-vmsvl8} From the same section: "The pending queue is the record of what
21
+ > you still owe me. … When you have incorporated an answer (briefed it, built it, or
22
+ > put a follow-up question on the page), delete `pending/<sId>` with
23
+ > ArtifactData, pinned with `if_version` to the version you read (phase 2),
24
+ > so a change I make while you work stays pending. List `pending/` at the
25
+ > start of every turn that touches the page and before every reply that
26
+ > lists questions as open; a non-empty `pending/` is work, not something to
27
+ > wait on."
28
+
29
+ > {#m-brdqfi} From the same section: "In the terminal, a new question is
30
+ > one short line that names it and says it's on the page, unless it is
31
+ > urgent."
32
+
33
+ > {#m-cj0deu} RULING (CEO) 2026-10-12 (AIOS): "When you ask new question: 1)
34
+ > collapse the group of already-answered questions. 2) open the local browser
35
+ > to the page"; and 2026-10-15, after a question asked in the terminal: "use
36
+ > the web page for questions"
37
+
38
+ > {#m-qx1889} RULING (CEO) (AIOS), after decisions were asked only in chat:
39
+ > "I don't see any open questions on the questionaire"
40
+
41
+ > {#m-dom4ly} RULING (CEO) (AIOS), after reports listed saved answers
42
+ > as awaited: "These are not showing up on the page, they are in the already
43
+ > answered collapse."; and a second time: "These are not showing up in my
44
+ > unanswered list"
45
+
46
+ > {#m-vc3mky} RULING (CEO) 2026-10-01 (AIOS), while a design was still being
47
+ > shaped and an architect had been launched on it: "STOP WORKING UNTIL WE
48
+ > AGREE ON SOMETHING."
49
+
50
+ > {#m-7xfv1u} RULING (CEO) 2026-11-04, q199. The question: "IDD: pending
51
+ > answers when a session starts. A new session finds answers you saved that
52
+ > no session has acted on yet. Example: you open a session to fix a typo,
53
+ > and yesterday's answer to q201 is still pending.
54
+ > A) The session acts on q201 first, then does the typo.
55
+ > B) The session says in one line that q201 is pending, does the typo, then
56
+ > acts on q201.
57
+ > C) The session names q201 and asks whether to act on it now." His answer:
58
+ > A.
59
+
60
+ ## Starting a session
61
+
62
+ * {#g-3ncq2t <m-vmsvl8@415d9d6 for=main via=prompt} **Find the matching IDD branch first.** At
63
+ the start of every session in an adopting project, run
64
+ `npm exec -- idd guide`,
65
+ identify the checked-out code branch and its `idd-<branch>` data branch,
66
+ and open or reuse a separate data worktree under the code checkout's
67
+ `tmp/` directory. Fetch that IDD branch before reading `idd/page.json`,
68
+ `idd/questions.json` or pending answers. If it does not exist, create it
69
+ from the code branch's IDD parent branch, or as a data-only branch when
70
+ there is no parent, then initialize the files and push it. Run all
71
+ `npm exec -- idd` commands from the data worktree; never commit IDD files to the
72
+ code branch.
73
+ * {#g-24zjbf <arch for=main via=prompt} **Keep questionnaire commits separate.** Commit question,
74
+ answer, history, conflict and status files only to the matching
75
+ `idd-<code-branch>` branch. When a code branch has a parent, base its IDD
76
+ branch on the parent's IDD branch so the data histories remain mergeable.
77
+ * {#g-n4s36y <m-vmsvl8@415d9d6 for=main via=prompt} **List hosted answers that are pending.**
78
+ When the viewer has open questions, refresh the matching IDD branch and
79
+ list its newly committed answers before any other work, and tell the
80
+ human in one line which question ids are pending.
81
+ * {#g-u5t8t0 <arch for=main via=prompt} **List local answers that are pending.** Before any
82
+ other work, a session reads `idd/pending.json` when it exists and lists
83
+ its question ids with the other pending answers.
84
+ * {#g-w42ybb <m-7xfv1u@663fe96 for=main via=prompt} **Pending answers come before the
85
+ task.** A session that finds pending answers at its start acts on each of
86
+ them, by The pending queue below, before it begins the task it was started
87
+ for, even a task unrelated to them, as fixing a typo.
88
+ * {#g-yve3y9 <arch for=main via=prompt} **Review project thoughts.** At session start,
89
+ run `npm exec -- idd thoughts` from the matching IDD data worktree and
90
+ review submitted thoughts in creation order. Treat each as a plain-text
91
+ idea or observation from the human, not as a question that requires an
92
+ answer. Work on it when it applies and is not already reflected in the
93
+ project; if it needs a decision, ask a follow-up through the normal IDD
94
+ question flow. Do not rewrite or remove submitted thoughts.
95
+
96
+ ## Every decision goes through the tool's questionnaire
97
+
98
+ * {#g-ji85m3 <m-ja6m5r@30b5494,m-cj0deu@1f006c3,m-qx1889@b94432f for=main via=prompt} **In the
99
+ tool's questionnaire.** Every decision the session needs from the human,
100
+ an architect's question and an option an architect chose on his behalf
101
+ included, is added to `idd/questions.json` and presented with that tool's
102
+ questionnaire, even when it is also stated in terminal text. Check, before
103
+ ending a turn that asks him anything: `grep -c '"id": "q<N>"'
104
+ idd/questions.json` prints 1 for each question the turn names. [o-7ioawk]
105
+ * {#g-qykl4x <m-brdqfi@33c1124 for=main via=prompt} **One line in the Claude Code terminal.**
106
+ In the terminal a new question is one short line naming its id and saying
107
+ it is on the page, unless it is urgent.
108
+ * {#g-7pywro <m-be8ix1@1bb0e96 for=main,architect via=prompt} **Keep the viewer reachable.**
109
+ After publishing a question, open its direct hosted viewer link when the
110
+ agent tool can open a browser and include the link in the same update. At
111
+ session start, after progress reports, and whenever the agent says it is
112
+ waiting while any question remains unanswered, include the direct link
113
+ again so the human can reopen the page.
114
+
115
+ ## Adding a question
116
+
117
+ * {#g-otl2eg <m-ja6m5r@30b5494,m-cj0deu@1f006c3 for=main via=prompt} **Tool-specific steps.**
118
+ Follow `npm exec -- idd guide` and the installed package's tool-specific
119
+ instructions to write and present the question through that tool's native
120
+ questionnaire. For a hosted question, commit and push the data worktree,
121
+ get its direct URL with `npm exec -- idd viewer-url`, open the page when the tool
122
+ can open a browser, and include the link in the update. Codex follows
123
+ `specs/guidance/codex.md`.
124
+ A question is never added to the question file by hand, since two
125
+ sessions adding at once would take one id (`specs/idd-page.md`, Concurrent
126
+ runs).
127
+ * {#g-ffrx1c <arch for=main via=prompt} **An answered question is never edited.**
128
+ A question that has a saved answer is never edited, renumbered or removed
129
+ from the question file, since its answer is keyed by its id; a correction
130
+ or a follow-up is a new question. An open question's text may be
131
+ corrected before he answers it. Removing a question whose answer is
132
+ recorded makes `npm exec -- idd build` fail (`specs/idd-page.md`, check); an
133
+ answer saved on the page but not yet recorded has no such check, so a
134
+ pending answer is recorded before any question is removed or edited.
135
+ [o-k3r7wq]
136
+ * {#g-csu92e <arch for=main via=prompt} **A recovered question comes back
137
+ answered.** A question recovered from history (a transcript, an old page,
138
+ the checkpoint repo) is restored to the question file only with its saved
139
+ answer recorded in the answer file first, so it draws among the answered
140
+ questions. A recovered question with no saved answer is restored as an
141
+ open card only after the question file is searched for a later question
142
+ that replaced it (`grep -n -i "replaces q<N>\|<two words of its
143
+ subject>" idd/questions.json`) and none is found; one that a later
144
+ question replaced is not restored as open. [o-r5wq2m]
145
+ * {#g-ed18pa <arch for=main via=prompt} **A question holds every build that would
146
+ decide it.** After adding a question, find every brief and message sent
147
+ since the decision arose that would decide it, those of running agents
148
+ included (`grep -n "<two words of the question's subject>"` over them);
149
+ each gets an explicit "HELD: do not build X until q<N>" line, sent before
150
+ the next tool call. [o-1asexx]
151
+ * {#g-s3n1rz <m-vc3mky@ab7c0a0 for=main via=prompt} **Nothing is built while he shapes it.**
152
+ While he is still shaping a design ("something like", a refinement, a
153
+ question), no agent is launched on it: reply with the proposal and wait
154
+ until he states it as settled.
155
+
156
+ ## Hosted agent status
157
+
158
+ * {#g-rdv6ht <arch for=main via=prompt} **Report whether the agent is blocked.** A session
159
+ working with a hosted questionnaire writes its session entry to
160
+ `idd/status.json` on the matching `idd-<branch>` branch with
161
+ `npm exec -- idd status <session-id> <blocked|working|clear>`, marks itself
162
+ blocked only when it cannot continue without a human answer, and refreshes
163
+ `updatedAt` when that state changes or it reports progress. It commits and
164
+ pushes each change so the viewer can show it, then removes its entry when
165
+ the session ends.
166
+
167
+ ## Changed answers and conflicts
168
+
169
+ * {#g-q1onm6 <m-hvgu3e@374ddc6 for=main,fixer via=prompt} When `idd/conflicts.json` has a new
170
+ submission that differs from the committed answer, keep that committed answer in force and
171
+ add a follow-up question to the shared questionnaire. Name both answer
172
+ choices and their submission dates, explain that the original may already
173
+ have been implemented and later decisions may depend on it, and ask whether
174
+ to switch to the new answer. Do not rewrite the original answer or resolve
175
+ the conflict before the follow-up is answered. Once answered, record the
176
+ ruling and mark the conflict resolved immediately; this moves the question
177
+ to Answered even if the implementation work remains. Then do the work the
178
+ ruling requires. A revisit that repeats the current choice and note is not a
179
+ conflict.
180
+
181
+ ## The pending queue
182
+
183
+ * {#g-ll6nbu <m-vmsvl8@415d9d6 for=main via=prompt} **Pending is work.** A pending answer is
184
+ work for the session, not something to wait on. List the page's pending
185
+ answers at the start of every turn that touches the page and before every
186
+ reply that lists questions as open.
187
+ * {#g-key6h6 <arch for=main via=prompt} **Local pending is work.** List the local pending
188
+ answers at the start of every turn that touches IDD and before every
189
+ reply that lists questions as open.
190
+ * {#g-8dij85 <m-vmsvl8@415d9d6,m-dom4ly@9201ac7 for=main via=prompt} **A saved answer is an
191
+ answer.** An answer saved on the page is acted on whether or not a Done
192
+ comment named it. Before writing "waiting on q<N>", read `answers/q<N>`
193
+ in the same turn as the reply; a saved choice or note is acted on now.
194
+ [o-x2i8vm]
195
+ * {#g-ynkoin <arch for=main via=prompt} **Record it first.** Before acting on a
196
+ pending answer, record it in the project's answer file
197
+ (`specs/project-files.md`, The answer file) with `npm exec -- idd
198
+ answer <id>`, which must exit 0; this also records the answer as locally
199
+ pending in `idd/pending.json`.
200
+ * {#g-z1cvl1 <arch for=main via=prompt} **Publish the pending queue.** Commit and push
201
+ the answer and pending files on the matching IDD data branch after
202
+ recording a native answer, and commit and push pending-queue changes after
203
+ recording or clearing a hosted answer, so a later session can see the work
204
+ that remains.
205
+ * {#g-mh145q <m-vmsvl8@415d9d6 for=main via=prompt} **Clear it once incorporated.** Delete a
206
+ question's `pending/` document only once its answer is incorporated (briefed
207
+ to an agent, built, or answered by a follow-up question on the page), and
208
+ pin the delete to the version of the document read before acting on it,
209
+ so a change he makes meanwhile stays pending.
210
+ * {#g-yml7dk <arch for=main via=prompt} **Clear the local record after incorporation.** After a
211
+ local pending answer is incorporated, run `npm exec -- idd clear-pending <id>
212
+ <time>` with the time read from that answer. A newer answer with a
213
+ different time stays pending.
214
+
215
+ ## Dependencies
216
+
217
+ * {#p-ta0zif >specs/project-files.md} The page file, the question file and the
218
+ answer file.
219
+ * {#p-vmgrfz >specs/idd-page.md} The command that creates, checks and builds them.
220
+ * {#p-zwayt9 >specs/questions-page.md} The page, its answer and pending documents
221
+ and its Done comment.
222
+ * {#p-1kdv9a >specs/guidance/claude-code.md} How these steps are done with Claude
223
+ Code's tools.
@@ -0,0 +1,171 @@
1
+ # Guidance: writing a question for the human
2
+
3
+ Statement ids: complete
4
+
5
+ ## Purpose
6
+
7
+ How a question for the human is written and checked before it goes on the
8
+ page, whoever drafts it. Each `[o-…]` citation names an entry of
9
+ `~/@idd/observations.md`.
10
+
11
+ ## His words
12
+
13
+ > {#m-zis8nz} From his instructions file `~/.claude/CLAUDE.md`, section
14
+ > "Questions for me go on a web questions page", as read 2026-11-04: "Each
15
+ > question is complete on its own. Give a short title, then a body that says
16
+ > what I see, where and when, with a concrete example, then 2–4 options as `{
17
+ > sKey, sText }`. Never point back at an earlier message, and never use code
18
+ > or spec vocabulary I didn't introduce."
19
+
20
+ > {#m-d0xavz} RULING (CEO) 2026-09-28 (AIOS): "OMG. FOr each of those questions,
21
+ > ASK A COMPLETE QUESTION. Why are you making me scroll through pages of
22
+ > useless thoughts?"
23
+
24
+ > {#m-hrtndz} RULING (CEO) 2026-09-23 (AIOS), asked a question holding a word
25
+ > from the specs: "what do you mean by frame? that's your own word"
26
+
27
+ > {#m-cubli8} RULING (CEO) 2026-09-29 (AIOS), asked about a nickname coined in
28
+ > a message: "What is a "saved box"?"; and 2026-10-07, shown a test fixture's
29
+ > value: "What is a "nomen"?"
30
+
31
+ > {#m-ggebxz} RULING (CEO) (AIOS), answering questions his standing
32
+ > principle already answered: "OMFG. How many times do I need to say it"
33
+
34
+ > {#m-p1sufn} RULING (CEO) (AIOS), asked where a new element's form is filled
35
+ > in: "You are being frustrating this morning. <analyze> acts like group for
36
+ > the purposes of rendering"
37
+
38
+ > {#m-u8pt83} RULING (CEO) 2026-10-07 (AIOS), offered as a choice a behaviour he
39
+ > would plainly reject: "Huh? … No."
40
+
41
+ > {#m-pmw2kw} RULING (CEO) 2026-10-11 (AIOS), choosing an option added
42
+ > only after he asked for an example: "Yes, c is better, but you had not
43
+ > offered that before"
44
+
45
+ > {#m-xqs1m0} RULING (CEO) 2026-10-04 (AIOS), on a delay an architect chose that
46
+ > he had never seen: "brutally slow"
47
+
48
+ > {#m-vk1rcm} RULING (CEO) (AIOS), after a ruling gave a key a new meaning:
49
+ > "Argh. Shift-tab was already taken."
50
+
51
+ > {#m-g3vhaa} RULING (CEO) (AIOS), on a card that described links as
52
+ > pointing from the spec to the code: "THe spec should not link to the code!
53
+ > The code should link to the spec! VERY VERY IMPORTANT."
54
+
55
+ > {#m-nuw5vs} RULING (CEO) 2026-11-04 (AIOS), on a question "Where does the
56
+ > new Security tab sit in the settings tabs?" whose options were after Admin
57
+ > at the end, just before Admin, and right after Models: "Don't ask stupid
58
+ > stuff like this. Just make a decision."
59
+
60
+ > {#m-hg4vjm} From his instructions file `~/.claude/CLAUDE.md`, section
61
+ > "Development of web apps", as read 2026-11-04: "dont provide defaults. I
62
+ > want to be asked the questions from the Architect."
63
+
64
+ > {#m-4p034f} RULING (CEO), 2026-11-12: "it needs to contain sufficient context";
65
+ > "it should not include any terms that the model has made up for its own
66
+ > internal reasoning but has not discussed with the user"; "it should be
67
+ > important / make a difference in the product"; "it should be asked in a
68
+ > way in which the OBSERVABLE user behavior is evident, not just internal
69
+ > implementtion detail"
70
+
71
+ ## The shape of a question
72
+
73
+ * {#g-3e7r04 <m-zis8nz@70625d5,m-d0xavz@dfa3c86 for=main,architect via=prompt} **Complete on its
74
+ own.** A question has a short title, then a body saying what he sees,
75
+ where and when, with a concrete example, then two to four options. It
76
+ never points back at an earlier message or question; a label pointing back
77
+ is rewritten as the full question.
78
+ * {#g-s88zfh <m-zis8nz@70625d5,m-hrtndz@38bc9ad,m-cubli8@a1b60f5 for=main,architect via=prompt} **His
79
+ words only.** A word from the specs, the code, a test fixture or a
80
+ nickname coined in an earlier message is not his word: before the question
81
+ goes on the page, each is replaced by what he sees on screen and one
82
+ concrete example.
83
+ * {#g-rc16tq <m-zis8nz@70625d5 for=main,architect via=prompt} **Where, when and what it
84
+ looks like.** Every on-screen thing a question names comes with where it
85
+ appears, when, and what it looks like, in the same sentence.
86
+ * {#g-y1fy29 <m-4p034f@bc4dca3 for=main,architect via=prompt} **Enough context.** Give the reader the
87
+ context needed to understand the situation and decide without searching
88
+ earlier messages or guessing what the question refers to.
89
+ * {#g-clgrqj <m-4p034f@bc4dca3 for=main,architect via=prompt} **No private model vocabulary.** Do not use
90
+ terms the model invented in its internal reasoning unless the user has
91
+ already discussed those terms with the agent.
92
+ * {#g-7yrr59 <m-4p034f@bc4dca3 for=main,architect via=prompt} **A consequential choice.** Ask only about a
93
+ choice that matters to the product or changes what the user experiences;
94
+ decide internal details that do not make a product difference without
95
+ asking.
96
+ * {#g-3vophc <m-4p034f@bc4dca3 for=main,architect via=prompt} **Observable behavior.** Describe choices through
97
+ actions the user can take and results the user can observe, not through
98
+ internal implementation details.
99
+ * {#g-68x1u5 <m-g3vhaa@078cb26 for=main,architect via=prompt} **Direction as the files
100
+ point.** A question about a link, reference or dependency names the file
101
+ the line is written in and quotes one example line in its body. [o-oud1hd]
102
+ * {#g-ktwj32 <arch for=main,architect via=prompt} **Markup as it reads.** A body is
103
+ text (`specs/project-files.md`): markup quoted in it is written as it
104
+ reads, `<form>`, never as character references.
105
+
106
+ ## Before it is asked
107
+
108
+ * {#g-802y2i <m-ggebxz@c2d2747 for=main,architect via=prompt} **The project's standing
109
+ principles decide first.** Before a question goes on the page, check it
110
+ against the principles the human has laid down for the project (in its
111
+ rules files and specs, quoted in his words); a question a principle
112
+ answers is not asked: the principle is applied and briefed to an
113
+ architect. An architect's decision made on his behalf is checked the same
114
+ way before it is relayed to him. [o-faqe7j]
115
+ * {#g-hs5uln <m-p1sufn@a345c1d for=main,architect via=prompt} **Map onto what exists.**
116
+ Before asking how a new thing behaves, name the existing thing it already
117
+ behaves like; when one maps, brief that mapping and do not ask. [o-il1nvy]
118
+ * {#g-ypnfcj <arch for=main,architect via=prompt} **Its example is a claim.** Each
119
+ "for example, X happens" in a question, and each claim about today's
120
+ behaviour, is checked against the spec that owns it before publishing
121
+ (`grep -rn -i "<two words of X>" specs/`), or asked of an architect first.
122
+ [o-bpncb3] [o-r5wq2m]
123
+ * {#g-su9bba <arch for=main,architect via=prompt} **"You ruled" needs his words.**
124
+ Before writing "you ruled" in a question, find his quoted words in the
125
+ specs (`grep -rn "RULING (CEO)" specs/ | grep -i "<subject word>"`); if the
126
+ claim is not in them, write "the spec says". [o-bpncb3] [o-a1t5mg]
127
+ * {#g-2dz6r0 <arch for=main,architect via=prompt} **Its options' premise is
128
+ checked.** Name the mechanism an option rests on and read his own words on
129
+ it; when they do not state that premise, the premise goes to an architect
130
+ as a defect and the option is not sent. Before proposing a mechanism as
131
+ new, search the specs for it (`grep -rln -i "<two or three words>"
132
+ specs/`).
133
+ * {#g-qqyc01 <m-vk1rcm@8f6e65b for=main,architect via=prompt} **A new meaning takes away an
134
+ old one.** When a ruling would give a key, gesture or word a new meaning,
135
+ search the specs for its existing meaning; any hit puts the collision on
136
+ the page before anything is built. [o-m7spcg]
137
+ * {#g-s794hn <m-nuw5vs@c4a6df9 for=main,architect via=prompt} **An arrangement detail is
138
+ decided, not asked.** When he would accept every option of a question and
139
+ its only effect is an arrangement detail that is cheap to change later
140
+ (the order of items in a row, where a thing is placed, which side a label
141
+ sits on), the architect decides it, or the session when no architect is
142
+ involved, records the decision as a statement rooted `<arch`, and mentions
143
+ it to him in one line of the report that relays the work; it never goes on
144
+ the page. [o-tq4n8z]
145
+ * {#g-zvah92 <m-nuw5vs@c4a6df9,m-hg4vjm@f42adfd for=main,architect via=prompt} **Only an
146
+ arrangement detail.** The rule above narrows which of an architect's
147
+ questions reach him; it defaults nothing he would feel. A decision that
148
+ changes what he can do, what he sees happen, or how long he waits (A
149
+ number he will feel is a question, under Options) still goes on the page,
150
+ as his instruction to be asked the architect's questions requires; a
151
+ detail that might be more than an arrangement detail is asked.
152
+
153
+ ## Options
154
+
155
+ * {#g-lhd91k <m-pmw2kw@7653d9c for=main,architect via=prompt} **Offer the right
156
+ answer.** The option set includes the answer that follows from his
157
+ standing principles, written as an option he can tap.
158
+ * {#g-tbgfhw <m-u8pt83@4a4e1a8 for=main,architect via=prompt} **Offer nothing he would
159
+ plainly reject.** Before offering an option, check it against the obvious
160
+ expectation of the product; a behaviour he would plainly reject is a
161
+ defect for an architect, not an option. A remedy offered is checked to
162
+ have the property it is offered for.
163
+ * {#g-zthj3e <m-xqs1m0@41fcfbf for=main,architect via=prompt} **A number he will feel is a
164
+ question.** A delay, timeout or cap an architect chose on a path he waits
165
+ on goes to him as a question naming the number, where he waits on it and
166
+ the alternative; it is never a default.
167
+
168
+ ## Dependencies
169
+
170
+ * {#p-hd2fyx >specs/project-files.md} The form a question is written in.
171
+ * {#p-2s93p6 >specs/guidance/session.md} How a written question reaches the page.