Commit Graph

731 Commits

Author SHA1 Message Date
Tianyi Cui
6227cfd03d docs(architecture): rewrite the system map to the 1,800-word budget
architecture.md is the behavior map: layering, service map, seam
pattern, and the loop — everything else defers to its owning tier.

- Seam narrations compress to two-to-four sentences plus links to the
  RFC and type-catalog homes that carry the detail (turn-end variant
  semantics -> session.md, derivation mapping -> session.md, StreamChunk
  conventions -> llm-streaming.md + source).
- The MVP feature-to-mechanism checklist moves de-statused into the
  extension cookbook as 'The feature -> mechanism map' — mechanisms
  only, no implementation-status bolding to rot; the microkernel RFC's
  proof-obligation pointer follows it.
- The layering diagram describes layers by family instead of
  enumerating packages (the stale 'future plugins: hooks, compaction'
  row is gone); the dependency rule defers to packages/README.md.
- The loop pseudocode, the three externally-cited anchors (the
  vocabulary, event taxonomy, waterfall semantics), and the filename
  are unchanged.
- Budget ratchet: docs/architecture.md 3897 -> 1800 (now 1,797 words);
  the doc-tiers RFC's deferred list prunes the item this ships.
2026-07-04 14:43:48 +08:00
Tianyi Cui
65f28580f0 Merge branch 'worktree-docs-overhaul-a-standard' into worktree-docs-overhaul-b-agents
# Conflicts:
#	scripts/doc-budgets.manifest.json
2026-07-04 14:30:12 +08:00
Tianyi Cui
65690d8cf1 fix(doc-budgets): address Codex review — exact-freeze ceilings, list missing entries
- The manifest now freezes each budgeted doc at its exact current wc -w
  count, matching the documented policy (a ceiling starts at the doc's
  current size); the headroom that contradicted the freeze claim is
  gone. Post-rewrite ratchets may still land at new-size-plus-headroom,
  per the skill's ratchet rule — that is a different moment than the
  initial freeze.
- --list now renders MISS/BAD rows for missing files and malformed
  ceilings instead of silently dropping them (gate mode already failed
  correctly; the report mode no longer under-reports).
2026-07-04 14:27:49 +08:00
Tianyi Cui
7702a33531 docs(AGENTS): rewrite the root standing orders to the 1,500-word budget
Applies the documentation standard to its biggest offender. Every rule
survives as one to three lines plus a link to its durable home; the
stories, duplicate statements, and re-narrations go:

- Situational clusters evict to new homes: docs/testing.md (tiers,
  with-key policy, real-over-mock, world-verification, real-entry-path
  guards), docs/defensive-patterns.md (the bug-class rules), and
  docs/cookbook/responding-to-pr-review-on-a-stack.md (the stacked-PR
  review procedure).
- Doc-authoring rules consolidate into docs/AGENTS.md § Writing rules
  (current-state-never-history, md-wrap, ts-block compilation, @mode,
  catalog same-change, pair same-change).
- packages/README.md drops to the group table + the extension-vs-bundle
  dependency rule; the hand ASCII graph yields to the generated
  module-graph.md; group READMEs are the canonical per-package map.
- packages/AGENTS.md keeps only its packages-specific rules (export
  shape, ctx.get, real-Loader coverage); examples/AGENTS.md repoints
  its with-key-policy link; rfc/README.md loses a narrated-history
  aside; dsh-code-review / dsh-find-simplifications / verify-md-wrap
  references follow the moved content.
- Budget manifest ratchets: AGENTS.md 8200 -> 1500 (now 1,495 words),
  packages/README.md 1900 -> 600, packages/AGENTS.md 600 -> 450; the
  two new eviction docs join the budget set (testing 800, defensive
  550); docs/AGENTS.md raises 1000 -> 1250 for the absorbed writing
  rules (the one justified increase). The doc-tiers RFC's deferred list
  prunes the two items this change ships.
2026-07-04 14:22:47 +08:00
Tianyi Cui
aa36b3b36b feat(doc-standards): documentation tiers, budgets, and the ceiling gate
Standing docs accrete a paragraph per PR with nothing pushing back; the
root AGENTS.md reached 8,130 words in 50 commits with the same rule
stated two and three times. This encodes the counter-pressure:

