A searchable engineering fieldbook for people building reliable software agents.
For: aspiring AI engineers, agent builders, harness builders, and systems engineers who want to understand why a design works—not merely what files exist.
A normal summary keeps conclusions and drops the path that produced them. That is dangerous in harness work. Two designs can look identical on the happy path while behaving very differently under cancellation, retries, partial writes, provider quirks, or a full context window.
This repository keeps the engineering decision trail:
pressure -> options -> decision -> code boundary -> failure case -> test evidence -> reusable lesson
That trail is not private model chain-of-thought. It is public engineering reasoning reconstructed from design notes, source paths, named code constructs, tests, and stated trade-offs.
Each source note has a paired agent-context file that answers practical questions:
- What problem forced this design?
- What owns the behavior?
- Which source files and symbols carry it?
- What breaks when the assumption is wrong?
- Is this shipped, proposed, rejected, or historical?
- What should a Rust harness preserve without copying the TypeScript shape?
- Which nearby notes share code or face the same design pressure?
The context files use evidence labels. A named source file is strong evidence. A title-to-path match is only a search lead and is never presented as confirmed implementation.
Everything is Markdown. Retrieval needs only rg.
- Stable IDs and YAML front matter
- Broad tags that can be combined
- Aliases for symbols, events, packages, and older names
- Ready-to-copy regex patterns
- Direct links to raw notes and pinned source code
- Typed links:
source-link,shares-code-with, andsame-design-pressure - Status gates so rejected proposals do not become accidental implementation plans
AGENTS.mdwith a safe retrieval and handoff routine
No vector database, knowledge-graph service, website, or custom search daemon is required.
01-book/— the 3,050-page Judgment Edition with 705 diagrams.02-notes/— all 687 canonical English Agent Notes copied byte-for-byte from commit47f943859bef60e4160492346772ded9b24f765a.03-agent-context/— 687 tagged implementation-context files, plus Markdown indexes and regex recipes.04-code-samples/— byte-identical TypeScript files from the pinned deepseek-harness commit for the most-cited code paths, plus provenance and licensing.
The third folder is a map, not a second source of truth. If a context file conflicts with its raw note or the pinned code, the raw note and code win.
Human reader:
- Read the PDF for the connected story and mental models.
- Use
03-agent-context/INDEX.mdwhen an idea becomes useful. - Read the paired raw note before adopting the design.
Implementation agent:
- Read
AGENTS.md. - Search
03-agent-context/before searching raw notes. - Check
statusandimplementation_evidence. - Read the raw note and pinned source paths.
- Inspect the target repository before naming target files.
- Port the contract, ownership, failure behavior, and tests—not the original package layout.
Find context-compaction notes:
rg -l --fixed-strings 'domain/context' 03-agent-contextFind context notes that also discuss recovery:
rg -l -0 --fixed-strings 'domain/context' 03-agent-context | xargs -0 -r -n 40 rg -l --fixed-strings 'concern/recovery' | sort -uSearch the vocabulary used by event and content pipelines:
rg -n --pcre2 '(ContentBlockMap|BlockAssembler|SessionEventMap)' 02-notes 03-agent-contextSee 03-agent-context/REGEX-SEARCH.md for reusable patterns.
| Note state | Count |
|---|---|
| Implemented | 506 |
| Proposed | 25 |
| Rejected | 11 |
| Archived | 143 |
| Note-system roots | 2 |
| Code-map confidence | Count | Meaning |
|---|---|---|
| High | 201 | A source file or code declaration is named directly. |
| Medium | 454 | An owning package, directory, or symbol is confirmed. |
| Search lead only | 32 | Useful place to inspect; not claimed as implementation. |
The porting notes use one concrete target so advice does not stay vague:
- Tokio owns async execution.
- QuickJS/rquickjs is an orchestration DSL with explicit Rust capabilities.
- The model-facing core remains four tools:
read,write,patch, andexec. - Raw session events and evidence survive compaction.
- Provider and platform quirks stay at adapters.
- Windows sandbox support is probed at runtime and fails closed.
These are adaptation prompts, not claims that DeepSeek Harness uses this Rust design.
agent-systems agent-runtime ai-engineering harness-engineering coding-agents llm-agents rust tokio context-management software-architecture engineering-decisions technical-writing
- Upstream repository: https://github.com/deepseek-ai/deepseek-harness
- Pinned commit:
47f943859bef60e4160492346772ded9b24f765a - Upstream license: MIT; its
LICENSEis included here. - The raw-note layer is unchanged. Generated explanations should be checked against the pinned note and code before production use.