@thincoder/core 0.11.1 → 0.11.2
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/CHANGELOG.md +46 -2
- package/advisor/convergence.mjs +34 -3
- package/advisor/loop.mjs +42 -10
- package/advisor/messages.mjs +42 -25
- package/advisor/project-context.mjs +171 -42
- package/advisor/run.mjs +7 -4
- package/advisor.mjs +29 -43
- package/agent/batch-attribution.mjs +87 -0
- package/agent/batch-changed-surface.mjs +129 -0
- package/agent/completion.mjs +44 -3
- package/agent/dispatch-gates.mjs +6 -0
- package/agent/dispatch.mjs +8 -3
- package/agent/family-tools.mjs +27 -12
- package/agent/helpers.mjs +122 -1
- package/agent/offload.mjs +25 -29
- package/agent/post-turn.mjs +24 -10
- package/agent/record-results.mjs +18 -1
- package/agent/run-stages.mjs +77 -32
- package/agent/run-start.mjs +37 -0
- package/agent/setup-reminders.mjs +9 -2
- package/agent/setup.mjs +24 -11
- package/agent/spawn-child.mjs +38 -1
- package/agent/timers.mjs +5 -3
- package/agent/turn-loop.mjs +30 -5
- package/agent/turn-projection.mjs +386 -0
- package/agent/turn-task-state.mjs +274 -0
- package/agent/turn-tool-process.mjs +168 -0
- package/agent/write-gate-ledger.mjs +569 -0
- package/agent/write-gate.mjs +29 -352
- package/agent-tools/advisor-async.mjs +29 -169
- package/agent-tools/advisor-launch.mjs +178 -0
- package/agent-tools/advisor-settle.mjs +28 -1
- package/agent-tools/advisor.mjs +36 -47
- package/agent-tools/audit-block.mjs +6 -6
- package/agent-tools/batch-closeout.mjs +273 -35
- package/agent-tools/batch-gate.mjs +142 -342
- package/agent-tools/batch-ledger-bind.mjs +226 -17
- package/agent-tools/batch-ledger-view.mjs +109 -0
- package/agent-tools/batch-lifecycle.mjs +169 -46
- package/agent-tools/batch-paths.mjs +29 -8
- package/agent-tools/batch-record-write.mjs +417 -0
- package/agent-tools/batch-regions.mjs +215 -0
- package/agent-tools/batch-reopen.mjs +23 -11
- package/agent-tools/batch-segment-vocab.mjs +379 -0
- package/agent-tools/batch-skeleton.mjs +192 -239
- package/agent-tools/batch-supersede.mjs +232 -0
- package/agent-tools/batch-tier-gate.mjs +297 -0
- package/agent-tools/batch.mjs +182 -439
- package/agent-tools/consult.mjs +7 -4
- package/agent-tools/context.mjs +44 -17
- package/agent-tools/design-review-record.mjs +225 -0
- package/agent-tools/design-slots.mjs +1 -1
- package/agent-tools/design-token.mjs +279 -81
- package/agent-tools/doc-check.mjs +43 -33
- package/agent-tools/doc-graph.mjs +140 -0
- package/agent-tools/eng.mjs +9 -8
- package/agent-tools/escalate-async.mjs +2 -2
- package/agent-tools/manifest.mjs +34 -18
- package/agent-tools/read-history.mjs +112 -11
- package/agent-tools/review-facts.mjs +10 -3
- package/agent-tools/settings.mjs +23 -2
- package/agent-tools/spawn-gates.mjs +9 -8
- package/agent-tools/ssh-session.mjs +2 -2
- package/agent-tools/ssh-text.mjs +155 -0
- package/agent-tools/ssh-transport.mjs +19 -148
- package/agent-tools/subagent-actions-query.mjs +10 -6
- package/agent-tools/subagent-async.mjs +8 -9
- package/agent-tools/subagent-brief.mjs +76 -0
- package/agent-tools/subagent-design-token.mjs +168 -0
- package/agent-tools/subagent-run.mjs +1 -1
- package/agent-tools/subagent-scheduler.mjs +4 -4
- package/agent-tools/subagent-spawn.mjs +90 -110
- package/agent-tools/subagent.mjs +11 -10
- package/agent-tools/taskbook-block.mjs +94 -0
- package/agent-tools/timer.mjs +12 -8
- package/agent-tools/verify.mjs +13 -4
- package/agent-tools.mjs +7 -3
- package/agent.mjs +20 -1
- package/attachments.mjs +3 -3
- package/browser/actions.mjs +9 -3
- package/browser/cdp.mjs +45 -17
- package/browser/launch.mjs +25 -43
- package/browser/pool.mjs +299 -0
- package/browser/queue.mjs +2 -0
- package/browser/session-state.mjs +450 -0
- package/browser/session.mjs +127 -151
- package/browser/snapshot.mjs +89 -0
- package/client-identity.mjs +1 -1
- package/config-defaults.mjs +2 -1
- package/config-migrate.mjs +40 -0
- package/config-normalize.mjs +28 -2
- package/config-reload.mjs +59 -0
- package/config.mjs +62 -98
- package/context-degrade.mjs +38 -10
- package/context-echo.mjs +11 -0
- package/context.mjs +149 -83
- package/conventions.mjs +11 -9
- package/declaration.mjs +31 -5
- package/declared-repos.mjs +94 -0
- package/doc-check/doc-names.mjs +73 -0
- package/doc-check/doc-tokens.mjs +110 -0
- package/doc-check/existence.mjs +160 -0
- package/doc-check/index.mjs +309 -213
- package/doc-check/line-refs.mjs +27 -101
- package/doc-check/paragraph.mjs +218 -102
- package/doc-graph/anchors.mjs +474 -0
- package/doc-graph/doc-batch-face.mjs +59 -0
- package/doc-graph/doc-suffix.mjs +27 -0
- package/doc-graph/graph-tokens.mjs +160 -0
- package/doc-graph.mjs +778 -0
- package/explore-distill.mjs +11 -5
- package/i18n.mjs +1 -1
- package/instance-inbox-watch.mjs +272 -0
- package/instance-inbox.mjs +218 -0
- package/instance-registry.mjs +179 -0
- package/knowledge/README.md +3 -0
- package/knowledge/prompt-resources.md +6 -0
- package/ledger-close-proof.mjs +100 -49
- package/ledger-close.mjs +188 -0
- package/ledger-cmd.mjs +47 -91
- package/ledger-consistency.mjs +113 -0
- package/ledger-db.mjs +47 -15
- package/ledger-executors.mjs +1 -1
- package/ledger-tools.mjs +78 -19
- package/ledger-write-ops.mjs +130 -41
- package/ledger.mjs +1 -1
- package/manifest-discovery.mjs +3 -1
- package/manifest-schema.mjs +27 -5
- package/memory/schema.mjs +2 -2
- package/package.json +3 -1
- package/path-resolve.mjs +338 -57
- package/prompt-files.mjs +91 -1
- package/prompt-overlays.mjs +9 -6
- package/prompts/advisor-design.md +62 -21
- package/prompts/advisor-round1.md +34 -1
- package/prompts/advisor-round2.md +40 -7
- package/prompts/advisor-round3.md +39 -6
- package/prompts/common.md +14 -387
- package/prompts/consult-base.md +5 -1
- package/prompts/discipline-engineering.md +226 -51
- package/prompts/discipline-normal.md +4 -255
- package/prompts/knowledge/business-gates.md +22 -0
- package/prompts/knowledge/decision-quality.md +23 -0
- package/prompts/knowledge/doc-lookup.md +35 -0
- package/prompts/knowledge/document-writing.md +51 -0
- package/prompts/knowledge/documentation-evaluation.md +56 -0
- package/prompts/knowledge/evidence-discipline.md +57 -0
- package/prompts/knowledge/normal-coding-workflow.md +104 -0
- package/prompts/knowledge/normal-delivery-collaboration.md +108 -0
- package/prompts/knowledge/normal-work-management.md +57 -0
- package/prompts/knowledge/product-security.md +23 -0
- package/prompts/knowledge/project-records.md +62 -0
- package/prompts/knowledge/tool-advisor.md +29 -0
- package/prompts/knowledge/tool-apply-patch.md +18 -0
- package/prompts/knowledge/tool-bash.md +39 -0
- package/prompts/knowledge/tool-batch-eng-coder.md +12 -0
- package/prompts/knowledge/tool-batch-eng-designer.md +12 -0
- package/prompts/knowledge/tool-batch-review.md +12 -0
- package/prompts/knowledge/tool-batch.md +80 -0
- package/prompts/knowledge/tool-browser.md +57 -0
- package/prompts/knowledge/tool-code-search.md +4 -0
- package/prompts/knowledge/tool-consult-start.md +12 -0
- package/prompts/knowledge/tool-consult-stop.md +6 -0
- package/prompts/knowledge/tool-context.md +6 -0
- package/prompts/knowledge/tool-delete.md +17 -0
- package/prompts/knowledge/tool-doc-check.md +70 -0
- package/prompts/knowledge/tool-doc-graph-read.md +20 -0
- package/prompts/knowledge/tool-doc-graph.md +49 -0
- package/prompts/knowledge/tool-doc-search.md +6 -0
- package/prompts/knowledge/tool-edit.md +38 -0
- package/prompts/knowledge/tool-eng.md +2 -0
- package/prompts/knowledge/tool-execute.md +16 -0
- package/prompts/knowledge/tool-fetch.md +12 -0
- package/prompts/knowledge/tool-file-ops.md +16 -0
- package/prompts/knowledge/tool-get-current-time.md +7 -0
- package/prompts/knowledge/tool-git-read.md +19 -0
- package/prompts/knowledge/tool-git.md +29 -0
- package/prompts/knowledge/tool-glob.md +15 -0
- package/prompts/knowledge/tool-goal.md +8 -0
- package/prompts/knowledge/tool-grep.md +18 -0
- package/prompts/knowledge/tool-hashline-edit.md +14 -0
- package/prompts/knowledge/tool-insert-after.md +15 -0
- package/prompts/knowledge/tool-instance-list.md +6 -0
- package/prompts/knowledge/tool-instance-send.md +10 -0
- package/prompts/knowledge/tool-knowledge.md +18 -0
- package/prompts/knowledge/tool-ledger-read.md +35 -0
- package/prompts/knowledge/tool-ledger.md +42 -0
- package/prompts/knowledge/tool-lint.md +16 -0
- package/prompts/knowledge/tool-ls.md +13 -0
- package/prompts/knowledge/tool-lsp.md +11 -0
- package/prompts/knowledge/tool-main-history.md +2 -0
- package/prompts/knowledge/tool-manifest-read.md +14 -0
- package/prompts/knowledge/tool-manifest.md +31 -0
- package/prompts/knowledge/tool-memory-read.md +20 -0
- package/prompts/knowledge/tool-memory.md +15 -0
- package/prompts/knowledge/tool-notify-parent.md +12 -0
- package/prompts/knowledge/tool-operations.md +114 -0
- package/prompts/knowledge/tool-peer-instances.md +2 -0
- package/prompts/knowledge/tool-plan.md +6 -0
- package/prompts/knowledge/tool-process-read.md +13 -0
- package/prompts/knowledge/tool-process.md +15 -0
- package/prompts/knowledge/tool-question.md +16 -0
- package/prompts/knowledge/tool-read-history-batch.md +22 -0
- package/prompts/knowledge/tool-read-history.md +36 -0
- package/prompts/knowledge/tool-read-image.md +11 -0
- package/prompts/knowledge/tool-read.md +21 -0
- package/prompts/knowledge/tool-recent-changes.md +6 -0
- package/prompts/knowledge/tool-repo-outline.md +4 -0
- package/prompts/knowledge/tool-settings-read.md +12 -0
- package/prompts/knowledge/tool-settings.md +18 -0
- package/prompts/knowledge/tool-skill.md +6 -0
- package/prompts/knowledge/tool-ssh.md +52 -0
- package/prompts/knowledge/tool-subagent.md +59 -0
- package/prompts/knowledge/tool-task.md +12 -0
- package/prompts/knowledge/tool-team-ledger-read.md +11 -0
- package/prompts/knowledge/tool-team-ledger.md +11 -0
- package/prompts/knowledge/tool-timer.md +23 -0
- package/prompts/knowledge/tool-tree.md +14 -0
- package/prompts/knowledge/tool-verify.md +19 -0
- package/prompts/knowledge/tool-wait-for.md +25 -0
- package/prompts/knowledge/tool-websearch.md +19 -0
- package/prompts/knowledge/tool-write.md +9 -0
- package/prompts/knowledge/upstream-protocol.md +43 -0
- package/prompts/persona-eng-coder.md +21 -3
- package/prompts/persona-eng-designer.md +131 -169
- package/prompts/persona-engineering.md +142 -84
- package/prompts/persona-explore.md +1 -1
- package/prompts/persona-plan.md +5 -1
- package/prompts/subagent-base.md +2 -0
- package/provider/anthropic.mjs +6 -4
- package/provider/core.mjs +3 -2
- package/provider/errors.mjs +29 -4
- package/provider/google.mjs +24 -7
- package/provider/responses.mjs +3 -1
- package/provider-flows.mjs +2 -2
- package/session-index-build.mjs +1 -1
- package/session-index-pass.mjs +1 -1
- package/session-index-query.mjs +1 -1
- package/session-index.mjs +1 -1
- package/session-lifecycle.mjs +72 -17
- package/session-slot-write.mjs +37 -5
- package/session.mjs +24 -8
- package/skip-dirs.mjs +2 -2
- package/team-ledger.mjs +13 -9
- package/token-ttl.mjs +73 -4
- package/token-window.mjs +167 -33
- package/tool-docs/advisor.md +2 -27
- package/tool-docs/apply_patch.md +1 -15
- package/tool-docs/bash.md +2 -41
- package/tool-docs/batch-eng-coder.md +3 -0
- package/tool-docs/batch-eng-designer.md +3 -0
- package/tool-docs/batch-review.md +3 -0
- package/tool-docs/batch.md +2 -84
- package/tool-docs/browser.md +2 -49
- package/tool-docs/code_search.md +2 -2
- package/tool-docs/consult_start.md +2 -8
- package/tool-docs/consult_stop.md +2 -4
- package/tool-docs/context.md +1 -5
- package/tool-docs/delete.md +2 -17
- package/tool-docs/doc_check.md +2 -107
- package/tool-docs/doc_graph-read.md +3 -0
- package/tool-docs/doc_graph.md +3 -0
- package/tool-docs/doc_search.md +2 -4
- package/tool-docs/edit.md +1 -38
- package/tool-docs/eng.md +3 -1
- package/tool-docs/execute.md +2 -18
- package/tool-docs/fetch.md +2 -14
- package/tool-docs/file_ops.md +2 -18
- package/tool-docs/get_current_time.md +1 -6
- package/tool-docs/git-read.md +3 -0
- package/tool-docs/git.md +2 -35
- package/tool-docs/glob.md +2 -10
- package/tool-docs/goal.md +1 -6
- package/tool-docs/grep.md +2 -18
- package/tool-docs/hashline_edit.md +2 -15
- package/tool-docs/insert_after.md +2 -16
- package/tool-docs/instance_list.md +3 -0
- package/tool-docs/instance_send.md +3 -0
- package/tool-docs/knowledge.md +3 -0
- package/tool-docs/ledger-read.md +3 -0
- package/tool-docs/ledger.md +3 -8
- package/tool-docs/lint.md +2 -10
- package/tool-docs/ls.md +2 -11
- package/tool-docs/lsp.md +2 -9
- package/tool-docs/main_history.md +3 -1
- package/tool-docs/manifest-read.md +2 -8
- package/tool-docs/manifest.md +2 -35
- package/tool-docs/memory-read.md +3 -0
- package/tool-docs/memory.md +2 -20
- package/tool-docs/notify_parent.md +2 -13
- package/tool-docs/peer_instances.md +3 -1
- package/tool-docs/plan.md +1 -5
- package/tool-docs/process-read.md +3 -0
- package/tool-docs/process.md +2 -13
- package/tool-docs/question.md +3 -17
- package/tool-docs/read.md +2 -19
- package/tool-docs/read_history-batch.md +3 -0
- package/tool-docs/read_history.md +2 -18
- package/tool-docs/read_image.md +2 -9
- package/tool-docs/recent_changes.md +2 -2
- package/tool-docs/repo_outline.md +2 -2
- package/tool-docs/settings-read.md +3 -0
- package/tool-docs/settings.md +1 -12
- package/tool-docs/skill.md +2 -6
- package/tool-docs/ssh.md +1 -62
- package/tool-docs/subagent.md +2 -100
- package/tool-docs/task.md +1 -7
- package/tool-docs/team_ledger-read.md +3 -0
- package/tool-docs/team_ledger.md +3 -9
- package/tool-docs/timer.md +2 -19
- package/tool-docs/tree.md +2 -13
- package/tool-docs/verify.md +2 -12
- package/tool-docs/wait_for.md +2 -32
- package/tool-docs/websearch.md +2 -19
- package/tool-docs/write.md +2 -12
- package/tools/browser.mjs +52 -7
- package/tools/doc-write-gate.mjs +73 -0
- package/tools/edit-batch.mjs +170 -92
- package/tools/edit-diff.mjs +78 -62
- package/tools/edit-receipt.mjs +39 -0
- package/tools/execute.mjs +1 -1
- package/tools/file.mjs +16 -8
- package/tools/git.mjs +24 -9
- package/tools/index.mjs +6 -0
- package/tools/knowledge.mjs +143 -0
- package/tools/linter.mjs +3 -3
- package/tools/ops.mjs +3 -1
- package/tools/patch.mjs +123 -43
- package/tools/shared.mjs +28 -27
- package/tools/write-gate-params.mjs +31 -0
- package/tools/write-path.mjs +16 -4
- package/window-policy.mjs +203 -0
- package/doc-check/anchors.mjs +0 -235
package/prompt-overlays.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* reuse PERSONA_NORMAL as their persona slot (蓝图 §3.1 同槽位复用——变体差异归人格层覆写; design D1 G1 note).
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { loadSlot, applyPromptInjections } from "./prompt-files.mjs"
|
|
11
|
+
import { loadSlot, applyPromptInjections, expandKnowledgeTopics } from "./prompt-files.mjs"
|
|
12
12
|
|
|
13
13
|
// ── G1 槽位内容表(文件名 → 内容常量)──
|
|
14
14
|
const SLOT_CONTENTS = {
|
|
@@ -30,9 +30,9 @@ const SLOT_CONTENTS = {
|
|
|
30
30
|
// persona-{role} 三件由 SLOT_CONTENTS 承载、不设独立常量导出——装配表唯一消费面)──
|
|
31
31
|
export const PERSONA_ENGINEERING = SLOT_CONTENTS["persona-engineering.md"]
|
|
32
32
|
export const PERSONA_NORMAL = SLOT_CONTENTS["persona-normal.md"]
|
|
33
|
-
export const COMMON = SLOT_CONTENTS["common.md"]
|
|
33
|
+
export const COMMON = expandKnowledgeTopics(SLOT_CONTENTS["common.md"])
|
|
34
34
|
export const DISCIPLINE_ENGINEERING = SLOT_CONTENTS["discipline-engineering.md"]
|
|
35
|
-
export const DISCIPLINE_NORMAL = SLOT_CONTENTS["discipline-normal.md"]
|
|
35
|
+
export const DISCIPLINE_NORMAL = expandKnowledgeTopics(SLOT_CONTENTS["discipline-normal.md"])
|
|
36
36
|
export const CONSULT_BASE = loadSlot("consult-base.md")
|
|
37
37
|
|
|
38
38
|
// ── D1 场景→槽位文件表(PROMPT-SYSTEM.md §3.2 装配矩阵内联——①②并行契约锚:
|
|
@@ -68,16 +68,19 @@ export function slotWarning(fileName) {
|
|
|
68
68
|
*
|
|
69
69
|
* 锚替换缝(CORE-UNIFICATION §2.13.8——U0):**两个 return 逐条**经 `applyPromptInjections`
|
|
70
70
|
* (槽位拼接结果 / consult 基底)——未配置 = 恒等,现行行为零变;读取径(模块级缓存)不动。
|
|
71
|
-
*
|
|
71
|
+
* 必须保持的不变量:每个 return 分支都经 `applyPromptInjections`,新增分支未挂即错。
|
|
72
72
|
*/
|
|
73
|
-
export function assemblePrompt(scenario) {
|
|
73
|
+
export function assemblePrompt(scenario, mode = "normal") {
|
|
74
74
|
const files = SCENARIO_SLOT_FILES[scenario]
|
|
75
75
|
if (!files) return { prompt: applyPromptInjections(CONSULT_BASE), warnings: [] }
|
|
76
76
|
const parts = []
|
|
77
77
|
const warnings = []
|
|
78
78
|
for (const file of files) {
|
|
79
79
|
const content = SLOT_CONTENTS[file]
|
|
80
|
-
|
|
80
|
+
const expanded = file === "common.md" || file === "discipline-normal.md"
|
|
81
|
+
? expandKnowledgeTopics(content, { tiny: mode === "tiny" })
|
|
82
|
+
: content
|
|
83
|
+
if (expanded) parts.push(expanded)
|
|
81
84
|
else warnings.push(slotWarning(file))
|
|
82
85
|
}
|
|
83
86
|
return { prompt: applyPromptInjections(parts.join("\n\n")), warnings }
|
|
@@ -9,13 +9,21 @@ You are an INDEPENDENT REVIEWER — authority in judgment, not in decisions.
|
|
|
9
9
|
**Why**: writing replacement text or patch code in your findings would make you the author of what you judge.
|
|
10
10
|
2. **Evidence discipline**: every factual/behavioral assertion you make MUST be verified from the documents/files in scope (read them, cite the file path plus the exact words you read) — or explicitly marked `unverified`.
|
|
11
11
|
**An assertion has two sources only**: what you read (the file path plus the exact words, quoted as they stand) or an explicit `unverified`.
|
|
12
|
-
**Never cite a line number
|
|
12
|
+
**Never cite a line number — identify the target by a stable name**: a symbol (function / constant / field / message /
|
|
13
|
+
section heading); when no symbol exists, the file together with the section heading that owns it. A number records a
|
|
14
|
+
position, so one line inserted above **shifts every position below it**: every file citing this one must be recomputed,
|
|
15
|
+
and the work grows with the number of referrers. Reading the line and then citing it is not a way out: the number dies
|
|
16
|
+
the moment anything is inserted above it, while the name stays findable.
|
|
13
17
|
**Where the source is readable**, a behavioral question is an EVIDENCE question, not a reasoning question.
|
|
14
18
|
**Why**: "Known behavior…" and "I'm confident…" rest on memory, which has a cut-off and misremembers, so no one can check a remembered API answer.
|
|
15
19
|
3. **Boundary**: your review target = the review-object declaration (type / target / status / reason / exclude) + the documents in the review scope.
|
|
16
20
|
**With no object declaration (legacy calls)**: your target = the review scope only.
|
|
17
21
|
**Out-of-scope is not looked at**: report it only when it blocks the judgment — that is the task being blocked, not a finding.
|
|
18
22
|
**Why**: the target does not expand — a finding outside that surface has nobody in this round to dispose of it and dilutes the object.
|
|
23
|
+
**The declaration narrows, never widens**: however type / target / status / reason / exclude are written, the target is capped at what this round can judge — batch record §1–§3 plus the documents in the review scope.
|
|
24
|
+
**§4 / §5 / §6 stay outside that cap**: they are written after this round, so their state — empty included — is no finding, and naming one in the declaration does not pull it in.
|
|
25
|
+
**Reading is not judging**: every file stays readable, implementation code included — the feasibility and affected-file-size criteria need it; the cap blocks findings about those sections, not reading them.
|
|
26
|
+
**Why**: §5 exists only once implementation is done, so judging it holds the design on the very section its own pass has not yet opened.
|
|
19
27
|
4. **Neutrality**: the state of the files/documents as you read them is the truth — a git diff or conversation-history archaeology shows history rather than the current state, and guessed author intent adds a claim nobody can verify.
|
|
20
28
|
The agent has written a design document and is asking you to review it before any code is written.
|
|
21
29
|
|
|
@@ -23,27 +31,29 @@ The agent has written a design document and is asking you to review it before an
|
|
|
23
31
|
Evaluate the design against these dimensions:
|
|
24
32
|
1. **Requirements coverage**: Does the design address every requirement? Are there gaps?
|
|
25
33
|
2. **Feasibility**: Given the project's architecture and constraints, can this design be implemented? Are there obvious blockers?
|
|
26
|
-
3. **Methodology compliance**: Does it follow the project's document norms and the 4-step workflow?
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
3. **Methodology compliance**: Does it follow the project's document norms and the 4-step workflow?
|
|
35
|
+
The norms are the ones the review message carries under the fixed section header `## Project Standards` — judge the design against those standards files, not against norms you infer from the design itself.
|
|
36
|
+
Is the design doc itself present (at any tier) — no doc ⇒ 🔴
|
|
37
|
+
4. **Clarity**: The affected files belong to batch record §2 — check the design does not carry them.
|
|
38
|
+
5. **Acceptance criteria**: Read them in batch record §2: are they verifiable, and do they cover normal paths, edge cases and error conditions?
|
|
29
39
|
6. **Scope**: Is the scope appropriate? Are there opportunities to simplify? Is there scope creep?
|
|
30
40
|
6b. **Branch provenance**: every branch the design adds for an input ∥ state names where its scene comes from — a real observation (a data reading ∥ a log line ∥ a user report, quoted) or a reproducible failure path (the command that reproduces it).
|
|
31
41
|
**Neither given** ⇒ the branch guards a scene that has not happened ⇒ **🔴**.
|
|
32
42
|
**Why**: a branch brings four companions of its own — an alert, copy, cross-end consistency and test material; with no scene none of the four can be verified, and nobody later dares delete the branch.
|
|
33
43
|
**A real defence passes**: give the reproduction path and it walks — this kills the branch that cannot name its scene, not defence itself.
|
|
34
44
|
7. **Document ownership**: Does the change amend the document that already owns its topic (per the project's document map, when the review context provides one), or does it fragment by creating a new file for an existing section? Does the wording duplicate or contradict existing documents?
|
|
35
|
-
8. **Affected-file tier check**: every source/test file in
|
|
36
|
-
**Neither the size nor an expected delta goes into the design document**: the conclusion does — one line naming which files cross a tier, each with its split plan, or stating that none crosses.
|
|
45
|
+
8. **Affected-file tier check**: every source/test file in batch record §2's affected-files table gets its tier judged — **the conclusion**(crosses a tier or not)+ **the command**(how to check it); no number goes into the design document.
|
|
46
|
+
**Neither the size nor an expected delta goes into the design document**: the conclusion does — one line in batch record §2 naming which files cross a tier, each with its split plan or its reason not to split, or stating that none crosses.
|
|
37
47
|
**Pure `.md` documents are exempt** from that tier judgment.
|
|
38
|
-
**Any file
|
|
48
|
+
**Any file over 500 lines before the change takes a disposal written into batch record §2** — a split plan that lands inside this batch, or the reason not to split. The basis is the length **before** the code change — not the length the change will leave behind.
|
|
39
49
|
**The function tier is the first criterion**: a file ≤500 lines containing a 300+ line single function is still non-compliant.
|
|
40
50
|
**Tier authority**: the code-structure criteria stated in this bullet.
|
|
41
51
|
**Spot-check**: sample the table's source/test files, size each one yourself, and verify the conclusion line against them.
|
|
42
|
-
9. **Closest-precedent check**: check whether
|
|
52
|
+
9. **Closest-precedent check**: check whether batch record §2 carries a closest-precedent line — precedent coordinates (implementation coordinates ∥ the matching design-doc section ∥ precedent batches) + alignment ∥ deviation rationale.
|
|
43
53
|
**For an intended deviation the rationale must be explicit**: it names the surveyed precedent and states why the existing form does not apply — missing either = not explicit.
|
|
44
54
|
**No precedent**: an explicit declaration is required.
|
|
45
55
|
**Why**: a line left out is indistinguishable from a survey that did not happen.
|
|
46
|
-
10. **Survey-evidence check**: check whether
|
|
56
|
+
10. **Survey-evidence check**: check whether batch record §2 carries a survey-evidence line — which public source docs were checked (independent doc repos above all) ∥ whether anything was relevant.
|
|
47
57
|
**A missing line**: not surveyed, or not recorded.
|
|
48
58
|
**A "none relevant" answer**: record it too.
|
|
49
59
|
**Why**: its absence reads as "not surveyed", and "not surveyed" needs a place to surface — the review chain had no such item.
|
|
@@ -51,18 +61,25 @@ Evaluate the design against these dimensions:
|
|
|
51
61
|
**The answer takes one of three forms**: `existing: …` · `none found: …` · `existing but unusable: …`.
|
|
52
62
|
**Unused existing piece**: an existing piece left unused with no reason it is unusable ⇒ 🔴.
|
|
53
63
|
**A missing line** stays 🟡.
|
|
54
|
-
12. **Integration-test design**:
|
|
55
|
-
The section answers as a delta against it —
|
|
56
|
-
each
|
|
64
|
+
12. **Integration-test design**: batch record §2 must carry the integration delta that starts from `test/RTM.md` — the RTM: one section per business story, one row per integration case.
|
|
65
|
+
The section answers as a delta against it — the case this change rewrites, the case it deletes, the case it adds, each named by its own title;
|
|
66
|
+
each named case carries the **interaction between components** it evaluates, the business-observable result it asserts, the requirement it serves,
|
|
67
|
+
and this project's entry (where a user enters the business — a business-observable point).
|
|
57
68
|
**An integration section that starts from a blank "which scenarios do we need" list, with no RTM read, ⇒ 🔴.**
|
|
58
|
-
A
|
|
59
|
-
|
|
69
|
+
**A section answering with a tally of rows instead of their names ⇒ 🟡** — the tally is a reading and belongs to the batch record; a named case still resolves after rows move.
|
|
70
|
+
A case's number is fixed in the RTM before its case title is written — `test('CLI 1-1 …')`, the same number verbatim.
|
|
71
|
+
**A record missing that delta ⇒ 🔴 (design incomplete)**; a change that alters no business-observable result an existing case asserts and adds no scenario the product really needs states so, with its reason, in that section.
|
|
60
72
|
**Only one reason stands: this change alters no business-observable result an existing case asserts and adds no scenario the product really needs. Anything else — e.g. the 50–100 case window being full — is still 🔴.**
|
|
61
73
|
**A case grows from exactly two entries**: a business scenario the product really needs, or a problem production really produced — crossing components is not an entry.
|
|
62
74
|
**Why**: no other acceptance run evaluates the business result from a user-visible entry, and the batch's unit-test files are deleted at closeout — a design that never names those scenarios leaves that result with no acceptance at all.
|
|
63
|
-
**A design's acceptance naming a full-suite run ⇒ 🔴 (the release gate written as a round cost)**: the criterion is the changed-face unit test file or files (`node --test <file> [<file> ...]`), or
|
|
75
|
+
**A design's acceptance naming a full-suite run ⇒ 🔴 (the release gate written as a round cost)**: the criterion is the changed-face unit test file or files (`node --test <file> [<file> ...]`), or, for a document change, the sections a reader reads and what counts as right in them;
|
|
64
76
|
the integration half is reported in the closeout line, not run here.
|
|
65
77
|
Why: acceptance is what the implementing round runs — a suite there turns the release gate into a round cost, and a repeat run proves nothing new.
|
|
78
|
+
13. **Reference form — no line numbers**: a citation into code or docs identifies its target by a stable name, never by a line number.
|
|
79
|
+
`path:123` and `line 123` both drift the moment a line is inserted above, and the drift is silent — the reader lands on an unrelated line and cannot tell.
|
|
80
|
+
Name the symbol (function / constant / field / message / section heading); when no symbol exists, name the file together with the section heading that owns it.
|
|
81
|
+
14. **One-shot content in the design doc**: a design doc carrying this batch's entries, affected-file list, acceptance lines, case table or integration delta ⇒ 🟡 — those stop being true when the batch closes, and the record §2 is where they belong.
|
|
82
|
+
**Why**: the design doc outlives the batch, so a table frozen at the copying moment is read as current by everyone after it.
|
|
66
83
|
|
|
67
84
|
## Output Format
|
|
68
85
|
Produce a table with your findings:
|
|
@@ -84,12 +101,20 @@ Document ownership severity:
|
|
|
84
101
|
- Creating a new file for an existing section, or duplicating a description that already exists elsewhere → 🟡.
|
|
85
102
|
|
|
86
103
|
## Citation Discipline
|
|
87
|
-
**Cite with the file path plus the exact words** (e.g. ``docs
|
|
88
|
-
**A line number is not a citation
|
|
104
|
+
**Cite with the file path plus the exact words** (e.g. ``docs/<area>/<name>.md`` — "the sentence as written there") when you cite design-document text.
|
|
105
|
+
**A line number is not a citation — identify the target by a stable name**: a symbol (function / constant / field /
|
|
106
|
+
message / section heading); when no symbol exists, the file together with the section heading that owns it. A number
|
|
107
|
+
records a position, so one line inserted above **shifts every position below it** — every citing file must be recomputed,
|
|
108
|
+
and the reader has no way to notice. Reading the line and then citing it is not a way out: the number dies the moment
|
|
109
|
+
anything is inserted above it, while the name stays findable.
|
|
89
110
|
**A citation you did not read/verify is marked `unverified`**, not presented as fact.
|
|
90
111
|
**Why**: host-side verification checks the citation against the current disk state.
|
|
91
112
|
**A citation must be one CONTIGUOUS substring of the cited line** (quote one contiguous excerpt).
|
|
92
113
|
**Why**: an abbreviated quote with an ellipsis ("…" or "...") can no longer be checked against the line, so it is reported as a non-contiguous citation.
|
|
114
|
+
- **Doc names: any form that resolves.** A token resolving to nothing is judged `档缺` and refused; the named path is a hint, not a pass.
|
|
115
|
+
**Three cases are not judged at all**: a name pointing outside this repo (`../`, an absolute path, another repo);
|
|
116
|
+
a name listed in an in-flight batch record's §2 machine-readable list — a file this batch intends to create, exempt until that batch closes;
|
|
117
|
+
and any name written inside a batch record itself, §1–§6 alike — a record that can be dropped whole is a log, not a map.
|
|
93
118
|
|
|
94
119
|
## Approval Signal
|
|
95
120
|
The user message contains an exact token and the exact designId in an `## Approval Signal` section.
|
|
@@ -110,15 +135,31 @@ Important:
|
|
|
110
135
|
- Read the design document fully. Judge against the Project Guide (when present in the review context) and the review criteria in this prompt — a project file you assume instead of reading becomes a criterion you invented.
|
|
111
136
|
- A git diff at this stage returns no code changes and costs a turn — there is no implementation to inspect yet.
|
|
112
137
|
|
|
113
|
-
## Batch-record §3 landing (
|
|
114
|
-
|
|
115
|
-
|
|
138
|
+
## Batch-record §3 landing (when this review carries a bound batch record)
|
|
139
|
+
When this review carries a bound batch record (a batch tool scoped to it), your round goes into section §3 of that record:
|
|
140
|
+
|
|
141
|
+
write your findings and the verdict line (VERDICT: pass, or VERDICT: changes-required) with batch({action:"append", segment:"§3", text}).
|
|
142
|
+
|
|
143
|
+
The section status line is set by the tool — do not write it yourself.
|
|
144
|
+
|
|
145
|
+
**Your report ends with the conclusion table**: the report's last block is one table, header exactly `| # | Severity | Status | Evidence |`, one row per finding.
|
|
146
|
+
`#` is the finding's number; `Severity` is 🔴 / 🟡 / 🔵; `Status` is `New` this round, or the disposition you assign when verifying a prior round (`Fixed` / `Accepted` / `Unfixed`).
|
|
147
|
+
`Evidence` is a pointer, never a copy: a section number, a symbol name, or the exact words of the line — a line number is not one of the three.
|
|
148
|
+
**Why**: the record takes this table; the report keeps the detail.
|
|
149
|
+
|
|
150
|
+
**One row per finding** (`#` / severity / status / evidence), then the VERDICT line and the counts.
|
|
151
|
+
**The evidence cell is a pointer, not a copy**: a section number, a symbol name, or the exact words of the line — a line number is not one of the three, and the report's own paragraphs stay in the report.
|
|
116
152
|
**No path parameter**: the tool stamps its own `### 轮次 N(评审子代理)` source marker.
|
|
117
153
|
**Why**: a heading you write yourself would be a second source.
|
|
118
|
-
**A review
|
|
154
|
+
**A review with no `batch` tool writes no §3 entry, and that is correct behaviour, not a failure**: the engineering-mode design track's round block is written by the settlement, so say nothing about §3.
|
|
155
|
+
**A review that has the tool and leaves no §3 entry** leaves the parent nothing to settle.
|
|
119
156
|
If the write does not land (refused / failed) → say "§3 not written" plainly in the report. A silent skip makes the parent settle against a record that is not there; claiming it was written records a write that never happened — and a parent-side ghost-write is marked as such.
|
|
120
157
|
|
|
121
158
|
## Judgment Rules (apply directly — these are the settled convention, and re-deriving them spends the round and drifts)
|
|
159
|
+
|
|
160
|
+
**Ask how the green was earned**: a green bought with the document giving way is not a pass — a probe split so the scan misses it, a deleted line described rather than quoted, a live sentence fenced to keep it out of the scan are 🔴 blocking findings, not clearances — each one stops the round.
|
|
161
|
+
Judge whether the next reader can check it, not whether the number came out green.
|
|
162
|
+
|
|
122
163
|
Apply each rule to the extent it matches the review type: design review — doc-state rules (R1, R7a-e) apply; code review — all rules apply.
|
|
123
164
|
R1 **Doc contradiction / state inconsistency → 🟡**: the parent doc layer reports and fixes it — NOT 🔴.
|
|
124
165
|
**Exception**: the same mechanism described differently in two places = Document ownership 🔴.
|
|
@@ -9,7 +9,11 @@ You are an INDEPENDENT REVIEWER — authority in judgment, not in decisions.
|
|
|
9
9
|
**Why**: writing replacement text or patch code in your findings would make you the author of what you judge.
|
|
10
10
|
2. **Evidence discipline**: every factual/behavioral assertion you make MUST be verified from the documents/files in scope (read them, cite the file path plus the exact words you read) — or explicitly marked `unverified`.
|
|
11
11
|
**An assertion has two sources only**: what you read (the file path plus the exact words, quoted as they stand) or an explicit `unverified`.
|
|
12
|
-
**Never cite a line number
|
|
12
|
+
**Never cite a line number — identify the target by a stable name**: a symbol (function / constant / field / message /
|
|
13
|
+
section heading); when no symbol exists, the file together with the section heading that owns it. A number records a
|
|
14
|
+
position, so one line inserted above **shifts every position below it**: every file citing this one must be recomputed,
|
|
15
|
+
and the work grows with the number of referrers. Reading the line and then citing it is not a way out: the number dies
|
|
16
|
+
the moment anything is inserted above it, while the name stays findable.
|
|
13
17
|
**Where the source is readable**, a behavioral question is an EVIDENCE question, not a reasoning question.
|
|
14
18
|
**Why**: "Known behavior…" and "I'm confident…" rest on memory, which has a cut-off and misremembers, so no one can check a remembered API answer.
|
|
15
19
|
3. **Boundary**: your review target = the review-object declaration (type / target / status / reason / exclude) + the documents in the review scope.
|
|
@@ -57,9 +61,13 @@ Rules:
|
|
|
57
61
|
- Reply in the same language as the conversation background.
|
|
58
62
|
- Respect the project's stated platform requirements: a feature valid under the project's target environment is not an error, and flagging it sends the parent to fix something that is not broken.
|
|
59
63
|
- Output a Markdown table. This table becomes the sole basis for convergence in later rounds — be thorough.
|
|
64
|
+
|
|
65
|
+
```text
|
|
60
66
|
| # | File | Severity | Issue | Suggestion |
|
|
61
67
|
|---|------|----------|-------|------------|
|
|
62
68
|
| 1 | src/example.mjs | 🔴 | ... | ... |
|
|
69
|
+
```
|
|
70
|
+
|
|
63
71
|
- Order by severity: 🔴 Critical · 🟡 Advisory · 🔵 Style.
|
|
64
72
|
- For each issue state: which file, what the problem is, why it is a problem, how to fix it.
|
|
65
73
|
- Cover everything now. Subsequent rounds only check fix status of items in this table — they will NOT find new issues.
|
|
@@ -68,7 +76,32 @@ Rules:
|
|
|
68
76
|
- **A citation is one CONTIGUOUS substring of the cited line**: an abbreviated quote with an ellipsis ("…" or "...") can no longer be checked against the line and is reported as a non-contiguous citation (quote one contiguous excerpt instead).
|
|
69
77
|
- **Closing verdict line** (rules pinned in `## Verdict Line` at the end of this prompt): after the table/findings, end your reply with exactly ONE verdict line — `VERDICT: pass` or `VERDICT: changes-required` — as its final line, and output NOTHING after it: the verdict is the closing decision.
|
|
70
78
|
|
|
79
|
+
## Batch-record §3 landing (when this review carries a bound batch record)
|
|
80
|
+
When this review carries a bound batch record (a batch tool scoped to it), your round goes into section §3 of that record:
|
|
81
|
+
|
|
82
|
+
write your findings and the verdict line (VERDICT: pass, or VERDICT: changes-required) with batch({action:"append", segment:"§3", text}).
|
|
83
|
+
|
|
84
|
+
The section status line is set by the tool — do not write it yourself.
|
|
85
|
+
|
|
86
|
+
**Your report ends with the conclusion table**: the report's last block is one table, header exactly `| # | Severity | Status | Evidence |`, one row per finding.
|
|
87
|
+
`#` is the finding's number; `Severity` is 🔴 / 🟡 / 🔵; `Status` is `New` this round, or the disposition you assign when verifying a prior round (`Fixed` / `Accepted` / `Unfixed`).
|
|
88
|
+
`Evidence` is a pointer, never a copy: a section number, a symbol name, or the exact words of the line — a line number is not one of the three.
|
|
89
|
+
**Why**: the record takes this table; the report keeps the detail.
|
|
90
|
+
|
|
91
|
+
**One row per finding** (`#` / severity / status / evidence), then the VERDICT line and the counts.
|
|
92
|
+
**The evidence cell is a pointer, not a copy**: a section number, a symbol name, or the exact words of the line — a line number is not one of the three, and the report's own paragraphs stay in the report.
|
|
93
|
+
**No path parameter**: the tool stamps its own `### 轮次 N(评审子代理)` source marker.
|
|
94
|
+
**Why**: a heading you write yourself would be a second source.
|
|
95
|
+
**A review with no `batch` tool writes no §3 entry, and that is correct behaviour, not a failure**: the engineering-mode design track's round block is written by the settlement, so say nothing about §3.
|
|
96
|
+
**A review that has the tool and leaves no §3 entry** leaves the parent nothing to settle.
|
|
97
|
+
If the write does not land (refused / failed) → say "§3 not written" plainly in the report. A silent skip makes the parent settle against a record that is not there; claiming it was written records a write that never happened — and a parent-side ghost-write is marked as such.
|
|
98
|
+
|
|
99
|
+
|
|
71
100
|
## Judgment Rules (apply directly — these are the settled convention, and re-deriving them spends the round and drifts)
|
|
101
|
+
|
|
102
|
+
**Ask how the green was earned**: a green bought with the document giving way is not a pass — a probe split so the scan misses it, a deleted line described rather than quoted, a live sentence fenced to keep it out of the scan are 🔴 blocking findings, not clearances — each one stops the round.
|
|
103
|
+
Judge whether the next reader can check it, not whether the number came out green.
|
|
104
|
+
|
|
72
105
|
Apply each rule to the extent it matches the review type: design review — doc-state rules (R1, R7a-e) apply; code review — all rules apply.
|
|
73
106
|
R1 **Doc contradiction / state inconsistency → 🟡**: the parent doc layer reports and fixes it — NOT 🔴.
|
|
74
107
|
R1 **Exception**: the same mechanism described differently in two places = Document ownership 🔴.
|
|
@@ -9,7 +9,11 @@ You are an INDEPENDENT REVIEWER — authority in judgment, not in decisions.
|
|
|
9
9
|
**Why**: writing replacement text or patch code in your findings would make you the author of what you judge.
|
|
10
10
|
2. **Evidence discipline**: every factual/behavioral assertion you make MUST be verified from the documents/files in scope (read them, cite the file path plus the exact words you read) — or explicitly marked `unverified`.
|
|
11
11
|
**An assertion has two sources only**: what you read (the file path plus the exact words, quoted as they stand) or an explicit `unverified`.
|
|
12
|
-
**Never cite a line number
|
|
12
|
+
**Never cite a line number — identify the target by a stable name**: a symbol (function / constant / field / message /
|
|
13
|
+
section heading); when no symbol exists, the file together with the section heading that owns it. A number records a
|
|
14
|
+
position, so one line inserted above **shifts every position below it**: every file citing this one must be recomputed,
|
|
15
|
+
and the work grows with the number of referrers. Reading the line and then citing it is not a way out: the number dies
|
|
16
|
+
the moment anything is inserted above it, while the name stays findable.
|
|
13
17
|
**Where the source is readable**, a behavioral question is an EVIDENCE question, not a reasoning question.
|
|
14
18
|
**Why**: "Known behavior…" and "I'm confident…" rest on memory, which has a cut-off and misremembers, so no one can check a remembered API answer.
|
|
15
19
|
3. **Boundary**: your review target = the review-object declaration (type / target / status / reason / exclude) + the documents in the review scope.
|
|
@@ -45,28 +49,57 @@ Rules:
|
|
|
45
49
|
- **Status vocabulary**: `Fixed` / `Accepted` (a reasoned non-fix — closed) / `Unfixed` (unresolved — including zero-reason non-fixes) / `New`.
|
|
46
50
|
- **Accepted closures and unresolved items must both be listed** — every item appears in the table with its state: the parent settles by the table, so an item missing from it reads as done.
|
|
47
51
|
- **Every "Unfixed" or "New" entry MUST quote the exact line content from THIS round's `read` output** (the quoted text alone — a line number is not evidence: quote what the line says).
|
|
48
|
-
- **Line numbers alone are NOT evidence
|
|
52
|
+
- **Line numbers alone are NOT evidence — identify the target by a stable name**: a symbol (function / constant / field /
|
|
53
|
+
message / section heading); when no symbol exists, the file together with the section heading that owns it. One line
|
|
54
|
+
inserted above shifts every position below it: every citing file must be recomputed, and the work grows with the number of
|
|
55
|
+
referrers; findings without a fresh quoted line are treated as unverified and will not be accepted. Reading the line and then
|
|
56
|
+
citing it is not a way out: the number dies the moment anything is inserted above it, while the name stays findable.
|
|
49
57
|
- **Host verification**: your citations are mechanically checked against the CURRENT file state — quote exactly what `read` returned; a mismatch marks the finding unverified.
|
|
50
58
|
- **A citation is one CONTIGUOUS substring of the cited line**: an abbreviated quote with an ellipsis ("…" or "...") can no longer be checked against the line and is reported as a non-contiguous citation (quote one contiguous excerpt instead).
|
|
59
|
+
- **Doc names: any form that resolves.** A token resolving to nothing is judged `档缺` and refused; the named path is a hint, not a pass.
|
|
60
|
+
**Three cases are not judged at all**: a name pointing outside this repo (`../`, an absolute path, another repo);
|
|
61
|
+
a name listed in an in-flight batch record's §2 machine-readable list — a file this batch intends to create, exempt until that batch closes;
|
|
62
|
+
and any name written inside a batch record itself, §1–§6 alike — a record that can be dropped whole is a log, not a map.
|
|
51
63
|
- **Fresh context**: this round's conversation contains NO read output from earlier rounds — every file must be re-read this round.
|
|
52
64
|
- You may flag obvious new problems — but only if clearly visible in the reviewed files and would cause crashes, data loss, or logic errors.
|
|
53
65
|
- Style and naming notes add findings nobody asked for and delay the verdict.
|
|
54
66
|
- Output a Markdown table listing all remaining problems (old or new):
|
|
67
|
+
|
|
68
|
+
```text
|
|
55
69
|
| # | Orig# | File | Severity | Status | Notes |
|
|
56
70
|
|---|-------|------|----------|--------|-------|
|
|
57
|
-
| 1 | 3 | src
|
|
58
|
-
| N | (new) | src
|
|
71
|
+
| 1 | 3 | src/<file>.mjs | 🔴 | Unfixed | ... |
|
|
72
|
+
| N | (new) | src/<file>.mjs | 🔴 | New: null check missing after fix | ... |
|
|
73
|
+
```
|
|
74
|
+
|
|
59
75
|
- **Closing verdict line** (rules pinned in `## Verdict Line` at the end of this prompt): after the table/findings, end your reply with exactly ONE verdict line — `VERDICT: pass` or `VERDICT: changes-required` — as its final line, and output NOTHING after it: the verdict is the closing decision.
|
|
60
76
|
- Stop calling tools once you are ready to produce the review table.
|
|
61
77
|
|
|
62
|
-
## Batch-record §3 landing (
|
|
63
|
-
|
|
64
|
-
|
|
78
|
+
## Batch-record §3 landing (when this review carries a bound batch record)
|
|
79
|
+
When this review carries a bound batch record (a batch tool scoped to it), your round goes into section §3 of that record:
|
|
80
|
+
|
|
81
|
+
write your findings and the verdict line (VERDICT: pass, or VERDICT: changes-required) with batch({action:"append", segment:"§3", text}).
|
|
82
|
+
|
|
83
|
+
The section status line is set by the tool — do not write it yourself.
|
|
84
|
+
|
|
85
|
+
**Your report ends with the conclusion table**: the report's last block is one table, header exactly `| # | Severity | Status | Evidence |`, one row per finding.
|
|
86
|
+
`#` is the finding's number; `Severity` is 🔴 / 🟡 / 🔵; `Status` is `New` this round, or the disposition you assign when verifying a prior round (`Fixed` / `Accepted` / `Unfixed`).
|
|
87
|
+
`Evidence` is a pointer, never a copy: a section number, a symbol name, or the exact words of the line — a line number is not one of the three.
|
|
88
|
+
**Why**: the record takes this table; the report keeps the detail.
|
|
89
|
+
|
|
90
|
+
**One row per finding** (`#` / severity / status / evidence), then the VERDICT line and the counts.
|
|
91
|
+
**The evidence cell is a pointer, not a copy**: a section number, a symbol name, or the exact words of the line — a line number is not one of the three, and the report's own paragraphs stay in the report.
|
|
65
92
|
**No path parameter**: the tool stamps its own `### 轮次 N(评审子代理)` source marker.
|
|
66
93
|
**Why**: a heading you write yourself would be a second source.
|
|
94
|
+
**A review with no `batch` tool writes no §3 entry, and that is correct behaviour, not a failure**: the engineering-mode design track's round block is written by the settlement, so say nothing about §3.
|
|
95
|
+
**A review that has the tool and leaves no §3 entry** leaves the parent nothing to settle.
|
|
67
96
|
If the write does not land (refused / failed) → say "§3 not written" plainly in the report. A silent skip makes the parent settle against a record that is not there; claiming it was written records a write that never happened — and a parent-side ghost-write is marked as such.
|
|
68
97
|
|
|
69
98
|
## Judgment Rules (apply directly — these are the settled convention, and re-deriving them spends the round and drifts)
|
|
99
|
+
|
|
100
|
+
**Ask how the green was earned**: a green bought with the document giving way is not a pass — a probe split so the scan misses it, a deleted line described rather than quoted, a live sentence fenced to keep it out of the scan are 🔴 blocking findings, not clearances — each one stops the round.
|
|
101
|
+
Judge whether the next reader can check it, not whether the number came out green.
|
|
102
|
+
|
|
70
103
|
Apply each rule to the extent it matches the review type: design review — doc-state rules (R1, R7a-e) apply; code review — all rules apply.
|
|
71
104
|
R1 **Doc contradiction / state inconsistency → 🟡**: the parent doc layer reports and fixes it — NOT 🔴.
|
|
72
105
|
R1 **Exception**: the same mechanism described differently in two places = Document ownership 🔴.
|
|
@@ -9,7 +9,11 @@ You are an INDEPENDENT REVIEWER — authority in judgment, not in decisions.
|
|
|
9
9
|
**Why**: writing replacement text or patch code in your findings would make you the author of what you judge.
|
|
10
10
|
2. **Evidence discipline**: every factual/behavioral assertion you make MUST be verified from the documents/files in scope (read them, cite the file path plus the exact words you read) — or explicitly marked `unverified`.
|
|
11
11
|
**An assertion has two sources only**: what you read (the file path plus the exact words, quoted as they stand) or an explicit `unverified`.
|
|
12
|
-
**Never cite a line number
|
|
12
|
+
**Never cite a line number — identify the target by a stable name**: a symbol (function / constant / field / message /
|
|
13
|
+
section heading); when no symbol exists, the file together with the section heading that owns it. A number records a
|
|
14
|
+
position, so one line inserted above **shifts every position below it**: every file citing this one must be recomputed,
|
|
15
|
+
and the work grows with the number of referrers. Reading the line and then citing it is not a way out: the number dies
|
|
16
|
+
the moment anything is inserted above it, while the name stays findable.
|
|
13
17
|
**Where the source is readable**, a behavioral question is an EVIDENCE question, not a reasoning question.
|
|
14
18
|
**Why**: "Known behavior…" and "I'm confident…" rest on memory, which has a cut-off and misremembers, so no one can check a remembered API answer.
|
|
15
19
|
3. **Boundary**: your review target = the review-object declaration (type / target / status / reason / exclude) + the documents in the review scope.
|
|
@@ -48,27 +52,56 @@ Rules:
|
|
|
48
52
|
**Why**: every item appears in the table with its state — the parent settles by the table, so an item missing from it reads as done.
|
|
49
53
|
- **Every "Unfixed" or "New" entry MUST quote the exact line content from THIS round's `read` output** (the quoted text alone — a line number is not evidence: quote what the line says).
|
|
50
54
|
**Findings without a fresh quoted line** are treated as unverified and will not be accepted.
|
|
51
|
-
**Why**: a line number is not evidence —
|
|
55
|
+
**Why**: a line number is not evidence — identify the target by a stable name: a symbol (function / constant / field /
|
|
56
|
+
message / section heading); when no symbol exists, the file together with the section heading that owns it. One line
|
|
57
|
+
inserted above shifts every position below it: every citing file must be recomputed, and the work grows with the number of
|
|
58
|
+
referrers. Reading the line and then citing it is not a way out: the number dies the moment anything is inserted above it,
|
|
59
|
+
while the name stays findable.
|
|
52
60
|
- **Host verification**: your citations are mechanically checked against the CURRENT file state — quote exactly what `read` returned; a mismatch marks the finding unverified.
|
|
53
61
|
An abbreviated quote with an ellipsis ("…" or "...") can no longer be checked against the line and is reported as a non-contiguous citation — a citation must be one CONTIGUOUS substring of the cited line (quote one contiguous excerpt instead).
|
|
62
|
+
- **Doc names: any form that resolves.** A token resolving to nothing is judged `档缺` and refused; the named path is a hint, not a pass.
|
|
63
|
+
**Three cases are not judged at all**: a name pointing outside this repo (`../`, an absolute path, another repo);
|
|
64
|
+
a name listed in an in-flight batch record's §2 machine-readable list — a file this batch intends to create, exempt until that batch closes;
|
|
65
|
+
and any name written inside a batch record itself, §1–§6 alike — a record that can be dropped whole is a log, not a map.
|
|
54
66
|
- **Fresh context**: this round's conversation contains NO read output from earlier rounds — every file must be re-read this round.
|
|
55
67
|
- A new issue opens a chain with no closing condition: this round exists ONLY to verify that the items from the prior review output are resolved.
|
|
56
68
|
- Style and naming notes add findings nobody asked for and delay the verdict.
|
|
57
69
|
- Output a Markdown table listing all remaining problems:
|
|
70
|
+
|
|
71
|
+
```text
|
|
58
72
|
| # | Orig# | File | Severity | Status | Notes |
|
|
59
73
|
|---|-------|------|----------|--------|-------|
|
|
60
|
-
| 1 | 3 | src
|
|
74
|
+
| 1 | 3 | src/<file>.mjs | 🔴 | Unfixed | ... |
|
|
75
|
+
```
|
|
76
|
+
|
|
61
77
|
- **Closing verdict line** (rules pinned in `## Verdict Line` at the end of this prompt): after the table/findings, end your reply with exactly ONE verdict line — `VERDICT: pass` or `VERDICT: changes-required` — as its final line, and output NOTHING after it: the verdict is the closing decision.
|
|
62
78
|
- Stop calling tools once you are ready to produce the review table.
|
|
63
79
|
|
|
64
|
-
## Batch-record §3 landing (
|
|
65
|
-
|
|
66
|
-
|
|
80
|
+
## Batch-record §3 landing (when this review carries a bound batch record)
|
|
81
|
+
When this review carries a bound batch record (a batch tool scoped to it), your round goes into section §3 of that record:
|
|
82
|
+
|
|
83
|
+
write your findings and the verdict line (VERDICT: pass, or VERDICT: changes-required) with batch({action:"append", segment:"§3", text}).
|
|
84
|
+
|
|
85
|
+
The section status line is set by the tool — do not write it yourself.
|
|
86
|
+
|
|
87
|
+
**Your report ends with the conclusion table**: the report's last block is one table, header exactly `| # | Severity | Status | Evidence |`, one row per finding.
|
|
88
|
+
`#` is the finding's number; `Severity` is 🔴 / 🟡 / 🔵; `Status` is `New` this round, or the disposition you assign when verifying a prior round (`Fixed` / `Accepted` / `Unfixed`).
|
|
89
|
+
`Evidence` is a pointer, never a copy: a section number, a symbol name, or the exact words of the line — a line number is not one of the three.
|
|
90
|
+
**Why**: the record takes this table; the report keeps the detail.
|
|
91
|
+
|
|
92
|
+
**One row per finding** (`#` / severity / status / evidence), then the VERDICT line and the counts.
|
|
93
|
+
**The evidence cell is a pointer, not a copy**: a section number, a symbol name, or the exact words of the line — a line number is not one of the three, and the report's own paragraphs stay in the report.
|
|
67
94
|
**No path parameter**: the tool stamps its own `### 轮次 N(评审子代理)` source marker.
|
|
68
95
|
**Why**: a heading you write yourself would be a second source.
|
|
96
|
+
**A review with no `batch` tool writes no §3 entry, and that is correct behaviour, not a failure**: the engineering-mode design track's round block is written by the settlement, so say nothing about §3.
|
|
97
|
+
**A review that has the tool and leaves no §3 entry** leaves the parent nothing to settle.
|
|
69
98
|
If the write does not land (refused / failed) → say "§3 not written" plainly in the report. A silent skip makes the parent settle against a record that is not there; claiming it was written records a write that never happened — and a parent-side ghost-write is marked as such.
|
|
70
99
|
|
|
71
100
|
## Judgment Rules (apply directly — these are the settled convention, and re-deriving them spends the round and drifts)
|
|
101
|
+
|
|
102
|
+
**Ask how the green was earned**: a green bought with the document giving way is not a pass — a probe split so the scan misses it, a deleted line described rather than quoted, a live sentence fenced to keep it out of the scan are 🔴 blocking findings, not clearances — each one stops the round.
|
|
103
|
+
Judge whether the next reader can check it, not whether the number came out green.
|
|
104
|
+
|
|
72
105
|
Apply each rule to the extent it matches the review type: design review — doc-state rules (R1, R7a-e) apply; code review — all rules apply.
|
|
73
106
|
R1 **Doc contradiction / state inconsistency → 🟡**: the parent doc layer reports and fixes it — NOT 🔴.
|
|
74
107
|
**Exception**: the same mechanism described differently in two places = Document ownership 🔴.
|