- docs/AGENTS.md becomes the documentation standard: the tier taxonomy
  (one home per fact), target word budgets, and the slop checklist.
- verify-doc-budgets joins doc-sync: word ceilings for the six
  accretion-prone standing docs, manifest-driven, frozen at current
  sizes and ratcheted down as each doc is brought to target.
- .agents/skills/dsh-doc-standards: the thin placement/audit/red-gate
  workflow over the standard, mirroring the dsh-translate-docs split.
- RFC (implemented/process) records the decision, alternatives, and
  the first audit cycle's deferred work list.

The gate's first catch was the standard itself (1,057 > 1,000); it
ships condensed to 984 words rather than with a raised ceiling.
2026-07-04 13:53:43 +08:00
Tianyi Cui
af584e5dc1 Merge pull request #138 from deepseek-harness/worktree-hooks-i-snapshots
test(hooks): snapshot the CC + Codex hook matrix end-to-end
2026-07-04 10:58:14 +08:00
Tianyi Cui
9a0dda64d4 Merge remote-tracking branch 'origin/master' into worktree-hooks-i-snapshots 2026-07-04 10:57:36 +08:00
Tianyi Cui
5278ee3d74 Merge pull request #131 from deepseek-harness/worktree-hooks-h-retro
docs(AGENTS): add a 'gates and judgment' note distilled from the hooks stack
2026-07-04 10:56:37 +08:00
Tianyi Cui
4377fa9801 Merge remote-tracking branch 'origin/master' into worktree-hooks-h-retro 2026-07-04 10:56:19 +08:00
Tianyi Cui
6a8adf9c80 Merge pull request #129 from deepseek-harness/worktree-hooks-g-stream-chunk
refactor(events): remove the agent/stream-chunk mirror (hooks stack PR-G)
2026-07-04 10:56:06 +08:00
Tianyi Cui
2e7688c96d Merge remote-tracking branch 'origin/master' into worktree-hooks-g-stream-chunk 2026-07-04 10:55:50 +08:00
Tianyi Cui
bffb209d7f Merge pull request #124 from deepseek-harness/worktree-hooks-f-bridges
feat(hooks): dsh-hooks-claude + dsh-hooks-codex bridges (hooks stack PR-F)
2026-07-04 10:55:37 +08:00
Tianyi Cui
536c208a7f Merge remote-tracking branch 'origin/master' into worktree-hooks-f-bridges 2026-07-04 10:55:19 +08:00
Tianyi Cui
ff21a788e3 Merge pull request #123 from deepseek-harness/worktree-hooks-e-protocol
feat(hooks): dsh-hook-protocol — shared CC/Codex hook wire-protocol core (hooks stack PR-E)
2026-07-04 10:54:57 +08:00
Tianyi Cui
74c34d63a3 Merge remote-tracking branch 'origin/master' into worktree-hooks-e-protocol 2026-07-04 10:54:41 +08:00
Tianyi Cui
2610fddfc7 Merge pull request #122 from deepseek-harness/worktree-hooks-d-subagent
feat(subagent): enrich lifecycle events — agentType + lastAssistantMessage (observe-only) (hooks stack PR-D)
2026-07-04 10:54:30 +08:00
Tianyi Cui
f7412d7494 Merge remote-tracking branch 'origin/master' into worktree-hooks-d-subagent 2026-07-04 10:54:14 +08:00
Tianyi Cui
9cedc2d1c0 Merge pull request #121 from deepseek-harness/worktree-hooks-c-interception
feat(events): interception seams — typed-Decision surface for hooks (hooks stack PR-C)
2026-07-04 10:54:01 +08:00
Tianyi Cui
152a8322d0 Merge remote-tracking branch 'origin/master' into worktree-hooks-c-interception 2026-07-04 10:53:39 +08:00
Tianyi Cui
a935de7380 Merge pull request #120 from deepseek-harness/worktree-hooks-b-bash-seam
feat(bash): stdin + extra env on the executor seam (trusted-plugin surface) (hooks stack PR-B)
2026-07-04 10:53:17 +08:00
Tianyi Cui
e8d01f6800 Merge remote-tracking branch 'origin/master' into worktree-hooks-b-bash-seam 2026-07-04 10:52:31 +08:00
Tianyi Cui
34ae0f9df5 Merge pull request #118 from deepseek-harness/worktree-hooks-a-taxonomy
refactor(events): event-domain semantics + drop step-boundary mirror emits (hooks stack PR-A)
2026-07-04 10:52:11 +08:00
Tianyi Cui
1546c6060a Merge branch 'worktree-hooks-h-retro' into worktree-hooks-i-snapshots 2026-07-04 03:31:31 +08:00
Tianyi Cui
f63ca8f00f Merge branch 'worktree-hooks-g-stream-chunk' into worktree-hooks-h-retro 2026-07-04 03:26:19 +08:00
Tianyi Cui
81c27bed36 Merge branch 'worktree-hooks-f-bridges' into worktree-hooks-g-stream-chunk
# Conflicts:
#	docs/rfc/README.md
2026-07-04 03:21:00 +08:00
Tianyi Cui
38cd1a150c Merge branch 'worktree-hooks-e-protocol' into worktree-hooks-f-bridges
# Conflicts:
#	examples/acp-agent/cordis.snapshot.yml
#	examples/acp-agent/cordis.yml
2026-07-04 03:09:37 +08:00
Tianyi Cui
7d69d759f6 Merge branch 'worktree-hooks-d-subagent' into worktree-hooks-e-protocol
# Conflicts:
#	docs/module-graph.md
#	pnpm-lock.yaml
2026-07-04 03:01:22 +08:00
Tianyi Cui
92be2724bd Merge branch 'worktree-hooks-c-interception' into worktree-hooks-d-subagent 2026-07-04 02:48:41 +08:00
Tianyi Cui
9033837081 Merge branch 'worktree-hooks-b-bash-seam' into worktree-hooks-c-interception
# Conflicts:
#	docs/architecture.md
#	docs/cordis-catalog/events-and-services.md
#	docs/core-data-structures/tools.md
#	packages/core/tools/README.md
#	packages/core/tools/src/index.ts
2026-07-04 02:44:26 +08:00
Tianyi Cui
89f3c484c1 Merge branch 'worktree-hooks-a-taxonomy' into worktree-hooks-b-bash-seam
# Conflicts:
#	docs/rfc/README.md
2026-07-04 02:26:19 +08:00
Tianyi Cui
c5ed5ff490 Merge remote-tracking branch 'origin/master' into worktree-hooks-a-taxonomy
# Conflicts:
#	docs/rfc/README.md
2026-07-04 02:15:52 +08:00
Tianyi Cui
b735c766c6 Merge pull request #134 from deepseek-harness/codex/fs-directory-listing
feat(fs): add directory listing seam
2026-07-04 01:31:10 +08:00
Tianyi Cui
ecd5ca6ce6 Merge branch 'master' into codex/fs-directory-listing 2026-07-04 01:27:42 +08:00
Tianyi Cui
43ab04d944 Merge pull request #137 from deepseek-harness/docs/update-readme-for-sdk
docs: refresh SDK README and demo naming
2026-07-04 01:27:02 +08:00
Tianyi Cui
571f5b383a Merge branch 'master' into docs/update-readme-for-sdk 2026-07-04 01:20:27 +08:00
Tianyi Cui
db885271ed docs: polish Chinese README summary 2026-07-04 01:18:32 +08:00
Tianyi Cui
51640362b5 docs: rename coding demo to repl 2026-07-04 01:07:26 +08:00
Tianyi Cui
4cf2ade4ba docs: clarify top-level demos 2026-07-04 00:57:49 +08:00
Tianyi Cui
ca91d7c2da scripts: ignore local artifacts in constraints 2026-07-04 00:57:35 +08:00
Tianyi Cui
bf1966326e Merge remote-tracking branch 'origin/master' into codex/fs-directory-listing
# Conflicts:
#	docs/rfc/README.md
#	packages/fs/fs-local/src/index.ts
2026-07-04 00:56:17 +08:00
Tianyi Cui
bae8bf4990 scripts: lint only package directories 2026-07-04 00:54:31 +08:00
Tianyi Cui
26f8d1b9b6 Merge pull request #136 from deepseek-harness/tool-presentation-submodule
refactor(tools): move render-intent vocabulary to presentation.ts
2026-07-04 00:52:34 +08:00
Tianyi Cui
39cdb3ea28 docs: add translation review guidance 2026-07-04 00:51:25 +08:00
Tianyi Cui
ed022780a2 docs: rebrand README for DeepSeek Harness SDK
Replace outdated references to 'DeepSeek Code' with the correct
product name 'DeepSeek Harness SDK'. Update demo commands to
reflect the SDK nature (demo:agent, demo:acp) rather than the
old coding-agent product.
2026-07-04 00:42:59 +08:00
Tianyi Cui
74f61c89e3 test(hooks): snapshot the CC + Codex hook matrix end-to-end
Load both hook bridges in the ACP example (dsh-hooks-claude → ./hooks.json,
dsh-hooks-codex → ./codex-hooks.json) so the full-transcript snapshot tier can
exercise each dialect against the real app. An absent config file is a silent
no-op, so a scenario carries only the file it needs and the other bridge
vanishes — verified byte-identical against every pre-existing snapshot.

