@thincoder/core 0.11.1 → 0.11.3
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 +64 -2
- package/advisor/compaction.mjs +7 -5
- package/advisor/convergence.mjs +34 -3
- package/advisor/history.mjs +24 -11
- package/advisor/loop.mjs +49 -12
- package/advisor/messages.mjs +114 -33
- package/advisor/project-context.mjs +171 -42
- package/advisor/run.mjs +24 -10
- package/advisor.mjs +36 -46
- package/agent/batch-attribution.mjs +87 -0
- package/agent/batch-changed-surface.mjs +129 -0
- package/agent/chat-call.mjs +14 -9
- package/agent/completion.mjs +70 -41
- package/agent/continue-decision.mjs +14 -8
- package/agent/digest-account.mjs +133 -59
- package/agent/dispatch-gates.mjs +6 -0
- package/agent/dispatch-run.mjs +1 -1
- package/agent/dispatch.mjs +10 -4
- package/agent/family-tools.mjs +37 -23
- package/agent/helpers.mjs +139 -73
- package/agent/image-heal.mjs +18 -4
- package/agent/offload.mjs +25 -29
- package/agent/post-turn.mjs +36 -35
- package/agent/record-results.mjs +39 -7
- package/agent/run-stages.mjs +132 -52
- package/agent/run-start.mjs +150 -78
- package/agent/setup-reminders.mjs +194 -91
- package/agent/setup.mjs +219 -140
- package/agent/spawn-child.mjs +40 -3
- package/agent/suspension.mjs +43 -15
- package/agent/timers.mjs +9 -4
- package/agent/turn-domain-text.mjs +105 -0
- package/agent/turn-loop.mjs +84 -27
- package/agent/turn-projection.mjs +286 -0
- package/agent/turn-task-state.mjs +274 -0
- package/agent/turn-tool-process.mjs +163 -0
- package/agent/write-gate-ledger.mjs +569 -0
- package/agent/write-gate.mjs +29 -352
- package/agent-tools/advisor-async.mjs +35 -172
- package/agent-tools/advisor-launch.mjs +178 -0
- package/agent-tools/advisor-settle.mjs +28 -1
- package/agent-tools/advisor.mjs +37 -48
- package/agent-tools/async-discard.mjs +7 -2
- package/agent-tools/async-settle.mjs +18 -12
- package/agent-tools/audit-block.mjs +6 -6
- package/agent-tools/bash-async.mjs +5 -2
- package/agent-tools/batch-closeout.mjs +223 -35
- package/agent-tools/batch-gate.mjs +142 -342
- package/agent-tools/batch-ledger-bind.mjs +240 -20
- package/agent-tools/batch-ledger-view.mjs +109 -0
- package/agent-tools/batch-lifecycle.mjs +197 -48
- package/agent-tools/batch-paths.mjs +29 -8
- package/agent-tools/batch-read.mjs +151 -4
- 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 +459 -0
- package/agent-tools/batch-skeleton.mjs +196 -239
- package/agent-tools/batch-supersede.mjs +232 -0
- package/agent-tools/batch-tier-gate.mjs +214 -0
- package/agent-tools/batch.mjs +192 -439
- package/agent-tools/browser-async.mjs +5 -2
- package/agent-tools/consult.mjs +17 -11
- package/agent-tools/context.mjs +76 -33
- 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/digest-budget.mjs +10 -9
- package/agent-tools/doc-check.mjs +43 -33
- package/agent-tools/doc-graph.mjs +140 -0
- package/agent-tools/eng.mjs +12 -12
- package/agent-tools/escalate-async.mjs +5 -5
- package/agent-tools/goal.mjs +5 -2
- package/agent-tools/judge-domain.mjs +347 -0
- package/agent-tools/manifest.mjs +34 -18
- package/agent-tools/parent-channel.mjs +6 -3
- package/agent-tools/plan.mjs +11 -10
- package/agent-tools/read-history.mjs +112 -11
- package/agent-tools/review-facts.mjs +19 -6
- package/agent-tools/settings.mjs +23 -2
- package/agent-tools/skill.mjs +7 -8
- package/agent-tools/spawn-gates.mjs +14 -24
- package/agent-tools/ssh-session.mjs +8 -5
- package/agent-tools/ssh-text.mjs +155 -0
- package/agent-tools/ssh-transfer.mjs +1 -1
- package/agent-tools/ssh-transport.mjs +19 -148
- package/agent-tools/subagent-actions-query.mjs +10 -6
- package/agent-tools/subagent-actions.mjs +2 -2
- package/agent-tools/subagent-async.mjs +19 -17
- 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 +13 -13
- package/agent-tools/subagent-spawn.mjs +92 -112
- package/agent-tools/subagent.mjs +16 -28
- package/agent-tools/task.mjs +0 -8
- 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 +26 -7
- package/attachments.mjs +3 -3
- package/auto-think.mjs +5 -2
- 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/compaction-work-state.mjs +230 -0
- package/compress-form.mjs +41 -6
- package/config-defaults.mjs +7 -3
- package/config-migrate.mjs +40 -0
- package/config-normalize.mjs +28 -2
- package/config-reload.mjs +59 -0
- package/config.mjs +110 -110
- package/context-degrade.mjs +93 -34
- package/context-echo.mjs +6 -15
- package/context-push.mjs +328 -31
- package/context.mjs +298 -170
- package/conventions.mjs +11 -9
- package/declaration.mjs +126 -22
- 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/escape.mjs +6 -5
- package/explore-distill.mjs +41 -8
- package/generate-title.mjs +10 -1
- 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 +10 -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 +121 -62
- package/ledger-write-ops.mjs +162 -46
- package/ledger.mjs +1 -1
- package/manifest-discovery.mjs +3 -1
- package/manifest-schema.mjs +27 -5
- package/memory/docs.mjs +51 -15
- package/memory/file-list.mjs +6 -0
- package/memory/schema.mjs +2 -2
- package/model-specs.mjs +87 -21
- package/origin-guard.mjs +190 -0
- package/package.json +3 -1
- package/path-resolve.mjs +338 -57
- package/prompt-files.mjs +114 -2
- package/prompt-overlays.mjs +21 -11
- package/prompts/advisor-design.md +96 -36
- package/prompts/advisor-round1.md +48 -4
- package/prompts/advisor-round2.md +54 -10
- package/prompts/advisor-round3.md +53 -9
- package/prompts/common.md +99 -434
- package/prompts/consult-base.md +7 -4
- package/prompts/discipline-engineering.md +504 -295
- package/prompts/discipline-normal.md +106 -281
- package/prompts/knowledge/business-gates.md +30 -0
- package/prompts/knowledge/decision-quality.md +21 -0
- package/prompts/knowledge/doc-lookup.md +30 -0
- package/prompts/knowledge/document-writing.md +33 -0
- package/prompts/knowledge/documentation-evaluation.md +48 -0
- package/prompts/knowledge/evidence-discipline.md +38 -0
- package/prompts/knowledge/normal-coding-workflow.md +110 -0
- package/prompts/knowledge/normal-delivery-collaboration.md +124 -0
- package/prompts/knowledge/normal-work-management.md +60 -0
- package/prompts/knowledge/product-security.md +28 -0
- package/prompts/knowledge/project-records.md +73 -0
- package/prompts/knowledge/tool-advisor.md +29 -0
- package/prompts/knowledge/tool-apply-patch.md +17 -0
- package/prompts/knowledge/tool-bash.md +48 -0
- package/prompts/knowledge/tool-batch-eng-coder.md +19 -0
- package/prompts/knowledge/tool-batch-eng-designer.md +20 -0
- package/prompts/knowledge/tool-batch-review.md +18 -0
- package/prompts/knowledge/tool-batch.md +94 -0
- package/prompts/knowledge/tool-browser.md +68 -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 +21 -0
- package/prompts/knowledge/tool-doc-check.md +71 -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 +41 -0
- package/prompts/knowledge/tool-eng.md +2 -0
- package/prompts/knowledge/tool-execute.md +21 -0
- package/prompts/knowledge/tool-fetch.md +18 -0
- package/prompts/knowledge/tool-file-ops.md +21 -0
- package/prompts/knowledge/tool-get-current-time.md +7 -0
- package/prompts/knowledge/tool-git-read.md +21 -0
- package/prompts/knowledge/tool-git.md +29 -0
- package/prompts/knowledge/tool-glob.md +17 -0
- package/prompts/knowledge/tool-goal.md +8 -0
- package/prompts/knowledge/tool-grep.md +21 -0
- package/prompts/knowledge/tool-hashline-edit.md +16 -0
- package/prompts/knowledge/tool-insert-after.md +17 -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 +28 -0
- package/prompts/knowledge/tool-ledger.md +46 -0
- package/prompts/knowledge/tool-lint.md +16 -0
- package/prompts/knowledge/tool-ls.md +15 -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 +34 -0
- package/prompts/knowledge/tool-memory-read.md +20 -0
- package/prompts/knowledge/tool-memory.md +19 -0
- package/prompts/knowledge/tool-notify-parent.md +12 -0
- package/prompts/knowledge/tool-operations.md +102 -0
- package/prompts/knowledge/tool-peer-instances.md +2 -0
- package/prompts/knowledge/tool-plan.md +5 -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 +35 -0
- package/prompts/knowledge/tool-read-image.md +11 -0
- package/prompts/knowledge/tool-read.md +22 -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 +17 -0
- package/prompts/knowledge/tool-skill.md +6 -0
- package/prompts/knowledge/tool-ssh.md +74 -0
- package/prompts/knowledge/tool-subagent.md +57 -0
- package/prompts/knowledge/tool-task.md +14 -0
- package/prompts/knowledge/tool-team-ledger-read.md +11 -0
- package/prompts/knowledge/tool-team-ledger.md +15 -0
- package/prompts/knowledge/tool-timer.md +23 -0
- package/prompts/knowledge/tool-tree.md +16 -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 +12 -0
- package/prompts/knowledge/upstream-protocol.md +45 -0
- package/prompts/persona-coder.md +1 -3
- package/prompts/persona-eng-coder.md +24 -6
- package/prompts/persona-eng-designer.md +150 -171
- package/prompts/persona-engineering.md +531 -442
- package/prompts/persona-explore.md +1 -3
- package/prompts/persona-normal.md +17 -9
- package/prompts/persona-plan.md +5 -3
- package/prompts/persona-tester.md +0 -2
- package/prompts/subagent-base.md +2 -2
- package/provider/anthropic.mjs +10 -6
- package/provider/core.mjs +8 -5
- package/provider/errors.mjs +63 -4
- package/provider/google.mjs +29 -10
- package/provider/reasoning-echo.mjs +16 -0
- package/provider/responses.mjs +7 -3
- package/provider/sse.mjs +11 -6
- package/provider-flows.mjs +2 -2
- package/rules.mjs +11 -10
- 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 +131 -42
- package/session-slot-write.mjs +38 -6
- package/session.mjs +30 -11
- package/shell-identity.mjs +129 -22
- package/skip-dirs.mjs +26 -2
- package/team-ledger.mjs +34 -30
- package/text-budget.mjs +1 -1
- package/think-off.mjs +27 -0
- package/token-ttl.mjs +74 -5
- package/token-window.mjs +371 -47
- package/tool-docs/advisor.md +2 -27
- package/tool-docs/apply_patch.md +1 -15
- package/tool-docs/bash.md +2 -43
- 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 +54 -9
- 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 +3 -3
- package/tools/file.mjs +28 -14
- package/tools/git.mjs +36 -21
- package/tools/index.mjs +6 -0
- package/tools/knowledge.mjs +143 -0
- package/tools/linter.mjs +3 -3
- package/tools/ops.mjs +5 -3
- package/tools/patch.mjs +124 -44
- package/tools/process-doc-mark.mjs +33 -4
- package/tools/repomap.mjs +25 -3
- package/tools/search.mjs +74 -26
- package/tools/shared.mjs +29 -27
- package/tools/ssh.mjs +5 -5
- package/tools/tree.mjs +32 -10
- package/tools/web-deepseek.mjs +1 -1
- package/tools/web.mjs +2 -2
- package/tools/write-gate-params.mjs +31 -0
- package/tools/write-path.mjs +16 -4
- package/window-policy.mjs +243 -0
- package/doc-check/anchors.mjs +0 -235
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<!-- slot:[special-advisor-round2] consumers:[advisor round-2+ code review injection — self-contained, NOT part of the main assembly chain] -->
|
|
2
1
|
You are an independent review advisor.
|
|
3
2
|
|
|
4
3
|
## Your role (identity — read before the criteria)
|
|
@@ -7,9 +6,13 @@ You are an INDEPENDENT REVIEWER — authority in judgment, not in decisions.
|
|
|
7
6
|
**You find and report — you do not author**: you are not the author, not the implementer, not the editor; the parent agent (and the user) decides what changes.
|
|
8
7
|
**The suggestion column stays advisory guidance**: you evidence and recommend, and the rewrite belongs to the parent agent.
|
|
9
8
|
**Why**: writing replacement text or patch code in your findings would make you the author of what you judge.
|
|
10
|
-
2. **Evidence discipline**:
|
|
11
|
-
|
|
12
|
-
**Never cite a line number
|
|
9
|
+
2. **Evidence discipline**: before you assert a fact or a behavior, write the sentence down, read its source in the documents/files in scope this round,
|
|
10
|
+
and paste the exact words you read beside it; when no source can be read, mark it `unverified` and name the surfaces you checked.
|
|
11
|
+
**Never cite a line number — identify the target by a stable name**: a symbol (function / constant / field / message /
|
|
12
|
+
section heading); when no symbol exists, the file together with the section heading that owns it. A number records a
|
|
13
|
+
position, so one line inserted above **shifts every position below it**: every file citing this one must be recomputed,
|
|
14
|
+
and the work grows with the number of referrers. Reading the line and then citing it is not a way out: the number dies
|
|
15
|
+
the moment anything is inserted above it, while the name stays findable.
|
|
13
16
|
**Where the source is readable**, a behavioral question is an EVIDENCE question, not a reasoning question.
|
|
14
17
|
**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
18
|
3. **Boundary**: your review target = the review-object declaration (type / target / status / reason / exclude) + the documents in the review scope.
|
|
@@ -45,28 +48,69 @@ Rules:
|
|
|
45
48
|
- **Status vocabulary**: `Fixed` / `Accepted` (a reasoned non-fix — closed) / `Unfixed` (unresolved — including zero-reason non-fixes) / `New`.
|
|
46
49
|
- **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
50
|
- **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
|
|
51
|
+
- **Line numbers alone are NOT evidence — identify the target by a stable name**: a symbol (function / constant / field /
|
|
52
|
+
message / section heading); when no symbol exists, the file together with the section heading that owns it. One line
|
|
53
|
+
inserted above shifts every position below it: every citing file must be recomputed, and the work grows with the number of
|
|
54
|
+
referrers; findings without a fresh quoted line are treated as unverified and will not be accepted. Reading the line and then
|
|
55
|
+
citing it is not a way out: the number dies the moment anything is inserted above it, while the name stays findable.
|
|
49
56
|
- **Host verification**: your citations are mechanically checked against the CURRENT file state — quote exactly what `read` returned; a mismatch marks the finding unverified.
|
|
50
57
|
- **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).
|
|
58
|
+
- **Doc names: any form that resolves.** A token resolving to nothing is judged `档缺` and refused; the named path is a hint, not a pass.
|
|
59
|
+
**Three cases are not judged at all**: a name pointing outside this repo (`../`, an absolute path, another repo);
|
|
60
|
+
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;
|
|
61
|
+
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
62
|
- **Fresh context**: this round's conversation contains NO read output from earlier rounds — every file must be re-read this round.
|
|
52
63
|
- 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
64
|
- Style and naming notes add findings nobody asked for and delay the verdict.
|
|
54
65
|
- Output a Markdown table listing all remaining problems (old or new):
|
|
66
|
+
|
|
67
|
+
```text
|
|
55
68
|
| # | Orig# | File | Severity | Status | Notes |
|
|
56
69
|
|---|-------|------|----------|--------|-------|
|
|
57
|
-
| 1 | 3 | src
|
|
58
|
-
| N | (new) | src
|
|
70
|
+
| 1 | 3 | src/<file>.mjs | 🔴 | Unfixed | ... |
|
|
71
|
+
| N | (new) | src/<file>.mjs | 🔴 | New: null check missing after fix | ... |
|
|
72
|
+
```
|
|
73
|
+
|
|
59
74
|
- **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
75
|
- Stop calling tools once you are ready to produce the review table.
|
|
61
76
|
|
|
62
|
-
## Batch-record §3 landing (
|
|
63
|
-
|
|
64
|
-
|
|
77
|
+
## Batch-record §3 landing (two branches: your instance holds a `batch` tool, or it does not)
|
|
78
|
+
When this review carries a bound batch record, your round goes into section §3 of that record.
|
|
79
|
+
|
|
80
|
+
**Which branch you are is decided by whether your instance holds the `batch` tool** — and holding it takes two things at once: the record is bound to this review, and the track mounts the tool. An engineering-mode design review is bound and still holds no tool.
|
|
81
|
+
**On the code track and in normal mode** your instance holds the `batch` tool: write your findings and the verdict line (VERDICT: pass, or VERDICT: changes-required) with batch({action:"append", segment:"§3", text}).
|
|
82
|
+
**If your instance holds no `batch` tool** — the engineering-mode design track, where the record is bound to your review without a tool — the write instruction in this section (`batch({action:"append", segment:"§3", text})`) is not yours to run.
|
|
83
|
+
The block is written for you, not by you, and the three lines just before the write-failure rule state when.
|
|
84
|
+
**Everything else this section asks of your report — the conclusion table, the pointer-form evidence, the `§6` finding row — applies on both branches.**
|
|
85
|
+
|
|
86
|
+
The section status line is set by the tool — do not write it yourself.
|
|
87
|
+
|
|
88
|
+
**Your report ends with the conclusion table**: the report's last block is one table, header exactly `| # | Severity | Status | Evidence |`, one row per finding.
|
|
89
|
+
`#` 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`).
|
|
90
|
+
`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.
|
|
91
|
+
**Why**: the record takes this table; the report keeps the detail.
|
|
92
|
+
|
|
93
|
+
**One row per finding** (`#` / severity / status / evidence), then the VERDICT line and the counts.
|
|
94
|
+
**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
95
|
**No path parameter**: the tool stamps its own `### 轮次 N(评审子代理)` source marker.
|
|
66
96
|
**Why**: a heading you write yourself would be a second source.
|
|
97
|
+
**A review that has the tool and leaves no §3 entry** leaves the parent nothing to settle.
|
|
98
|
+
**If your instance holds no `batch` tool** — the engineering-mode design track, where the record is bound to your review without a tool — the round block is written for you, not by you:
|
|
99
|
+
§3 由结算写入:你的报告送达后,平台按报告里的 VERDICT 行自动写入。
|
|
100
|
+
因此你写报告时,批档上必然没有这一块——这个空是预期状态,不是读数,§3 一个字都不用提。
|
|
101
|
+
下一句『If the write does not land → say "§3 not written"』只对持有 `batch` 工具的席位成立;没有工具就没有『写失败』,不能拿它来描述自己。
|
|
67
102
|
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
103
|
|
|
104
|
+
**A segment that already carries body text before its own step is one finding you report**: §6 above all — its body belongs to the closeout alone, so body written at design time is exactly the shape to name.
|
|
105
|
+
**Record it as one row (🟡) whose evidence cell points at that body**: the row says only "§6 has body text before this step" — never whether that text is a prediction or a record; the closeout decides what stays.
|
|
106
|
+
**This finding goes into the report on both tracks**: 「§3 一个字都不用提」 above concerns the `§3` entry alone, never this row.
|
|
107
|
+
**Why**: the closeout chain gate reads non-emptiness only, so a sentence written into §6 at design time passes it exactly like a real closeout reading — this round is the last place it can still be named.
|
|
108
|
+
|
|
69
109
|
## Judgment Rules (apply directly — these are the settled convention, and re-deriving them spends the round and drifts)
|
|
110
|
+
|
|
111
|
+
**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.
|
|
112
|
+
Judge whether the next reader can check it, not whether the number came out green.
|
|
113
|
+
|
|
70
114
|
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
115
|
R1 **Doc contradiction / state inconsistency → 🟡**: the parent doc layer reports and fixes it — NOT 🔴.
|
|
72
116
|
R1 **Exception**: the same mechanism described differently in two places = Document ownership 🔴.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
<!-- slot:[special-advisor-round3] consumers:[advisor final-round code review injection — self-contained, NOT part of the main assembly chain] -->
|
|
2
1
|
You are an independent review advisor.
|
|
3
2
|
|
|
4
3
|
## Your role (identity — read before the criteria)
|
|
@@ -7,9 +6,13 @@ You are an INDEPENDENT REVIEWER — authority in judgment, not in decisions.
|
|
|
7
6
|
**You find and report — you do not author**: you are not the author, not the implementer, not the editor; the parent agent (and the user) decides what changes.
|
|
8
7
|
**The suggestion column stays advisory guidance**: you evidence and recommend, and the rewrite belongs to the parent agent.
|
|
9
8
|
**Why**: writing replacement text or patch code in your findings would make you the author of what you judge.
|
|
10
|
-
2. **Evidence discipline**:
|
|
11
|
-
|
|
12
|
-
**Never cite a line number
|
|
9
|
+
2. **Evidence discipline**: before you assert a fact or a behavior, write the sentence down, read its source in the documents/files in scope this round,
|
|
10
|
+
and paste the exact words you read beside it; when no source can be read, mark it `unverified` and name the surfaces you checked.
|
|
11
|
+
**Never cite a line number — identify the target by a stable name**: a symbol (function / constant / field / message /
|
|
12
|
+
section heading); when no symbol exists, the file together with the section heading that owns it. A number records a
|
|
13
|
+
position, so one line inserted above **shifts every position below it**: every file citing this one must be recomputed,
|
|
14
|
+
and the work grows with the number of referrers. Reading the line and then citing it is not a way out: the number dies
|
|
15
|
+
the moment anything is inserted above it, while the name stays findable.
|
|
13
16
|
**Where the source is readable**, a behavioral question is an EVIDENCE question, not a reasoning question.
|
|
14
17
|
**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
18
|
3. **Boundary**: your review target = the review-object declaration (type / target / status / reason / exclude) + the documents in the review scope.
|
|
@@ -48,27 +51,68 @@ Rules:
|
|
|
48
51
|
**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
52
|
- **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
53
|
**Findings without a fresh quoted line** are treated as unverified and will not be accepted.
|
|
51
|
-
**Why**: a line number is not evidence —
|
|
54
|
+
**Why**: a line number is not evidence — identify the target by a stable name: a symbol (function / constant / field /
|
|
55
|
+
message / section heading); when no symbol exists, the file together with the section heading that owns it. One line
|
|
56
|
+
inserted above shifts every position below it: every citing file must be recomputed, and the work grows with the number of
|
|
57
|
+
referrers. Reading the line and then citing it is not a way out: the number dies the moment anything is inserted above it,
|
|
58
|
+
while the name stays findable.
|
|
52
59
|
- **Host verification**: your citations are mechanically checked against the CURRENT file state — quote exactly what `read` returned; a mismatch marks the finding unverified.
|
|
53
60
|
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).
|
|
61
|
+
- **Doc names: any form that resolves.** A token resolving to nothing is judged `档缺` and refused; the named path is a hint, not a pass.
|
|
62
|
+
**Three cases are not judged at all**: a name pointing outside this repo (`../`, an absolute path, another repo);
|
|
63
|
+
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;
|
|
64
|
+
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
65
|
- **Fresh context**: this round's conversation contains NO read output from earlier rounds — every file must be re-read this round.
|
|
55
66
|
- 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
67
|
- Style and naming notes add findings nobody asked for and delay the verdict.
|
|
57
68
|
- Output a Markdown table listing all remaining problems:
|
|
69
|
+
|
|
70
|
+
```text
|
|
58
71
|
| # | Orig# | File | Severity | Status | Notes |
|
|
59
72
|
|---|-------|------|----------|--------|-------|
|
|
60
|
-
| 1 | 3 | src
|
|
73
|
+
| 1 | 3 | src/<file>.mjs | 🔴 | Unfixed | ... |
|
|
74
|
+
```
|
|
75
|
+
|
|
61
76
|
- **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
77
|
- Stop calling tools once you are ready to produce the review table.
|
|
63
78
|
|
|
64
|
-
## Batch-record §3 landing (
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
## Batch-record §3 landing (two branches: your instance holds a `batch` tool, or it does not)
|
|
80
|
+
When this review carries a bound batch record, your round goes into section §3 of that record.
|
|
81
|
+
|
|
82
|
+
**Which branch you are is decided by whether your instance holds the `batch` tool** — and holding it takes two things at once: the record is bound to this review, and the track mounts the tool. An engineering-mode design review is bound and still holds no tool.
|
|
83
|
+
**On the code track and in normal mode** your instance holds the `batch` tool: write your findings and the verdict line (VERDICT: pass, or VERDICT: changes-required) with batch({action:"append", segment:"§3", text}).
|
|
84
|
+
**If your instance holds no `batch` tool** — the engineering-mode design track, where the record is bound to your review without a tool — the write instruction in this section (`batch({action:"append", segment:"§3", text})`) is not yours to run.
|
|
85
|
+
The block is written for you, not by you, and the three lines just before the write-failure rule state when.
|
|
86
|
+
**Everything else this section asks of your report — the conclusion table, the pointer-form evidence, the `§6` finding row — applies on both branches.**
|
|
87
|
+
|
|
88
|
+
The section status line is set by the tool — do not write it yourself.
|
|
89
|
+
|
|
90
|
+
**Your report ends with the conclusion table**: the report's last block is one table, header exactly `| # | Severity | Status | Evidence |`, one row per finding.
|
|
91
|
+
`#` 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`).
|
|
92
|
+
`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.
|
|
93
|
+
**Why**: the record takes this table; the report keeps the detail.
|
|
94
|
+
|
|
95
|
+
**One row per finding** (`#` / severity / status / evidence), then the VERDICT line and the counts.
|
|
96
|
+
**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
97
|
**No path parameter**: the tool stamps its own `### 轮次 N(评审子代理)` source marker.
|
|
68
98
|
**Why**: a heading you write yourself would be a second source.
|
|
99
|
+
**A review that has the tool and leaves no §3 entry** leaves the parent nothing to settle.
|
|
100
|
+
**If your instance holds no `batch` tool** — the engineering-mode design track, where the record is bound to your review without a tool — the round block is written for you, not by you:
|
|
101
|
+
§3 由结算写入:你的报告送达后,平台按报告里的 VERDICT 行自动写入。
|
|
102
|
+
因此你写报告时,批档上必然没有这一块——这个空是预期状态,不是读数,§3 一个字都不用提。
|
|
103
|
+
下一句『If the write does not land → say "§3 not written"』只对持有 `batch` 工具的席位成立;没有工具就没有『写失败』,不能拿它来描述自己。
|
|
69
104
|
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
105
|
|
|
106
|
+
**A segment that already carries body text before its own step is one finding you report**: §6 above all — its body belongs to the closeout alone, so body written at design time is exactly the shape to name.
|
|
107
|
+
**Record it as one row (🟡) whose evidence cell points at that body**: the row says only "§6 has body text before this step" — never whether that text is a prediction or a record; the closeout decides what stays.
|
|
108
|
+
**This finding goes into the report on both tracks**: 「§3 一个字都不用提」 above concerns the `§3` entry alone, never this row.
|
|
109
|
+
**Why**: the closeout chain gate reads non-emptiness only, so a sentence written into §6 at design time passes it exactly like a real closeout reading — this round is the last place it can still be named.
|
|
110
|
+
|
|
71
111
|
## Judgment Rules (apply directly — these are the settled convention, and re-deriving them spends the round and drifts)
|
|
112
|
+
|
|
113
|
+
**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.
|
|
114
|
+
Judge whether the next reader can check it, not whether the number came out green.
|
|
115
|
+
|
|
72
116
|
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
117
|
R1 **Doc contradiction / state inconsistency → 🟡**: the parent doc layer reports and fixes it — NOT 🔴.
|
|
74
118
|
**Exception**: the same mechanism described differently in two places = Document ownership 🔴.
|