document360-writer 0.5.109 → 0.5.111
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/dist/cli.js +6 -4
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -116,7 +116,9 @@ either stalls or ships thin. Answer promptly and thoroughly. For each open messa
|
|
|
116
116
|
\`re: <the question's id>\`).
|
|
117
117
|
- If it's a **request**: do what it asks (a "re-run onboarding" request usually embeds the exact prompt to
|
|
118
118
|
run \u2014 run it).
|
|
119
|
-
- Then
|
|
119
|
+
- Then flip the message YOU received (the writer's question/request) to \`status: done\`. **Leave your own
|
|
120
|
+
answer file at \`status: open\`** \u2014 the writer's inbox only surfaces open messages; it folds your answer
|
|
121
|
+
into the docs and closes it itself. An answer you pre-close is a dead letter the writer never sees.
|
|
120
122
|
|
|
121
123
|
**Product-discovery questions (subject starts \`[discovery]\`) are the most important to answer well.**
|
|
122
124
|
Before writing a repo's docs, the writer interviews YOU to understand the product the way a senior
|
|
@@ -153,7 +155,7 @@ re: <question id> # for an answer; leave empty for a request
|
|
|
153
155
|
sources:
|
|
154
156
|
- path/to/file.ts
|
|
155
157
|
subject: "<one line>"
|
|
156
|
-
status: open #
|
|
158
|
+
status: open # ALWAYS 'open' when you write it \u2014 the RECIPIENT closes it after processing
|
|
157
159
|
---
|
|
158
160
|
<the answer or request, in plain words>
|
|
159
161
|
\`\`\`
|
|
@@ -235,7 +237,7 @@ Anything only a human knows that would help document this product. For example:
|
|
|
235
237
|
`)}function Ur(e){try{let t=Iu(Ta(e),"utf8"),n=JSON.parse(t);return n&&typeof n=="object"?n:null}catch{return null}}function ja(e,t){let o={...Ur(e)??{},emittedVersion:le,emittedAt:t};nt(Ta(e),`${JSON.stringify(o,null,2)}
|
|
236
238
|
`)}function ze(e){try{return _u(Pa(e)).some(t=>/\.md$/i.test(t)&&t.toLowerCase()!=="creator-notes.md")}catch{return!1}}function Ee(e){let n=Ur(e)?.completedVersion;return typeof n!="number"?{status:"unset"}:{status:n<le?"stale":"current",completedVersion:n}}function ko(e,t=new Date().toISOString()){let n={guideRefreshed:!1,notifiedBuilder:!1,toVersion:le};try{if(!Gt(yo(e)))return n;let o=Ur(e),r=o?.emittedVersion??0;n.completedVersion=o?.completedVersion;let s=o?.completedVersion??0;le>r&&(bn(Mr(e)),nt(yo(e),Sa()),ja(e,t),n.guideRefreshed=!0),le>s&&(Uu(e).some(p=>p.kind==="request"&&p.subject.startsWith(Ra))||(Mu(e,{id:`onb${le}`,created:t,from:"docs",kind:"request",re:"",sources:[],subject:`${Ra}${le})`,status:"open",body:[`The dev\u2194docs onboarding protocol moved to v${le}${s?` (you last completed v${s})`:""}.`,"Re-run the hand-off so the docs agent and this repo stay in step \u2014 run this prompt here:","",kt()].join(`
|
|
237
239
|
`)}),n.notifiedBuilder=!0))}catch{}return n}function bo(e){if(!Gt(yo(e)))return[];let t=Ee(e);return t.status==="current"?[]:[`\u{1F514} Your builder agent ${t.completedVersion?`is on v${t.completedVersion}`:"hasn't completed the hand-off yet"} \u2014 d360-writer's dev\u2194docs protocol is now v${le}.`,"Please run this prompt in your repository's coding agent (Claude Code / Codex / Cursor) for:",` ${e}`,Yt,kt(),Yt,"(Also saved in .d360-writer/messages/ \u2014 or run /devhints to re-show. This stops once your builder runs it.)"]}function Wr(){return['document360-writer (its "docs agent") has been removed from this repository. Please undo its dev\u2192docs',"hand-off setup and restore this repo to how it was before \u2014 in order:","","1. In this repo's agent-memory file (CLAUDE.md, or AGENTS.md \u2014 whichever it edited), REMOVE the",' "Documentation hand-off" section that was added (the rule about dropping hint files in'," `.d360-writer/hints/`, keeping `.d360-writer/architecture/` current, checking"," `.d360-writer/messages/`, and relaying `@d360-writer` directives to `.d360-writer/directives.md`)."," Leave everything else in that file untouched.","2. The `.d360-writer/` folder is already deleted on disk. If it was committed, remove it from version"," control too \u2014 `git rm -r --cached .d360-writer` (if it still resolves) \u2014 and commit the deletions.","3. Do NOT recreate any of those files or follow the hand-off protocol anymore.","","That's it \u2014 this repo is back to its pre-docs-agent state."].join(`
|
|
238
|
-
`)}function vo(){return['\u{1F9F9} One leftover: your builder still has the "Documentation hand-off" rule in its CLAUDE.md / AGENTS.md'," (reset only clears d360-writer's own .d360-writer/ folder \u2014 never your repo's files)."," To restore it, paste this prompt into your repo's coding agent (Claude Code / Codex / Cursor):",Yt,Wr(),Yt]}function Kt(e){return[...e?.status==="stale"?[`\u26A0 Your builder last completed devhints v${e.completedVersion}; this hand-off is v${le}.`," Have them run the prompt below again \u2014 it now sets up two-way messages + on-demand docs.",""]:[],"\u2713 Wrote .d360-writer/DEV-HINTS-GUIDE.md + the .d360-writer/architecture/ (brief), .d360-writer/hints/, and .d360-writer/messages/ inboxes.","","\u{1F4CB} Copy this one prompt and run it in your repo's coding agent (Claude Code / Codex / Cursor):",Yt,kt(),Yt,"","That one run writes the architecture brief, adds the ongoing rule to your agent memory (CLAUDE.md / AGENTS.md)","and commits it so teammates inherit it, answers any open questions the writer left, and asks you for tribal","knowledge \u2014 no manual file edits. It also sets up the two-way channel: the writer can ask you questions","(`/inbox` on its side), and you can ask it to document a session on demand (Part 4 of the guide).","","When it finishes, come back to THIS terminal and run:"," write the docs for this repo"]}var Yt,le,Wu,Ra,ot=ao(()=>{"use strict";Yt="-".repeat(64),le=
|
|
240
|
+
`)}function vo(){return['\u{1F9F9} One leftover: your builder still has the "Documentation hand-off" rule in its CLAUDE.md / AGENTS.md'," (reset only clears d360-writer's own .d360-writer/ folder \u2014 never your repo's files)."," To restore it, paste this prompt into your repo's coding agent (Claude Code / Codex / Cursor):",Yt,Wr(),Yt]}function Kt(e){return[...e?.status==="stale"?[`\u26A0 Your builder last completed devhints v${e.completedVersion}; this hand-off is v${le}.`," Have them run the prompt below again \u2014 it now sets up two-way messages + on-demand docs.",""]:[],"\u2713 Wrote .d360-writer/DEV-HINTS-GUIDE.md + the .d360-writer/architecture/ (brief), .d360-writer/hints/, and .d360-writer/messages/ inboxes.","","\u{1F4CB} Copy this one prompt and run it in your repo's coding agent (Claude Code / Codex / Cursor):",Yt,kt(),Yt,"","That one run writes the architecture brief, adds the ongoing rule to your agent memory (CLAUDE.md / AGENTS.md)","and commits it so teammates inherit it, answers any open questions the writer left, and asks you for tribal","knowledge \u2014 no manual file edits. It also sets up the two-way channel: the writer can ask you questions","(`/inbox` on its side), and you can ask it to document a session on demand (Part 4 of the guide).","","When it finishes, come back to THIS terminal and run:"," write the docs for this repo"]}var Yt,le,Wu,Ra,ot=ao(()=>{"use strict";Yt="-".repeat(64),le=10,Wu=`#!/usr/bin/env node
|
|
239
241
|
// d360-writer \u2014 session-start nudge for the builder ("John"). Surfaces open questions the docs agent
|
|
240
242
|
// ("Julie") left in .d360-writer/messages/ so they get answered, not forgotten. Self-contained (no deps);
|
|
241
243
|
// wired into your coding agent's session-start trigger by /devhints. See .d360-writer/DEV-HINTS-GUIDE.md.
|
|
@@ -267,7 +269,7 @@ try {
|
|
|
267
269
|
: '';
|
|
268
270
|
process.stdout.write(
|
|
269
271
|
'\u{1F4CB} d360-writer: ' + open + ' open question' + (open === 1 ? '' : 's') + ' from the docs agent await your answer' + d +
|
|
270
|
-
'.
|
|
272
|
+
'. Reply with an answer file (kind: answer, status: open \u2014 the writer closes it after folding), flip only the QUESTION to status: done. An open docs question blocks the documentation. See .d360-writer/DEV-HINTS-GUIDE.md.\\n',
|
|
271
273
|
);
|
|
272
274
|
}
|
|
273
275
|
} catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document360-writer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.111",
|
|
4
4
|
"description": "Standalone documentation agent CLI. Reads your code, writes your docs. Specialized for Document360 publishing.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@inquirer/prompts": "^8.4.3",
|
|
35
35
|
"commander": "^14.0.3",
|
|
36
36
|
"diff": "^8.0.4",
|
|
37
|
-
"document360-engine": "^0.2.
|
|
37
|
+
"document360-engine": "^0.2.123",
|
|
38
38
|
"ink": "^5.2.1",
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
40
|
"react": "^18.3.1",
|