Add a scenario per hook point × its headline Decision outcome, both dialects:
UserPromptSubmit block (authored, keyless) + context-fold, PreToolUse deny/ask,
PostToolUse block/context, Stop force-continue. The mid-turn scenarios are
recorded against the real API with the hook active, so the model's reaction to
a denied/blocked/force-continued turn is part of the replayed transcript.

SessionStart and SubagentStart are deliberately excluded (detached best-effort
inject races the log position — a recorded golden fails 10/10 on its own
replay), as is SubagentStop (observe-only, zero transcript footprint — a golden
could never be proven to fail). Both stay on the bridges' unit coverage. See
docs/rfc/implemented/testing/2026-07-04-hook-snapshot-matrix.md.
2026-07-04 00:40:35 +08:00
Tianyi Cui
fb78a844af docs(tools): fix cross-module JSDoc links and the catalog source list
Codex review of the vocabulary relocation found two doc-accuracy issues:

- presentation.ts's JSDoc used {@link ToolDefinition...}, which the
  TypeScript language service cannot resolve because presentation.ts
  deliberately does not import index.ts (that would create the cycle the
  split avoids). Demote those three to plain `ToolDefinition` code text;
  same-file and imported @links (TerminalResultView, ContentBlock) stay.
- docs/core-data-structures/tools.md's source header listed only index.ts
  and schema.ts; add presentation.ts, which now owns the presentation
  vocabulary the page documents.
