@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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
aliases: 时间, 当前时间, 日期
|
|
2
|
+
**Route to get_current_time instead of bash:**
|
|
3
|
+
- `date` / `time` → get_current_time
|
|
4
|
+
|
|
5
|
+
Use it whenever a task depends on the current time or date (deadlines, freshness, timestamps) rather than shelling out.
|
|
6
|
+
|
|
7
|
+
Returns `Date` / `Timezone` / `Weekday` / `Local` lines (UTC + local timezone).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
aliases: git, 只读, 版本库, 查看提交
|
|
2
|
+
Nothing here writes the repository: no commit, no staging, no branch or tag changes, no push, no checkout, no snapshot restore. One exception sits in `checkpoint`, described below.
|
|
3
|
+
|
|
4
|
+
The actions this tool face carries: diff / status / log / show / ls-remote / blame / checkpoint list·cat / tag list / branch list / stash list / remote list / worktree list.
|
|
5
|
+
|
|
6
|
+
- diff: unified diff since last commit (`staged` — staged only; `ref` — compare a commit/branch; `path` — scope).
|
|
7
|
+
- status: working tree state — staged / unstaged / untracked / conflicts.
|
|
8
|
+
- log: recent commits (`count`, `oneline`, `path` — one file's history).
|
|
9
|
+
- show: one commit with --stat (`ref`, default HEAD).
|
|
10
|
+
- ls-remote: light remote-ref check — network (`remote`, optional `ref`).
|
|
11
|
+
- blame: file blame (`path` required).
|
|
12
|
+
- checkpoint: snapshots — `checkpointAction` `list` (shows file tree) or `cat` (a file from the snapshot id); `checkpointId` for `cat`.
|
|
13
|
+
`list` first clears this project's snapshot directory when HEAD is newer than the newest snapshot,
|
|
14
|
+
so a `list` can remove files while adding none; `cat` does not take that path.
|
|
15
|
+
- tag / branch / stash / remote / worktree: `tagAction` / `branchAction` / `stashAction` / `remoteAction` / `worktreeAction` `list` only.
|
|
16
|
+
|
|
17
|
+
`filter` narrows any of these outputs (case-insensitive regex); `workdir` runs git in a subdirectory (default: the discovered project repo root); `config` carries `git -c` overrides for `ls-remote`.
|
|
18
|
+
|
|
19
|
+
Two things this variant does not do, by design: it never runs a write action, and calling one directly is refused before anything executes — nothing is staged, committed, restored or pushed. If the work needs a write, report it and let the role that owns writes do it.
|
|
20
|
+
|
|
21
|
+
Failures come back as errors — `git <action> failed: <reason>`.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
aliases: git, 版本库, 提交, 分支
|
|
2
|
+
**Route to git instead of bash** — every sub-command maps to the same-named action:
|
|
3
|
+
|
|
4
|
+
status / log / diff / show / add / rm / commit / push / tag / branch / checkout / restore / stash / fetch / pull / reset / revert / merge / cherry-pick / ls-remote / clone / init / rebase / remote / clean / switch / apply / worktree / archive / blame / mv.
|
|
5
|
+
|
|
6
|
+
- diff: unified diff since last commit (`staged` — staged only; `ref` — compare a commit/branch; `path` — scope).
|
|
7
|
+
- status: working tree state — staged / unstaged / untracked / conflicts.
|
|
8
|
+
- log: recent commits (`count`, `oneline`, `path` — one file's history).
|
|
9
|
+
- show: one commit with --stat (`ref`, default HEAD).
|
|
10
|
+
- add: stage files — `path` (granular) or all changes.
|
|
11
|
+
- rm: untrack a file/dir (`git rm --cached` — kept on disk; `path` required).
|
|
12
|
+
- commit: `message` required. With `path` → `git commit --only <paths>`: commits those files' working-tree content only, atomic — other staged batches are NOT mixed in; without → add -A + full commit. New (untracked) files: `git add` them first — the tool refuses a path list with any untracked entry and names them (staging extra is safe — `--only` commits only the listed files).
|
|
13
|
+
- push / fetch / pull: sync with remote — `remote`, `ref`, `tags` for --tags. `push` takes several refs in one space-separated `ref` (so does `ls-remote`); `fetch` and `pull` take exactly one, and a space there is `Invalid ref`.
|
|
14
|
+
- tag / branch: manage via `tagAction` / `branchAction` — list / create (name, optional ref) / delete (snapshots first); branch also switch (name).
|
|
15
|
+
- checkout: switch to `ref`; with `path`, restore a file from the index (discards its working-tree changes — snapshots first).
|
|
16
|
+
- restore: restore a file from index/HEAD (`path` required; `staged` restores the staged copy — snapshots first).
|
|
17
|
+
- stash: `stashAction` push (message) / pop / list (pop snapshots first).
|
|
18
|
+
- reset: `ref` (default HEAD), `mode` soft / mixed / hard — hard drops working-tree changes (snapshots first).
|
|
19
|
+
- revert: revert a commit (safe, `ref` default HEAD); merge: `ref` — conflicts come back for you to resolve; cherry-pick: `ref`.
|
|
20
|
+
- rebase: `rebaseAction` start / abort / continue (snapshots first).
|
|
21
|
+
- ls-remote: light remote-ref check — read-only, network (`remote`, optional `ref`).
|
|
22
|
+
- clone: `remote` required (URL or local path), optional `path` (target dir); init: create a repo in the current workdir.
|
|
23
|
+
- remote: manage remotes — `remoteAction` list / add / remove / set-url (`remoteUrl` for add / set-url).
|
|
24
|
+
- clean: remove untracked files/dirs — `dryRun` previews (-n; the real clean snapshots first).
|
|
25
|
+
- switch: switch branch (`name` required; `create` = -c); apply: apply a patch (`path` required); archive: tar of a `ref` (`path` required, output file); blame: file blame (`path` required); mv: rename/move (`path` + `dest` required); worktree: `worktreeAction` list / add / remove.
|
|
26
|
+
- checkpoint: local snapshots — `checkpointAction` list / create / rewind / cat / versions (`checkpointId` for rewind / cat).
|
|
27
|
+
- Destructive ops (checkout -- path / restore / reset --hard / stash pop / branch|tag delete / clean / rebase) auto-snapshot first; restore a snapshot via `checkpointAction=rewind`.
|
|
28
|
+
- Failures come back as errors — `git <action> failed: <reason>`.
|
|
29
|
+
- `filter` narrows any read-only action's output (case-insensitive regex); `config` (git -c overrides, e.g. a proxy) applies to the network actions (push / fetch / pull / ls-remote / clone). Other parameter defaults and applicability live in the schema.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
aliases: 文件匹配, 找文件, 通配
|
|
2
|
+
Returns matching paths (relative to the search path), sorted, capped at 1000. Use it to discover file structure; use `grep` to search file contents.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
- `pattern` (required): glob pattern, relative to `path`. Supported:
|
|
6
|
+
- `**` (recursive), `**/`, `*` (within a segment), `?` (single char), `[..]` character classes, and `{a,b}` brace expansion - e.g. `**/*.{js,txt}` matches .js and .txt files at any depth.
|
|
7
|
+
- Exclusions: a space-separated `!` token - `**/*.js !test/**` matches .js files except those under test/.
|
|
8
|
+
- Several extension alternatives go in one `{a,b}` group (e.g. `**/*.{js,md}`); adjacent space-separated includes are not a supported form. A pattern containing a literal space is fine on its own - spaces separate patterns only when a `!` exclusion is present.
|
|
9
|
+
- `path`: directory to search in (default cwd).
|
|
10
|
+
- `includeProcessDocs`: include docs from process layers (batch records, archived material) - excluded by default; pass `true` to get them back.
|
|
11
|
+
|
|
12
|
+
Notes:
|
|
13
|
+
- Invalid glob syntax is an EXPLICIT error, never a silent no-match: unsupported extglob dialects (`?(x)` / `@(a|b)` / `+(x)`) and malformed braces (empty `{}`, unclosed `{`, nested `{a,{b,c}}`) return `glob error: ...` - use `{a,b}`, or a space-separated `!exclude`, instead.
|
|
14
|
+
- Skips noise directories before matching — `node_modules`, `.git`, `dist`, `build`, `.turbo`, `coverage` are examples, not the list. The whole set is `SKIP_DIRS` in `thincoder-core/skip-dirs.mjs`, one list behind the index, the tree walk and both search tools.
|
|
15
|
+
- Results are capped at 1000 matches.
|
|
16
|
+
- Every row carries the layer label of its document, e.g. `[design] docs/core/design/TOOLS.md`; when rows from process layers are excluded (or included on request), a final line reports how many. Excluded rows spend none of the 1000-match cap.
|
|
17
|
+
- Prefer a pattern with a literal anchor (an extension or a subdirectory) over a bare wildcard.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
aliases: 目标, 任务目标
|
|
2
|
+
action='set': create or replace the goal — must have a verifiable completion criterion (a machine-checkable proof, not vague effort).
|
|
3
|
+
|
|
4
|
+
action='complete': mark achieved — only after the criterion's check has actually passed.
|
|
5
|
+
action='blocked': report an impasse (requires 'reason') — only after 3 genuine attempts.
|
|
6
|
+
action='cancel': abandon the goal.
|
|
7
|
+
|
|
8
|
+
Returns a status line — the goal set/updated/completed/blocked/cancelled confirmation, or Error: ... with the reason.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
aliases: 搜索内容, 正则, 查找文本
|
|
2
|
+
**Route to grep instead of bash:** `findstr /c:"pat" file` / `grep -rn pat .` → grep. Searching file contents is a read - never shell out for it.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
- `pattern` (required): a JavaScript regular expression, or a literal string when `literal: true`.
|
|
6
|
+
- `path`: directory or file to search (default cwd).
|
|
7
|
+
- `glob`: only search files matching this glob - supports `**`, `*`, `?`, `[..]`, `{a,b}` braces and space-separated exclusion (`"**/*.js !test/**"` = .js files outside test/); e.g. `'*.mjs'`.
|
|
8
|
+
- `ignoreCase`: case-insensitive match (default false).
|
|
9
|
+
- `literal`: literal string match, no regex interpretation (default false; use it for strings carrying `.` or `\`).
|
|
10
|
+
- `before`: lines of context to show before each match (like `grep -B`). Default 0.
|
|
11
|
+
- `after`: lines of context to show after each match (like `grep -A`). Default 0.
|
|
12
|
+
- `includeProcessDocs`: include docs from process layers (batch records, archived material) - excluded by default; pass `true` to get them back.
|
|
13
|
+
|
|
14
|
+
Notes:
|
|
15
|
+
- Skips noise directories before matching — `node_modules`, `.git`, `dist`, `build`, `.turbo`, `coverage` are examples, not the list. The whole set is `SKIP_DIRS` in `thincoder-core/skip-dirs.mjs`, one list behind the index, the tree walk and both search tools.
|
|
16
|
+
- Results are capped at 200 matches.
|
|
17
|
+
- Every document row carries its layer label at line start, e.g. `[design] path:line: text`; a row from a process layer keeps the `[process doc: not a design basis]` prefix and then its layer.
|
|
18
|
+
- When the output would contain rows from process layers, a final line reports how many were excluded, or how many were included on request. Excluded rows spend none of the 200-match cap.
|
|
19
|
+
- Unreadable files are skipped silently, and so is anything over 10 MB. A binary file is not detected as one: it is read as UTF-8 and searched, so a match inside it can come back garbled.
|
|
20
|
+
- Use this to find usages, definitions and patterns; use `glob` to find files by name.
|
|
21
|
+
- With `before` / `after`: a matching line uses the `:` separator and a context line uses `-` (as in ripgrep), and overlapping context ranges in one file are merged and de-duplicated - you see each context line once.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
aliases: 按行哈希, 精确改行
|
|
2
|
+
More reliable than `edit` when whitespace or encoding varies, because the addresses are SHA256 hashes of the line text after UTF-8 decoding and CRLF-to-LF normalization — the same rule `read` uses with `hashes=true` — not of the raw bytes on disk.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
- `path` (required): file path.
|
|
6
|
+
- `old_hashes` (required): array of the line hashes to replace (12-char hex). Read the file with `hashes=true` first to get them; a single line takes `[hash]`, a contiguous block takes `[hash1, hash2, ...]` in order.
|
|
7
|
+
- `new_content` (required): the replacement text (multi-line ok, `\n` separated).
|
|
8
|
+
- `ledger`: the in-flight ledger row this call serves — `"#N"` or `"N"`.
|
|
9
|
+
- `project`: the project root holding `PROJECT-MANIFEST.json` (absolute or cwd-relative).
|
|
10
|
+
|
|
11
|
+
Notes:
|
|
12
|
+
- Hashes are position-independent: they identify lines by content, not by line number, so a line-number drift after an edit does not touch them.
|
|
13
|
+
- When the hash sequence is not found, the error carries the current hashes of the file's first 50 lines (all of them when the file is shorter), each with its line number and the first 80 characters of that line.
|
|
14
|
+
- Prefer this over `edit` when (1) the file may have mixed whitespace or encoding, or (2) you want to edit a block of lines in one call.
|
|
15
|
+
- The replacement replaces exactly the lines the hashes identify - whatever is not in `new_content` is deleted. For a new line after a known line use `insert_after`; for a single simple string swap use `edit`.
|
|
16
|
+
- Re-read the file after it changed: hashes taken before a write are stale.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
aliases: 插入行, 加一行
|
|
2
|
+
Safer than `edit` for adding new content - no surrounding context to copy, so no exact-string matching to get wrong.
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
- `path` (required): file path.
|
|
6
|
+
- `content` (required): the text to insert; it becomes its own line, placed after the target line.
|
|
7
|
+
- `after_line`: line number to insert after (1-based). Preferred when you know the exact line number from `read`.
|
|
8
|
+
- `after_regex`: a JavaScript regex finding the line to insert after. It must match exactly one line; when it matches several the tool errors and shows the matching line numbers.
|
|
9
|
+
- `ledger`: the in-flight ledger row this call serves — `"#N"` or `"N"`.
|
|
10
|
+
- `project`: the project root holding `PROJECT-MANIFEST.json` (absolute or cwd-relative).
|
|
11
|
+
|
|
12
|
+
Notes:
|
|
13
|
+
- Either `after_line` or `after_regex` is required; if both are given, `after_line` wins.
|
|
14
|
+
- Use this instead of `edit` when you are adding a line - a checklist item, a doc heading, a line of prose, a function, an import, or a block - rather than fabricating surrounding context to anchor an exact-string match.
|
|
15
|
+
- Returns a diff of the change.
|
|
16
|
+
- **Read-before-insert guard**: `after_line` is judged against the last write to that file: a line above that write's write point is allowed, and a line at the write point itself is allowed only when that write was itself an insertion. Inside or below it the call is refused, naming the path and two ways on: re-read, or address the region without line numbers. The write point and the offset (`L<startLine>`, `±shift`) are named only when a write point was recorded and the drift can be measured; a file rewritten in full by a write since the last read, a file changed with no recorded write point to check against, and a file whose drift cannot be measured because a write in this session changed it after the recorded write point are each refused without those numbers, and the refusal says why they are unavailable.
|
|
17
|
+
- Take line numbers from the most recent `read` of that file; re-read after the file changed.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
aliases: 实例列表, 多实例, 跨实例
|
|
2
|
+
Any cwd — a target in another repository is addressable.
|
|
3
|
+
|
|
4
|
+
Returns [{ sessionId, end, cwd, pid }]; never includes self; pure read — writes nothing.
|
|
5
|
+
|
|
6
|
+
Only sessions that have a pickup face register here, so a headless session (one-shot chat / ACP / direct runAgent) never appears.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
aliases: 跨实例消息, 发消息, 实例
|
|
2
|
+
Parameters: sessionId (required, no default — an id from instance_list) · text (required, no default — the message body) · re (optional — the requestId this message answers, a non-empty string of at most 128 chars; omit it for a first message).
|
|
3
|
+
|
|
4
|
+
Returns { requestId, target: { sessionId, end }, status: "delivered-to-inbox" }. requestId is the inbox message id — pass it as re when you answer back.
|
|
5
|
+
|
|
6
|
+
The target takes the message only when it has no turn in flight: during its turn the message waits in the inbox (never injected mid-turn) and starts a new normal user turn afterwards.
|
|
7
|
+
|
|
8
|
+
An unreachable target (no such session / exited / unverifiable / inbox not writable) fails the call with the target and the reason named — nothing is queued for later and nothing is dropped silently.
|
|
9
|
+
|
|
10
|
+
Delivering does not make the target your subordinate: it may ignore the message or answer "I won't".
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
aliases: 知识, 主题, 检索知识, 查主题
|
|
2
|
+
Pure-reference topics are never inlined into system prompts.
|
|
3
|
+
|
|
4
|
+
Actions: `list` shows globally unique topic ids and titles; `search` returns bounded locating snippets; `get` returns the complete topic by exact id.
|
|
5
|
+
|
|
6
|
+
Search splits the query on whitespace, lowercases each word, trims the punctuation at both ends of each word and then drops high-frequency function words (`the`, `of`, `a`, `的`, `了` …).
|
|
7
|
+
A word's inner characters stay as written, so `doc?` searches `doc` while `doc-check` is searched whole.
|
|
8
|
+
A query left with no word fails explicitly and names `query` — type a concrete noun instead of retrying the same shape.
|
|
9
|
+
Every remaining word matching the id, the title, an alias or the body puts that topic in the result (OR — not all words must match).
|
|
10
|
+
Ranking: title-level hits first (a distinct word hitting the id, the title or an alias), then total hits, then id ascending.
|
|
11
|
+
|
|
12
|
+
A topic's first line may carry `aliases: word, word` — near-synonyms, Chinese included. Aliases are metadata, never part of the body a `get` returns; they exist so a Chinese query can find an English-id topic.
|
|
13
|
+
|
|
14
|
+
Results are capped at 10 topics and 6,000 characters, so a wide query cannot swallow the window.
|
|
15
|
+
The envelope reports `matched` (topics that matched), `shown` (topics returned) and `truncated` — never read a short list as "these are all the matches".
|
|
16
|
+
No match returns an explicit empty result that names the next step: retry with one English keyword, or run `list` for every topic id first.
|
|
17
|
+
|
|
18
|
+
Search only to locate: read `get` before acting on a rule. Unknown actions, missing arguments, unknown topics and duplicate ids fail explicitly; no match is an explicit empty result.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
aliases: 台账, 只读, 待办查询
|
|
2
|
+
`query` returns filtered rows, `count` returns how many. Nothing here adds, moves or settles a row.
|
|
3
|
+
|
|
4
|
+
A row is one requirement point or one piece of engineering debt. The six states are `待讨论` / `待设计` / `在途` / `待核销` / `已核销` / `已废弃`; `status` filters to one of them.
|
|
5
|
+
|
|
6
|
+
Use it to find what work is already queued before proposing more: the open rows on your board, what is in flight for this batch record, and how old the unsettled ones are.
|
|
7
|
+
|
|
8
|
+
Adding, moving or settling a row belongs to the main agent; calling one directly is refused before anything is written.
|
|
9
|
+
|
|
10
|
+
The other filters:
|
|
11
|
+
- `kind` — requirement vs tech_todo (the field itself holds those two words).
|
|
12
|
+
- `board` — the owning board (a requirement-document name).
|
|
13
|
+
- `trigger` — the tech-todo trigger.
|
|
14
|
+
- `task_book` — the task-book pointer, i.e. the row → batch lookup.
|
|
15
|
+
|
|
16
|
+
Rows come back 10 per page, with or without filters — a filter narrows what is eligible, not how many a page carries.
|
|
17
|
+
- Every page ends with a tail line giving the total, this page's rank range and, when another page exists, the command for it: `ledger({action:"query"<the filters in force>, cursor:"<cursor>"})`. Run that line whole: it repeats this page's filters, and copying only the `cursor` drops them. Omit `cursor` for the first page; a malformed one is refused, never treated as page one.
|
|
18
|
+
- `count` is a different book: it counts the four unsettled states only, while a page's total covers all six.
|
|
19
|
+
|
|
20
|
+
Every returned row carries a reading about itself:
|
|
21
|
+
- `aged` — unsettled and older than 30 days.
|
|
22
|
+
- `evidenceTooLong` — the evidence text is too long to read.
|
|
23
|
+
- `taskBookOnDisk` — the row's task-book file part resolves and is on disk.
|
|
24
|
+
- `overdue` — the exit state as one word (resume_due / dangling / unlabeled / aged); first match wins.
|
|
25
|
+
|
|
26
|
+
`cwd` decides which project's ledger is read; omit it for the session anchor. A relative path resolves against the anchor, and the project root is taken inside it — outside it no project is attached.
|
|
27
|
+
The root is the nearest ancestor directory carrying PROJECT-MANIFEST.json; a ledger file sitting on disk does not make a project.
|
|
28
|
+
The book lives in the user data directory keyed by project root, so a query never reads another project's book and the repository stays free of ledger files.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
aliases: 台账, 待办, 记账
|
|
2
|
+
`action` = add / update / close / query / count.
|
|
3
|
+
|
|
4
|
+
- `add`: a new entry lands in `待讨论`.
|
|
5
|
+
- `kind` = `requirement` (requirement pool) / `tech_todo` (engineering debt).
|
|
6
|
+
- `trigger` = `归批` / `条件` / `认账不排期` (optional).
|
|
7
|
+
- `resume_when` = the sentence saying when the entry resumes (optional; when given it may not be blank, and it may carry an anchor `@YYYY-MM-DD` (judged) or `@<event>` (not machine-judged)).
|
|
8
|
+
- **The `task_book` gate** — same on `add` and `update`, judged on what this call writes. An entry that ends up in `在途` / `待核销`, or a call that sets `trigger` = `归批`, must carry `task_book`: absent / empty / blank is refused.
|
|
9
|
+
- A call that writes `task_book` (non-empty), or that sets `trigger` = `归批`, is also held to the pointer: its file part, the text before the first `§`, must resolve with that file on disk, else refused.
|
|
10
|
+
- A call that does not touch the pointer is not judged: a stale pointer from an earlier call never blocks a `status` / `evidence` / other-field update — "is the file on disk" is the `taskBookOnDisk` reading, not a gate.
|
|
11
|
+
- **Reserved pointer** — the marker `(预定)` at the tail of the value (`docs/batches/<x>.md(预定)`) registers the intent to work a record that does not exist yet;
|
|
12
|
+
that pointer passes the gate while its file is absent (`taskBookOnDisk` stays `false`, a reading not a gate).
|
|
13
|
+
It must be a project-relative path — no declared-repo prefix, no absolute path — must sit under this project's batch root,
|
|
14
|
+
and the record must not be on disk yet: any of the three failing is refused, naming the pointer and the legal form.
|
|
15
|
+
Once that record is on disk the marker is surplus and refused (drop it).
|
|
16
|
+
- `batch create` on that same path later **claims this row** instead of opening a second one: the pointer becomes the plain form, the row goes to `在途`, no new row appears. Omit `ledger` and `newDebt` there and a reserved row for the path wins before the same-face check. Two reserved rows on one path are refused, each named — picking one would silently drop the other's intent.
|
|
17
|
+
- `close --batch`: settles only the rows already at `待核销`. `待讨论` / `待设计` rows are skipped and named (move them to `在途` first to claim them), `在途` rows are skipped and named (they cannot be jumped), settled and withdrawn rows are not counted.
|
|
18
|
+
- `status` may be omitted (default `已核销`) and can only be `已核销`.
|
|
19
|
+
- `query`: equality filters (`status` / `kind` / `board` / `trigger` / `task_book`); with none given, every row is eligible. Rows come back 10 per page either way — a filter narrows which rows are eligible, not how many a page carries. Each row carries:
|
|
20
|
+
- `aged` — an unsettled state and older than 30 days.
|
|
21
|
+
- `evidenceTooLong` — the evidence text is too long to read; a reading, never a write refusal.
|
|
22
|
+
- `taskBookOnDisk` — the `task_book` file part resolves and that file is on disk.
|
|
23
|
+
- `overdue` — the exit state as a word: `resume_due` / `dangling` / `unlabeled` / `aged`, first match wins.
|
|
24
|
+
- The six states: `待讨论` / `待设计` / `在途` / `待核销` / `已核销` / `已废弃`.
|
|
25
|
+
- **Every page ends with a tail line**: the total, this page's rank range, and — when another page exists — the command for it, `ledger({action:"query"<the filters in force>, cursor:"<cursor>"})`. **Run that line whole**: it repeats this page's filters, and copying only the `cursor` drops them, so the next page comes from the unfiltered set with no error. Omit `cursor` for the first page; a malformed one is refused, never treated as page one.
|
|
26
|
+
- `count` is a different book: it counts the four unsettled states only, while a page's total covers all six.
|
|
27
|
+
- `count`: `{ count, overdue, evidenceTooLong }` — rows in the four unsettled states; how many of those are in an overdue exit state; how many carry over-long evidence. `count` takes `task_book` only: every other filter (`status` / `kind` / `board` / `trigger`) is refused as an unknown parameter (`未知参数:…`), so filter after counting or use `query`.
|
|
28
|
+
- `query` / `count` are read-only and open to every role; `add` / `update` / `close` write and are main-agent only.
|
|
29
|
+
- `update`: moves an entry along the six-state table, edge by edge — `待讨论→待设计` / `待讨论→在途` / `待设计→在途` / `在途→待核销` / `在途→待讨论` / `待核销→已核销` / `待核销→在途` / `待核销→待讨论` / any unsettled state → `已废弃`. `已核销` and `已废弃` are terminal; every edge not on that list is refused.
|
|
30
|
+
- `待讨论→在途` is the ignition path: opening a batch moves its coverage rows straight to `在途`, never through `待设计` (`待设计` means design is scheduled, not that ignition happened).
|
|
31
|
+
- `待核销→在途` is the reopen or manual return path and always writes the current session as executor; an explicit old executor does not override it.
|
|
32
|
+
- `在途→待讨论` and `待核销→待讨论` return unfinished work to the waiting pool. They require this call's non-blank `evidence` as the reason, append it to the row, clear `executor` / `task_book` / `trigger`, preserve `created_at`, and return `reason` in the receipt.
|
|
33
|
+
- Give exactly one of `id` / `batch`.
|
|
34
|
+
- `status` omitted = update only the fields you passed; `resume_when` omitted = unchanged; `executor` omitted = entering `待设计` / `在途` writes this session, and leaving `在途`, returning to `待讨论`, or withdrawing clears it.
|
|
35
|
+
- `evidence` appends (old value non-empty ⇒ `old|new`, nothing around `|`; old empty ⇒ written as given). `evidenceReplace: true` with `evidence` replaces the whole text; the flag alone, or a blank new value, is refused.
|
|
36
|
+
- `update --batch`: one migration across a batch (`batch` = the batch-record pointer; the rows whose `task_book` sits on that record are handled together).
|
|
37
|
+
- With `status` ⇒ every row re-judged against the migration table; without `status` ⇒ a pure field patch, `status` untouched.
|
|
38
|
+
- Receipt `{ batch, status, applied, skipped }`; each skipped row is named `{ id, from, why }` (`why` = that row's own refusal text) and the rest still land; a transaction-level failure rolls the whole batch back.
|
|
39
|
+
- A `batch` that does not resolve to a record on disk is refused.
|
|
40
|
+
- `close`: settle (`待核销 → 已核销`) — the one settling edge. `待讨论` / `待设计` / `在途` are refused, naming the current state and that state's way out. Withdrawal is allowed only from an unsettled state; both archived states reject further archival writes.
|
|
41
|
+
- Settlement requires non-blank work `evidence` after applying this call. Existing evidence is sufficient; a blank replacement is refused and leaves the row unchanged.
|
|
42
|
+
- **Archiving a row is tied to its batch record.** Before either archived target lands (`已核销` to settle, `已废弃` to withdraw), the record its `task_book` points at is read: a record whose §1 status line reads `进行中` refuses the write — `批档未收口 … 请先 batch close(同笔结算并冻结档)` for a settlement, and `先退回 待讨论(携理由)再 已废弃,或先 batch close` for a withdrawal from `在途` / `待核销`. The row is left unchanged either way, and `batch close` settles the row and freezes the record in one action.
|
|
43
|
+
- `update` to either archived state is held to the same gate, and `close --batch` / `update --batch` name each refused row in `skipped` with that gate's own words. A record whose §1 status line cannot be read (missing, or two or more in the §1 header zone) is refused separately and names its repair: exactly one status line in that zone, written by the main agent as an ordinary document write.
|
|
44
|
+
- Four cases pass the gate without a record to judge, and the receipt carries one `notices` entry per such row — `{id, reason, message}`, key omitted when there is none — for a single-row receipt and at the top level for a `batch` one: the pointer resolves to a file that is not a batch record (`pointer-not-a-record`), the pointer has no file part (`no-task-book`), the pointer does not resolve or its file is not on disk (`record-not-on-disk`, a record may be cleaned up), or the row is a `待讨论` / `待设计` retro-close (`retro-close`). A gate side-step is not work evidence, so it never touches `evidence`.
|
|
45
|
+
- Soft delete: the row keeps its content and gains a `closed_at`, and a settled row's settled time is the close, not an update.
|
|
46
|
+
- `status` is required on a single-row close: `已核销` to settle, `已废弃` to withdraw. Give exactly one of `id` / `batch`. `evidence` / `evidenceReplace` behave as in `update`, and an omitted `evidence` leaves the row's own text as it stands.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
aliases: 语法检查, 静态检查
|
|
2
|
+
Parameters:
|
|
3
|
+
- path: File to check (default: most recently modified file)
|
|
4
|
+
- full: Run the full language-aware cascade instead of just node --check (default false)
|
|
5
|
+
|
|
6
|
+
Without `full` it runs `node --check` only, which covers the JS/TS family; any other file gets a hint to pass `full` instead.
|
|
7
|
+
|
|
8
|
+
With `full` the cascade is picked by extension:
|
|
9
|
+
|
|
10
|
+
- TS: tsc --noEmit, run only where a TypeScript project config exists.
|
|
11
|
+
- Python: ruff. Rust: cargo check, run only where a Cargo manifest is present.
|
|
12
|
+
- Go: go vet. JS/JSX: still `node --check`.
|
|
13
|
+
|
|
14
|
+
Use the fast default after every write or edit, and `full` before declaring a task complete.
|
|
15
|
+
|
|
16
|
+
Returns `Syntax OK: <path>` / `Syntax error in <path>: <message>`, or the language checker's own line (`✓ <checker>: no issues` / `✗ <checker>: <failure text>`), or a `lint:` line saying that checker is not installed or that no linter exists for that extension.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
aliases: 目录, 列目录
|
|
2
|
+
Directories listed first. Use to see what a directory contains (glob only matches files).
|
|
3
|
+
|
|
4
|
+
**Route to ls instead of bash:** `dir /b` / `ls` / `dir` → ls. Listing a directory is a read — never shell out for it.
|
|
5
|
+
|
|
6
|
+
Parameters:
|
|
7
|
+
- path: Directory path (default cwd)
|
|
8
|
+
- filter: Only list entries matching this glob (e.g. '*.mjs', '*test*') — a wildcard filter, not a full listing
|
|
9
|
+
- includeProcessDocs: include docs from process layers (batch records, archived material) — excluded by default; pass `true` to get them back
|
|
10
|
+
|
|
11
|
+
Notes:
|
|
12
|
+
- Shows first 500 entries
|
|
13
|
+
- Directories are suffixed with `/` and listed before files
|
|
14
|
+
- A file row carries its layer label after the name (`TOOLS.md [design]`); directory rows carry none. When file rows from process layers are excluded (or included on request), a final line reports how many. Excluded rows spend none of the 500-entry cap.
|
|
15
|
+
- Use this for a quick overview; use glob when you have a specific file pattern in mind
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
aliases: 定义, 引用, 符号, 代码导航
|
|
2
|
+
Use this to understand code structure without grep-guessing function locations or type shapes. Find files with glob / repo_outline — use lsp for definition / references / diagnostics
|
|
3
|
+
|
|
4
|
+
Parameters:
|
|
5
|
+
- subcommand (required): LSP operation — "definition" | "references" | "hover" | "symbols" | "diagnostics"
|
|
6
|
+
- uri (required): Target file path (relative to project root)
|
|
7
|
+
- line: 1-based line number (for definition/references/hover)
|
|
8
|
+
- character: 1-based character offset (for definition/references/hover)
|
|
9
|
+
|
|
10
|
+
Notes:
|
|
11
|
+
- Returns the requested LSP result: definition location, references, hover info, document symbols, or diagnostics — or an error message.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
aliases: 清单, 项目档案, 只读
|
|
2
|
+
The file holds version / phase / docRoot / codePaths / index.
|
|
3
|
+
|
|
4
|
+
target — the project root or directory you mean; **required** — omitting it is refused. Relative paths resolve against the session anchor. A workspace target (several projects below it) is reported with the full candidate list — name the project root you mean and pass it as target.
|
|
5
|
+
|
|
6
|
+
`docRoot` holds one entry per document layer, each a directory (a string | a multi-root array | `null` = absent): requirements / specs / design / modules / batches.
|
|
7
|
+
|
|
8
|
+
`standards` is the standards **layer** — a directory whose `.md` files — subdirectories included, in layer-root-relative path order — are the standards; a file path is not accepted (one key, one meaning).
|
|
9
|
+
|
|
10
|
+
Read-only: the only action is `read`. Creating or editing a manifest belongs to the main agent — this subagent variant has no init / write action.
|
|
11
|
+
|
|
12
|
+
read — report the manifest state with a stable anchor `state=ok|missing|invalid|workspace|no-project`. The ok state prints the manifest JSON plus missingKeys / errors rows (only when non-empty). Never throws — a missing manifest is reported, not refused.
|
|
13
|
+
|
|
14
|
+
Use it to locate documentation instead of assuming a path: read `docRoot.<key>` and resolve your target under that root. A missing face (`null`) means that document layer does not exist in this project — report it instead of inventing a path.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
aliases: 清单, 项目档案, 文档根
|
|
2
|
+
Subagents carry a read-only variant (action `read`); init / write stay main-agent only.
|
|
3
|
+
|
|
4
|
+
Actions:
|
|
5
|
+
- read — report the state with a stable anchor `state=ok|missing|invalid|workspace|no-project`. The ok state prints the manifest JSON plus missingKeys / errors rows (only when non-empty). It never throws — a missing manifest is reported, not refused.
|
|
6
|
+
- init — create the default manifest where the project root resolves. Refused when one already exists — init never overwrites.
|
|
7
|
+
- write <key> <value> — point-edit one node: read, set, write back through the writer gate. The result must validate (a fault is refused, disk byte-for-byte unchanged); a missing manifest is refused — run init first.
|
|
8
|
+
|
|
9
|
+
target — the project root or directory you mean; **required** — omitting it is refused. Relative paths resolve against the session anchor.
|
|
10
|
+
|
|
11
|
+
A workspace target (several projects below it) is reported by `read` and refused by `init` / `write` — name the project root you mean.
|
|
12
|
+
|
|
13
|
+
key — dot path into the manifest: version / phase / codePaths, or a sub-key of docRoot / index. Whole-object writes of those two families are refused, as is any key outside the set (spelling protection).
|
|
14
|
+
|
|
15
|
+
value — JSON first (null / true / 5 / ["a","b"]), else a literal string (docs/design). "null" is the explicit "no such face" for docRoot.<key>: a legal value, not a deletion.
|
|
16
|
+
|
|
17
|
+
Refusals throw `manifest <action>: refused — …`; a missing parameter throws `manifest <action>: <param> is required …`,
|
|
18
|
+
and what follows takes that parameter's own form — a dash clause for `target`, a parenthetical for `key` and `value` —
|
|
19
|
+
so match on `is required`, not on the punctuation after it.
|
|
20
|
+
Both leave the disk unchanged; the written file reaches the project-state line next turn.
|
|
21
|
+
|
|
22
|
+
read is read-only (no approval); init / write are side effects (approval gate).
|
|
23
|
+
|
|
24
|
+
Key catalog — the 15 writable nodes (3 whole keys + docRoot's 6 sub-keys + index's 6 sub-keys): what each is; when to change it; wrong ⇒ consequence.
|
|
25
|
+
- `version` — schema version (a number); change on migration; wrong ⇒ validation refuses.
|
|
26
|
+
- `phase` — `initial-dev` / `production`; change when the stage is crossed; wrong ⇒ validation refuses.
|
|
27
|
+
- `codePaths` — path segment names (segment match at any depth; **no default segment** — the key is empty until the project declares one, so a project that never declares it has no code segment, and a `.md` under `src/` reads as a document); change when the layout moves; wrong ⇒ no segment is classified.
|
|
28
|
+
- `docRoot.requirements` · `docRoot.specs` · `docRoot.design` · `docRoot.modules` · `docRoot.batches` — each doc-layer root (a string | a multi-root array | `null` = absent); change when a layer moves; wrong ⇒ validation refuses, or checks / batch landing / review roots point elsewhere.
|
|
29
|
+
- `docRoot.standards` — the standards **layer**: one directory of `.md` files (a string | a multi-directory array | `null` = no such face; default `null` — no default directory, so no default name to guess); members = every `.md` file under it, subdirectories included, in layer-root-relative path order (case-insensitive; symbolic links not followed); change it when a standards document is added or the layer moves; wrong ⇒ the reviewer reports the declaration unreadable and names the path, splitting the cause (no such directory / not a directory / no .md file), never a silent skip. A file path is not accepted (one key, one meaning).
|
|
30
|
+
- `index.codeExtensions` · `index.docExtensions` — extra code / doc extensions (unioned, add-only); change when a type is missing from the index; wrong ⇒ that type stays out.
|
|
31
|
+
- `index.excludePaths` — project-root-relative prefixes for the index; change to keep a directory out; wrong ⇒ it is still indexed, or another is wrongly excluded.
|
|
32
|
+
- `index.docCheckExcludePaths` — project-root-relative prefixes the document check leaves alone: a document under one is not judged and not counted, and a manifest that cannot be read excludes nothing, so every document is judged. Not interchangeable with `index.excludePaths`, which the index reads.
|
|
33
|
+
- `index.publicRepos` — public-repo paths (resolvable from this repo root) = this repo's out-edge table: a repo listed here may be **searched and cited**. Change it when wiring one in or dropping one; not listed ⇒ that repo is outside this project's searchable corpus and is not a source this project can cite. Not interchangeable with `index.writableRepos` (reading ≠ writing).
|
|
34
|
+
- `index.writableRepos` — external **directories** this repo may write into (directories, not repos — no `.git` / manifest is read; resolvable from this repo root) = this repo's write-rights table, one-way: the target gets no say, and git permissions are the real defence. A target inside the table ⇒ the write gate takes the ledger row number from **this** project's ledger and books the change here; outside it ⇒ the gate refuses and names this table. Change it only when you mean to spend **this repo's** account on an external directory — empty means the target can only be written under its own account. Not interchangeable with `index.publicRepos` (reading ≠ writing). Wrong ⇒ that directory's writes are still refused (the refusal names `writableRepos` and the target), or a directory you did not mean to open sits in the table.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
aliases: 记忆, 只读记忆, 检索记忆
|
|
2
|
+
Two actions:
|
|
3
|
+
|
|
4
|
+
- `search` — find knowledge saved in previous sessions. Each result row carries `[layer]` plus the entry id, and the id's prefix is the layer.
|
|
5
|
+
- `list` — inventory what memory holds, one row per entry: `[layer] id [type] title (date)`. A truncated list notes the full count.
|
|
6
|
+
|
|
7
|
+
Use it before re-exploring something the project may already know: a saved rule, a decision, a debugging pattern. Session message history is NOT in memory — that is `read_history`.
|
|
8
|
+
|
|
9
|
+
Writing memory belongs to the role that owns writes. Those actions are not part of this tool face, and calling one directly is refused before anything is written.
|
|
10
|
+
|
|
11
|
+
Layer = the memory tier: personal (private) / project (shared via this repo's .thincoder/memory/) / team (CLI only, git-synced). The `[layer]` tag, the id prefix and the `layer` parameter are the same concept.
|
|
12
|
+
|
|
13
|
+
Both actions take `layer` optionally — omit it to read every layer.
|
|
14
|
+
|
|
15
|
+
The other arguments:
|
|
16
|
+
|
|
17
|
+
- `type` — filters list by entry type: rule (coding standards) · knowledge (project facts) · decision (architecture decisions) · pattern (debugging/workflow patterns).
|
|
18
|
+
- `keyword` — filters list by a substring of the title or content.
|
|
19
|
+
- `query` — search's natural-language question.
|
|
20
|
+
- `limit` — caps the rows (list 50 by default, search 5).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
aliases: 记忆, 长期记忆, 存记忆
|
|
2
|
+
The action picks the operation:
|
|
3
|
+
- search — find knowledge saved in previous sessions; each result row carries [layer] plus an entry id whose prefix is the layer.
|
|
4
|
+
- put — save knowledge for future sessions; type = rule (coding standards) / knowledge (project facts) / decision (architecture decisions) / pattern (debugging / workflow patterns).
|
|
5
|
+
- list — inventory what memory holds; one row per entry as [layer] id [type] title (date); a truncated list notes the full count.
|
|
6
|
+
- delete, single: {id, layer} removes the entry shown in put / search / list output. `layer` is optional — passed, it is validated against the id prefix and a mismatch is refused (guards against deleting the wrong entry); omitted, the id prefix routes the delete.
|
|
7
|
+
- delete, batch (no id): {layer, type and/or keyword} removes every matching entry in that layer — layer plus at least one of type / keyword is required. Without confirm:true it returns the count and a preview; a layer-wide wipe without filters is refused on every layer.
|
|
8
|
+
- clear — {layer: "personal", confirm: true} wipes ALL personal entries. It is personal-only: a missing layer or a project / team layer is refused (use delete batch filters on shared layers).
|
|
9
|
+
- maintain — index self-maintenance, dry run by default: without confirm:true you get the plan and its readings and nothing is written; confirm:true executes. It takes no layer — it works on the whole store.
|
|
10
|
+
|
|
11
|
+
Write-gate parameters:
|
|
12
|
+
- ledger: the in-flight ledger row this call serves — `"#N"` or `"N"`.
|
|
13
|
+
- project: the project root holding `PROJECT-MANIFEST.json` (absolute or cwd-relative).
|
|
14
|
+
|
|
15
|
+
Layer = the memory tier: personal (private) / project (shared via this repo's .thincoder/memory/) / team (CLI only, git-synced). The [layer] tag, the id prefix and the layer parameter are one concept — pass a result row's [layer] as layer.
|
|
16
|
+
|
|
17
|
+
Team deletion is local only: a later team sync may bring the entry back while the remote still holds it.
|
|
18
|
+
|
|
19
|
+
Save bugs, conventions and preferences here — they persist across sessions. Session message history is NOT in memory — search it with read_history.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
aliases: 上抛, 父代理, 请示
|
|
2
|
+
It queues a message on the parent's side: your turn is not interrupted and nothing is taken out of it.
|
|
3
|
+
|
|
4
|
+
- `kind: 'ask'` - a question whose answer changes your next step and that you cannot answer from the materials you can read (task book / design doc / repo). The parent replies with `subagent action:'send'`, and you receive it as an ordinary instruction at your next turn boundary. One ask at a time while a previous one still waits in the parent's queue.
|
|
5
|
+
Read the materials first and carry the evidence you already checked (the file path plus the exact words you read) - the parent should not have to re-read for you.
|
|
6
|
+
- `kind: 'note'` - an FYI that needs no answer (a premise you found broken, a conflict you resolved and want visible early).
|
|
7
|
+
- Delivery markers: the message your parent receives is headed `[上抛·待裁]` (ask - awaiting the parent's decision) or `[上抛·知会]` (note - FYI). They are added for you - do not write these markers inside `message`. In your final report the marker is yours to write: tag items still awaiting the parent's decision `[上抛·待裁]`, FYI items `[上抛·知会]`.
|
|
8
|
+
- NON-BLOCKING: it returns immediately. Keep working on the unaffected parts and leave the affected part pending; no fetch, no polling. Finishing first means reporting the unanswered part as not done.
|
|
9
|
+
- SYNCHRONOUS SPAWN: if the parent is blocked on your run, nothing can be sent back - `send` reaches only a RUNNING ASYNC child, and the message is read when the parent's call returns (it may re-spawn you with an answer). Do not idle-wait.
|
|
10
|
+
- Out of scope: naming / implementation / wording details, anything a read or a command would answer, a trade-off the task book already states - those follow the stop-and-report discipline, not this channel. A confirmation-type question (asking for a nod before you continue) does not belong here either: the parent cannot approve anything, so the nod buys nothing - decide, or carry the question to the user-facing seat through your report.
|
|
11
|
+
- Availability: subagents only (depth > 0). At depth 0 you talk to the user through your normal reply or the `question` tool.
|
|
12
|
+
- Limits: `message` is at most 1,500 characters, and the parent's in-flight queue holds at most 20 messages - exceeding either is an explicit error, never a silent drop.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
aliases: 工具纪律, 工具选择, 检索优先级
|
|
2
|
+
## Tool discipline
|
|
3
|
+
### Search tool priority
|
|
4
|
+
Check the tool table before searching: MCP search tools (`*_web_search*`, `*_search_prime`) are primary for technical verification and general search.
|
|
5
|
+
Use `websearch` only when MCP search is not configured or its call failed.
|
|
6
|
+
It is not Bing-only: a configured DeepSeek provider answers first, then Tavily when `websearch.apiKey` is set and returned results, then Bing.
|
|
7
|
+
`websearch.backend: "local"` skips the DeepSeek leg, as does a query over 128 characters; an empty or failed DeepSeek answer falls through and adds one note beside the results a fallback leg carried.
|
|
8
|
+
Switch to an MCP search tool immediately after two consecutive junk or unrelated `websearch` results.
|
|
9
|
+
Use a mirror path for a blocked or unreachable site, such as gh-proxy.com for GitHub SDK source or type definitions.
|
|
10
|
+
Cite the page actually fetched, not a guessed official-doc URL.
|
|
11
|
+
Check for an existing fetch or search tool before scraping a page by hand: `fetch` or MCP search before `curl`-style scraping.
|
|
12
|
+
Pick search and fetch tools by the stated priority and network reachability, not by a hard-coded name.
|
|
13
|
+
Translate Chinese into English first when needed for search.
|
|
14
|
+
|
|
15
|
+
### What counts as a source
|
|
16
|
+
Use a verbatim sentence or code fragment from official docs, an official repo or a specification, with its specific page or file.
|
|
17
|
+
Treat blogs, Q&A and aggregators as leads; trace them to a first-hand source or confirm by measurement.
|
|
18
|
+
Say when no first-hand source is available and mark the assertion `unverified`.
|
|
19
|
+
If no usable search tool exists, say "no search tool in the environment" and mark the assertion `unverified`.
|
|
20
|
+
If searches find no first-hand source, keep switching sources until that is established, then state "checked, no first-hand source" and mark `unverified`.
|
|
21
|
+
Never fabricate a source.
|
|
22
|
+
Verify facts rather than copying an industry checklist.
|
|
23
|
+
Online verification requires a usable online entry in the tool table.
|
|
24
|
+
|
|
25
|
+
### Codebase exploration order
|
|
26
|
+
repo_outline → doc_search → code_search. Structure → intent → details.
|
|
27
|
+
|
|
28
|
+
### Document search — finding a document vs locating a line
|
|
29
|
+
Use `doc_search` for discovery: which document states a rule, whether a standard exists, where a decision was made, which repository holds it.
|
|
30
|
+
Use `grep` to locate exact wording once repository, directory and file are known, then read the matching text.
|
|
31
|
+
The doc-lookup rules decide when to look; these decide which tool to use.
|
|
32
|
+
|
|
33
|
+
`doc_search` covers this project's documents and repositories declared under `index.publicRepos` in one query.
|
|
34
|
+
`grep` searches only the supplied `path`, defaulting to `.` in the session's working directory; no repository boundary applies — `path: "../<repo>"` and an absolute path are searched like any other directory.
|
|
35
|
+
Treat a `grep` empty result as limited to its actual reach, not proof of cross-repository absence.
|
|
36
|
+
Report when a search finds nothing.
|
|
37
|
+
After an empty `doc_search`, `grep` is appropriate for alternate spelling or a phrase in a known file; report `doc_search: none found` beside that `grep` result.
|
|
38
|
+
|
|
39
|
+
A hit in a process document is neither a criterion nor a lead: it grounds no finding and never stands in for the requirement or design document's own words.
|
|
40
|
+
Batch records and project-declared archived pages are outside the declared index domain.
|
|
41
|
+
Open the requirement or design state document identified by such a hit before relying on it.
|
|
42
|
+
Do not turn a past batch draft into the current standard.
|
|
43
|
+
|
|
44
|
+
A repository outside `index.publicRepos` is neither searchable through `doc_search` nor citable.
|
|
45
|
+
A reference into an undeclared repository is reported as missing and fails the delivery gate.
|
|
46
|
+
When a sibling-repository topic is possible but the answer is empty, report `cross-repo: not indexed`.
|
|
47
|
+
|
|
48
|
+
### Parallel call principles
|
|
49
|
+
Batch independent read-only calls into one reply so they run concurrently.
|
|
50
|
+
A top-level spawn returns immediately and its report arrives when the session is idle.
|
|
51
|
+
The scheduler queues file conflicts and `dependsOn` dependencies automatically.
|
|
52
|
+
After dispatching a subagent, end the turn if its report is needed next; otherwise continue other work immediately.
|
|
53
|
+
Do not hold later spawns until earlier ones finish, and do not poll progress.
|
|
54
|
+
|
|
55
|
+
### Steering your own context (a session whose tool table carries `context`)
|
|
56
|
+
Use `context` to inspect usage, composition and distance from the compaction line.
|
|
57
|
+
Start compaction yourself when direction changes or context becomes noisy, and state the focus needed for upcoming work.
|
|
58
|
+
Compacted material remains retrievable through the receipt's anchor.
|
|
59
|
+
Automatic compaction at the line is a fallback, not a signal to stop; continue after compaction until the task is done.
|
|
60
|
+
|
|
61
|
+
## Tool routing — write-type scenarios route per the table, not bash
|
|
62
|
+
| Tool | Use it for | Not (use the dedicated tool instead) |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `read` | read a text file (paged / hashes=true for editing) | `cat`, `type`, `node -e fs.readFileSync` |
|
|
65
|
+
| `write` | create/overwrite a file | `echo >`, `printf >`, heredocs |
|
|
66
|
+
| `edit` | region replacement (line-number or content targeting — exact → fuzzy) | `sed -i`, `perl -p` |
|
|
67
|
+
| `hashline_edit` | content-hash-addressed edit (position-independent) | `sed` by line number |
|
|
68
|
+
| `insert_after` | insert a block after a known line / regex anchor | `sed` insertion, line-number surgery |
|
|
69
|
+
| `apply_patch` | multi-file unified diff (all-or-nothing) | `git apply` by hand |
|
|
70
|
+
| `delete` | delete one file, or an empty directory (tracked files need force) | `del`, `rm` |
|
|
71
|
+
| `file_ops` | move / copy / rename files or dirs | `mv`, `cp`, `ren` |
|
|
72
|
+
| `ls` / `glob` / `grep` / `tree` | list dirs / find files by pattern / regex search / directory tree | bash `dir`/`find`/`findstr`/`grep -rn` |
|
|
73
|
+
| `repo_outline` / `code_search` / `doc_search` | module dependency graph / code search / doc search | ad-hoc scripts, grep gymnastics |
|
|
74
|
+
| `read_image` | view an image (vision models) | external viewers |
|
|
75
|
+
| `execute` | run JS (inline or scriptFile; + nodeArgs for `node --test`/`--check`) | `bash node -e` |
|
|
76
|
+
| `bash` | package-manager/CLI subprocesses, servers, TTY programs, one-off pipelines no dedicated tool expresses | see table — dedicated tools first |
|
|
77
|
+
| `git` | ALL git operations | `git` in bash |
|
|
78
|
+
| `process` / `get_current_time` / `wait_for` | list processes / current time / condition waits | `tasklist`/`ps`, `date`, `sleep` hacks |
|
|
79
|
+
| `timer` | set a thinking-budget reminder — non-blocking; a system reminder lands at the deadline | `sleep` hacks / pushing work to later turns |
|
|
80
|
+
| `verify` | pre-completion gate (you declare verification.status; it gates mechanically — it does not run checks) | expecting it to run your tests |
|
|
81
|
+
| `memory` | long-term memory (search/put/list/delete/clear/maintain) | session notes |
|
|
82
|
+
| `fetch` / `websearch` / MCP search | fetch a URL (explicit proxy) / search with a provider chain (DeepSeek → Tavily → Bing) / technical lookups primary | `curl` scraping |
|
|
83
|
+
| `checkpoint` | git snapshots / rewind safety | manual branches |
|
|
84
|
+
| `subagent` / `advisor` / `consult_*` | delegation / independent review / consultation | inlining exploration, self-review only, single-model guessing |
|
|
85
|
+
| `question` | ask the user (ambiguity, design decisions) | guessing; routine confirm-gates (those go in your plain reply text) |
|
|
86
|
+
|
|
87
|
+
Use the `git` tool for every git operation: it snapshots before `checkout -- <path>`, `restore`, `reset --hard`, `stash pop`, `clean -f` and branch/tag deletion.
|
|
88
|
+
Recover a mistaken rollback with `checkpoint` `list` → `rewind`.
|
|
89
|
+
Do not rely on the bash guard: it checks the process `cwd`, which may be a non-repo workspace root even when the repo is in a child directory, and a shell `cd` or `Set-Location` does not change the `cwd` that guard uses.
|
|
90
|
+
Pass an explicit `workdir` to the git tool when the anchor is ambiguous.
|
|
91
|
+
|
|
92
|
+
Use `wait_for` only for states without their own delivery channel, such as a port opening or a file appearing.
|
|
93
|
+
Do not use it for an async subagent report, which arrives when the session is idle.
|
|
94
|
+
A blocking `wait_for` parks the whole session.
|
|
95
|
+
|
|
96
|
+
**Destructive commands — the tool layer catches none of this**:
|
|
97
|
+
- **Deletions go through the tool face**: use `delete`, `git rm` or a very narrow allowlist instead of `rm`, `rmdir`, `del`, `rd`, `Remove-Item` and similar commands.
|
|
98
|
+
- **Diagnostics are read-only**: only read-only existence and state commands such as `dir`, `ls`, `where` and `type`; never smuggle in a write or delete verb.
|
|
99
|
+
Follow the routing table when a dedicated tool exists; this bullet covers bare commands.
|
|
100
|
+
- **Keep failures visible**: no `2>nul` or `2>/dev/null` on destructive or write commands, and no chaining with `&` or `;` instead of `&&`.
|
|
101
|
+
- **Confirm before irreversible actions**: the main session asks the user; a subagent raises `notify_parent` `ask`.
|
|
102
|
+
- **Take responsibility for the command**: no tool-layer gate replaces your own check.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
aliases: 计划模式, 只读计划
|
|
2
|
+
In plan mode you are restricted to READ-ONLY tools: read files, search code, run read-only shell commands.
|
|
3
|
+
Use plan mode before complex multi-step tasks — explore the codebase, design the architecture, present a plan to the user.
|
|
4
|
+
|
|
5
|
+
Exit plan mode to present the plan for the user's approval; implement only after they approve.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
aliases: 进程, 只读进程
|
|
2
|
+
Nothing here kills: no process tree and no background task is terminated.
|
|
3
|
+
|
|
4
|
+
The action this tool face carries: `list` (the default). It returns one line per process (name / PID, plus memory on Windows).
|
|
5
|
+
|
|
6
|
+
**Route to process instead of bash:**
|
|
7
|
+
- `tasklist` (Windows) / `ps aux` (POSIX) → process
|
|
8
|
+
|
|
9
|
+
Parameters:
|
|
10
|
+
- action (optional, default 'list'): list — show running processes
|
|
11
|
+
- name: (list) substring filter (case-insensitive), e.g. "node", "python"
|
|
12
|
+
|
|
13
|
+
Use it to check what a previous run left behind, or whether a server you started is still up. Terminating something (`kill`) is deliberately not part of this tool face: it is destructive and stays with the roles that own it — calling it directly is refused before any process is signalled.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
aliases: 进程, 结束进程
|
|
2
|
+
List returns one line per process (name / PID, plus memory on Windows); kill returns a one-line confirmation.
|
|
3
|
+
|
|
4
|
+
**Route to process instead of bash:**
|
|
5
|
+
- `tasklist` (Windows) / `ps aux` (POSIX) → process
|
|
6
|
+
|
|
7
|
+
Parameters:
|
|
8
|
+
- action (optional, default 'list'): list — show running processes; kill — terminate a process tree (target: pid) or a background task (target: id)
|
|
9
|
+
- name: (list) substring filter (case-insensitive), e.g. "node", "python"
|
|
10
|
+
- pid: (kill) process id — the whole tree is terminated (taskkill /T /F on win32; POSIX group kill)
|
|
11
|
+
- id: (kill) background task id — the N from a `bash#N` or `browser#N` ack, as a number. bash ⇒ its process tree is terminated; browser ⇒ a queued task is dropped, a running one is aborted (the browser itself is not killed); either way the entry leaves the pool and no digest will arrive (a bash task's log so far stays readable).
|
|
12
|
+
|
|
13
|
+
Notes:
|
|
14
|
+
- kill is destructive: pass exactly one target (pid or id — never both), and it goes through the same approval gate as other destructive actions — confirm before killing.
|
|
15
|
+
- Repeating a kill is idempotent (same confirmation, no double kill); an unknown or already-finished task id comes back as `Error: ...`.
|