@cliangdev/conductor 0.58.3 → 0.60.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 +4 -2
- package/assets/claude/commands/conductor/comments.md +81 -0
- package/assets/claude/commands/conductor/prd.md +210 -13
- package/assets/cli-manifest.json +32 -28
- package/dist/commands/lint.d.ts.map +1 -1
- package/dist/commands/lint.js +5 -0
- package/dist/commands/lint.js.map +1 -1
- package/dist/lib/plugin-assets.d.ts.map +1 -1
- package/dist/lib/plugin-assets.js +1 -0
- package/dist/lib/plugin-assets.js.map +1 -1
- package/dist/mcp/index.d.ts +1483 -1642
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +86 -86
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/tools/comments.d.ts +25 -9
- package/dist/mcp/tools/comments.d.ts.map +1 -1
- package/dist/mcp/tools/comments.js +159 -20
- package/dist/mcp/tools/comments.js.map +1 -1
- package/dist/mcp/tools/doc-conflict.d.ts +7 -0
- package/dist/mcp/tools/doc-conflict.d.ts.map +1 -0
- package/dist/mcp/tools/doc-conflict.js +12 -0
- package/dist/mcp/tools/doc-conflict.js.map +1 -0
- package/dist/mcp/tools/documents.d.ts +1 -0
- package/dist/mcp/tools/documents.d.ts.map +1 -1
- package/dist/mcp/tools/documents.js +10 -1
- package/dist/mcp/tools/documents.js.map +1 -1
- package/dist/mcp/tools/project-docs.d.ts +1 -23
- package/dist/mcp/tools/project-docs.d.ts.map +1 -1
- package/dist/mcp/tools/project-docs.js +14 -38
- package/dist/mcp/tools/project-docs.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,6 +48,7 @@ Then open Claude Code in your project and run `/conductor:prd` to create your fi
|
|
|
48
48
|
| `/conductor:prd` | Guides you through writing a PRD with AI — discovery, research, structured output |
|
|
49
49
|
| `/conductor:implement` | Takes an approved PRD and implements it — task breakdown, parallel subagents, PR creation |
|
|
50
50
|
| `/conductor:fix` | Fixes bugs and review feedback on an open PR — structured intake, investigation, build validation, and push |
|
|
51
|
+
| `/conductor:comments` | Works through the open comment threads on a document — edits it once, replies on every thread, resolves only on request |
|
|
51
52
|
| `/conductor:workflow` | Designs and creates a Conductor workflow — YAML automation or lifecycle statechart — via guided discovery |
|
|
52
53
|
|
|
53
54
|
These commands are installed automatically when you run `conductor init` (project-level) or during global install (user-level, to `~/.claude/`).
|
|
@@ -75,8 +76,9 @@ Once `conductor init` runs, Claude Code gets access to 40 tools via the Conducto
|
|
|
75
76
|
|
|
76
77
|
| Area | Tools |
|
|
77
78
|
|------|-------|
|
|
78
|
-
| Work items | `create_work_item`, `update_work_item`, `get_work_item`, `list_work_items`, `set_work_item_status`, `get_available_transitions`, `transition_work_item`, `
|
|
79
|
-
| Documents | `write_document` (headless upsert), `scaffold_document` (local file, needs daemon), `delete_document` |
|
|
79
|
+
| Work items | `create_work_item`, `update_work_item`, `get_work_item`, `list_work_items`, `set_work_item_status`, `get_available_transitions`, `transition_work_item`, `record_asset` |
|
|
80
|
+
| Documents | `read_document` (content + `contentHash`), `write_document` (headless upsert; optional `baseContentHash` refuses a stale write), `scaffold_document` (local file, needs daemon), `delete_document` |
|
|
81
|
+
| Comments | `list_comments`, `add_comment`, `respond_to_comment` — one set for Work Item documents and project docs |
|
|
80
82
|
| Workflows | `list_workflows`, `create_workflow`, `get_workflow`, `update_workflow`, `publish_workflow`, `delete_workflow`, `dispatch_workflow`, `cancel_workflow_run`, `get_workflow_run`, `list_workflow_runs`, `list_workflow_secrets`, `get_workflow_step_schema`, `report_step_run` |
|
|
81
83
|
| Integrations & discovery | `list_integration_tools`, `list_connector_catalog`, `list_agents`, `create_agent`, `update_agent`, `delete_agent`, `list_skills`, `register_skill` |
|
|
82
84
|
| Knowledge | `submit_knowledge_source`, `read_knowledge_sources`, `search_knowledge`, `read_knowledge_pages`, `write_knowledge_pages`, `list_knowledge_domains`, `suggest_knowledge_domain` |
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: conductor:comments
|
|
3
|
+
description: Work through the open comment threads on a Conductor document — a PRD, marketing brief, wiki page or any Work Item document or project doc. Reads each document once, decides per thread whether to edit, answer, ask or leave it, writes each document once with an optimistic lock, replies on every thread, and resolves only when asked.
|
|
4
|
+
allowed-tools: mcp__conductor__*, AskUserQuestion, Read, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /conductor:comments
|
|
8
|
+
|
|
9
|
+
You are the Conductor comment responder. People leave comments on documents; your job is to act on them so the author does not have to: revise the document where a comment asks for a change, answer where it asks a question, and say plainly when you did neither.
|
|
10
|
+
|
|
11
|
+
Documents here are any text a team keeps in Conductor — a PRD, a campaign brief, a runbook, a wiki page, a spec. Do not assume code. Judge each comment by what the document is for.
|
|
12
|
+
|
|
13
|
+
## Trigger
|
|
14
|
+
|
|
15
|
+
`/conductor:comments <target> [--resolve]`
|
|
16
|
+
|
|
17
|
+
- `<target>` is a Work Item display id (e.g. `PRD-12`), optionally followed by a filename to limit it to one document, or a project doc path.
|
|
18
|
+
- `--resolve` lets you resolve threads you fully handled. Without it, never resolve: leave that to the human.
|
|
19
|
+
|
|
20
|
+
If no target is given, ask for one.
|
|
21
|
+
|
|
22
|
+
## Step 1 — Resolve the target
|
|
23
|
+
|
|
24
|
+
- Work Item: `list_work_items` (or `get_work_item`) to turn the display id into `issueId`. If a filename was not given, `list_comments` with only `issueId` returns the threads of every document on the item.
|
|
25
|
+
- Project doc: `list_project_docs` to get the `docId` from the path.
|
|
26
|
+
|
|
27
|
+
## Step 2 — List the open threads
|
|
28
|
+
|
|
29
|
+
Call `list_comments` (status defaults to `open`). Each thread has an `id`, a `kind` (`QUOTE`, `LINE` or `DOCUMENT`), the `quote` or `line` it points at, an `anchorStatus` when set, the author, the body, and any replies.
|
|
30
|
+
|
|
31
|
+
- If there are none, say so and stop.
|
|
32
|
+
- Read the replies: a thread whose latest reply is yours and unanswered is waiting on the human, so skip it unless the human has written since.
|
|
33
|
+
- `anchorStatus: ORPHANED` or `stale: true` means the commented text may have changed or gone. Check the current document before acting on it.
|
|
34
|
+
|
|
35
|
+
## Step 3 — Read each document once
|
|
36
|
+
|
|
37
|
+
Group the threads by document. For each document read it a single time: `read_document` (Work Item documents, returns `content` and `contentHash`) or `read_project_doc` (project docs, returns `content` and `contentHash`). Keep the hash; you need it to write.
|
|
38
|
+
|
|
39
|
+
Quotes on an HTML document are the page's rendered text, not its source. Find them loosely, ignoring tags and whitespace.
|
|
40
|
+
|
|
41
|
+
## Step 4 — Decide per thread
|
|
42
|
+
|
|
43
|
+
For every thread choose exactly one:
|
|
44
|
+
|
|
45
|
+
1. **Edit** — the comment asks for a change you can make with confidence. Apply it to your in-memory copy of the document.
|
|
46
|
+
2. **Answer** — the comment is a question or an observation. Reply with the answer, grounded in the document or in the work item; do not change the document.
|
|
47
|
+
3. **Ask** — the request is ambiguous, conflicts with another thread, or needs a decision only a person can make. Reply with one specific clarifying question.
|
|
48
|
+
4. **Leave** — you should not act (out of scope, needs information you do not have, disagrees with the document's purpose). Reply with the reason in a sentence.
|
|
49
|
+
|
|
50
|
+
When two threads touch the same passage, reconcile them in one edit rather than editing the passage twice. Make the smallest edit that satisfies the comment; do not rewrite surrounding text or fix unrelated issues.
|
|
51
|
+
|
|
52
|
+
## Step 5 — Write each document once
|
|
53
|
+
|
|
54
|
+
Make **one** write per document that has at least one Edit:
|
|
55
|
+
|
|
56
|
+
- Work Item document: `write_document` with `issueId`, `filename`, the full revised `content` and `baseContentHash` set to the hash you read.
|
|
57
|
+
- Project doc: `write_project_doc` with `path`, the full revised `content` and `baseContentHash`.
|
|
58
|
+
|
|
59
|
+
If the write is refused because the document changed since you read it, nothing was written. Read the document again, redo your edits on the new content (a thread may no longer apply), and write once more. Do not write without `baseContentHash`.
|
|
60
|
+
|
|
61
|
+
Preserve everything you were not asked to change: frontmatter, headings, formatting and any content type conventions of that document.
|
|
62
|
+
|
|
63
|
+
## Step 6 — Reply on every thread
|
|
64
|
+
|
|
65
|
+
Use `respond_to_comment` for each thread you handled:
|
|
66
|
+
|
|
67
|
+
- Edit: reply `Changed: <what you changed, in one sentence>`.
|
|
68
|
+
- Answer: reply with the answer.
|
|
69
|
+
- Ask: reply with the question.
|
|
70
|
+
- Leave: reply with the reason.
|
|
71
|
+
|
|
72
|
+
Only after the document write has succeeded may you say `Changed:`. Add `resolve: true` only when `--resolve` was passed and the thread is fully handled (an Edit that satisfies the comment, or an Answer that closes it). Never resolve a thread you Asked or Left.
|
|
73
|
+
|
|
74
|
+
## Step 7 — Check and summarise
|
|
75
|
+
|
|
76
|
+
Call `list_comments` once more to confirm your replies landed, then finish with a short table:
|
|
77
|
+
|
|
78
|
+
| Thread | Document | Quote or line | Decision | Resolved |
|
|
79
|
+
|--------|----------|---------------|----------|----------|
|
|
80
|
+
|
|
81
|
+
Follow it with one line per document edited, and any thread waiting on a human.
|
|
@@ -120,12 +120,13 @@ Use AskUserQuestion:
|
|
|
120
120
|
- Each section is `<section id="{name}" data-prd-section="{name}">` with an `<h2>`; names, in order: `problem`, `glossary`, `goals`, `non-goals`, `users`, `reference-patterns`, `features`, then optional `out-of-scope`, `open-questions`, `supporting-documents`
|
|
121
121
|
- An empty Glossary or Reference Patterns contains exactly `<p><em>None.</em></p>`
|
|
122
122
|
- Each feature is `<article id="P0-1" data-feature="P0-1">` with an `<h3>`, then a `<dl>` whose `<dt>`s are What, Not, Inputs, Outputs, Invariants, then `<ul data-acs>` of `<li data-ac="AC-P0-1.1">…</li>`
|
|
123
|
-
- Self-contained: inline `<style>` and `<script>`, Google Fonts, and pinned CDN scripts only from cdnjs.cloudflare.com, cdn.jsdelivr.net, unpkg.com, cdn.tailwindcss.com or code.jquery.com. No `fetch`/XHR/WebSocket (the viewer's CSP blocks them), no `window.claude`, no `window.open` (popups are blocked). Links are plain `<a href>`: `#hash` scrolls inside the page and `http(s)` links open in a new tab through the Conductor app. The
|
|
123
|
+
- Self-contained: inline `<style>` and `<script>`, Google Fonts, and pinned CDN scripts only from cdnjs.cloudflare.com, cdn.jsdelivr.net, unpkg.com, cdn.tailwindcss.com or code.jquery.com. No `fetch`/XHR/WebSocket (the viewer's CSP blocks them), no `window.claude`, no `window.open` (popups are blocked). Links are plain `<a href>`: `#hash` scrolls inside the page and `http(s)` links open in a new tab through the Conductor app. The only script a PRD needs is the template's contents script; add another only when it earns its place
|
|
124
|
+
- Contents: `<nav class="toc" data-prd-toc data-conductor-skip aria-label="Contents">` holds plain links to each section (the no-script fallback), and the template's `/* contents */` CSS and contents `<script>` turn it into an outline built from the section, feature and `data-ac` markers: a sticky rail when the page is 960px or wider, a one-line bar with a Contents popover below that (Conductor's review panel is narrower). Copy both blocks verbatim; never write the outline by hand. `data-conductor-skip` keeps the outline's text out of comment anchors. The script adds no ids to the page, so a comment on a subheading still records its section's id
|
|
124
125
|
- Escape `<`, `>` and `&` in text. Keep ids stable: reviewers' comments reference the nearest section id. Comment quotes are rendered text (tags dropped, whitespace collapsed), so write section text that reads naturally
|
|
125
126
|
|
|
126
127
|
### HTML PRD Template
|
|
127
128
|
|
|
128
|
-
Keep this structure and token block; adapt the visual style to the product's design language from Phase 2a when the PRD is UI-heavy.
|
|
129
|
+
Keep this structure and token block; adapt the visual style to the product's design language from Phase 2a when the PRD is UI-heavy. When restyling, keep the token names the contents CSS reads (`--bg`, `--fg`, `--muted`, `--line`, `--accent`, `--soft`, `--accent-soft`, `--warn`, `--warn-soft`, `--mono`) with light and dark values, and keep the `.shell` wrapper, the `nav[data-prd-toc]` and the contents script.
|
|
129
130
|
|
|
130
131
|
```html
|
|
131
132
|
<!doctype html>
|
|
@@ -138,28 +139,76 @@ Keep this structure and token block; adapt the visual style to the product's des
|
|
|
138
139
|
<meta name="conductor:issue-id" content="{issueId}">
|
|
139
140
|
<title>{title}</title>
|
|
140
141
|
<style>
|
|
141
|
-
:root{--bg:#fff;--fg:#1a1d21;--muted:#5b6470;--line:#e3e6ea;--card:#f6f7f9;--accent:#2f5bea}
|
|
142
|
-
@media (prefers-color-scheme:dark){:root{--bg:#14161a;--fg:#e8eaed;--muted:#9aa3ae;--line:#2a2e35;--card:#1c1f25;--accent:#7b9bff}}
|
|
142
|
+
:root{--bg:#fff;--fg:#1a1d21;--muted:#5b6470;--line:#e3e6ea;--card:#f6f7f9;--accent:#2f5bea;--soft:#f0f2f5;--accent-soft:#e8eefe;--warn:#8a5a0b;--warn-soft:#f8eedb;--mono:ui-monospace,SFMono-Regular,Menlo,monospace}
|
|
143
|
+
@media (prefers-color-scheme:dark){:root{--bg:#14161a;--fg:#e8eaed;--muted:#9aa3ae;--line:#2a2e35;--card:#1c1f25;--accent:#7b9bff;--soft:#1f232a;--accent-soft:#1f2a4a;--warn:#e0b060;--warn-soft:#3a2f1a}}
|
|
143
144
|
*{box-sizing:border-box}
|
|
144
145
|
body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
main{max-width:760px;margin:0 auto;padding:0 16px 64px}
|
|
148
|
-
h1{font-size:2rem;line-height:1.2;margin:32px 0 4px}
|
|
146
|
+
main{min-width:0;width:100%;max-width:760px;margin:0 auto;padding:24px 16px 64px}
|
|
147
|
+
h1{font-size:2rem;line-height:1.2;margin:0 0 4px}
|
|
149
148
|
h2{font-size:1.25rem;margin:0 0 12px}
|
|
150
149
|
h3{font-size:1.05rem;margin:0 0 8px}
|
|
151
150
|
.sub{color:var(--muted);margin:0 0 8px}
|
|
152
|
-
section{padding:24px 0;border-top:1px solid var(--line)
|
|
151
|
+
section{padding:24px 0;border-top:1px solid var(--line)}
|
|
153
152
|
article{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:16px;margin:12px 0}
|
|
154
153
|
dl{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0 0 12px}
|
|
155
154
|
dt{color:var(--muted);font-weight:600}dd{margin:0}
|
|
156
155
|
ul[data-acs]{margin:0;padding-left:20px}
|
|
157
156
|
@media (max-width:560px){dl{grid-template-columns:1fr}dd{margin-bottom:6px}}
|
|
157
|
+
/* contents: keep verbatim; it reads only the tokens above */
|
|
158
|
+
.shell{display:grid;grid-template-columns:minmax(0,1fr)}
|
|
159
|
+
.toc{position:sticky;top:0;z-index:2;font-size:14px}
|
|
160
|
+
.toc a{text-decoration:none}
|
|
161
|
+
.toc [hidden]{display:none!important}
|
|
162
|
+
.toc:not(.js){display:flex;gap:16px;overflow-x:auto;white-space:nowrap;padding:10px 16px;background:var(--bg);border-bottom:1px solid var(--line)}
|
|
163
|
+
.toc:not(.js) a{color:var(--muted)}
|
|
164
|
+
.toc-bar{position:relative;display:flex;align-items:center;gap:6px;height:44px;padding:0 8px;background:var(--bg);border-bottom:1px solid var(--line)}
|
|
165
|
+
.toc-btn,.toc-step{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:30px;flex:none;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--fg);font-family:inherit;font-size:13px;font-weight:500;cursor:pointer}
|
|
166
|
+
.toc-btn{padding:0 9px}.toc-step{width:30px;padding:0}
|
|
167
|
+
.toc-btn[aria-expanded="true"]{border-color:var(--accent);color:var(--accent)}
|
|
168
|
+
.toc-step:disabled{opacity:.4;cursor:default}
|
|
169
|
+
.toc svg{width:15px;height:15px}
|
|
170
|
+
.toc button:focus-visible,.toc a:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
|
|
171
|
+
.toc-crumb{flex:1;min-width:0;padding-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13.5px}
|
|
172
|
+
.toc-crumb b{font-weight:600}.toc-crumb i{font-style:normal;color:var(--muted);padding:0 5px}
|
|
173
|
+
.toc-fid,.toc-pos,.toc-ct,.toc-progress,.toc-grp{font-family:var(--mono);font-variant-numeric:tabular-nums}
|
|
174
|
+
.toc-fid{flex:none;white-space:nowrap;font-size:11.5px;color:var(--muted)}
|
|
175
|
+
.toc-pos,.toc-ct,.toc-progress{font-size:11px;color:var(--muted);white-space:nowrap}
|
|
176
|
+
.toc-pos{padding:0 4px}
|
|
177
|
+
.toc-meter{position:absolute;left:0;bottom:-1px;height:2px;width:0;background:var(--accent)}
|
|
178
|
+
.toc-outline{display:none;flex-direction:column;gap:12px}
|
|
179
|
+
.toc-head{display:flex;align-items:center;gap:8px}
|
|
180
|
+
.toc-track{flex:1;height:3px;border-radius:2px;background:var(--soft);overflow:hidden}
|
|
181
|
+
.toc-fill{display:block;height:100%;width:0;background:var(--accent)}
|
|
182
|
+
.toc-list{display:flex;flex-direction:column;border-left:1px solid var(--line)}
|
|
183
|
+
.toc-kids{display:flex;flex-direction:column;padding:2px 0 8px}
|
|
184
|
+
.toc-item,.toc-kid{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:10px;margin-left:-1px;border-left:2px solid transparent;color:var(--muted)}
|
|
185
|
+
.toc-item{padding:4px 8px 4px 12px;font-size:13.5px}
|
|
186
|
+
.toc-kid{padding:3px 8px 3px 24px;font-size:13px;line-height:1.4}
|
|
187
|
+
.toc-kid>span:first-child{display:flex;gap:7px;min-width:0}
|
|
188
|
+
.toc-item:hover,.toc-kid:hover{color:var(--fg);background:var(--soft)}
|
|
189
|
+
.toc-item.on{color:var(--fg);font-weight:600;border-left-color:var(--fg)}
|
|
190
|
+
.toc-kid.on{color:var(--accent);border-left-color:var(--accent);background:var(--accent-soft)}
|
|
191
|
+
.toc-kid.on .toc-fid{color:var(--accent)}
|
|
192
|
+
.toc-grp{padding:8px 8px 2px 24px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
|
|
193
|
+
.toc-ct.warn{color:var(--warn);background:var(--warn-soft);border-radius:3px;padding:0 5px}
|
|
194
|
+
section,article,section h3{scroll-margin-top:56px}
|
|
195
|
+
@media (max-width:959.98px){
|
|
196
|
+
.toc.js .toc-outline{position:absolute;top:calc(100% + 6px);left:8px;width:min(380px,calc(100vw - 16px));max-height:calc(100vh - 64px);overflow:auto;padding:12px 10px 10px 12px;background:var(--bg);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 28px rgba(0,0,0,.18)}
|
|
197
|
+
.toc.js.open .toc-outline{display:flex}}
|
|
198
|
+
@media (min-width:960px){
|
|
199
|
+
.shell{grid-template-columns:220px minmax(0,1fr);gap:40px;max-width:1140px;margin:0 auto;padding:0 24px}
|
|
200
|
+
main{margin:0;padding:24px 0 64px}
|
|
201
|
+
.toc{align-self:start;max-height:100vh;overflow:auto;padding:24px 2px 24px 0}
|
|
202
|
+
.toc:not(.js){flex-direction:column;gap:2px;overflow-x:visible;white-space:normal;padding:24px 0;background:none;border-bottom:0}
|
|
203
|
+
.toc-bar{display:none}
|
|
204
|
+
.toc.js .toc-outline{display:flex}
|
|
205
|
+
section,article,section h3{scroll-margin-top:16px}}
|
|
158
206
|
</style>
|
|
159
207
|
</head>
|
|
160
208
|
<body>
|
|
161
|
-
<
|
|
162
|
-
<
|
|
209
|
+
<div class="shell">
|
|
210
|
+
<nav class="toc" data-prd-toc data-conductor-skip aria-label="Contents">
|
|
211
|
+
<a href="#problem">Problem</a><a href="#glossary">Glossary</a><a href="#goals">Goals</a><a href="#non-goals">Non-Goals</a><a href="#users">Users</a><a href="#reference-patterns">Reference Patterns</a><a href="#features">Features</a><a href="#out-of-scope">Out of Scope</a><a href="#open-questions">Open Questions</a><a href="#supporting-documents">Supporting Documents</a>
|
|
163
212
|
</nav>
|
|
164
213
|
<main>
|
|
165
214
|
<h1>{title}</h1>
|
|
@@ -215,6 +264,151 @@ ul[data-acs]{margin:0;padding-left:20px}
|
|
|
215
264
|
<section id="supporting-documents" data-prd-section="supporting-documents"><h2>Supporting Documents</h2>
|
|
216
265
|
<p>Links are added here as supporting documents are created.</p></section>
|
|
217
266
|
</main>
|
|
267
|
+
</div>
|
|
268
|
+
<script>
|
|
269
|
+
/* contents: keep verbatim. Builds the outline from the PRD's own markers, so it never needs editing. */
|
|
270
|
+
(function () {
|
|
271
|
+
var nav = document.querySelector('nav[data-prd-toc]');
|
|
272
|
+
var secs = [].slice.call(document.querySelectorAll('section[data-prd-section]'));
|
|
273
|
+
if (!nav || !secs.length) return;
|
|
274
|
+
var narrow = window.matchMedia('(max-width: 959.98px)');
|
|
275
|
+
var smooth = !window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
276
|
+
function esc(s) { return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); }
|
|
277
|
+
function freeId(base) { var id = base || 'part', n = 2; while (document.getElementById(id)) id = base + '-' + n++; return id; }
|
|
278
|
+
var list = secs.map(function (sec) {
|
|
279
|
+
var name = sec.getAttribute('data-prd-section'), h2 = sec.querySelector('h2');
|
|
280
|
+
if (!sec.id) sec.id = freeId(name);
|
|
281
|
+
var s = { el: sec, label: (h2 ? h2.textContent : name).trim(), kids: [], count: '', warn: false };
|
|
282
|
+
if (name === 'features') {
|
|
283
|
+
[].forEach.call(sec.querySelectorAll('h3.sub, article[data-feature]'), function (n) {
|
|
284
|
+
if (n.tagName === 'H3') {
|
|
285
|
+
if (!n.closest('article')) s.kids.push({ group: n.textContent.trim().replace(/^(P\d+):\s*/, '$1 · ') });
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
var fid = n.getAttribute('data-feature'), h = n.querySelector('h3');
|
|
289
|
+
if (!n.id) n.id = freeId(fid);
|
|
290
|
+
s.kids.push({ el: n, fid: fid, title: (h ? h.textContent : '').trim().replace(/^P\d+-\d+:\s*/, ''), count: n.querySelectorAll('[data-ac]').length });
|
|
291
|
+
});
|
|
292
|
+
s.count = s.kids.filter(function (k) { return k.el; }).length + ' · ' + sec.querySelectorAll('[data-ac]').length + ' AC';
|
|
293
|
+
} else {
|
|
294
|
+
// Subheadings get no ids: comments take the nearest id as their section, so it stays the section's.
|
|
295
|
+
[].forEach.call(sec.querySelectorAll('h3'), function (h) {
|
|
296
|
+
if (!h.closest('article')) s.kids.push({ el: h, title: h.textContent.trim() });
|
|
297
|
+
});
|
|
298
|
+
if (name === 'open-questions') {
|
|
299
|
+
// Top-level items only: sub-bullets are part of their question.
|
|
300
|
+
var open = [].filter.call(sec.querySelectorAll('li'), function (li) { return !li.parentElement.closest('li'); }).length;
|
|
301
|
+
if (open) { s.count = open + ' open'; s.warn = true; }
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return s;
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
function icon(d) { return '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="' + d + '"/></svg>'; }
|
|
308
|
+
var h = '<div class="toc-bar"><button type="button" class="toc-btn" aria-expanded="false">' +
|
|
309
|
+
icon('M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01') + 'Contents</button>' +
|
|
310
|
+
'<span class="toc-crumb"></span><span class="toc-pos"></span>' +
|
|
311
|
+
'<button type="button" class="toc-step" data-step="-1" aria-label="Previous section">' + icon('m15 18-6-6 6-6') + '</button>' +
|
|
312
|
+
'<button type="button" class="toc-step" data-step="1" aria-label="Next section">' + icon('m9 18 6-6-6-6') + '</button>' +
|
|
313
|
+
'<span class="toc-meter"></span></div>' +
|
|
314
|
+
'<div class="toc-outline"><div class="toc-head"><span class="toc-progress"></span><span class="toc-track"><span class="toc-fill"></span></span></div><div class="toc-list">';
|
|
315
|
+
list.forEach(function (s, i) {
|
|
316
|
+
h += '<a class="toc-item" href="#' + esc(s.el.id) + '" data-i="' + i + '"><span>' + esc(s.label) + '</span>' +
|
|
317
|
+
(s.count ? '<span class="toc-ct' + (s.warn ? ' warn' : '') + '">' + esc(s.count) + '</span>' : '') + '</a>';
|
|
318
|
+
if (!s.kids.length) return;
|
|
319
|
+
h += '<div class="toc-kids" data-i="' + i + '" hidden>';
|
|
320
|
+
s.kids.forEach(function (k, j) {
|
|
321
|
+
if (k.group) { h += '<div class="toc-grp">' + esc(k.group) + '</div>'; return; }
|
|
322
|
+
h += '<a class="toc-kid" href="#' + esc(k.el.id || s.el.id) + '" data-k="' + i + '.' + j + '"><span>' +
|
|
323
|
+
(k.fid ? '<span class="toc-fid">' + esc(k.fid) + '</span>' : '') + '<span>' + esc(k.title) + '</span></span>' +
|
|
324
|
+
(k.count !== undefined ? '<span class="toc-ct">' + k.count + '</span>' : '') + '</a>';
|
|
325
|
+
});
|
|
326
|
+
h += '</div>';
|
|
327
|
+
});
|
|
328
|
+
nav.innerHTML = h + '</div></div>';
|
|
329
|
+
nav.classList.add('js');
|
|
330
|
+
nav.setAttribute('data-conductor-skip', '');
|
|
331
|
+
|
|
332
|
+
function q(sel) { return nav.querySelector(sel); }
|
|
333
|
+
var btn = q('.toc-btn'), crumb = q('.toc-crumb'), pos = q('.toc-pos'), meter = q('.toc-meter');
|
|
334
|
+
var fill = q('.toc-fill'), progress = q('.toc-progress'), outline = q('.toc-outline'), steps = nav.querySelectorAll('.toc-step');
|
|
335
|
+
// `pinned`: a section the reader jumped to that sits too low to reach the reading line (short
|
|
336
|
+
// trailing sections). Held while the page rests at the bottom, until the reader scrolls themselves.
|
|
337
|
+
var cur = -1, curKid = null, pinned = null;
|
|
338
|
+
|
|
339
|
+
function reveal() {
|
|
340
|
+
var box = narrow.matches ? outline : nav, el = q('.toc-kid.on') || q('.toc-item.on');
|
|
341
|
+
if (!el || box.scrollHeight <= box.clientHeight) return;
|
|
342
|
+
var t = el.getBoundingClientRect().top - box.getBoundingClientRect().top + box.scrollTop;
|
|
343
|
+
if (t < box.scrollTop + 48) box.scrollTop = Math.max(0, t - 48);
|
|
344
|
+
else if (t + el.offsetHeight > box.scrollTop + box.clientHeight - 16) box.scrollTop = t + el.offsetHeight - box.clientHeight + 16;
|
|
345
|
+
}
|
|
346
|
+
function setOpen(open) {
|
|
347
|
+
nav.classList.toggle('open', open);
|
|
348
|
+
btn.setAttribute('aria-expanded', open ? 'true' : 'false');
|
|
349
|
+
if (open) reveal();
|
|
350
|
+
}
|
|
351
|
+
function go(i, el) {
|
|
352
|
+
if (i < 0 || i >= list.length) return;
|
|
353
|
+
el = el || list[i].el;
|
|
354
|
+
var y = window.scrollY || document.documentElement.scrollTop;
|
|
355
|
+
var max = document.documentElement.scrollHeight - window.innerHeight;
|
|
356
|
+
pinned = el.getBoundingClientRect().top + y - (narrow.matches ? nav.offsetHeight : 0) - 24 > max - 2 ? i : null;
|
|
357
|
+
el.scrollIntoView({ behavior: smooth ? 'smooth' : 'auto', block: 'start' });
|
|
358
|
+
mark();
|
|
359
|
+
}
|
|
360
|
+
function unpin() { if (pinned !== null) { pinned = null; cur = -1; mark(); } }
|
|
361
|
+
|
|
362
|
+
function mark() {
|
|
363
|
+
var line = (narrow.matches ? nav.offsetHeight : 0) + 24, si = 0, ki = null;
|
|
364
|
+
var y = window.scrollY || document.documentElement.scrollTop, max = document.documentElement.scrollHeight - window.innerHeight;
|
|
365
|
+
list.forEach(function (s, i) { if (s.el.getBoundingClientRect().top <= line) si = i; });
|
|
366
|
+
if (max > 0 && y >= max - 2) si = pinned !== null ? pinned : list.length - 1;
|
|
367
|
+
list[si].kids.forEach(function (k, j) { if (k.el && k.el.getBoundingClientRect().top <= line) ki = j; });
|
|
368
|
+
var pct = max > 0 ? Math.min(100, Math.max(0, y / max * 100)) : 100;
|
|
369
|
+
meter.style.width = fill.style.width = pct + '%';
|
|
370
|
+
if (si === cur && ki === curKid) return;
|
|
371
|
+
cur = si; curKid = ki;
|
|
372
|
+
var s = list[si], k = ki === null ? null : s.kids[ki];
|
|
373
|
+
[].forEach.call(nav.querySelectorAll('.toc-item'), function (a) { a.classList.toggle('on', +a.getAttribute('data-i') === si); });
|
|
374
|
+
[].forEach.call(nav.querySelectorAll('.toc-kids'), function (d) { d.hidden = +d.getAttribute('data-i') !== si; });
|
|
375
|
+
[].forEach.call(nav.querySelectorAll('.toc-kid'), function (a) { a.classList.toggle('on', a.getAttribute('data-k') === si + '.' + ki); });
|
|
376
|
+
crumb.innerHTML = '<b>' + esc(s.label) + '</b>' + (k ? '<i>›</i>' + (k.fid ? '<span class="toc-fid">' + esc(k.fid) + '</span> ' : '') + esc(k.title) : '');
|
|
377
|
+
pos.textContent = (si + 1) + ' / ' + list.length;
|
|
378
|
+
progress.textContent = 'Section ' + (si + 1) + ' of ' + list.length;
|
|
379
|
+
steps[0].disabled = si === 0;
|
|
380
|
+
steps[1].disabled = si === list.length - 1;
|
|
381
|
+
reveal();
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
nav.addEventListener('click', function (e) {
|
|
385
|
+
var a = e.target.closest('a[href^="#"]');
|
|
386
|
+
if (a) {
|
|
387
|
+
e.preventDefault();
|
|
388
|
+
var k = a.getAttribute('data-k');
|
|
389
|
+
if (k) { var p = k.split('.'); go(+p[0], list[+p[0]].kids[+p[1]].el); }
|
|
390
|
+
else go(+a.getAttribute('data-i'));
|
|
391
|
+
setOpen(false);
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
var b = e.target.closest('button');
|
|
395
|
+
if (b === btn) setOpen(!nav.classList.contains('open'));
|
|
396
|
+
else if (b) go(cur + Number(b.getAttribute('data-step')));
|
|
397
|
+
});
|
|
398
|
+
document.addEventListener('click', function (e) { if (nav.classList.contains('open') && !nav.contains(e.target)) setOpen(false); });
|
|
399
|
+
document.addEventListener('keydown', function (e) { if (e.key === 'Escape' && nav.classList.contains('open')) { setOpen(false); btn.focus(); } });
|
|
400
|
+
var queued = false;
|
|
401
|
+
window.addEventListener('scroll', function () {
|
|
402
|
+
if (queued) return;
|
|
403
|
+
queued = true;
|
|
404
|
+
requestAnimationFrame(function () { queued = false; mark(); });
|
|
405
|
+
}, { passive: true });
|
|
406
|
+
['wheel', 'touchstart', 'keydown'].forEach(function (t) { window.addEventListener(t, unpin, { passive: true }); });
|
|
407
|
+
document.addEventListener('mousedown', function (e) { if (!nav.contains(e.target)) unpin(); });
|
|
408
|
+
window.addEventListener('resize', function () { cur = -1; mark(); });
|
|
409
|
+
mark();
|
|
410
|
+
})();
|
|
411
|
+
</script>
|
|
218
412
|
</body>
|
|
219
413
|
</html>
|
|
220
414
|
```
|
|
@@ -303,6 +497,7 @@ Before showing the PRD to the user in Step 3d, run through the checklist for the
|
|
|
303
497
|
- [ ] Every P0 feature's `<dl>` has `<dt>`s What, Not, Inputs, Outputs, Invariants, and a `<ul data-acs>` follows (P1 features may omit all but What)
|
|
304
498
|
- [ ] Every criterion is `<li data-ac="AC-P0-1.1">` with an id matching `^AC-P[01]-\d+\.\d+$`
|
|
305
499
|
- [ ] Every AC id is unique, and its feature part matches the enclosing article (`AC-P0-3.2` only inside `P0-3`)
|
|
500
|
+
- [ ] `<nav class="toc" data-prd-toc data-conductor-skip>` sits with `<main>` inside `<div class="shell">`, and the template's `/* contents */` CSS and contents `<script>` are copied verbatim, with every token they read defined for light and dark
|
|
306
501
|
- [ ] No `fetch`/XHR/`window.claude`/`window.open`; scripts, if any, are inline or pinned from cdnjs.cloudflare.com, cdn.jsdelivr.net, unpkg.com, cdn.tailwindcss.com or code.jquery.com
|
|
307
502
|
|
|
308
503
|
**If markdown (`prd.md`):**
|
|
@@ -544,10 +739,12 @@ Write a valid standalone HTML file with inline CSS — no external dependencies.
|
|
|
544
739
|
- If the result lists declared runtime capabilities (live data, shared state, Claude calls), warn the user: Conductor renders pages in a sandbox that blocks `fetch`/XHR and popups and has no `window.claude`, so those parts will not work there.
|
|
545
740
|
- For the user's own artifact the result names a saved file that holds the full page: Read that file.
|
|
546
741
|
2. **Detect whether it already meets the HTML PRD contract**: the `conductor:doc-type` = `prd` meta tag plus `data-prd-section` and `data-ac` markers (Grep the content).
|
|
547
|
-
- **Meets it**: keep the page verbatim. Skip to step 3 and only set `conductor:issue-id` (adding the meta tag if absent) once the Work Item exists. Run the HTML self-check from 3c and report any failures to the user rather than rewriting their page.
|
|
742
|
+
- **Meets it**: keep the page verbatim. Skip to step 3 and only set `conductor:issue-id` (adding the meta tag if absent) once the Work Item exists. Run the HTML self-check from 3c and report any failures to the user rather than rewriting their page. The one exception: if the page has no `nav[data-prd-toc]`, ask (AskUserQuestion) whether to add the contents outline, and on yes apply the contents upgrade below.
|
|
548
743
|
- **Does not meet it**: use AskUserQuestion with these options:
|
|
549
|
-
- "Convert to Conductor PRD (keeps content and styling, adds the structure)" (Recommended) — restructure the page into the seven sections, feature articles and `data-ac` criteria; keep the author's wording, CSS and layout. Do not invent content: put real source material in each section, write "None" where the page has nothing, and draft any missing P0 fields (Not, Inputs, Outputs, Invariants, acceptance criteria) from the page's own content, flagging them for review. Run the 3c self-check, then 3d.
|
|
744
|
+
- "Convert to Conductor PRD (keeps content and styling, adds the structure)" (Recommended) — restructure the page into the seven sections, feature articles and `data-ac` criteria; keep the author's wording, CSS and layout, and apply the contents upgrade below in place of any section index the page had. Do not invent content: put real source material in each section, write "None" where the page has nothing, and draft any missing P0 fields (Not, Inputs, Outputs, Invariants, acceptance criteria) from the page's own content, flagging them for review. Run the 3c self-check, then 3d.
|
|
550
745
|
- "Attach as-is as a supporting document"
|
|
551
746
|
- "Cancel" — stop.
|
|
552
747
|
- **Attach as-is**: ask (AskUserQuestion) which Work Item to attach to — an existing one (`list_work_items`) or a new one (resolve the Workflow and create it as in Phase 4 steps 1-2). Then `scaffold_document({issueId, filename})` with a descriptive `.html` filename that is not `prd.html`, Write the page verbatim to the returned `absolutePath`, and confirm. No status transition.
|
|
553
748
|
3. **Save a PRD** (meets the contract, or converted) with the Phase 4 sequence: resolve the Workflow, `create_work_item` (title from `<title>` or the `<h1>`, description from the Problem section), `scaffold_document({issueId, filename: "prd.html"})`, Write, then the IN_REVIEW transition and confirmation. Offer supporting documents as in Phase 4.
|
|
749
|
+
|
|
750
|
+
**Contents upgrade** (adding the outline to an existing `prd.html`, imported or older): replace the page's own section index (`<nav>` of section links, if any) with the template's `<nav class="toc" data-prd-toc data-conductor-skip aria-label="Contents">`; wrap that nav and `<main>` in `<div class="shell">` (if the page already has a two-column wrapper, drop its grid and sticky-nav rules); append the `/* contents */` CSS after the page's own rules and the contents `<script>` before `</body>`; then map the page's colors onto any of `--bg`, `--fg`, `--muted`, `--line`, `--accent`, `--soft`, `--accent-soft`, `--warn`, `--warn-soft`, `--mono` it lacks (e.g. `--line: var(--rule)`), in both its light and dark blocks. Below 960px the outline adds no side padding, so `main` keeps its own (the template's is `24px 16px 64px`). Leave section, feature and AC ids untouched: comments are anchored to them.
|
package/assets/cli-manifest.json
CHANGED
|
@@ -181,6 +181,10 @@
|
|
|
181
181
|
"name": "conductor:fix",
|
|
182
182
|
"description": "Fix a bug found during PR review — root cause investigation, full build validation, push to the existing PR branch."
|
|
183
183
|
},
|
|
184
|
+
{
|
|
185
|
+
"name": "conductor:comments",
|
|
186
|
+
"description": "Work through the open comment threads on a document — a PRD, brief, wiki page or any Work Item or project doc — editing it once, replying on each thread, and resolving only on request."
|
|
187
|
+
},
|
|
184
188
|
{
|
|
185
189
|
"name": "conductor:workflow",
|
|
186
190
|
"description": "Design and create a Conductor workflow — YAML automation or statechart lifecycle — via guided discovery and MCP creation."
|
|
@@ -380,7 +384,7 @@
|
|
|
380
384
|
},
|
|
381
385
|
{
|
|
382
386
|
"name": "write_document",
|
|
383
|
-
"description": "Create or update a Work Item document by filename with full content (upsert). Works headlessly — supersedes scaffold_document+Write for new documents.",
|
|
387
|
+
"description": "Create or update a Work Item document by filename with full content (upsert). Works headlessly — supersedes scaffold_document+Write for new documents. Optional baseContentHash refuses the write if the document changed since read_document.",
|
|
384
388
|
"category": "documents",
|
|
385
389
|
"requiredParams": [
|
|
386
390
|
"issueId",
|
|
@@ -399,11 +403,33 @@
|
|
|
399
403
|
]
|
|
400
404
|
},
|
|
401
405
|
{
|
|
402
|
-
"name": "
|
|
403
|
-
"description": "List
|
|
406
|
+
"name": "list_comments",
|
|
407
|
+
"description": "List comment threads on a Work Item document or project doc — open by default, each with its quote or line, author, body and replies.",
|
|
408
|
+
"category": "comments"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"name": "add_comment",
|
|
412
|
+
"description": "Start a comment thread on a document, anchored to a quoted passage or on the whole document.",
|
|
404
413
|
"category": "comments",
|
|
405
414
|
"requiredParams": [
|
|
406
|
-
"
|
|
415
|
+
"body"
|
|
416
|
+
]
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"name": "respond_to_comment",
|
|
420
|
+
"description": "Answer a comment thread — reply, resolve, reopen, or a reply plus one of those.",
|
|
421
|
+
"category": "comments",
|
|
422
|
+
"requiredParams": [
|
|
423
|
+
"commentId"
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "read_document",
|
|
428
|
+
"description": "Read a Work Item document's full text and contentHash, for a safe revise-and-write with baseContentHash.",
|
|
429
|
+
"category": "documents",
|
|
430
|
+
"requiredParams": [
|
|
431
|
+
"issueId",
|
|
432
|
+
"filename"
|
|
407
433
|
]
|
|
408
434
|
},
|
|
409
435
|
{
|
|
@@ -651,12 +677,12 @@
|
|
|
651
677
|
},
|
|
652
678
|
{
|
|
653
679
|
"name": "read_project_doc",
|
|
654
|
-
"description": "Read one project document by path or docId — full Markdown plus taskLines (every checkbox with its line number and state).",
|
|
680
|
+
"description": "Read one project document by path or docId — full Markdown, contentHash, plus taskLines (every checkbox with its line number and state).",
|
|
655
681
|
"category": "project-docs"
|
|
656
682
|
},
|
|
657
683
|
{
|
|
658
684
|
"name": "write_project_doc",
|
|
659
|
-
"description": "Create or replace a project document at a path, creating any missing folders.",
|
|
685
|
+
"description": "Create or replace a project document at a path, creating any missing folders. Optional baseContentHash refuses the write if the doc changed since read_project_doc.",
|
|
660
686
|
"category": "project-docs",
|
|
661
687
|
"requiredParams": [
|
|
662
688
|
"path",
|
|
@@ -685,28 +711,6 @@
|
|
|
685
711
|
"checked"
|
|
686
712
|
]
|
|
687
713
|
},
|
|
688
|
-
{
|
|
689
|
-
"name": "list_project_doc_comments",
|
|
690
|
-
"description": "Read the line-anchored comments humans left on a project document, unresolved by default.",
|
|
691
|
-
"category": "project-docs"
|
|
692
|
-
},
|
|
693
|
-
{
|
|
694
|
-
"name": "comment_on_project_doc",
|
|
695
|
-
"description": "Leave a comment anchored to one line of a project document.",
|
|
696
|
-
"category": "project-docs",
|
|
697
|
-
"requiredParams": [
|
|
698
|
-
"lineNumber",
|
|
699
|
-
"content"
|
|
700
|
-
]
|
|
701
|
-
},
|
|
702
|
-
{
|
|
703
|
-
"name": "respond_to_project_doc_comment",
|
|
704
|
-
"description": "Answer a comment thread on a project document — reply, resolve, or both.",
|
|
705
|
-
"category": "project-docs",
|
|
706
|
-
"requiredParams": [
|
|
707
|
-
"commentId"
|
|
708
|
-
]
|
|
709
|
-
},
|
|
710
714
|
{
|
|
711
715
|
"name": "list_project_doc_versions",
|
|
712
716
|
"description": "List a project document's edit history — version number, author and timestamp, newest first.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/commands/lint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAoDnC,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;CACd;AAED,UAAU,WAAW;IACnB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACvB,IAAI,EAAE,OAAO,CAAA;CACd;AAiCD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAY/E;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAuEtD;AAkBD,qGAAqG;AACrG,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/commands/lint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAoDnC,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;CACd;AAED,UAAU,WAAW;IACnB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACvB,IAAI,EAAE,OAAO,CAAA;CACd;AAiCD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAY/E;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAuEtD;AAkBD,qGAAqG;AACrG,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAyI1D;AA8ED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,WAAW,CA6E9E;AA4ED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0HnD"}
|
package/dist/commands/lint.js
CHANGED
|
@@ -261,6 +261,11 @@ export function validatePrdHtml(content) {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
+
// Contents: the template's outline is built from a <nav data-prd-toc>; without it a long PRD has no
|
|
265
|
+
// navigation in Conductor's review panel. A warning, not an error: older PRDs predate it.
|
|
266
|
+
if (!root.querySelector('nav[data-prd-toc]')) {
|
|
267
|
+
warnings.push(`${F}: no contents nav (<nav class="toc" data-prd-toc>); add the outline with the contents upgrade in /conductor:prd`);
|
|
268
|
+
}
|
|
264
269
|
// Self-containment: Conductor renders the page with connect-src 'none'.
|
|
265
270
|
for (const script of root.querySelectorAll('script')) {
|
|
266
271
|
const src = script.getAttribute('src');
|