2026-07-04 00:39:09 +08:00
Tianyi Cui
539051b2c9 refactor(tools): move render-intent vocabulary to presentation.ts
The tool render-intent vocabulary (ToolCallView/ToolResultView + members,
FileLocation, FileDiff, ToolCallKind) is the UI-facing surface of
dsh-tools; it lived inline in index.ts alongside the registry and
execution core. Move it to its own presentation.ts module so index.ts is
the registry + execute waterfall and the presentation vocabulary is a
separate, one-directional dependency.

presentation.ts owns ONLY render-intent types and references none of the
execution types; index.ts imports the view types for ToolDefinition's
presentCall/presentResult signatures (clean acyclic index -> presentation).
The opaque `meta` presentation channel (ToolExecuteReturn, ToolResult,
ToolExecutionResult) is execution plumbing and stays in index.ts.

Public surface unchanged: index.ts re-exports the vocabulary, so consumers
(tool-fs/tool-bash/tool-web/tool-todo, the ACP bridge) keep importing from
@deepseek-ai/dsh-tools with zero churn. No producer/bridge/test edits; a
pure internal relocation with no observable-output change (snapshot goldens
untouched).
2026-07-04 00:20:06 +08:00
Tianyi Cui
4e70489c73 docs(AGENTS): collapse the section to its theme; drop the two Defensive-patterns additions
The bulleted lessons and the two Defensive-patterns traps did not earn their
place. Reduce the new section to its one load-bearing sentence — gates prove
lines ran, not semantics/doc-accuracy/that a test guards anything; layer
judgment on top and lean on an independent reviewer for what gates can't see —
and drop the spawn-narrowing and AgentLoop.create-meta bullets entirely.
2026-07-04 00:04:48 +08:00
Tianyi Cui
9e71c886e3 Merge pull request #133 from deepseek-harness/docs/i18n-translate-skill
docs: bilingual docs contract, translation skill, and pairing gate
2026-07-03 23:54:32 +08:00
Tianyi Cui
19db3aa28a Merge branch 'master' into docs/i18n-translate-skill 2026-07-03 23:50:53 +08:00