@debonet/idd 0.0.0-stage → 0.1.1
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/INSTRUCTIONS.md +159 -0
- package/README.md +89 -2
- package/bin/idd +16 -0
- package/bin/idd-merge-hook +13 -0
- package/docs/existing-page-migration.md +92 -0
- package/docs/hosted-viewer.md +164 -0
- package/package.json +57 -4
- package/scripts/check.js +593 -0
- package/scripts/commands.js +908 -0
- package/scripts/html-text.js +50 -0
- package/scripts/import-page.js +80 -0
- package/scripts/merge-hook.js +365 -0
- package/scripts/page-build.js +21 -0
- package/scripts/project-lock.js +135 -0
- package/specs/adoption.md +133 -0
- package/specs/build.md +201 -0
- package/specs/guidance/agent-merge.md +63 -0
- package/specs/guidance/answers.md +108 -0
- package/specs/guidance/claude-code.md +76 -0
- package/specs/guidance/codex.md +93 -0
- package/specs/guidance/session.md +238 -0
- package/specs/guidance/writing-questions.md +171 -0
- package/specs/hosted-questionnaire.md +793 -0
- package/specs/idd-merge-hook.md +42 -0
- package/specs/idd-page.md +367 -0
- package/specs/project-files.md +198 -0
- package/specs/questions-page.md +169 -0
- package/specs/themes.md +114 -0
- package/templates/questions-page.html +337 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Adopting IDD
|
|
2
|
+
|
|
3
|
+
Statement ids: complete
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
What a project does to use interrogation-driven development, so that every
|
|
8
|
+
new session in it finds the shared question and answer files and uses its
|
|
9
|
+
tool's questionnaire with no further instruction.
|
|
10
|
+
|
|
11
|
+
## His words
|
|
12
|
+
|
|
13
|
+
> {#m-f2so64} RULING (CEO) 2026-11-04: "We should consolidate all of the best
|
|
14
|
+
> practices/instructions/code for this interrogation-driven-development into
|
|
15
|
+
> a separate package so that many projects can use it. Stick it in ~/@idd and
|
|
16
|
+
> use the ConcordSTD framework. Your goal should be a package that can be
|
|
17
|
+
> included in AGENTS.md that makes a new session use the questionaire
|
|
18
|
+
> framework for pending questions"
|
|
19
|
+
|
|
20
|
+
> {#m-1g0dvt} RULING (CEO) 2026-11-04, q198. The question: "IDD: every
|
|
21
|
+
> project, or only projects that opt in? Your global Claude Code instructions
|
|
22
|
+
> already tell every session in every project to use a questions page. IDD
|
|
23
|
+
> is opted into by one line in a project's AGENTS.md. Example: a session in a
|
|
24
|
+
> project whose AGENTS.md lacks that line needs a decision from you.
|
|
25
|
+
> A) The global section becomes one pointer to IDD, so every project uses
|
|
26
|
+
> it.
|
|
27
|
+
> B) The global section is deleted; only projects with the IDD line use the
|
|
28
|
+
> page." His answer: B, with the note: "Just like Concord. Each project
|
|
29
|
+
> should specify whether or not they want to use each framework."
|
|
30
|
+
|
|
31
|
+
> {#m-o27vtp} RULING (CEO) 2026-11-04, q202 (Concord). The question: "Is
|
|
32
|
+
> ConcordSTC used by every project, or only by projects that say so?" His
|
|
33
|
+
> answer: A, only projects whose `AGENTS.md` says so, with the note: "The
|
|
34
|
+
> global claude should be set to ask if the user has not specified."
|
|
35
|
+
|
|
36
|
+
> {#m-wzc76j} RULING (CEO), 2026-11-06: "idd-merge-hook already uses node, so we have a node requirement. Just use npm."
|
|
37
|
+
|
|
38
|
+
> {#m-be8ix1} RULING (CEO), 2026-11-06: "the agent should open it for the
|
|
39
|
+
> user, or at least provide a link (frequently, because the page gets closed
|
|
40
|
+
> sometimes)"
|
|
41
|
+
|
|
42
|
+
> {#m-yqrzks} RULING (CEO), 2026-11-06, on keeping IDD data on branch-specific
|
|
43
|
+
> IDD branches and using a data worktree: "Agreed. Or do we provide a skill
|
|
44
|
+
> or direct cut and paste agent instructions?"
|
|
45
|
+
|
|
46
|
+
> {#m-0f7o0n} RULING (CEO), 2026-11-08: “So the instructions need to say
|
|
47
|
+
> to install the idd app on your project.”
|
|
48
|
+
|
|
49
|
+
## Terms
|
|
50
|
+
|
|
51
|
+
* {#d-ihn44p <m-f2so64@36c95e2} **Adopting project** — a project whose root `AGENTS.md`
|
|
52
|
+
holds the IDD line.
|
|
53
|
+
* {#d-vl5tvf <m-f2so64@36c95e2} **IDD line** — the one line that includes IDD in an
|
|
54
|
+
adopting project's `AGENTS.md`.
|
|
55
|
+
|
|
56
|
+
## The line
|
|
57
|
+
|
|
58
|
+
* {#g-4oj61n <m-wzc76j@812ba8b for=main,architect via=prompt} **Install the npm package.**
|
|
59
|
+
Add the public `@debonet/idd` package to the adopting project's npm
|
|
60
|
+
dependencies with `npm install @debonet/idd`.
|
|
61
|
+
* {#g-8m8doy <m-0f7o0n@0780303 for=main,architect via=prompt} **Install the GitHub App on
|
|
62
|
+
the repository.** Before expecting the viewer to discover a project's
|
|
63
|
+
questionnaire, include that repository in an installation of the IDD
|
|
64
|
+
GitHub App.
|
|
65
|
+
* {#g-6jkb7v <m-f2so64@36c95e2,m-wzc76j@812ba8b for=main,architect via=prompt} **One short copy-paste
|
|
66
|
+
instruction.** An adopting project's root `AGENTS.md` includes this text:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
This project uses IDD. Before other work, read the installed package's instructions at the path printed by `node -p "require.resolve('@debonet/idd/INSTRUCTIONS.md')"`. If IDD is not installed, run `npm install @debonet/idd` first.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
* {#g-dpmdxo <m-yqrzks@7d9b3bc for=main,architect via=prompt} **Tool instructions use native
|
|
73
|
+
questionnaires.** The shared package documents the project workflow;
|
|
74
|
+
tool-specific guidance supplies only the mechanics of that agent's native
|
|
75
|
+
questionnaire and browser. A concise tool-specific instruction is
|
|
76
|
+
available for tools without skill support.
|
|
77
|
+
* {#g-0rz7vz <m-1g0dvt@dfb4edf for=main,architect via=prompt} **Per project, by its own
|
|
78
|
+
line.** A project uses IDD only when its own root `AGENTS.md` holds the
|
|
79
|
+
IDD line, as a project uses ConcordSTC only when it declares it; a
|
|
80
|
+
session in a project without the line follows none of IDD's rules.
|
|
81
|
+
* {#g-t4154n <m-1g0dvt@dfb4edf for=main,architect via=prompt} **Never for every project
|
|
82
|
+
at once.** IDD's rules, and any pointer to them, are never written into an
|
|
83
|
+
instruction file that sessions in every project read, as a user's global
|
|
84
|
+
`~/.claude/CLAUDE.md`.
|
|
85
|
+
* {#g-bl9a8z <m-o27vtp@5d340a6 for=main,architect via=prompt} **Ask when the project says
|
|
86
|
+
neither.** A user's global instruction file may hold one line telling a
|
|
87
|
+
session to ask the human whether to use a framework (IDD, ConcordSTC) in a
|
|
88
|
+
project whose root `AGENTS.md` says neither that it uses it nor that it
|
|
89
|
+
does not. That line holds none of IDD's rules and no pointer to them, so
|
|
90
|
+
Never for every project at once does not bar it.
|
|
91
|
+
* {#g-gkcg3x <m-o27vtp@5d340a6 for=main via=prompt} **His answer is written into the
|
|
92
|
+
project.** When he answers yes to IDD, the session writes the IDD line into
|
|
93
|
+
the project's root `AGENTS.md`; when he answers no, it writes there, on a
|
|
94
|
+
line of its own, exactly `This project does not use IDD.`; either line
|
|
95
|
+
means the project is never asked again. Until he answers, the session
|
|
96
|
+
follows none of IDD's rules.
|
|
97
|
+
* {#g-sbu6iu <arch for=main via=prompt} **Asked in the terminal.** The question
|
|
98
|
+
whether to use IDD is asked in the terminal, since a project that has not
|
|
99
|
+
adopted IDD has no questions page.
|
|
100
|
+
* {#g-0pni9q <m-f2so64@36c95e2 for=main,architect via=prompt} **Nothing copied.** An
|
|
101
|
+
adopting project's rules files and specs hold no copy of IDD's rules;
|
|
102
|
+
they hold the IDD line and the project's own standing principles, which
|
|
103
|
+
IDD's checks read (`specs/guidance/writing-questions.md`, Before it is
|
|
104
|
+
asked).
|
|
105
|
+
* {#g-ze1gq8 <m-f2so64@36c95e2 for=main via=prompt} **Its files.** An adopting project
|
|
106
|
+
holds its page file and question file, and its answer and pending answer
|
|
107
|
+
files once answers are recorded (`specs/project-files.md`); the first session that finds the
|
|
108
|
+
page file and question file absent creates them
|
|
109
|
+
(`specs/guidance/session.md`, Starting a session).
|
|
110
|
+
|
|
111
|
+
## IDD's own files, read from other projects
|
|
112
|
+
|
|
113
|
+
* {#g-suwilu <m-f2so64@36c95e2 for=main,architect via=prompt} **Tool mechanics apart.**
|
|
114
|
+
The installed IDD guidance holds the shared project workflow; a skill may
|
|
115
|
+
add only the mechanics of one agent tool's questionnaire or browser.
|
|
116
|
+
|
|
117
|
+
## Migrating a project with an existing page
|
|
118
|
+
|
|
119
|
+
* {#g-ze1mh5 <m-f2so64@36c95e2 for=main via=prompt} **Follow the migration note.** A
|
|
120
|
+
project that already has a questions page made from the older template,
|
|
121
|
+
or rules of its own on questions for the human, adopts IDD by
|
|
122
|
+
`~/@idd/docs/existing-page-migration.md`, which keeps the page's address
|
|
123
|
+
and every saved answer.
|
|
124
|
+
|
|
125
|
+
* {#s-fm0j9h <m-0f7o0n@0780303} The package instructions tell adopters to
|
|
126
|
+
install the IDD GitHub App on each project repository and link to its
|
|
127
|
+
installation page.
|
|
128
|
+
|
|
129
|
+
## Dependencies
|
|
130
|
+
|
|
131
|
+
* {#p-e3n6ry >specs/project-files.md} The IDD data worktree and files an adopting project holds.
|
|
132
|
+
* {#p-zrzy09 >specs/guidance/session.md} What a session in an adopting project
|
|
133
|
+
does first.
|
package/specs/build.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Build, Layout, and Run
|
|
2
|
+
|
|
3
|
+
Statement ids: complete
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
IDD's toolchain, layout, dependencies and the named commands every fixer
|
|
8
|
+
invokes; no fixer runs `node`, `jest` or an ad-hoc pipeline outside these.
|
|
9
|
+
|
|
10
|
+
## Toolchain
|
|
11
|
+
|
|
12
|
+
* {#g-94bsyg <arch for=main,architect,fixer via=prompt} Use Node >= 20 and plain
|
|
13
|
+
JavaScript with CommonJS modules (`require` / `module.exports`) for the
|
|
14
|
+
command and server. The browser client uses Preact and is bundled into
|
|
15
|
+
same-origin static assets.
|
|
16
|
+
* {#g-d4bbao <arch for=main,architect,fixer via=prompt} Keep Jest at major version
|
|
17
|
+
29, and test the page in a DOM emulated by `jsdom`, with the page's store
|
|
18
|
+
and comment services replaced by fakes the test controls.
|
|
19
|
+
* {#s-0bt8j8 <arch} The browser client is rendered with Preact and emitted as a
|
|
20
|
+
same-origin static asset by `npm run build:web`; `npm test` and
|
|
21
|
+
`npm run deploy` build that asset before use.
|
|
22
|
+
* {#g-kv15zk <arch for=main,architect,fixer via=prompt} Keep this an
|
|
23
|
+
interpreted-language project. Developers install its dependencies with
|
|
24
|
+
`npm install`; adopters add the public package to their project with
|
|
25
|
+
`npm install @debonet/idd`.
|
|
26
|
+
|
|
27
|
+
## Project Layout
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
~/@idd
|
|
31
|
+
package.json agent package metadata and project scripts
|
|
32
|
+
package-lock.json committed
|
|
33
|
+
README.md
|
|
34
|
+
INSTRUCTIONS.md canonical agent workflow installed with npm
|
|
35
|
+
AGENTS.md what a session in an adopting project follows
|
|
36
|
+
(specs/adoption.md)
|
|
37
|
+
CLAUDE.md imports AGENTS.md for sessions in this repository
|
|
38
|
+
concord.json IDD's Concord declaration
|
|
39
|
+
observations.md IDD's observations
|
|
40
|
+
idd/ IDD's own page, question, answer and pending
|
|
41
|
+
answer files (specs/project-files.md)
|
|
42
|
+
bin/ the command: idd
|
|
43
|
+
and the merge-hook installer
|
|
44
|
+
scripts/ the modules behind the command
|
|
45
|
+
templates/ the questions page template
|
|
46
|
+
.githooks/ IDD and Concord Git hooks
|
|
47
|
+
web/ Cloud Run viewer, OAuth callback and workspace package
|
|
48
|
+
web/package.json hosted service runtime dependencies
|
|
49
|
+
Dockerfile Cloud Run container
|
|
50
|
+
docs/ migration notes for adopting projects
|
|
51
|
+
specs/ IDD's specs; specs/guidance/ the session rules
|
|
52
|
+
test/ IDD's jest tests
|
|
53
|
+
.githooks/pre-commit IDD's pre-commit hook (Concord's gate)
|
|
54
|
+
tmp/ scratch and fixture trees (gitignored)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
* {#g-dt9a19 <arch for=main,architect,fixer via=prompt} Keep `node_modules/` and
|
|
58
|
+
`tmp/` gitignored.
|
|
59
|
+
|
|
60
|
+
## Hosted viewer
|
|
61
|
+
|
|
62
|
+
* {#g-tskk4b <arch for=main,architect,fixer via=prompt} Keep the hosted viewer in
|
|
63
|
+
`web/` and implement its HTTP service with Node's built-in modules; the
|
|
64
|
+
service listens on `process.env.PORT` and serves files from `web/`.
|
|
65
|
+
* {#g-b9fjxa <arch for=main,architect,fixer via=prompt} The service requires
|
|
66
|
+
`GITHUB_APP_CLIENT_ID`, `GITHUB_APP_CLIENT_SECRET`, and
|
|
67
|
+
`IDD_OAUTH_STATE_SECRET`, and the public origin in `IDD_PUBLIC_URL`;
|
|
68
|
+
production supplies the client secret and state secret from Google Secret
|
|
69
|
+
Manager.
|
|
70
|
+
* {#g-xutz05 <arch for=main,architect,fixer via=prompt} The service uses
|
|
71
|
+
`@google-cloud/firestore` to retain MCP event subscriptions across Cloud Run
|
|
72
|
+
restarts; production supplies a Firestore database and grants the Cloud Run
|
|
73
|
+
service account Firestore read/write access.
|
|
74
|
+
* {#g-vk03sm <arch for=main,architect,fixer via=prompt} The hosted service
|
|
75
|
+
uses Firestore for per-GitHub-user theme preferences as well as MCP event
|
|
76
|
+
subscriptions; user theme records use a separate collection and do not store
|
|
77
|
+
access tokens or answer data.
|
|
78
|
+
* {#g-u68buh <arch for=main,architect,fixer via=prompt} Keep
|
|
79
|
+
`@google-cloud/firestore` and `standardwebhooks` in the hosted workspace's
|
|
80
|
+
runtime dependencies and
|
|
81
|
+
keep every external request used by MCP event delivery injectable for
|
|
82
|
+
hermetic tests.
|
|
83
|
+
* {#g-hq4lnx <arch for=main,architect,fixer via=prompt} Run the service locally
|
|
84
|
+
with `npm start`; the root `Dockerfile` installs runtime dependencies from
|
|
85
|
+
`package-lock.json` before starting the Cloud Run service.
|
|
86
|
+
* {#g-otococ <arch for=main,architect,fixer via=prompt} Keep the GitHub App
|
|
87
|
+
configuration and Cloud Run deployment steps in `docs/hosted-viewer.md`;
|
|
88
|
+
do not commit credentials.
|
|
89
|
+
* {#s-gu3zl2 <arch} `npm run deploy` runs `scripts/deploy.js` to deploy the
|
|
90
|
+
root Dockerfile to Cloud Run service `idd-service` in project `idd-platform`
|
|
91
|
+
and region `us-east4`, with one maximum instance and concurrency 1000.
|
|
92
|
+
It uses the authenticated `gcloud` CLI and leaves the service's existing
|
|
93
|
+
environment variables, secret bindings, and access policy in place.
|
|
94
|
+
* {#s-emm7r0 <arch} The deployment script reports a missing `gcloud`
|
|
95
|
+
executable or a failed deployment with a nonzero exit status and does not
|
|
96
|
+
print credentials or secret values.
|
|
97
|
+
* {#g-hfipex <arch for=main,architect,fixer via=prompt} The hosted MCP endpoint is
|
|
98
|
+
`/mcp`; implement its Streamable HTTP tools and events protocol with Node
|
|
99
|
+
built-ins and use `standardwebhooks` for signed callbacks. Keep callback
|
|
100
|
+
network validation, signing, retries and subscription storage behind
|
|
101
|
+
modules with hermetic tests.
|
|
102
|
+
* {#g-ami8kh <arch for=main,architect,fixer via=prompt} Keep the canonical
|
|
103
|
+
adopter workflow in root `INSTRUCTIONS.md`; `idd guide` prints that
|
|
104
|
+
file verbatim, and npm installs it with the package.
|
|
105
|
+
* {#g-w20g67 <arch for=main,architect,fixer via=prompt} Expose `idd-merge-hook` from
|
|
106
|
+
`bin/idd-merge-hook`; its installer writes hooks to the adopting project's
|
|
107
|
+
`.githooks/` and configures Git to run them; each hook calls the installed
|
|
108
|
+
package with `npm exec -- idd-merge-hook` (`specs/idd-merge-hook.md`).
|
|
109
|
+
|
|
110
|
+
## The command
|
|
111
|
+
|
|
112
|
+
* {#s-cg2j10 <arch} `bin/idd` is executable, has no file extension, and opens
|
|
113
|
+
with the line `#!/usr/bin/env node`, so it runs by its path from any
|
|
114
|
+
working directory (`specs/idd-page.md`).
|
|
115
|
+
* {#s-vfgnzf <arch} It loads every npm module it uses from IDD's own
|
|
116
|
+
dependencies, never from the adopting project's.
|
|
117
|
+
|
|
118
|
+
## Packages and Dependencies
|
|
119
|
+
|
|
120
|
+
> {#m-47zf2p} RULING (CEO), 2026-11-12: “we need two different things:
|
|
121
|
+
> 1) the idd back end, which runs in interrogation.dev
|
|
122
|
+
> 2) the idd instructions and tools which live in npm”
|
|
123
|
+
|
|
124
|
+
* {#s-nifxq3 <m-47zf2p@5c93368} The published npm package contains the agent command, its required modules,
|
|
125
|
+
templates, specifications and canonical instructions; it excludes the hosted
|
|
126
|
+
web application, its runtime dependencies, Dockerfile and Cloud Run deployment
|
|
127
|
+
script. The hosted service has a separate workspace manifest and is deployed
|
|
128
|
+
from the IDD repository; it is reached at `https://interrogation.dev`.
|
|
129
|
+
> {#m-r4balx} RULING (CEO), 2026-11-12: “yes, let's do that.” This approves
|
|
130
|
+
> GitHub Actions trusted publishing so package releases do not require the
|
|
131
|
+
> maintainer to supply a one-time code for each release.
|
|
132
|
+
* {#s-jm0nq3 <m-r4balx@e53a626} The root package metadata names `https://github.com/debonet/idd`
|
|
133
|
+
as its repository, matching the source repository used by npm trusted
|
|
134
|
+
publishing.
|
|
135
|
+
* {#s-k9c49i <m-r4balx@e53a626} `.github/workflows/publish.yml` publishes only version tags. It
|
|
136
|
+
checks out the source, installs the supported Node and npm versions, runs the
|
|
137
|
+
full test suite, and publishes `@debonet/idd` with `id-token: write` and
|
|
138
|
+
`contents: read`; it stores no npm token.
|
|
139
|
+
* {#s-r6qcwv <m-r4balx@e53a626} Configure npm's trusted publisher for `debonet/idd` and the
|
|
140
|
+
`publish.yml` workflow, allowing direct package publishing. A release tag's
|
|
141
|
+
version matches `package.json`; the workflow uses npm OIDC and publishes
|
|
142
|
+
provenance without an npm access token.
|
|
143
|
+
* {#i-re3pab <s-r6qcwv@8f29404} **Do:** Run `npm trust list @debonet/idd`.
|
|
144
|
+
**Look for:** GitHub Actions trusted publishing for `debonet/idd` with
|
|
145
|
+
`publish.yml` and direct publishing allowed.
|
|
146
|
+
* {#g-aiemo2 <arch for=main,architect,fixer via=prompt} Publish the package
|
|
147
|
+
publicly as `@debonet/idd`, exposing `idd` and `idd-merge-hook` from
|
|
148
|
+
their matching files under `bin/`, so adopters can install it from npm.
|
|
149
|
+
* {#g-7o7fu3 <arch for=main,architect,fixer via=prompt} Keep every module the
|
|
150
|
+
command loads in `dependencies`, and Jest `^29`, `jsdom` and other
|
|
151
|
+
test-only modules in `devDependencies`.
|
|
152
|
+
* {#g-haeoa5 <arch for=main,architect,fixer via=prompt} Set the scripts: `"start"`
|
|
153
|
+
to `"node web/server.js"`; `"test"` to `"jest"`; `"spec-map"` to
|
|
154
|
+
`"$HOME/@concord/bin/spec-map"`;
|
|
155
|
+
`"spec-coverage"` to `"$HOME/@concord/bin/spec-coverage"`;
|
|
156
|
+
`"hook-install"` to `"$HOME/@concord/bin/concord-hook install"`; each
|
|
157
|
+
passes its arguments through unchanged and in order.
|
|
158
|
+
* {#g-5phruy <arch for=main,architect,fixer via=prompt} Set Jest's root to
|
|
159
|
+
`<rootDir>/test`.
|
|
160
|
+
|
|
161
|
+
## Build and Test
|
|
162
|
+
|
|
163
|
+
* {#g-2avaz9 <arch for=main,architect,fixer via=prompt} Install dependencies with
|
|
164
|
+
`npm install --cache ./tmp/npm-cache` at `~/@idd`.
|
|
165
|
+
* {#g-6gajca <arch for=main,architect,fixer via=prompt} Run the suite with
|
|
166
|
+
`npm test` at `~/@idd`; add tests under `test/**/*.test.js`.
|
|
167
|
+
* {#g-va67x1 <arch for=main,architect,fixer via=prompt} Check the specs and links
|
|
168
|
+
with `npm run spec-map [-- <arguments>]` (assign: `npm run spec-map --
|
|
169
|
+
--assign`; hash table: `npm run --silent spec-map -- --hashes`); measure
|
|
170
|
+
coverage with `npm run spec-coverage [-- <arguments>]` on demand, never as
|
|
171
|
+
part of `npm test`.
|
|
172
|
+
* {#g-fj4oz8 <arch for=main,architect,fixer via=prompt} Keep commits gated by
|
|
173
|
+
`.githooks/pre-commit`, installed in each clone with
|
|
174
|
+
`npm run hook-install` once `npm run spec-map -- --gate` passes over the
|
|
175
|
+
tree.
|
|
176
|
+
|
|
177
|
+
## IDD's own settings
|
|
178
|
+
|
|
179
|
+
* {#g-g10hm9 <arch for=main,architect,fixer via=prompt} Declare in `concord.json`
|
|
180
|
+
IDD's name `IDD`, its one suite `root` over `test`, its languages
|
|
181
|
+
`javascript`, `html` and `css`, its read directories `bin`, `scripts`,
|
|
182
|
+
`templates`, `test` and `web`, the ignored directory `node_modules`, the record
|
|
183
|
+
file `test/interactive-passes.jsonl`, the observations file
|
|
184
|
+
`observations.md`, the rules files `AGENTS.md` and `CLAUDE.md`, and one
|
|
185
|
+
coverage run at the root over `bin` and `scripts` with the review file
|
|
186
|
+
`spec-coverage-review.md`; include `web` in the coverage sources and keep
|
|
187
|
+
those values aligned with this spec.
|
|
188
|
+
|
|
189
|
+
## Hermeticity
|
|
190
|
+
|
|
191
|
+
* {#g-qq5g54 <arch for=fixer via=prompt} Keep tests hermetic: do not write outside
|
|
192
|
+
the project's `tmp/`, read files outside the project, open network
|
|
193
|
+
connections or run `git`; build each fixture project under `tmp/` and run
|
|
194
|
+
the command with that fixture as its working directory.
|
|
195
|
+
* {#g-grm59h <arch for=fixer via=prompt} Tests do not read files under `specs/`
|
|
196
|
+
or `idd/`; build the files a case needs in its fixture.
|
|
197
|
+
|
|
198
|
+
## Error Handling
|
|
199
|
+
|
|
200
|
+
* {#s-ddc95k <arch} The command's errors reach its caller as its exit code and
|
|
201
|
+
stderr lines, as `specs/idd-page.md` gives them.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Guidance: IDD-aware branch merges
|
|
2
|
+
|
|
3
|
+
## His words
|
|
4
|
+
|
|
5
|
+
> {#m-mc5vkw} RULING (CEO) 2026-11-05: “So the merge for idd can
|
|
6
|
+
> involve creating new questions and deleting the duplicates and then doing
|
|
7
|
+
> the work required to implement the decision.”
|
|
8
|
+
|
|
9
|
+
## Merge process
|
|
10
|
+
|
|
11
|
+
* {#g-rt5s9p <m-mc5vkw@076749d for=main,architect,fixer via=prompt} Before an agent completes a code-branch merge, it
|
|
12
|
+
compares the source and target IDD branches and reviews questions and
|
|
13
|
+
answers that may describe the same decision.
|
|
14
|
+
* {#g-k07zt5 <arch for=main,architect,fixer via=prompt} Exact duplicate questions are consolidated into one active
|
|
15
|
+
question; earlier question and answer records remain in the IDD history
|
|
16
|
+
and point to the consolidated question.
|
|
17
|
+
* {#g-8ux1b9 <arch for=main,architect,fixer via=prompt} When the same question id has
|
|
18
|
+
different accepted answers on the source and target IDD branches, the
|
|
19
|
+
target answer remains accepted and the source answer is recorded as a
|
|
20
|
+
rejected answer conflict with its submitting GitHub user.
|
|
21
|
+
* {#g-9p1iiw <arch for=main,architect,fixer via=prompt} When questions describe the same decision but their answers
|
|
22
|
+
do not settle it, the agent adds one clarifying question to the target
|
|
23
|
+
IDD branch, then waits for its answer before doing the implementation
|
|
24
|
+
work and completing the code-branch merge.
|
|
25
|
+
* {#g-wjcjlc <arch for=main,architect,fixer via=prompt} When a follow-up question makes an earlier question obsolete,
|
|
26
|
+
the agent archives it with `npm exec -- idd archive <old-id> <follow-up-id>`;
|
|
27
|
+
its full question record and answer remain in history.
|
|
28
|
+
* {#g-y1uuo7 <arch for=main,architect,fixer via=prompt} During reconciliation, keep the target
|
|
29
|
+
page's branch hash and each retained question's origin branch hash; a new
|
|
30
|
+
clarifying question gets the target branch hash.
|
|
31
|
+
* {#g-gn96qw <arch for=main,architect,fixer via=prompt} An agent may use this process without ConcordSTC.
|
|
32
|
+
|
|
33
|
+
## Git integration
|
|
34
|
+
|
|
35
|
+
* {#g-3fmwel <arch for=main,architect,fixer via=prompt} Every code-branch merge uses
|
|
36
|
+
`git merge --no-ff` so Git runs the IDD pre-merge hook.
|
|
37
|
+
* {#g-tu3fn2 <arch for=main,architect,fixer via=prompt} Each clone installs the IDD hooks
|
|
38
|
+
with `npm exec -- idd-merge-hook install`; the project's `.githooks/` files
|
|
39
|
+
are committed, and the session checks installation before merging.
|
|
40
|
+
* {#g-1b9rc2 <arch for=main,architect,fixer via=prompt} The committed `pre-merge-commit` hook asks the IDD merge
|
|
41
|
+
command to check for unresolved questionnaire conflicts before Git
|
|
42
|
+
creates a merge commit.
|
|
43
|
+
* {#g-qzhgum <arch for=main,architect,fixer via=prompt} When Git first stops for code conflicts, the `pre-commit`
|
|
44
|
+
hook performs the same check before the agent commits the resolved merge.
|
|
45
|
+
* {#g-uhed71 <arch for=main,architect,fixer via=prompt} A hook that finds unresolved IDD work exits unsuccessfully and
|
|
46
|
+
prints the source and target branches and the IDD reconciliation
|
|
47
|
+
command for the agent to continue the process.
|
|
48
|
+
* {#g-qi307t <arch for=main,architect,fixer via=prompt} When the agent finds related questions that do
|
|
49
|
+
not require a clarifying answer, it records its review with
|
|
50
|
+
`npm exec -- idd-merge-hook reviewed`; the confirmation is tied to the current source
|
|
51
|
+
and target commits and cannot authorize a later merge state. The source IDD
|
|
52
|
+
branch must already be merged into and reconciled on the target IDD branch.
|
|
53
|
+
* {#g-xvyj2c <arch for=main,architect,fixer via=prompt} The agent does not record a review while
|
|
54
|
+
duplicate, obsolete or conflicting questions remain unresolved, or while
|
|
55
|
+
a clarifying answer or its implementation is pending.
|
|
56
|
+
* {#g-lwnark <arch for=main,architect,fixer via=prompt} Before completing the code merge, the agent merges the
|
|
57
|
+
source IDD branch into the target IDD branch, reconciles and commits the
|
|
58
|
+
result, and pushes the target IDD branch. The `post-merge` hook verifies
|
|
59
|
+
that the reviewed IDD state remains in place and clears the review record.
|
|
60
|
+
|
|
61
|
+
## Dependencies
|
|
62
|
+
|
|
63
|
+
* {#p-afnv8o >specs/hosted-questionnaire.md} The IDD branch data and its reconciliation rules.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Guidance: reading and recording the human's answers
|
|
2
|
+
|
|
3
|
+
Statement ids: complete
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
How the session reads an answer from the page, replies to it, and records
|
|
8
|
+
it as a ruling where the project's agents will find it. Each `[o-…]`
|
|
9
|
+
citation names an entry of `~/@idd/observations.md`.
|
|
10
|
+
|
|
11
|
+
## His words
|
|
12
|
+
|
|
13
|
+
> {#m-s43qto} From his instructions file `~/.claude/CLAUDE.md`, section
|
|
14
|
+
> "Questions for me go on a web questions page", as read 2026-11-04:
|
|
15
|
+
> "**Handling my answers:** when a comment arrives (an auto-reply or "sent to
|
|
16
|
+
> Claude"), read the thread, act on the answer, reply in the thread only if
|
|
17
|
+
> the auto-reply didn't already cover it, resolve the thread, and write one
|
|
18
|
+
> line in the session. If my answer includes a note, the note refines the
|
|
19
|
+
> option; read both together. If the note leaves the choice ambiguous, add a
|
|
20
|
+
> follow-up question to the page."
|
|
21
|
+
|
|
22
|
+
> {#m-yo3wtj} RULING (CEO) (AIOS), after a pointer answer ("I answered this
|
|
23
|
+
> in 97") was read as one of the question's options: "NO. This is not what I
|
|
24
|
+
> said."
|
|
25
|
+
|
|
26
|
+
> {#m-gcnebt} RULING (CEO) (AIOS), after a note naming a tab was re-asked
|
|
27
|
+
> as ambiguous: "OMG. You're making this complicated."
|
|
28
|
+
|
|
29
|
+
> {#m-bbat3q} RULING (CEO) 2026-09-30 (AIOS), asked back about slips in his
|
|
30
|
+
> answer: "Its frustrating repeating myself multiple times on the same topic
|
|
31
|
+
> ... you learn to listen the first time"
|
|
32
|
+
|
|
33
|
+
> {#m-mbhrcu} RULING (CEO) (AIOS) 2026-09-28: "why are you putting my
|
|
34
|
+
> decisions into claude.md instead of the architect putting them into spec/
|
|
35
|
+
> files?"; 2026-10-01: "why are you copying all of my sentences to a cdeo
|
|
36
|
+
> file?"; 2026-10-08: "Those are product specifications. They belong in the
|
|
37
|
+
> appropriate spec/ file(s)"
|
|
38
|
+
|
|
39
|
+
> {#m-a7o9fh} RULING (CEO) (AIOS), after a gloss of his ruling added a
|
|
40
|
+
> limit: "I never said a parent only limits its direct children."
|
|
41
|
+
|
|
42
|
+
## When an answer arrives
|
|
43
|
+
|
|
44
|
+
* {#g-y2queb <m-s43qto@adbad2e for=main via=prompt} **The thread.** When a page comment
|
|
45
|
+
arrives, an automatic reply's notice included, or he says "done" or
|
|
46
|
+
"updated": read the thread, act on the answer, reply in the thread only if
|
|
47
|
+
the automatic reply did not already cover it, resolve the thread, and
|
|
48
|
+
write one line in the session.
|
|
49
|
+
* {#g-c7bap6 <m-s43qto@adbad2e for=main via=prompt} **The automatic reply speaks for the
|
|
50
|
+
session.** Compare every automatic reply with the chosen option's own text
|
|
51
|
+
in the question file; where it assumed, defaulted or promised anything the
|
|
52
|
+
option does not say, reply with the correction before resolving.
|
|
53
|
+
[o-8rmpk8]
|
|
54
|
+
* {#g-1499zt <arch for=main via=prompt} **A note cut off mid-sentence.** When a
|
|
55
|
+
note ends mid-sentence, read the question's `answers/` document for the
|
|
56
|
+
latest text before acting, and act only on a note that ends cleanly.
|
|
57
|
+
|
|
58
|
+
## Reading an answer
|
|
59
|
+
|
|
60
|
+
* {#g-btj8e4 <m-s43qto@adbad2e for=main via=prompt} **The note refines the option.**
|
|
61
|
+
Read the chosen option and the note together; when the note leaves the
|
|
62
|
+
choice ambiguous, add and present a follow-up with the current tool's
|
|
63
|
+
questionnaire (`specs/guidance/session.md`).
|
|
64
|
+
* {#g-jigpd2 <m-yo3wtj@e906838 for=main via=prompt} **A pointer is not an option.** An
|
|
65
|
+
answer that points elsewhere ("I answered this in 97"), or a note with no
|
|
66
|
+
option, is never mapped onto one of the question's options; unless the
|
|
67
|
+
pointed-to answer's options literally cover this question's case, the
|
|
68
|
+
question goes back through the current tool's questionnaire as a new
|
|
69
|
+
question quoting his note, and the
|
|
70
|
+
thread reply says so. No reading of it is relayed to an architect.
|
|
71
|
+
[o-65eyze]
|
|
72
|
+
* {#g-7h9l11 <m-gcnebt@f88839e for=main via=prompt} **His nouns name what he sees.**
|
|
73
|
+
A noun in his note that names a visible part of the thing the question
|
|
74
|
+
shows, a tab, a view or a field, means that part; read it so before
|
|
75
|
+
calling the note ambiguous. [o-8qre78]
|
|
76
|
+
* {#g-0wfhwz <m-bbat3q@8bd203e for=main via=prompt} **A typo is read as its intent.** An
|
|
77
|
+
evident typo in his answer is read as its evident intent when exactly one
|
|
78
|
+
reading fits his earlier rulings and the project's vocabulary: act on it
|
|
79
|
+
and mention the correction in one clause; ask only when two readings
|
|
80
|
+
would build different things.
|
|
81
|
+
|
|
82
|
+
## Recording a ruling
|
|
83
|
+
|
|
84
|
+
* {#g-q5375r <m-mbhrcu@1ffe48c for=main,architect via=prompt} **Into the specs, through the
|
|
85
|
+
architect.** His answer reaches the project's rules only through the spec
|
|
86
|
+
that owns its subject: the main thread pastes his answer and the question
|
|
87
|
+
it answered verbatim into an architect's brief, and the architect records
|
|
88
|
+
them in that spec as a motive line, `RULING (CEO) <date>, q<N>:` and his
|
|
89
|
+
words, then writes each conclusion as its own statement rooted in it. His
|
|
90
|
+
decision is never written into a rules file or a scratch file.
|
|
91
|
+
* {#g-zvulrj <arch for=main,architect via=prompt} **Dated from the clock.** The date
|
|
92
|
+
on a recorded ruling is taken from `date` run in the same turn, never from
|
|
93
|
+
memory.
|
|
94
|
+
* {#g-p37e2s <m-a7o9fh@11c5476 for=main,architect via=prompt} **A gloss adds nothing.**
|
|
95
|
+
A sentence that restates a ruling of his carries his quoted words beside
|
|
96
|
+
it and adds no limit he did not state; before relaying a limit on a
|
|
97
|
+
ruling, find it in his words (`grep -rn "<the limit's words>" specs/ |
|
|
98
|
+
grep "{#m-"`) or do not relay it. [o-a1t5mg]
|
|
99
|
+
* {#g-7x0l5s <arch for=main via=prompt} **Citing his rulings.** Before saying
|
|
100
|
+
something rests on a ruling of his, find his quoted words and read the
|
|
101
|
+
question they answered; a ruling that cannot be found is an architect's
|
|
102
|
+
decision and goes to him as a question, never as a default.
|
|
103
|
+
|
|
104
|
+
## Dependencies
|
|
105
|
+
|
|
106
|
+
* {#p-hd5c3l >specs/questions-page.md} The Done comment and the answer documents.
|
|
107
|
+
* {#p-nbpmws >specs/guidance/session.md} The pending queue an incorporated answer
|
|
108
|
+
is cleared from.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Guidance: the questions page in Claude Code
|
|
2
|
+
|
|
3
|
+
Statement ids: complete
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
The Claude Code tools that carry out the steps of
|
|
8
|
+
`specs/guidance/session.md` and `specs/guidance/answers.md`: publishing the
|
|
9
|
+
page, reading and clearing its store, recording its answers in the
|
|
10
|
+
project's answer file, and handling its comment threads.
|
|
11
|
+
Each `[o-…]` citation names an entry of `~/@idd/observations.md`.
|
|
12
|
+
|
|
13
|
+
## His words
|
|
14
|
+
|
|
15
|
+
> {#m-ceg9ie} From his instructions file `~/.claude/CLAUDE.md`, section
|
|
16
|
+
> "Questions for me go on a web questions page", as read 2026-11-04:
|
|
17
|
+
> "**Publish with the Artifact tool, with `capabilities: {comments: {}, db:
|
|
18
|
+
> {}, user: {}}`.**"
|
|
19
|
+
|
|
20
|
+
> {#m-p8am7s} From the same section: "republish to the same URL, and open the
|
|
21
|
+
> page in my local Chrome (`mcp__claude-in-chrome__navigate`)."
|
|
22
|
+
|
|
23
|
+
> {#m-2nhxvl} From the same section: "**If my answers stop reaching you**
|
|
24
|
+
> (I say "updated", or a notice says a comment is awaiting a reply), read the
|
|
25
|
+
> page's comments yourself with `ArtifactComments` action "comments" and act
|
|
26
|
+
> on every comment of mine marked "sent to you". Do this also before going
|
|
27
|
+
> idle while questions are open. Auto mode's permission check can block the
|
|
28
|
+
> automatic reply that would have woken you; the answer still sits in the
|
|
29
|
+
> thread."
|
|
30
|
+
|
|
31
|
+
## Publishing
|
|
32
|
+
|
|
33
|
+
* {#g-g4nbtw <m-ceg9ie@e62db2e for=main via=prompt} **Publish the built page.** Publish
|
|
34
|
+
`tmp/idd/page.html` with the Artifact tool and the capabilities `comments`,
|
|
35
|
+
`db` and `user`. On the first publish, write the address the tool returns
|
|
36
|
+
into the page file's `url`; every later publish updates the artifact at
|
|
37
|
+
that address, never a new one.
|
|
38
|
+
* {#g-k3cqou <m-p8am7s@e496a8d for=main via=prompt} **Open it for him.** After every
|
|
39
|
+
publish, open the page's `url` in his local Chrome with
|
|
40
|
+
`mcp__claude-in-chrome__navigate`, screenshot the new card, and check its
|
|
41
|
+
options are drawn.
|
|
42
|
+
|
|
43
|
+
## The store
|
|
44
|
+
|
|
45
|
+
* {#g-x76kn8 <arch for=main via=prompt} **Pending answers.** List the page's
|
|
46
|
+
pending answers with ArtifactData `list` on `pending`; read one with
|
|
47
|
+
`get` on `pending/<id>`, noting its version; clear it with `delete` on
|
|
48
|
+
`pending/<id>` pinned with `if_version` to that version.
|
|
49
|
+
* {#g-2jje15 <arch for=main via=prompt} **Saved answers.** Read a saved answer
|
|
50
|
+
with ArtifactData `get` on `answers/<id>`; its `sChoice` is the chosen
|
|
51
|
+
option's key and its `sNote` his note (`specs/questions-page.md`, API).
|
|
52
|
+
* {#g-oauw82 <arch for=main via=prompt} **Recording an answer.** The page's
|
|
53
|
+
store is where his answers reach the session, and the answer file is
|
|
54
|
+
their record. To record a pending answer, read `answers/<id>` with
|
|
55
|
+
ArtifactData `get` and pass its value, the object holding `sChoice`,
|
|
56
|
+
`sNote` and `dtm`, on stdin to `npm exec -- idd answer <id>` through
|
|
57
|
+
a heredoc with a quoted delimiter, so his note reaches it unchanged; it
|
|
58
|
+
must exit 0 before the answer is acted on.
|
|
59
|
+
* {#g-u09697 <arch for=main via=prompt} **The local queue.** `idd answer` also records
|
|
60
|
+
each page answer in `idd/pending.json`. After incorporating it, clear the
|
|
61
|
+
local entry with `idd clear-pending <id> <time>`, using the `dtm`
|
|
62
|
+
just recorded. At session start, also act on local pending answers that
|
|
63
|
+
have no matching page-store entry, as `specs/guidance/session.md` gives.
|
|
64
|
+
|
|
65
|
+
## Comment threads
|
|
66
|
+
|
|
67
|
+
* {#g-ckcyd7 <arch for=main via=prompt} **On every automatic-reply notice.** On an
|
|
68
|
+
`artifact-auto-react` notice, read the thread with ArtifactComments,
|
|
69
|
+
compare the reply with the option's text (`grep -n -A8 '"id": "q<N>"'
|
|
70
|
+
idd/questions.json`), reply with any correction, then resolve it.
|
|
71
|
+
[o-8rmpk8]
|
|
72
|
+
* {#g-liax1o <m-2nhxvl@6923e6a for=main via=prompt} **When answers stop reaching the
|
|
73
|
+
session.** When he says "updated", when a notice says a comment is
|
|
74
|
+
awaiting a reply, and before going idle while questions are open, read
|
|
75
|
+
the page's comments with ArtifactComments action `comments` and act on
|
|
76
|
+
every comment of his marked "sent to you".
|