document360-writer 0.4.53 → 0.4.55
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 +137 -96
- package/dist/commands/devhints.d.ts +14 -9
- package/dist/commands/draft.d.ts +27 -0
- package/package.json +2 -2
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import type { SlashCommandResult } from './index.js';
|
|
2
2
|
import type { ReplContext } from '../repl.js';
|
|
3
3
|
/** Bump when the guide content changes — lets a future check detect a stale committed guide. */
|
|
4
|
-
export declare const DEV_HINTS_GUIDE_VERSION =
|
|
4
|
+
export declare const DEV_HINTS_GUIDE_VERSION = 2;
|
|
5
5
|
/**
|
|
6
|
-
* The committed protocol guide the SOURCE repo's coding agent follows
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* The committed protocol guide the SOURCE repo's coding agent follows. Self-contained because that
|
|
7
|
+
* agent has none of d360-writer's context. Two parts: (1) a ONE-TIME architecture brief that onboards
|
|
8
|
+
* the docs agent — the builder, who holds the full intent, hands over what code alone can't tell a
|
|
9
|
+
* writer; (2) ONGOING per-change doc hints. The /devhints command writes this to
|
|
10
|
+
* `.d360-writer/DEV-HINTS-GUIDE.md`; the paste block points the source agent at it.
|
|
10
11
|
*/
|
|
11
12
|
export declare function devHintsGuide(): string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
13
|
+
/** The human-owned creator-notes template (scaffolded once, never overwritten). The builder reads it
|
|
14
|
+
first as authoritative; the docs agent reads it as authoritative intent. */
|
|
15
|
+
export declare function creatorNotesTemplate(): string;
|
|
16
|
+
/** `/devhints` — scaffold the dev→docs hand-off: write the committed guide + the architecture inbox
|
|
17
|
+
(with a human creator-notes template) + the hints inbox, then emit a paste-ready block for the
|
|
18
|
+
SOURCE repo's CLAUDE.md/AGENTS.md so its coding agent onboards the docs agent and keeps it current. */
|
|
14
19
|
export declare function devhintsCommand(_args: string[], ctx: ReplContext): Promise<SlashCommandResult>;
|
|
15
20
|
/**
|
|
16
21
|
* The paste-ready block for the user to add to their SOURCE repo's agent memory (CLAUDE.md/AGENTS.md).
|
|
17
|
-
* A
|
|
18
|
-
* we can improve the guide without
|
|
22
|
+
* A pointer to the committed guide plus the ordered marching orders — not the protocol inline — so their
|
|
23
|
+
* memory stays lean and we can improve the guide without re-pasting. Mirrors renderTestidHandoff's shape.
|
|
19
24
|
*/
|
|
20
25
|
export declare function renderDevHintsHandoff(): string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReplContext } from '../repl.js';
|
|
2
|
+
import type { SlashCommandResult } from './index.js';
|
|
3
|
+
/** A feature available to draft: a subfolder of `.d360-writer/input/` holding ≥1 input doc. */
|
|
4
|
+
export type DraftFeature = {
|
|
5
|
+
name: string;
|
|
6
|
+
docCount: number;
|
|
7
|
+
};
|
|
8
|
+
/** List the feature subfolders under `.d360-writer/input/` (each with ≥1 PRD/spec doc). Sorted.
|
|
9
|
+
Loose docs directly in input/ (no subfolder) surface as the synthetic feature "" (root). */
|
|
10
|
+
export declare function listInputFeatures(cwd: string): {
|
|
11
|
+
features: DraftFeature[];
|
|
12
|
+
looseDocs: number;
|
|
13
|
+
};
|
|
14
|
+
/** Resolve a `/draft <selector>` to a feature subfolder: exact → prefix → fuzzy (substring), case-
|
|
15
|
+
insensitive. Returns the matched feature name, or null when nothing matches (caller treats the
|
|
16
|
+
selector as a free-text hint instead). */
|
|
17
|
+
export declare function matchFeature(features: DraftFeature[], selector: string): string | null;
|
|
18
|
+
/** The prompt that drives the draft-from-prd skill for a resolved scope. `feature` is the subfolder
|
|
19
|
+
(or '' for loose root docs); `hint` is the user's free-text framing when no subfolder matched. */
|
|
20
|
+
export declare function buildDraftPrompt(feature: string, hint?: string): string;
|
|
21
|
+
declare const EMPTY_INPUT_HINT = "No input docs found. Drop this feature's PRDs/specs in .d360-writer/input/<feature>/ (.md or .pdf), then run /draft.";
|
|
22
|
+
/**
|
|
23
|
+
* Classic-REPL `/draft`: resolve the feature, then forward the draft-from-prd prompt to the agent.
|
|
24
|
+
* Multiple features + no selector → list them and ask (the TUI shows a picker; classic prints the list).
|
|
25
|
+
*/
|
|
26
|
+
export declare function draftCommand(args: string[], ctx?: ReplContext): Promise<SlashCommandResult>;
|
|
27
|
+
export { EMPTY_INPUT_HINT };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document360-writer",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.55",
|
|
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.32",
|
|
38
38
|
"ink": "^5.2.1",
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
40
|
"react": "^18.3.1",
|