Skip to content

Harness engineering beginner tutorial, from 0 to 1

Add docs resource library and OpenAI advanced pack

sanbuphyc70d6fa31f83
diff --git a/README-CN.md b/README-CN.md
index 0ccb984..8a88061 100644
--- a/README-CN.md
+++ b/README-CN.md
@@ -71,6 +71,10 @@ Harness engineering 指的是:围绕模型搭建一整套工作环境,让它
每个文件的详细用法写在 [中文模板指南](./resources/zh/templates/README.md)。英文版见 [English template guide](./resources/en/templates/README.md)。
+如果你想直接用 OpenAI 那篇 harness engineering 文章里的更完整高级结构,可以继续看
+[`docs/resources/zh/openai-advanced/`](./docs/resources/zh/openai-advanced/README.md)
+和 [`docs/resources/en/openai-advanced/`](./docs/resources/en/openai-advanced/README.md)。
+
## 课程大纲
### 讲义
diff --git a/README.md b/README.md
index cdad9ed..437ad33 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,11 @@ When your project gets more complex, add these:
Each file has detailed usage instructions in the [English template guide](./resources/en/templates/README.md). Chinese versions are available in [中文模板指南](./resources/zh/templates/README.md).
+If you want the fuller OpenAI-style repository layout from the
+"Harness engineering" post, use the advanced pack in
+[`docs/resources/en/openai-advanced/`](./docs/resources/en/openai-advanced/README.md) or
+[`docs/resources/zh/openai-advanced/`](./docs/resources/zh/openai-advanced/README.md).
+
## Syllabus
### Lectures
diff --git a/docs/resources/README.md b/docs/resources/README.md
new file mode 100644
index 0000000..8369913
--- /dev/null
+++ b/docs/resources/README.md
@@ -0,0 +1,42 @@
+# 资料库
+
+这里是课程的双语 starter library,用来把课程里的方法整理成可直接复用的模板、检查清单和参考材料。
+
+英文入口见:[English Resource Overview](/en/resources)
+
+## 先看中文
+
+- [中文资料库总览](./zh/README.md)
+- [中文模板](./zh/templates/README.md)
+- [中文参考](./zh/reference/README.md)
+
+## English Resources
+
+- [English Resource Library](./en/README.md)
+- [English Templates](./en/templates/README.md)
+- [English Reference](./en/reference/README.md)
+
+## 这里能找到什么
+
+- 根指令模板
+- 功能状态与进度文件
+- 会话交接与收尾检查清单
+- 启动脚本参考
+- initializer 与 coding-agent 工作流说明
+- 适合更长周期协作的 OpenAI 风格高级仓库骨架
+
+## 推荐最小起步
+
+- `AGENTS.md` 或 `CLAUDE.md`
+- `feature_list.json`
+- `claude-progress.md`
+- `init.sh`
+
+先从这四个文件开始,再根据项目复杂度补充 handoff、evaluator 和质量治理材料。
+
+## 高级资源包
+
+如果最小 harness 已经不够,可以继续看 OpenAI 风格的 advanced pack:
+
+- 中文:[`zh/openai-advanced/README.md`](./zh/openai-advanced/README.md)
+- English:[`en/openai-advanced/README.md`](./en/openai-advanced/README.md)
diff --git a/docs/resources/en/README.md b/docs/resources/en/README.md
new file mode 100644
index 0000000..f612fb2
--- /dev/null
+++ b/docs/resources/en/README.md
@@ -0,0 +1,58 @@
+# English Resource Library
+
+This folder turns the course methods into copy-ready templates and compact
+references you can use in a real repository.
+
+## When To Use It
+
+Start here when you want Codex, Claude Code, or another coding agent to work
+across multiple sessions without constantly re-deriving setup, status, and
+scope.
+
+It is especially useful when:
+
+- work spans multiple sessions
+- features are numerous and easy to leave half-finished
+- agents tend to declare victory too early
+- startup steps are rediscovered every time
+
+## Start Here
+
+For a minimal setup, begin with:
+
+- root instructions: [`templates/AGENTS.md`](./templates/AGENTS.md) or [`templates/CLAUDE.md`](./templates/CLAUDE.md)
+- feature state: [`templates/feature_list.json`](./templates/feature_list.json)
+- progress log: [`templates/claude-progress.md`](./templates/claude-progress.md)
+- bootstrap script reference: `resources/en/templates/init.sh`
+
+Then add:
+
+- session handoff: [`templates/session-handoff.md`](./templates/session-handoff.md)
+- clean-exit checklist: [`templates/clean-state-checklist.md`](./templates/clean-state-checklist.md)
+- evaluator rubric: [`templates/evaluator-rubric.md`](./templates/evaluator-rubric.md)
+
+If you want the fuller OpenAI-style repository structure from the
+"Harness engineering" post, use the advanced pack:
+
+- [`openai-advanced/README.md`](./openai-advanced/README.md)
+
+## Library Structure
+
+- [`templates/`](./templates/README.md): templates to copy into a real repo
+- [`reference/`](./reference/README.md): method notes, startup flow, and failure-mode maps
+- [`openai-advanced/`](./openai-advanced/README.md): advanced repo skeleton,
+ system-of-record docs, and agent-first governance templates
+
+## Recommended Minimal Pack
+
+- `AGENTS.md` or `CLAUDE.md`
+- `feature_list.json`
+- `claude-progress.md`
+- `init.sh`
+
+Those four files are enough to make most agent workflows noticeably more stable.
+
+When the repo grows into a longer-running system with multiple domains, active
+plans, quality scoring, and reliability policies, move up to the
+[`openai-advanced/`](./openai-advanced/README.md) pack instead of stretching the
+minimal pack too far.
diff --git a/docs/resources/en/openai-advanced/README.md b/docs/resources/en/openai-advanced/README.md
new file mode 100644
index 0000000..6f47556
--- /dev/null
+++ b/docs/resources/en/openai-advanced/README.md
@@ -0,0 +1,83 @@
+# OpenAI Advanced Pack
+
+This folder packages the more opinionated repository shape described in
+OpenAI's "Harness engineering: leveraging Codex in an agent-first world"
+article into copy-ready starter files.
+
+Use this pack when the minimal harness is no longer enough and your repository
+now needs:
+
+- a short routing-style `AGENTS.md`
+- durable system-of-record docs inside the repo
+- active and completed execution plans
+- explicit product, reliability, security, and frontend policy files
+- quality scoring by product domain and architectural layer
+- model-friendly reference material folders
+- standard operating procedures for architecture, knowledge capture, and runtime validation
+
+## Included Starter Layout
+
+The starter pack under [`repo-template/`](./repo-template/README.md) mirrors the
+structure below:
+
+```text
+AGENTS.md
+ARCHITECTURE.md
+docs/
+├── design-docs/
+│ ├── index.md
+│ └── core-beliefs.md
+├── exec-plans/
+│ ├── active/
+│ ├── completed/
+│ └── tech-debt-tracker.md
+├── generated/
+│ └── db-schema.md
+├── product-specs/
+│ ├── index.md
+│ └── new-user-onboarding.md
+├── references/
+│ ├── design-system-reference-llms.txt
+│ ├── nixpacks-llms.txt
+│ └── uv-llms.txt
+├── DESIGN.md
+├── FRONTEND.md
+├── PLANS.md
+├── PRODUCT_SENSE.md
+├── QUALITY_SCORE.md
+├── RELIABILITY.md
+└── SECURITY.md
+```
+
+## How To Adopt It
+
+1. Start from the minimal pack if your repo is still small.
+2. Copy the files in [`repo-template/`](./repo-template/README.md) into your
+ own repository once you need stronger structure.
+3. Keep `AGENTS.md` short. Treat it as a router into the deeper docs, not as an
+ encyclopedia.
+4. Update the quality, reliability, and plan docs as part of normal work, not
+ as a separate cleanup day.
+5. Keep generated artifacts and external references explicit so agents can find
+ them without relying on chat history.
+
+## SOP Library
+
+The [`sops/`](./sops/README.md) folder turns the article's diagrams into
+step-by-step operating procedures:
+
+- layered domain architecture setup
+- encode unseen knowledge into the repository
+- local observability stack and feedback-loop workflow
+- Chrome DevTools validation loop for UI work
+
+## Design Principles
+
+- Short entrypoint, deeper linked docs
+- Repository as system of record
+- Mechanical checks beat remembered rules
+- Plans and quality history live beside the code
+- Cleanup and simplification are first-class responsibilities
+
+This pack is intentionally opinionated, but it should still be adapted to your
+project rather than copied blindly.
diff --git a/docs/resources/en/openai-advanced/repo-template/AGENTS.md b/docs/resources/en/openai-advanced/repo-template/AGENTS.md
new file mode 100644
index 0000000..8390052
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/AGENTS.md
@@ -0,0 +1,61 @@
+# AGENTS.md
+
+This repository is optimized for long-running coding-agent work. Keep this file
+short. Use it as the routing layer into the system-of-record docs, not as a
+giant instruction dump.
+
+## Startup Workflow
+
+Before changing code:
+
+1. Confirm the repo root with `pwd`.
+2. Read `ARCHITECTURE.md` for the current system map and hard dependency rules.
+3. Read `docs/QUALITY_SCORE.md` to see which domains or layers are weakest.
+4. Read `docs/PLANS.md`, then open the active plan you are working from.
+5. Read the relevant product spec in `docs/product-specs/`.
+6. Run the standard bootstrap and verification path for this repo.
+7. If baseline verification is failing, repair the baseline before adding scope.
+
+## Routing Map
+
+- `ARCHITECTURE.md`: domain map, layer model, dependency rules
+- `docs/design-docs/index.md`: design decisions and core beliefs
+- `docs/product-specs/index.md`: current product behaviors and acceptance targets
+- `docs/PLANS.md`: plan lifecycle and execution-plan policy
+- `docs/QUALITY_SCORE.md`: product-domain and layer health
+- `docs/RELIABILITY.md`: runtime signals, benchmarks, and restart expectations
+- `docs/SECURITY.md`: secrets, sandbox, data, and external-action rules
+- `docs/FRONTEND.md`: UI constraints, design system rules, accessibility checks
+
+## Working Contract
+
+- Work from one bounded plan or feature slice at a time.
+- Do not mark work done from code inspection alone; runnable evidence is
+ required.
+- If you change behavior, update the matching product, plan, or reliability
+ docs in the same session.
+- If you see repeated review feedback, promote it into a mechanical rule, check,
+ or linter instead of re-explaining it in chat.
+- Keep generated material in `docs/generated/` and source references in
+ `docs/references/`.
+- Prefer adding small, current docs over growing this file.
+
+## Definition Of Done
+
+A change is done only when all of the following are true:
+
+- target behavior is implemented
+- required verification actually ran
+- evidence is linked from the relevant plan or quality document
+- affected docs remain current
+- the repository can restart cleanly from the standard startup path
+
+## End Of Session
+
+Before ending a session:
+
+1. Update the active execution plan.
+2. Update `docs/QUALITY_SCORE.md` if any domain or layer meaningfully changed.
+3. Record new debt in `docs/exec-plans/tech-debt-tracker.md` if you deferred it.
+4. Move finished plans to `docs/exec-plans/completed/` when appropriate.
+5. Leave the repo in a restartable state with a clear next action.
diff --git a/docs/resources/en/openai-advanced/repo-template/ARCHITECTURE.md b/docs/resources/en/openai-advanced/repo-template/ARCHITECTURE.md
new file mode 100644
index 0000000..574920d
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/ARCHITECTURE.md
@@ -0,0 +1,57 @@
+# ARCHITECTURE.md
+
+This file is the top-level map of the system. It should stay concise and point
+to deeper documents when needed.
+
+## System Shape
+
+- Product: `[replace with product name]`
+- Primary user workflow: `[replace with main workflow]`
+- Runtime surfaces: `[desktop / web / cli / services / workers]`
+- Source of truth for product behavior: `docs/product-specs/`
+
+## Domain Map
+
+| Domain | Purpose | Primary Entry Points | Related Spec |
+|--------|---------|----------------------|--------------|
+| `[domain-a]` | `[what it owns]` | `[modules / routes / commands]` | `[spec path]` |
+| `[domain-b]` | `[what it owns]` | `[modules / routes / commands]` | `[spec path]` |
+
+## Layer Model
+
+Use a fixed directional model so agents do not invent ad hoc architecture:
+
+`Types -> Config -> Repo -> Service -> Runtime -> UI`
+
+Cross-cutting concerns should enter through explicit provider or adapter
+boundaries instead of reaching across layers directly.
+
+## Hard Dependency Rules
+
+- Lower layers must not depend on higher layers.
+- UI must not bypass runtime or service contracts.
+- Data access must enter through repositories or equivalent adapters.
+- Shared utilities must remain generic and must not accumulate domain logic.
+- New dependencies should be justified in the matching plan or design doc.
+
+## Cross-Cutting Interfaces
+
+| Concern | Approved Boundary | Notes |
+|--------|-------------------|-------|
+| Logging and tracing | `[provider / utility path]` | `[structured only, no ad hoc console use]` |
+| Auth | `[provider path]` | `[token/session rules]` |
+| External APIs | `[client or provider path]` | `[rate limit / retry guidance]` |
+| Feature flags | `[flag boundary]` | `[ownership]` |
+
+## Current Hot Spots
+
+- `[area that is hardest for agents to change safely]`
+- `[area with weak boundaries or fragile tests]`
+
+## Change Checklist
+
+When you touch architecture-relevant code:
+
+1. Update this file if the domain map or allowed boundaries changed.
+2. Update the related design doc in `docs/design-docs/` if the reasoning changed.
+3. Add or update an executable check if the rule should be enforced mechanically.
diff --git a/docs/resources/en/openai-advanced/repo-template/README.md b/docs/resources/en/openai-advanced/repo-template/README.md
new file mode 100644
index 0000000..28ba73f
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/README.md
@@ -0,0 +1,24 @@
+# Advanced Repo Template
+
+Copy this starter into a real repository when you want an OpenAI-style
+agent-first documentation surface instead of only a minimal harness.
+
+## Copy Order
+
+1. Copy `AGENTS.md` and `ARCHITECTURE.md` to the repo root.
+2. Copy the whole `docs/` tree.
+3. Fill in `docs/PRODUCT_SENSE.md`, `docs/QUALITY_SCORE.md`, and
+ `docs/RELIABILITY.md` first.
+4. Add your first active plan under `docs/exec-plans/active/`.
+5. Keep the entrypoint files short and route detail into the linked docs.
+
+## What This Template Optimizes For
+
+- durable repo-local context
+- progressive disclosure instead of one giant instruction file
+- explicit plan lifecycle
+- quality tracking over time
+- readable boundaries for agents and humans
+
+Treat every file here as a starter. Replace placeholders, examples, and sample
+commands with your real project specifics before relying on it.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/DESIGN.md b/docs/resources/en/openai-advanced/repo-template/docs/DESIGN.md
new file mode 100644
index 0000000..46bf163
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/DESIGN.md
@@ -0,0 +1,28 @@
+# DESIGN.md
+
+This file is the design entrypoint. Keep it brief and use it to route into the
+more detailed files under `docs/design-docs/`.
+
+## Purpose
+
+Record durable product and system design decisions that should survive beyond a
+single chat, sprint, or reviewer memory.
+
+## Read This When
+
+- you need the current design philosophy
+- you are about to introduce a new pattern
+- you need to know which design decisions are settled versus still open
+
+## Canonical Design Docs
+
+- `docs/design-docs/index.md`: index of accepted, proposed, and deprecated docs
+- `docs/design-docs/core-beliefs.md`: project-wide agent-first beliefs
+
+## Design Rules
+
+- Keep design docs small and current.
+- Prefer one doc per decision area.
+- Link design docs from plans and specs when a change depends on them.
+- If a design rule becomes operationally critical, promote it into an automated
+ check or update `ARCHITECTURE.md`.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/FRONTEND.md b/docs/resources/en/openai-advanced/repo-template/docs/FRONTEND.md
new file mode 100644
index 0000000..05cae78
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/FRONTEND.md
@@ -0,0 +1,24 @@
+# FRONTEND.md
+
+This file defines stable frontend expectations so agents do not invent UI
+patterns unpredictably.
+
+## UI Principles
+
+- Optimize for clarity before novelty.
+- Keep interaction flows discoverable and restartable.
+- Prefer a small number of reusable components over one-off variants.
+- Accessibility checks are part of normal verification, not polish work.
+
+## Guardrails
+
+- Document the design system or component library in `docs/references/`.
+- Record key user-facing states: empty, loading, success, error, retry.
+- Keep copy, keyboard behavior, and visual hierarchy consistent across flows.
+- When a UI bug is fixed, add or update the matching validation step.
+
+## Verification Expectations
+
+- Capture evidence for critical user journeys.
+- Record browser or runtime validation steps in the relevant plan.
+- If visual regressions are common, standardize screenshot or DOM checks.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/PLANS.md b/docs/resources/en/openai-advanced/repo-template/docs/PLANS.md
new file mode 100644
index 0000000..dd9729e
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/PLANS.md
@@ -0,0 +1,35 @@
+# PLANS.md
+
+This file defines how execution plans are created, updated, completed, and
+archived.
+
+## When A Plan Is Required
+
+Create an execution plan when work:
+
+- spans more than one session
+- changes more than one subsystem
+- has non-trivial verification or rollout risk
+- depends on open decisions that should be logged
+
+## Plan Locations
+
+- `docs/exec-plans/active/`: plans currently driving work
+- `docs/exec-plans/completed/`: finished plans kept for future agent context
+- `docs/exec-plans/tech-debt-tracker.md`: deferred work and follow-ups
+
+## Minimum Plan Sections
+
+- objective
+- scope and out-of-scope
+- verification path
+- risks and blockers
+- progress log
+- open decisions
+
+## Operating Rules
+
+- One active plan should have one clearly owned current step.
+- Update the plan as work progresses; do not treat it as static prose.
+- If a decision changes implementation direction, record it in the plan.
+- Move finished plans to `completed/` so agents can still discover prior context.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/PRODUCT_SENSE.md b/docs/resources/en/openai-advanced/repo-template/docs/PRODUCT_SENSE.md
new file mode 100644
index 0000000..cb5c664
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/PRODUCT_SENSE.md
@@ -0,0 +1,26 @@
+# PRODUCT_SENSE.md
+
+This file captures durable product judgment that agents cannot infer reliably
+from code alone.
+
+## Product Core
+
+- Primary user: `[replace]`
+- Job to be done: `[replace]`
+- Main frustration to remove: `[replace]`
+- Quality bar for acceptance: `[replace]`
+
+## Product Rules
+
+- Favor user-visible reliability over feature count.
+- Treat ambiguous behavior as a spec gap, not as permission to guess.
+- If implementation changes what users see or trust, update the matching spec.
+- Use product specs for concrete flows, and use this file for cross-cutting
+ product priorities.
+
+## No-Go Patterns
+
+- Hidden destructive actions
+- Silent failure without user feedback
+- Unclear source of truth for visible state
+- Features that cannot be explained in one sentence
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/QUALITY_SCORE.md b/docs/resources/en/openai-advanced/repo-template/docs/QUALITY_SCORE.md
new file mode 100644
index 0000000..02674df
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/QUALITY_SCORE.md
@@ -0,0 +1,40 @@
+# QUALITY_SCORE.md
+
+This document tracks whether the repository is getting stronger or weaker over
+time.
+
+## Grading Scale
+
+- `A`: verified, legible, stable, boundaries enforced
+- `B`: working with minor gaps
+- `C`: partially working, notable confusion or instability
+- `D`: broken, unsafe, or structurally unclear
+
+## Product Domains
+
+| Domain | Grade | Verification | Agent Legibility | Test Stability | Key Gaps | Last Updated |
+|--------|-------|-------------|-----------------|---------------|----------|-------------|
+| `[domain-a]` | - | - | - | - | - | - |
+| `[domain-b]` | - | - | - | - | - | - |
+| `[domain-c]` | - | - | - | - | - | - |
+
+## Architectural Layers
+
+| Layer | Grade | Boundary Enforcement | Agent Legibility | Key Gaps | Last Updated |
+|-------|-------|---------------------|-----------------|----------|-------------|
+| Types | - | - | - | - | - |
+| Services | - | - | - | - | - |
+| Runtime | - | - | - | - | - |
+| UI | - | - | - | - | - |
+
+## Benchmark Snapshots
+
+| Date | Harness Variant | Completion Rate | Retries | Defects Before Review | Notes |
+|------|-----------------|----------------|--------|-----------------------|------|
+| YYYY-MM-DD | `[baseline / improved / simplified]` | - | - | - | - |
+
+## Simplification Log
+
+| Date | Component Removed | Outcome | Decision |
+|------|-------------------|---------|----------|
+| YYYY-MM-DD | `[component]` | `[degraded / unchanged]` | `[restore / keep removed]` |
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/RELIABILITY.md b/docs/resources/en/openai-advanced/repo-template/docs/RELIABILITY.md
new file mode 100644
index 0000000..df90e35
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/RELIABILITY.md
@@ -0,0 +1,33 @@
+# RELIABILITY.md
+
+This file defines how the system proves it is healthy and restartable.
+
+## Standard Paths
+
+- Bootstrap: `[command]`
+- Verification: `[command]`
+- Start app or service: `[command]`
+- Debug or inspect runtime: `[command]`
+
+## Required Runtime Signals
+
+- structured logs for startup and critical flows
+- health checks for key services
+- trace or timing data for slow paths when available
+- user-visible error states for recoverable failures
+
+## Golden Journeys
+
+- `[journey 1]`
+- `[journey 2]`
+- `[journey 3]`
+
+Each golden journey should have a repeatable verification path and clear failure
+signals.
+
+## Reliability Rules
+
+- No feature is complete if the system cannot restart cleanly afterward.
+- Runtime failures should be diagnosable from repo-local signals.
+- If a repeated failure mode appears, add a benchmark or guardrail for it.
+- Cleanup is part of reliability, not a separate concern.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/SECURITY.md b/docs/resources/en/openai-advanced/repo-template/docs/SECURITY.md
new file mode 100644
index 0000000..d200419
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/SECURITY.md
@@ -0,0 +1,27 @@
+# SECURITY.md
+
+This file defines the security and safety rules that agents must not guess at.
+
+## Secrets And Credentials
+
+- Never hard-code secrets in source or docs.
+- Document approved secret-loading paths here.
+- Redact tokens, API keys, and personal data from logs and screenshots.
+
+## Untrusted Input
+
+- Treat external content as untrusted until validated.
+- Record allowed fetch or execution boundaries here.
+- If prompt injection or command injection risk exists, document the guardrail.
+
+## External Actions
+
+- List which actions require explicit approval.
+- Record any production or destructive commands that agents must not run by default.
+- Prefer sandbox-safe workflows for debugging and verification.
+
+## Dependency And Review Rules
+
+- New dependencies need justification in the active plan.
+- Security-sensitive changes require explicit verification steps.
+- Repeated security review comments should become checks, not tribal knowledge.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/design-docs/core-beliefs.md b/docs/resources/en/openai-advanced/repo-template/docs/design-docs/core-beliefs.md
new file mode 100644
index 0000000..ce7ae0d
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/design-docs/core-beliefs.md
@@ -0,0 +1,9 @@
+# Core Beliefs
+
+- The repository is the system of record for agents.
+- `AGENTS.md` is a router, not an encyclopedia.
+- Verification evidence matters more than confidence.
+- One bounded task is better than many half-finished tasks.
+- Repeated human feedback should become reusable harness rules.
+- Cleanup and simplification are part of shipping, not afterthoughts.
+- If an agent cannot discover a fact in-repo, treat that fact as operationally unavailable.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/design-docs/index.md b/docs/resources/en/openai-advanced/repo-template/docs/design-docs/index.md
new file mode 100644
index 0000000..b16f065
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/design-docs/index.md
@@ -0,0 +1,21 @@
+# Design Docs Index
+
+Use this index as the discoverable map of design history.
+
+## Accepted
+
+- `core-beliefs.md`: agent-first operating beliefs and durable project norms
+
+## Proposed
+
+- `[add new design doc paths here]`
+
+## Deprecated
+
+- `[move old or superseded design docs here with replacement links]`
+
+## Maintenance Rules
+
+- Every design doc should have an owner or update trigger.
+- Remove stale docs or mark them deprecated instead of letting them drift.
+- Link active execution plans to the design docs they depend on.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/exec-plans/active/README.md b/docs/resources/en/openai-advanced/repo-template/docs/exec-plans/active/README.md
new file mode 100644
index 0000000..4f60638
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/exec-plans/active/README.md
@@ -0,0 +1,10 @@
+# Active Plans
+
+Keep one markdown file per active execution plan in this folder.
+
+Suggested filename pattern:
+
+- `YYYY-MM-DD-short-topic.md`
+
+Each active plan should be current enough that a fresh agent session can resume
+work from the repository alone.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/exec-plans/completed/README.md b/docs/resources/en/openai-advanced/repo-template/docs/exec-plans/completed/README.md
new file mode 100644
index 0000000..256f03f
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/exec-plans/completed/README.md
@@ -0,0 +1,5 @@
+# Completed Plans
+
+Move finished plans here instead of deleting them. Completed plans are part of
+the repository memory surface and help later agent runs understand why the code
+looks the way it does.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/exec-plans/tech-debt-tracker.md b/docs/resources/en/openai-advanced/repo-template/docs/exec-plans/tech-debt-tracker.md
new file mode 100644
index 0000000..e92b6bc
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/exec-plans/tech-debt-tracker.md
@@ -0,0 +1,7 @@
+# Tech Debt Tracker
+
+Use this file for debt that is real, acknowledged, and intentionally deferred.
+
+| Date | Area | Debt | Why Deferred | Risk | Next Trigger |
+|------|------|------|--------------|------|--------------|
+| YYYY-MM-DD | `[area]` | `[debt]` | `[reason]` | `[risk]` | `[when to revisit]` |
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/generated/db-schema.md b/docs/resources/en/openai-advanced/repo-template/docs/generated/db-schema.md
new file mode 100644
index 0000000..0614159
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/generated/db-schema.md
@@ -0,0 +1,14 @@
+# Database Schema
+
+Use this folder for generated or derived artifacts that agents should be able
+to inspect without reverse-engineering them from code.
+
+## Source
+
+- Generated from: `[command or source path]`
+- Last refreshed: `YYYY-MM-DD`
+
+## Notes
+
+- Do not hand-edit generated sections.
+- Regenerate this file when the underlying schema changes.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/product-specs/index.md b/docs/resources/en/openai-advanced/repo-template/docs/product-specs/index.md
new file mode 100644
index 0000000..ad6e90c
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/product-specs/index.md
@@ -0,0 +1,14 @@
+# Product Specs Index
+
+Use this folder for current user-facing behavior specs.
+
+## Active Specs
+
+- `new-user-onboarding.md`
+
+## Rules
+
+- Specs should describe user-visible behavior and acceptance criteria.
+- If implementation diverges from the spec, update one of them in the same
+ session.
+- Keep this index current so a fresh agent can discover product scope quickly.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/product-specs/new-user-onboarding.md b/docs/resources/en/openai-advanced/repo-template/docs/product-specs/new-user-onboarding.md
new file mode 100644
index 0000000..b985494
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/product-specs/new-user-onboarding.md
@@ -0,0 +1,26 @@
+# New User Onboarding
+
+## Goal
+
+Describe the first-run experience a new user should have.
+
+## Entry Conditions
+
+- `[state before the flow starts]`
+
+## User Flow
+
+1. `[step one]`
+2. `[step two]`
+3. `[step three]`
+
+## Acceptance Criteria
+
+- `[observable outcome]`
+- `[observable outcome]`
+- `[observable outcome]`
+
+## Failure States
+
+- `[recoverable error and user feedback]`
+- `[blocked state and fallback]`
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/references/design-system-reference-llms.txt b/docs/resources/en/openai-advanced/repo-template/docs/references/design-system-reference-llms.txt
new file mode 100644
index 0000000..6f1c612
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/references/design-system-reference-llms.txt
@@ -0,0 +1,9 @@
+Purpose: store model-friendly reference material for the design system.
+
+Suggested contents:
+- component naming rules
+- spacing and typography tokens
+- state variants
+- accessibility expectations
+
+Keep this file concise and refresh it when the upstream design system changes.
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/references/nixpacks-llms.txt b/docs/resources/en/openai-advanced/repo-template/docs/references/nixpacks-llms.txt
new file mode 100644
index 0000000..c30cc9c
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/references/nixpacks-llms.txt
@@ -0,0 +1,8 @@
+Purpose: store a clean agent-readable extract of the deployment or packaging
+rules your repository depends on.
+
+Suggested contents:
+- build entrypoints
+- runtime assumptions
+- environment variable expectations
+- common failure signatures
diff --git a/docs/resources/en/openai-advanced/repo-template/docs/references/uv-llms.txt b/docs/resources/en/openai-advanced/repo-template/docs/references/uv-llms.txt
new file mode 100644
index 0000000..f2ceba9
--- /dev/null
+++ b/docs/resources/en/openai-advanced/repo-template/docs/references/uv-llms.txt
@@ -0,0 +1,8 @@
+Purpose: store a compact reference for your Python package and environment
+workflow when `uv` or similar tooling matters to the repo.
+
+Suggested contents:
+- install and sync commands
+- lockfile policy
+- virtualenv expectations
+- verification commands
diff --git a/docs/resources/en/openai-advanced/sops/README.md b/docs/resources/en/openai-advanced/sops/README.md
new file mode 100644
index 0000000..23854bc
--- /dev/null
+++ b/docs/resources/en/openai-advanced/sops/README.md
@@ -0,0 +1,25 @@
+# OpenAI Advanced SOPs
+
+These SOPs translate the article's operating patterns into concrete execution
+playbooks you can follow or adapt.
+
+## Included SOPs
+
+- [`layered-domain-architecture.md`](./layered-domain-architecture.md):
+ establish explicit layers and cross-cutting boundaries
+- [`encode-knowledge-into-repo.md`](./encode-knowledge-into-repo.md):
+ move invisible knowledge from chat, docs, and memory into repo-local files
+- [`observability-feedback-loop.md`](./observability-feedback-loop.md):
+ give agents logs, metrics, traces, and a repeatable debug loop
+- [`chrome-devtools-validation-loop.md`](./chrome-devtools-validation-loop.md):
+ use browser automation and snapshots to validate UI behavior until clean
+
+## How To Use Them
+
+1. Pick the SOP that matches your current bottleneck.
+2. Use the checklist to set up the missing artifacts or tooling.
+3. Encode the resulting rules into your copied `repo-template/` docs.
+4. Convert repeated review comments into checks, scripts, or guardrails.
+
+These are not meant to be followed blindly. They are meant to make the harness
+more legible, enforceable, and repeatable.
diff --git a/docs/resources/en/openai-advanced/sops/chrome-devtools-validation-loop.md b/docs/resources/en/openai-advanced/sops/chrome-devtools-validation-loop.md
new file mode 100644
index 0000000..409c931
--- /dev/null
+++ b/docs/resources/en/openai-advanced/sops/chrome-devtools-validation-loop.md
@@ -0,0 +1,51 @@
+# SOP: Chrome DevTools Validation Loop
+
+Use this SOP when UI work depends on actual runtime interaction and screenshots,
+DOM state, and console output matter more than code inspection alone.
+
+## Goal
+
+Turn UI validation into a repeatable interaction loop the agent can run until
+the journey is clean.
+
+## Core Loop
+
+1. Select the target page or app instance.
+2. Clear stale console noise.
+3. Capture the BEFORE state.
+4. Trigger the UI path.
+5. Observe runtime events during interaction.
+6. Capture the AFTER state.
+7. Apply the fix and restart the app if needed.
+8. Re-run validation until the journey is clean.
+
+## Required Inputs
+
+- a stable startup command
+- a reproducible UI journey
+- a way to snapshot DOM, console, or screenshots
+- a rule for what counts as "clean"
+
+## Execution SOP
+
+1. Write the target journey in the active plan.
+2. Define success in observable terms: text present, button enabled, error gone,
+ console clean, request succeeded.
+3. Snapshot the initial state before interaction.
+4. Trigger exactly one path at a time.
+5. Record runtime events, DOM changes, and visible output.
+6. If the journey fails, fix the smallest responsible layer and restart.
+7. Re-run the same path and compare BEFORE/AFTER evidence.
+
+## Clean Criteria
+
+- intended visible state is present
+- unexpected errors are absent
+- console noise is understood or cleared
+- rerunning the same path gives the same result
+
+## Repo Artifacts To Update
+
+- active execution plan
+- `docs/RELIABILITY.md` if the journey becomes a golden path
+- product spec if the visible behavior changed
diff --git a/docs/resources/en/openai-advanced/sops/encode-knowledge-into-repo.md b/docs/resources/en/openai-advanced/sops/encode-knowledge-into-repo.md
new file mode 100644
index 0000000..70e7c18
--- /dev/null
+++ b/docs/resources/en/openai-advanced/sops/encode-knowledge-into-repo.md
@@ -0,0 +1,45 @@
+# SOP: Encode Unseen Knowledge Into The Repo
+
+Use this SOP when important context still lives in Google Docs, chat threads,
+tickets, or people's heads.
+
+## Goal
+
+Make agent-invisible knowledge discoverable in the codebase so a fresh session
+can act on it without relying on prior conversation.
+
+## Trigger Signals
+
+- The agent keeps asking how the system works.
+- Humans say "we decided this in Slack" or "follow what X said last week."
+- Reviews reference product or security rules that are not written in-repo.
+- New sessions repeat discovery work that should already be settled.
+
+## Execution SOP
+
+1. List the invisible knowledge sources: docs, chats, tacit team rules, verbal decisions.
+2. For each source, ask: is this architecture, product behavior, security policy,
+ reliability expectation, plan context, or reference material?
+3. Encode it into the matching repo artifact:
+ - architecture -> `ARCHITECTURE.md`
+ - product behavior -> `docs/product-specs/`
+ - design rationale -> `docs/design-docs/`
+ - execution state -> `docs/exec-plans/`
+ - repeated external references -> `docs/references/`
+ - quality or reliability expectations -> `docs/QUALITY_SCORE.md` or `docs/RELIABILITY.md`
+4. Replace vague statements with operationally useful wording.
+5. Remove or deprecate stale copies so the repo keeps one discoverable truth.
+
+## Good Encoding Rules
+
+- Write for discoverability, not for literary completeness.
+- Prefer short documents with clear filenames.
+- Link related artifacts together.
+- Store durable rules, not meeting transcripts.
+- Update the repo in the same session that the decision is made.
+
+## Definition Of Done
+
+- A fresh agent can discover the relevant rule without asking a human.
+- The same fact is not scattered across multiple contradictory files.
+- The new artifact lives close to the code or workflow it governs.
diff --git a/docs/resources/en/openai-advanced/sops/layered-domain-architecture.md b/docs/resources/en/openai-advanced/sops/layered-domain-architecture.md
new file mode 100644
index 0000000..4019837
--- /dev/null
+++ b/docs/resources/en/openai-advanced/sops/layered-domain-architecture.md
@@ -0,0 +1,50 @@
+# SOP: Layered Domain Architecture
+
+Use this SOP when the agent keeps violating boundaries, duplicating logic across
+layers, or producing code that becomes hard to review after a few sessions.
+
+## Goal
+
+Make domain boundaries explicit enough that agents can move quickly without
+silently degrading structure.
+
+## Target Model
+
+Within a business domain, prefer this directional flow:
+
+`Types -> Config -> Repo -> Service -> Runtime -> UI`
+
+Cross-cutting concerns should enter through explicit providers or adapters.
+Shared utils stay outside the domain and should not accumulate domain logic.
+
+## Setup Checklist
+
+- Define the current domains in `ARCHITECTURE.md`.
+- Write allowed dependency directions in `ARCHITECTURE.md`.
+- Record cross-cutting interfaces such as auth, telemetry, and external APIs.
+- Add one short note for the hardest current boundary violation.
+- Decide what should be enforced mechanically by lint, tests, or scripts.
+
+## Execution SOP
+
+1. Map the codebase into domains before touching implementation style.
+2. For each domain, identify the allowed layer sequence.
+3. Identify all cross-cutting concerns and route them through providers or adapters.
+4. Move ambiguous shared logic either into the owning domain or into truly generic utils.
+5. Document the rules in `ARCHITECTURE.md`.
+6. Add one executable guardrail for the highest-cost violation.
+7. Update quality scoring after the change.
+
+## Definition Of Done
+
+- A fresh agent can tell which layer owns a change.
+- UI code no longer reaches into repo or external side effects directly.
+- Cross-cutting concerns have named entry points.
+- At least one important boundary is enforced mechanically.
+
+## Repo Artifacts To Update
+
+- `ARCHITECTURE.md`
+- `docs/QUALITY_SCORE.md`
+- `docs/design-docs/` when the rationale changed
+- `docs/PLANS.md` or the active execution plan
diff --git a/docs/resources/en/openai-advanced/sops/observability-feedback-loop.md b/docs/resources/en/openai-advanced/sops/observability-feedback-loop.md
new file mode 100644
index 0000000..478ce88
--- /dev/null
+++ b/docs/resources/en/openai-advanced/sops/observability-feedback-loop.md
@@ -0,0 +1,44 @@
+# SOP: Observability Feedback Loop
+
+Use this SOP when debugging is slow, agents keep claiming success without
+evidence, or runtime behavior is harder to inspect than the code itself.
+
+## Goal
+
+Give the agent a local feedback loop over logs, metrics, traces, and runnable
+workloads so it can reason from execution, not only from code inspection.
+
+## Minimum Stack
+
+- application emits structured logs
+- application emits metrics and traces when feasible
+- local fan-out or collection layer
+- query interfaces for logs, metrics, and traces
+- repeatable workload or user journey to rerun after each change
+
+## Execution SOP
+
+1. Define the golden runtime journeys that matter most.
+2. Add structured logs to startup and the critical path.
+3. Add metrics for latency, failure counts, or queue depth where useful.
+4. Add traces or timing markers for slow or multi-step flows.
+5. Make the signals queryable from the local dev environment.
+6. Give the agent one repeatable workload or scenario to rerun.
+7. Require the loop: query -> correlate -> reason -> implement -> restart ->
+ rerun -> verify.
+
+## Debug Session Checklist
+
+- What failed?
+- Which signal proves the failure?
+- Which layer owns the failure?
+- What changed after the fix?
+- Did the app restart cleanly?
+- Did the same workload pass after rerun?
+
+## Definition Of Done
+
+- The agent can explain a failure mode from runtime evidence.
+- The same workload can be rerun after each change.
+- Restart and rerun are part of the normal task loop.
+- Reliability signals are documented in `docs/RELIABILITY.md`.
diff --git a/docs/resources/en/reference/README.md b/docs/resources/en/reference/README.md
new file mode 100644
index 0000000..6c5b128
--- /dev/null
+++ b/docs/resources/en/reference/README.md
@@ -0,0 +1,22 @@
+# English Reference
+
+These notes explain how to use the templates as a working harness instead of a
+loose pile of files.
+
+## Reference Notes
+
+- [`method-map.md`](./method-map.md): map common long-running failure modes to
+ the artifact or policy that addresses them first
+- [`initializer-agent-playbook.md`](./initializer-agent-playbook.md): what the
+ initializer should leave behind before feature work starts
+- [`coding-agent-startup-flow.md`](./coding-agent-startup-flow.md): fixed
+ session-start flow for later coding runs
+- [`prompt-calibration.md`](./prompt-calibration.md): how to keep root
+ instructions sharp without making them bloated and brittle
+
+## Suggested Reading Order
+
+1. `method-map.md`
+2. `initializer-agent-playbook.md`
+3. `coding-agent-startup-flow.md`
+4. `prompt-calibration.md`
diff --git a/docs/resources/en/reference/coding-agent-startup-flow.md b/docs/resources/en/reference/coding-agent-startup-flow.md
new file mode 100644
index 0000000..b4d8781
--- /dev/null
+++ b/docs/resources/en/reference/coding-agent-startup-flow.md
@@ -0,0 +1,34 @@
+# Coding Agent Startup Flow
+
+Use this at the beginning of every session after initialization is complete.
+
+## Fixed Startup Template
+
+1. Run `pwd` and confirm the repository root.
+2. Read `claude-progress.md`.
+3. Read `feature_list.json`.
+4. Review recent commits with `git log --oneline -5`.
+5. Run `./init.sh`.
+6. Run a baseline smoke or end-to-end path.
+7. If the baseline is broken, fix that first.
+8. Select the highest-priority unfinished feature.
+9. Work only on that feature until it is verified or explicitly blocked.
+
+## Why This Order Matters
+
+- `pwd` prevents accidental work in the wrong directory.
+- progress and feature files recover durable state before new edits begin.
+- recent commits explain what changed most recently.
+- `init.sh` standardizes startup instead of relying on memory.
+- baseline verification catches broken starting states before new work hides
+ them.
+
+## End-Of-Session Mirror
+
+The same session should end by:
+
+1. recording progress
+2. updating feature state
+3. writing a handoff if needed
+4. committing safe work
+5. leaving a clean restart path
diff --git a/docs/resources/en/reference/initializer-agent-playbook.md b/docs/resources/en/reference/initializer-agent-playbook.md
new file mode 100644
index 0000000..622cf9b
--- /dev/null
+++ b/docs/resources/en/reference/initializer-agent-playbook.md
@@ -0,0 +1,37 @@
+# Initializer Agent Playbook
+
+Use this playbook for the first serious session in a repository, before
+incremental feature work begins.
+
+## Goal
+
+Create a stable operating surface so later sessions can implement behavior
+without re-deriving startup commands, current status, or task boundaries.
+
+## Required Outputs
+
+The initializer should leave behind at least these artifacts:
+
+- a root instruction file such as `AGENTS.md` or `CLAUDE.md`
+- a machine-readable feature surface such as `feature_list.json`
+- a durable progress artifact such as `claude-progress.md`
+- a standard startup helper such as `init.sh`
+- an initial safe commit that captures the baseline scaffold
+
+## Checklist
+
+1. Define the standard startup path.
+2. Define the standard verification path.
+3. Create the progress log and record the starting state.
+4. Decompose the work into explicit features with statuses.
+5. Create the first clean baseline commit.
+
+## Success Test
+
+A fresh session with no prior chat context should be able to answer:
+
+- what this repository does
+- how to start it
+- how to verify it
+- what is unfinished
+- what the next best step is
diff --git a/docs/resources/en/reference/method-map.md b/docs/resources/en/reference/method-map.md
new file mode 100644
index 0000000..405e4ca
--- /dev/null
+++ b/docs/resources/en/reference/method-map.md
@@ -0,0 +1,19 @@
+# Method Map
+
+This table maps the most common long-running coding-agent failure modes to the
+artifact or operating rule that usually fixes them first.
+
+| Failure mode | What it looks like in practice | Primary fix | Supporting artifact |
+| --- | --- | --- | --- |
+| Cold-start confusion | A new session spends most of its time rediscovering setup and status | Make the repository the system of record | `claude-progress.md` |
+| Scope sprawl | The agent starts several features and finishes none of them cleanly | Restrict active scope | `feature_list.json` |
+| Premature completion | The agent claims done after code edits but before runnable proof | Bind completion to evidence | `clean-state-checklist.md` |
+| Fragile startup | Every session re-learns how to boot the project | Standardize setup and verification | `init.sh` |
+| Weak handoff | The next session cannot tell what is verified, broken, or next | End with an explicit handoff | `session-handoff.md` |
+| Subjective review | Review quality depends on taste or memory | Score output with fixed categories | `evaluator-rubric.md` |
+
+## Operating Principle
+
+Add the smallest artifact that directly addresses the observed failure mode.
+Avoid solving every reliability problem by dumping more text into one global
+instruction file.
diff --git a/docs/resources/en/reference/prompt-calibration.md b/docs/resources/en/reference/prompt-calibration.md
new file mode 100644
index 0000000..0a69403
--- /dev/null
+++ b/docs/resources/en/reference/prompt-calibration.md
@@ -0,0 +1,25 @@
+# Prompt Calibration
+
+Root instructions should define the operating frame, not every possible move.
+
+## Keep In The Root File
+
+- repository purpose and scope
+- startup path
+- verification path
+- non-negotiable constraints
+- required state artifacts
+- end-of-session rules
+
+## Move Out Of The Root File
+
+- long historical edge cases
+- topic-specific implementation details
+- local architecture notes that belong near the code
+- examples that only apply to one subsystem
+
+## Working Rule
+
+The root file should help a fresh session orient itself quickly. If the file is
+becoming a dumping ground for every past failure, split the detail into smaller
+documents and link to them instead.
diff --git a/docs/resources/en/templates/AGENTS.md b/docs/resources/en/templates/AGENTS.md
new file mode 100644
index 0000000..3052639
--- /dev/null
+++ b/docs/resources/en/templates/AGENTS.md
@@ -0,0 +1,55 @@
+# AGENTS.md
+
+This repository is designed for long-running coding-agent work. The goal is not
+to maximize raw code output. The goal is to leave the repo in a state where the
+next session can continue without guessing.
+
+## Startup Workflow
+
+Before writing code:
+
+1. Confirm the working directory with `pwd`.
+2. Read `claude-progress.md` for the latest verified state and next step.
+3. Read `feature_list.json` and choose the highest-priority unfinished feature.
+4. Review recent commits with `git log --oneline -5`.
+5. Run `./init.sh`.
+6. Run the required smoke or end-to-end verification before starting new work.
+
+If baseline verification is already failing, fix that first. Do not stack new
+feature work on top of a broken starting state.
+
+## Working Rules
+
+- Work on one feature at a time.
+- Do not mark a feature complete just because code was added.
+- Keep changes within the selected feature scope unless a blocker forces a
+ narrow supporting fix.
+- Do not silently change verification rules during implementation.
+- Prefer durable repo artifacts over chat summaries.
+
+## Required Artifacts
+
+- `feature_list.json`: source of truth for feature state
+- `claude-progress.md`: session log and current verified status
+- `init.sh`: standard startup and verification path
+- `session-handoff.md`: optional compact handoff for larger sessions
+
+## Definition Of Done
+
+A feature is done only when all of the following are true:
+
+- the target behavior is implemented
+- the required verification actually ran
+- evidence is recorded in `feature_list.json` or `claude-progress.md`
+- the repository remains restartable from the standard startup path
+
+## End Of Session
+
+Before ending a session:
+
+1. Update `claude-progress.md`.
+2. Update `feature_list.json`.
+3. Record any unresolved risk or blocker.
+4. Commit with a descriptive message once the work is in a safe state.
+5. Leave the repo clean enough for the next session to run `./init.sh`
+ immediately.
diff --git a/docs/resources/en/templates/CLAUDE.md b/docs/resources/en/templates/CLAUDE.md
new file mode 100644
index 0000000..040b4ff
--- /dev/null
+++ b/docs/resources/en/templates/CLAUDE.md
@@ -0,0 +1,47 @@
+# CLAUDE.md
+
+You are working in a repository designed for long-running implementation work.
+Prioritize reliable completion, continuity across sessions, and explicit
+verification over speed.
+
+## Operating Loop
+
+At the start of every session:
+
+1. Run `pwd` and confirm you are in the expected repository root.
+2. Read `claude-progress.md`.
+3. Read `feature_list.json`.
+4. Review recent commits with `git log --oneline -5`.
+5. Run `./init.sh`.
+6. Check whether the baseline smoke or end-to-end path is already broken.
+
+Then select exactly one unfinished feature and work only on that feature until
+you either verify it or document why it is blocked.
+
+## Rules
+
+- One active feature at a time.
+- Do not claim completion without runnable evidence.
+- Do not rewrite the feature list to hide unfinished work.
+- Do not remove or weaken tests just to make the task look complete.
+- Use repository artifacts as the system of record.
+
+## Required Files
+
+- `feature_list.json`
+- `claude-progress.md`
+- `init.sh`
+- `session-handoff.md` when a compact handoff is useful
+
+## Completion Gate
+
+A feature can move to `passing` only after the required verification succeeds
+and the result is recorded.
+
+## Before You Stop
+
+1. Update the progress log.
+2. Update the feature state.
+3. Record what is still broken or unverified.
+4. Commit once the repository is safe to resume.
+5. Leave a clean restart path for the next session.
diff --git a/docs/resources/en/templates/README.md b/docs/resources/en/templates/README.md
new file mode 100644
index 0000000..797fa3c
--- /dev/null
+++ b/docs/resources/en/templates/README.md
@@ -0,0 +1,226 @@
+# Template Guide
+
+These templates are ready to copy into your own project. Each one serves a specific purpose in the agent's workflow. Edit the contents to match your project's commands, paths, feature names, and verification steps.
+
+## How to Get Started
+
+Copy these four files into your project root first:
+
+1. `AGENTS.md` or `CLAUDE.md`
+2. `init.sh`
+3. `claude-progress.md`
+4. `feature_list.json`
+
+Add the remaining files as your project grows.
+
+---
+
+## AGENTS.md
+
+The root instruction file. This is the first thing the agent reads when it starts a session. It defines the operating rules: what to do before writing code, how to work, and how to wrap up.
+
+**How to use it:**
+
+- Copy to your project root directory
+- Replace the startup workflow steps with your actual project paths and commands
+- Adjust the working rules to match your team's conventions
+- Keep the definition of done section — it's the most important part
+
+**What it does for the agent:**
+
+- Tells it to read progress and feature state before starting work
+- Forces it to work on one feature at a time
+- Requires evidence before marking anything as done
+- Defines what a clean end-of-session looks like
+
+Use `AGENTS.md` for Codex or other agents. Use `CLAUDE.md` if you're working with Claude Code — the structure is the same, just formatted for Claude's instruction style.
+
+## init.sh
+
+The startup script. Runs dependency installation, verification, and prints the start command — all in one shot.
+
+**How to use it:**
+
+- Copy to your project root
+- Edit these three variables at the top:
+ - `INSTALL_CMD` — your dependency install command (e.g. `npm install`, `pip install -r requirements.txt`)
+ - `VERIFY_CMD` — your basic verification command (e.g. `npm test`, `pytest`)
+ - `START_CMD` — your dev server start command (e.g. `npm run dev`)
+- Make it executable: `chmod +x init.sh`
+
+**What it does:**
+
+1. Prints the current directory (so you can confirm it's running in the right place)
+2. Installs dependencies
+3. Runs the verification command
+4. Prints the start command (or runs it if `RUN_START_COMMAND=1` is set)
+
+If verification fails, the agent should stop and fix the baseline before doing anything else.
+
+## claude-progress.md
+
+The progress log. Every session writes to this file, and every new session reads it first.
+
+**How to use it:**
+
+- Copy to your project root
+- Fill in the "Current Verified State" section with your project's info
+- After each session, update the session record
+
+**What each field means:**
+
+- **Current Verified State** — the single source of truth for where the project stands
+ - `Repository root directory` — where the project lives
+ - `Standard startup path` — the command to get the project running
+ - `Standard verification path` — the command to run tests
+ - `Highest priority unfinished feature` — what the next session should work on
+ - `Current blocker` — anything that's stuck
+- **Session Record** — one entry per session
+ - `Goal` — what you planned to do
+ - `Completed` — what actually got done
+ - `Verification run` — what tests were executed
+ - `Evidence recorded` — what proof was captured
+ - `Commits` — what was committed
+ - `Known risks` — what might be broken
+ - `Next best action` — where the next session should start
+
+## feature_list.json
+
+The feature tracker. A machine-readable list of every feature the agent needs to implement, along with its status, verification steps, and evidence.
+
+**How to use it:**
+
+- Copy to your project root
+- Replace the example features with your own
+- Each feature needs:
+ - `id` — a short unique identifier
+ - `priority` — integer, lower = higher priority
+ - `area` — which part of the app (e.g. "chat", "import", "search")
+ - `title` — short description
+ - `user_visible_behavior` — what the user should see when it works
+ - `status` — one of `not_started`, `in_progress`, `blocked`, `passing`
+ - `verification` — step-by-step instructions to confirm it works
+ - `evidence` — recorded proof that verification passed (filled in by the agent)
+ - `notes` — any extra context
+
+**Status rules:**
+
+- `not_started` — hasn't been touched
+- `in_progress` — the one feature currently being worked on (only one at a time)
+- `blocked` — can't proceed due to a documented issue
+- `passing` — verification passed and evidence is recorded
+
+The agent should only have one feature in `in_progress` at any time.
+
+## session-handoff.md
+
+A compact handoff note between sessions. Use this when a session ends and you want the next one to pick up quickly.
+
+**How to use it:**
+
+- Copy to your project root
+- Fill it out at the end of each session (or have the agent fill it out)
+
+**What each section covers:**
+
+- **Currently verified** — what's confirmed working and what verification was run
+- **Changes this session** — what code or infrastructure changed
+- **Still broken or unverified** — known issues and risky areas
+- **Next best action** — what the next session should do, and what not to touch
+- **Commands** — startup, verification, and debug commands for quick reference
+
+This file is optional for small sessions. It becomes important when sessions are long or when the project has multiple active areas.
+
+## clean-state-checklist.md
+
+A checklist to run through before ending each session. Makes sure the repo is in a good state for the next session to start cleanly.
+
+**How to use it:**
+
+- Copy to your project root
+- Run through it before you close a session
+- The agent should also check these items as part of its end-of-session routine
+
+**What it checks:**
+
+- Standard startup still works
+- Standard verification still runs
+- Progress log is updated
+- Feature list reflects actual state (no false `passing` entries)
+- No half-finished work left unrecorded
+- Next session can continue without manual fixes
+
+## evaluator-rubric.md
+
+A scorecard for reviewing agent output quality. Use this after a session or at project milestones to evaluate whether the work meets the bar.
+
+**How to use it:**
+
+- Copy to your project root
+- After a session (or a set of sessions), score the agent's work across six dimensions
+- Each dimension is scored 0-2
+
+**The six dimensions:**
+
+1. **Correctness** — does the implementation match the target behavior?
+2. **Verification** — were the required checks actually run, with evidence?
+3. **Scope discipline** — did the agent stay within the selected feature?
+4. **Reliability** — does the result survive a restart or re-run?
+5. **Maintainability** — is the code and documentation clear enough for the next session?
+6. **Handoff readiness** — can a new session continue using only repo artifacts?
+
+**Conclusion options:**
+
+- Accept — meets the bar
+- Revise — needs fixes before accepting
+- Block — fundamental issues that need to be resolved first
+
+**Important: the evaluator needs tuning.** Out of the box, agents are poor self-judges — they identify issues then talk themselves into approving. You will need to iterate:
+
+1. Run the evaluator on a completed sprint.
+2. Compare its scores against your own human judgment.
+3. Where they diverge, make the rubric more specific about pass/fail criteria.
+4. Re-run and check alignment.
+5. Repeat until the evaluator consistently matches human review.
+
+Plan for 3-5 tuning rounds. Record each change so you can track what improved alignment.
+
+## quality-document.md
+
+A quality snapshot that grades each product domain and architectural layer in your project. Tracks codebase health over time, not just individual session output.
+
+**How to use it:**
+
+- Copy to your project root
+- Before starting a session: read it to understand where the codebase is weakest
+- After a session: update grades based on what changed
+- Over time: compare snapshots to see which harness changes actually improved codebase health
+
+**What it grades:**
+
+- **Product domains** (e.g., document import, Q&A flow, indexing): each domain gets a grade (A-D) across verification status, agent legibility, test stability, and key gaps
+- **Architectural layers** (e.g., main process, preload, renderer, services): each layer gets a grade for boundary enforcement and agent legibility
+
+**Why it matters:**
+
+The evaluator rubric scores individual agent outputs. The quality document scores the codebase itself. They answer different questions:
+
+- Evaluator rubric: "Did the agent do good work this session?"
+- Quality document: "Is the project getting stronger or weaker over time?"
+
+**When to update:**
+
+- After each significant session
+- Before benchmark comparisons
+- After cleanup or simplification passes
+- When onboarding a new agent or model to the project
+
+**Harness simplification tie-in:**
+
+The quality document also supports harness simplification. Every harness component encodes an assumption about what the model cannot do. As models improve, these assumptions go stale. To check whether a component is still needed:
+
+1. Take a quality document snapshot.
+2. Remove one harness component.
+3. Run the benchmark task suite.
+4. Take another snapshot.
+5. Compare — if grades didn't drop, the component was overhead. If they did, restore it.
diff --git a/docs/resources/en/templates/claude-progress.md b/docs/resources/en/templates/claude-progress.md
new file mode 100644
index 0000000..c6a0a7b
--- /dev/null
+++ b/docs/resources/en/templates/claude-progress.md
@@ -0,0 +1,35 @@
+# Progress Log
+
+## Current Verified State
+
+- Repository root:
+- Standard startup path:
+- Standard verification path:
+- Current highest-priority unfinished feature:
+- Current blocker:
+
+## Session Log
+
+### Session 001
+
+- Date:
+- Goal:
+- Completed:
+- Verification run:
+- Evidence captured:
+- Commits:
+- Files or artifacts updated:
+- Known risk or unresolved issue:
+- Next best step:
+
+### Session 002
+
+- Date:
+- Goal:
+- Completed:
+- Verification run:
+- Evidence captured:
+- Commits:
+- Files or artifacts updated:
+- Known risk or unresolved issue:
+- Next best step:
diff --git a/docs/resources/en/templates/clean-state-checklist.md b/docs/resources/en/templates/clean-state-checklist.md
new file mode 100644
index 0000000..5aa8d51
--- /dev/null
+++ b/docs/resources/en/templates/clean-state-checklist.md
@@ -0,0 +1,8 @@
+# Clean State Checklist
+
+- [ ] The standard startup path still works.
+- [ ] The standard verification path still runs.
+- [ ] Current progress is recorded in the progress log.
+- [ ] Feature state reflects what is actually passing versus unverified.
+- [ ] No half-finished step is left undocumented.
+- [ ] The next session can continue without manual repair.
diff --git a/docs/resources/en/templates/evaluator-rubric.md b/docs/resources/en/templates/evaluator-rubric.md
new file mode 100644
index 0000000..b1eb57e
--- /dev/null
+++ b/docs/resources/en/templates/evaluator-rubric.md
@@ -0,0 +1,24 @@
+# Evaluator Rubric
+
+Use this rubric after implementation and before final acceptance.
+
+| Category | Question | Score (0-2) | Notes |
+| --- | --- | --- | --- |
+| Correctness | Does the implemented behavior match the requested feature? | | |
+| Verification | Did the required checks actually run, with evidence? | | |
+| Scope discipline | Did the session stay inside the chosen feature scope? | | |
+| Reliability | Does the result survive restart or rerun without repair? | | |
+| Maintainability | Is the code and documentation clear enough for the next session? | | |
+| Handoff readiness | Can a fresh session continue work from repo artifacts only? | | |
+
+## Verdict
+
+- Accept
+- Revise
+- Block
+
+## Required Follow-Up
+
+- Missing evidence:
+- Required fixes:
+- Next review trigger:
diff --git a/docs/resources/en/templates/feature_list.json b/docs/resources/en/templates/feature_list.json
new file mode 100644
index 0000000..138adc6
--- /dev/null
+++ b/docs/resources/en/templates/feature_list.json
@@ -0,0 +1,64 @@
+{
+ "project": "replace-with-project-name",
+ "last_updated": "YYYY-MM-DD",
+ "rules": {
+ "single_active_feature": true,
+ "passing_requires_evidence": true,
+ "do_not_skip_verification": true
+ },
+ "status_legend": {
+ "not_started": "Work has not begun.",
+ "in_progress": "The feature is the current active task.",
+ "blocked": "Work cannot continue until a documented blocker is resolved.",
+ "passing": "Required verification has passed and evidence is recorded."
+ },
+ "features": [
+ {
+ "id": "chat-001",
+ "priority": 1,
+ "area": "chat",
+ "title": "Create a new conversation",
+ "user_visible_behavior": "A user can click New Chat and see a fresh empty conversation.",
+ "status": "not_started",
+ "verification": [
+ "Open the app.",
+ "Click New Chat.",
+ "Verify a new conversation appears in the sidebar.",
+ "Verify the main panel shows an empty conversation state."
+ ],
+ "evidence": [],
+ "notes": ""
+ },
+ {
+ "id": "chat-002",
+ "priority": 2,
+ "area": "chat",
+ "title": "Send a message in the current conversation",
+ "user_visible_behavior": "A user can submit a message and see it appear in the active thread.",
+ "status": "not_started",
+ "verification": [
+ "Open an existing conversation.",
+ "Type a message into the input.",
+ "Submit the message.",
+ "Verify the new message appears in the thread."
+ ],
+ "evidence": [],
+ "notes": ""
+ },
+ {
+ "id": "chat-003",
+ "priority": 3,
+ "area": "chat",
+ "title": "Persist the active conversation list",
+ "user_visible_behavior": "A user sees previously created conversations after restarting the app.",
+ "status": "not_started",
+ "verification": [
+ "Create two conversations.",
+ "Restart the app.",
+ "Verify both conversations still appear in the sidebar."
+ ],
+ "evidence": [],
+ "notes": ""
+ }
+ ]
+}
diff --git a/docs/resources/en/templates/init.sh b/docs/resources/en/templates/init.sh
new file mode 100755
index 0000000..d7522d6
--- /dev/null
+++ b/docs/resources/en/templates/init.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+cd "$ROOT_DIR"
+
+# Replace these commands with the correct commands for your repository.
+INSTALL_CMD=(npm install)
+VERIFY_CMD=(npm test)
+START_CMD=(npm run dev)
+
+echo "==> Working directory: $PWD"
+echo "==> Syncing dependencies"
+"${INSTALL_CMD[@]}"
+
+echo "==> Running baseline verification"
+"${VERIFY_CMD[@]}"
+
+echo "==> Startup command"
+printf ' %q' "${START_CMD[@]}"
+printf '\n'
+
+if [ "${RUN_START_COMMAND:-0}" = "1" ]; then
+ echo "==> Starting the app"
+ exec "${START_CMD[@]}"
+fi
+
+echo "Set RUN_START_COMMAND=1 if you want init.sh to launch the app directly."
diff --git a/docs/resources/en/templates/quality-document.md b/docs/resources/en/templates/quality-document.md
new file mode 100644
index 0000000..fb8699b
--- /dev/null
+++ b/docs/resources/en/templates/quality-document.md
@@ -0,0 +1,43 @@
+# Quality Document
+
+A quality snapshot for each product domain and architectural layer. Both agents and humans can use this document to quickly understand where the codebase is strong and where it needs work.
+
+**Update cadence:** After each significant session, or before starting a new phase of work.
+
+**Grading scale:**
+
+- **A**: All verification passing, clean architecture, agent-legible, stable tests
+- **B**: Verification passing, mostly clean, minor gaps in legibility or test coverage
+- **C**: Partially working, known gaps, some code areas hard for agents to understand
+- **D**: Not working, or major structural issues
+
+---
+
+## Product Domains
+
+| Domain | Grade | Verification | Agent Legibility | Test Stability | Key Gaps | Last Updated |
+|--------|-------|-------------|-----------------|---------------|----------|-------------|
+| Document Import | - | - | - | - | - | - |
+| Document Management | - | - | - | - | - | - |
+| Document Indexing | - | - | - | - | - | - |
+| Q&A Flow | - | - | - | - | - | - |
+| Grounded Answers | - | - | - | - | - | - |
+
+## Architectural Layers
+
+| Layer | Grade | Boundary Enforcement | Agent Legibility | Key Gaps | Last Updated |
+|-------|-------|---------------------|-----------------|----------|-------------|
+| Main Process | - | - | - | - | - |
+| Preload | - | - | - | - | - |
+| Renderer | - | - | - | - | - |
+| Services | - | - | - | - | - |
+
+## Change History
+
+### YYYY-MM-DD
+
+- Changes:
+- Domains promoted:
+- Domoted:
+- New gaps identified:
+- Gaps closed:
diff --git a/docs/resources/en/templates/session-handoff.md b/docs/resources/en/templates/session-handoff.md
new file mode 100644
index 0000000..c37cf46
--- /dev/null
+++ b/docs/resources/en/templates/session-handoff.md
@@ -0,0 +1,30 @@
+# Session Handoff
+
+## Verified Now
+
+- What is currently working:
+- What verification actually ran:
+
+## Changed This Session
+
+- Code or behavior added:
+- Infrastructure or harness changes:
+
+## Broken Or Unverified
+
+- Known defect:
+- Unverified path:
+- Risk for the next session:
+
+## Next Best Step
+
+- Highest-priority unfinished feature:
+- Why it is next:
+- What counts as passing:
+- What must not change during that step:
+
+## Commands
+
+- Startup:
+- Verification:
+- Focused debug command:
diff --git a/docs/resources/zh/README.md b/docs/resources/zh/README.md
new file mode 100644
index 0000000..f6be0bb
--- /dev/null
+++ b/docs/resources/zh/README.md
@@ -0,0 +1,52 @@
+# 中文资料库
+
+这个文件夹把课程里的方法整理成可以直接参考和复用的材料,不是再讲一遍概念,而是尽量回答两个问题:
+
+- 我现在应该先抄哪些文件
+- 这些文件分别解决什么问题
+
+## 适合什么时候用
+
+当你准备让 Codex、Claude Code 或其他 coding agent 在一个仓库里持续工作时,就可以从这里开始。它特别适合这些场景:
+
+- 多轮会话开发,担心上下文断裂
+- 功能多,容易出现做一半就停的半成品
+- 常常提前宣布完成,但实际没测透
+- 每次开工都要重新摸索启动方式
+
+## 从这里开始
+
+如果你想先搭一个最小可用版本,优先看这些文件:
+
+- 根指令文件:[`templates/AGENTS.md`](./templates/AGENTS.md) 或 [`templates/CLAUDE.md`](./templates/CLAUDE.md)
+- 功能状态文件:[`templates/feature_list.json`](./templates/feature_list.json)
+- 进度日志:[`templates/claude-progress.md`](./templates/claude-progress.md)
+- 启动脚本参考:`resources/zh/templates/init.sh`
+
+然后按需要补上:
+
+- 会话交接模板:[`templates/session-handoff.md`](./templates/session-handoff.md)
+- 收尾检查清单:[`templates/clean-state-checklist.md`](./templates/clean-state-checklist.md)
+- 评审模板:[`templates/evaluator-rubric.md`](./templates/evaluator-rubric.md)
+
+如果你想直接采用 OpenAI 那篇 harness engineering 文章里更完整的仓库组织方式,可以继续看:
+
+- [`openai-advanced/README.md`](./openai-advanced/README.md)
+
+## 资料库结构
+
+- [`templates/`](./templates/README.md):可以直接复制到真实仓库里的模板
+- [`reference/`](./reference/README.md):方法说明、启动流程和问题对照表
+- [`openai-advanced/`](./openai-advanced/README.md):更完整的 OpenAI 风格高级资源包,包括 repo skeleton、质量文档、执行计划和系统级治理文件
+
+## 推荐最小组合
+
+- `AGENTS.md` 或 `CLAUDE.md`
+- `feature_list.json`
+- `claude-progress.md`
+- `init.sh`
+
+先把这四样放进项目里,再开始让 agent 持续工作,通常就已经能明显降低返工和瞎猜。
+
+如果你的仓库已经进入多模块、多阶段、多角色协作,可以直接升级到
+[`openai-advanced/`](./openai-advanced/README.md) 这一套高级结构,而不是继续把最小模板硬撑成一个大而乱的系统。
diff --git a/docs/resources/zh/openai-advanced/README.md b/docs/resources/zh/openai-advanced/README.md
new file mode 100644
index 0000000..2d4c75a
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/README.md
@@ -0,0 +1,76 @@
+# OpenAI 高级资源包
+
+这个文件夹把 OpenAI 那篇《Harness engineering: leveraging Codex in an
+agent-first world》里更完整、更高阶的仓库组织方式整理成可以直接参考和复制的模板。
+
+当最小 harness 已经不够用,而你的仓库开始需要下面这些能力时,就该看这一套:
+
+- 一个简短、负责路由的 `AGENTS.md`
+- 放在仓库里的 system-of-record 文档体系
+- 活跃执行计划与已完成计划的分层管理
+- 明确的产品、可靠性、安全、前端治理文件
+- 按产品领域和架构层持续更新的质量评分
+- 面向模型阅读的 reference 材料目录
+- 针对架构、知识沉淀、运行验证的标准 SOP
+
+## 包含的目录骨架
+
+[`repo-template/`](./repo-template/README.md) 里提供了一套可直接复制的 starter
+结构,核心布局如下:
+
+```text
+AGENTS.md
+ARCHITECTURE.md
+docs/
+├── design-docs/
+│ ├── index.md
+│ └── core-beliefs.md
+├── exec-plans/
+│ ├── active/
+│ ├── completed/
+│ └── tech-debt-tracker.md
+├── generated/
+│ └── db-schema.md
+├── product-specs/
+│ ├── index.md
+│ └── new-user-onboarding.md
+├── references/
+│ ├── design-system-reference-llms.txt
+│ ├── nixpacks-llms.txt
+│ └── uv-llms.txt
+├── DESIGN.md
+├── FRONTEND.md
+├── PLANS.md
+├── PRODUCT_SENSE.md
+├── QUALITY_SCORE.md
+├── RELIABILITY.md
+└── SECURITY.md
+```
+
+## 怎么用
+
+1. 如果仓库还小,先用最小资源包。
+2. 一旦进入多模块、多轮会话、长期演化阶段,就把
+ [`repo-template/`](./repo-template/README.md) 里的骨架复制到你的仓库。
+3. 保持 `AGENTS.md` 很短,把深层规则拆到 `docs/` 里。
+4. 把质量文档、可靠性文档、执行计划当成日常开发的一部分,而不是事后补写。
+5. 把生成物和外部 reference 明确收进仓库,避免 agent 依赖聊天上下文或人的记忆。
+
+## SOP 资料库
+
+[`sops/`](./sops/README.md) 把文章里的几张关键图,整理成可以逐步执行的标准流程:
+
+- 分层领域架构搭建 SOP
+- 把不可见知识编码进仓库的 SOP
+- 本地 observability stack 与 feedback loop SOP
+- 用 Chrome DevTools 做 UI 验证闭环的 SOP
+
+## 设计原则
+
+- 短入口,深链接
+- 仓库就是 system of record
+- 机械约束优先于口头约定
+- 计划、质量和技术债都和代码一起版本化
+- cleanup 与 harness 简化是常规工作,不是临时救火
+
+这套资源包是有倾向性的模板,不是必须逐字照抄。最好的用法是把它当成一套高质量起点,再按你的项目改造。
diff --git a/docs/resources/zh/openai-advanced/repo-template/AGENTS.md b/docs/resources/zh/openai-advanced/repo-template/AGENTS.md
new file mode 100644
index 0000000..39991d1
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/AGENTS.md
@@ -0,0 +1,55 @@
+# AGENTS.md
+
+这个仓库面向长时运行的 coding-agent 工作流。保持这个文件简短,把它当成 system-of-record 文档的入口和路由层,而不是一个不断膨胀的大说明书。
+
+## 开工流程
+
+改代码前先做这些事:
+
+1. 用 `pwd` 确认仓库根目录。
+2. 读取 `ARCHITECTURE.md`,理解当前系统地图和硬性依赖规则。
+3. 读取 `docs/QUALITY_SCORE.md`,先知道最弱的产品领域和架构层。
+4. 读取 `docs/PLANS.md`,再打开当前要执行的 active plan。
+5. 读取相关的 `docs/product-specs/` 规格文档。
+6. 跑这个仓库约定的 bootstrap 与验证路径。
+7. 如果基础验证先失败,先修 baseline,再加新范围。
+
+## 路由地图
+
+- `ARCHITECTURE.md`:领域地图、分层模型、依赖规则
+- `docs/design-docs/index.md`:设计决策与核心信念
+- `docs/product-specs/index.md`:当前产品行为与验收目标
+- `docs/PLANS.md`:计划生命周期与执行计划规则
+- `docs/QUALITY_SCORE.md`:产品领域与架构层健康度
+- `docs/RELIABILITY.md`:运行信号、benchmark、重启要求
+- `docs/SECURITY.md`:密钥、沙箱、数据和外部动作规则
+- `docs/FRONTEND.md`:UI 约束、设计系统规则、可访问性检查
+
+## 工作约定
+
+- 一次只围绕一个有边界的计划或功能切片工作。
+- 不能只靠读代码就宣布完成,必须有可运行证据。
+- 只要改了行为,就同步更新对应的产品、计划或可靠性文档。
+- 如果某类 review feedback 反复出现,把它升级成机械规则、检查或 linter,不要一直在聊天里重复解释。
+- 生成物放进 `docs/generated/`,外部 reference 放进 `docs/references/`。
+- 需要更多细节时,优先补小而新的文档,而不是继续把这个文件写长。
+
+## 完成定义
+
+一个改动只有在以下条件都满足时才算完成:
+
+- 目标行为已实现
+- 要求的验证真的跑过
+- 证据已经挂到相关 plan 或质量文档里
+- 受影响的文档仍然是最新的
+- 仓库能按标准启动路径干净重启
+
+## 收尾
+
+结束会话前:
+
+1. 更新当前 active execution plan。
+2. 如果产品领域或架构层有明显变化,更新 `docs/QUALITY_SCORE.md`。
+3. 如果有延期处理的债务,记到 `docs/exec-plans/tech-debt-tracker.md`。
+4. 已完成的计划及时移到 `docs/exec-plans/completed/`。
+5. 保证仓库可重启,并留下清晰的下一步动作。
diff --git a/docs/resources/zh/openai-advanced/repo-template/ARCHITECTURE.md b/docs/resources/zh/openai-advanced/repo-template/ARCHITECTURE.md
new file mode 100644
index 0000000..914c13f
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/ARCHITECTURE.md
@@ -0,0 +1,55 @@
+# ARCHITECTURE.md
+
+这份文件是系统的顶层地图。它应该保持简短,只提供最关键的结构信息,并把更深的内容指向其他文档。
+
+## 系统形态
+
+- 产品:`[替换成产品名]`
+- 主用户流程:`[替换成核心流程]`
+- 运行面:`[desktop / web / cli / services / workers]`
+- 产品行为真相来源:`docs/product-specs/`
+
+## 领域地图
+
+| 领域 | 负责什么 | 主要入口 | 对应规格 |
+|------|---------|---------|---------|
+| `[domain-a]` | `[职责]` | `[模块 / 路由 / 命令]` | `[spec path]` |
+| `[domain-b]` | `[职责]` | `[模块 / 路由 / 命令]` | `[spec path]` |
+
+## 分层模型
+
+用固定方向的分层模型,避免 agent 临场发明架构:
+
+`Types -> Config -> Repo -> Service -> Runtime -> UI`
+
+跨领域关注点应该通过明确的 provider 或 adapter 边界进入,而不是直接跨层穿透。
+
+## 硬性依赖规则
+
+- 低层不能依赖高层。
+- UI 不能绕过 runtime 或 service 契约。
+- 数据访问必须通过 repo 或等价 adapter 进入。
+- 共享 util 必须保持通用,不能慢慢堆成领域逻辑垃圾桶。
+- 新依赖要在对应 plan 或 design doc 里说明理由。
+
+## 横切接口
+
+| 关注点 | 允许的边界 | 备注 |
+|-------|-----------|------|
+| 日志与 tracing | `[provider / utility path]` | `[只允许结构化日志,不允许临时 console]` |
+| Auth | `[provider path]` | `[token/session 规则]` |
+| 外部 API | `[client 或 provider path]` | `[限流 / 重试原则]` |
+| Feature flags | `[flag boundary]` | `[归属]` |
+
+## 当前热点
+
+- `[最难安全修改的区域]`
+- `[边界最弱或测试最脆的区域]`
+
+## 变更检查
+
+当你修改了会影响架构的代码:
+
+1. 如果领域地图或允许边界变了,就更新这份文件。
+2. 如果背后的设计理由变了,就更新 `docs/design-docs/` 里的相关文档。
+3. 如果规则应该机械执行,就补一个可执行检查。
diff --git a/docs/resources/zh/openai-advanced/repo-template/README.md b/docs/resources/zh/openai-advanced/repo-template/README.md
new file mode 100644
index 0000000..cf3d7ce
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/README.md
@@ -0,0 +1,22 @@
+# 高级仓库模板
+
+当你希望把仓库升级成更接近 OpenAI 文中那种 agent-first 文档面,而不只是一个最小 harness 时,就复制这套 starter。
+
+## 推荐复制顺序
+
+1. 先把 `AGENTS.md` 和 `ARCHITECTURE.md` 放到仓库根目录。
+2. 再复制整个 `docs/` 目录树。
+3. 优先把 `docs/PRODUCT_SENSE.md`、`docs/QUALITY_SCORE.md`、
+ `docs/RELIABILITY.md` 填起来。
+4. 在 `docs/exec-plans/active/` 下创建你的第一份 active plan。
+5. 始终保持入口文件很短,详细规则拆到链接文档里。
+
+## 这套模板主要优化什么
+
+- 持久、repo-local 的上下文
+- 渐进披露,而不是一个超长 instruction 文件
+- 明确的计划生命周期
+- 随时间演化的质量追踪
+- 对 agent 和人都更可读的边界
+
+这里的每个文件都只是起点。真正投入使用前,把占位文字、示例命令和样例规则替换成你自己的项目现实。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/DESIGN.md b/docs/resources/zh/openai-advanced/repo-template/docs/DESIGN.md
new file mode 100644
index 0000000..fd9f327
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/DESIGN.md
@@ -0,0 +1,26 @@
+# DESIGN.md
+
+这份文件是设计文档入口。保持简短,把更细的内容路由到
+`docs/design-docs/` 里的具体文件。
+
+## 目的
+
+记录那些应该跨越单次聊天、单个 sprint、单个 reviewer 记忆而持续存在的产品与系统设计决策。
+
+## 什么时候先看它
+
+- 你需要理解当前的设计哲学
+- 你准备引入新模式
+- 你要判断哪些设计已经定了,哪些还在开放状态
+
+## 核心设计文档
+
+- `docs/design-docs/index.md`:accepted / proposed / deprecated 文档索引
+- `docs/design-docs/core-beliefs.md`:项目级 agent-first 核心信念
+
+## 设计规则
+
+- 设计文档要小而新。
+- 一个决策领域尽量对应一份文档。
+- 某个改动依赖设计文档时,要在 plan 和 spec 里显式链接它。
+- 如果某条设计规则已经变成运行上的硬要求,就把它升级成自动化检查或更新到 `ARCHITECTURE.md`。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/FRONTEND.md b/docs/resources/zh/openai-advanced/repo-template/docs/FRONTEND.md
new file mode 100644
index 0000000..dea2740
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/FRONTEND.md
@@ -0,0 +1,23 @@
+# FRONTEND.md
+
+这份文件定义稳定的前端预期,避免 agent 每次都临场发明一套 UI 模式。
+
+## UI 原则
+
+- 先保证清晰,再追求新鲜感。
+- 交互流程要可发现、可重走、可重启。
+- 优先沉淀少量可复用组件,而不是到处长一次性变体。
+- 可访问性检查属于正常验证,不是最后的美化工作。
+
+## 护栏
+
+- 把设计系统或组件库参考材料放进 `docs/references/`。
+- 显式记录关键用户状态:empty、loading、success、error、retry。
+- 在不同流程里保持文案、键盘行为、视觉层级一致。
+- 修复 UI bug 后,顺手补上对应验证步骤。
+
+## 验证要求
+
+- 为关键用户旅程留下证据。
+- 把浏览器或运行时验证步骤写进相关 plan。
+- 如果视觉回归常见,就标准化截图或 DOM 检查。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/PLANS.md b/docs/resources/zh/openai-advanced/repo-template/docs/PLANS.md
new file mode 100644
index 0000000..92cfc12
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/PLANS.md
@@ -0,0 +1,34 @@
+# PLANS.md
+
+这份文件定义执行计划如何创建、更新、完成和归档。
+
+## 什么时候必须有 plan
+
+当工作满足以下任一条件时,就创建 execution plan:
+
+- 会跨越多个会话
+- 会同时影响多个子系统
+- 验证或上线风险不小
+- 存在需要显式记录的开放决策
+
+## 计划放哪
+
+- `docs/exec-plans/active/`:当前正在驱动工作的计划
+- `docs/exec-plans/completed/`:已完成但仍然要保留上下文的计划
+- `docs/exec-plans/tech-debt-tracker.md`:延期处理的债务与 follow-up
+
+## 最少要包含的部分
+
+- 目标
+- 范围与明确不做什么
+- 验证路径
+- 风险与 blocker
+- 进度日志
+- 开放决策
+
+## 运行规则
+
+- 一份 active plan 同一时间应该只有一个清晰的当前步骤。
+- plan 要随着工作推进而更新,不要把它当成静态散文。
+- 只要某个决策改变了实现方向,就记到 plan 里。
+- 已完成的计划要移到 `completed/`,让后续 agent 仍然能发现历史上下文。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/PRODUCT_SENSE.md b/docs/resources/zh/openai-advanced/repo-template/docs/PRODUCT_SENSE.md
new file mode 100644
index 0000000..bfb7db0
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/PRODUCT_SENSE.md
@@ -0,0 +1,24 @@
+# PRODUCT_SENSE.md
+
+这份文件记录那些代码本身并不能可靠表达出来的产品判断。
+
+## 产品核心
+
+- 主要用户:`[替换]`
+- 要完成的任务:`[替换]`
+- 最想解决的核心痛点:`[替换]`
+- 可接受质量门槛:`[替换]`
+
+## 产品规则
+
+- 优先保证用户可感知的可靠性,而不是一味加功能。
+- 行为有歧义时,把它当成 spec 缺口,不要默认允许猜。
+- 只要实现改变了用户看见或信任的东西,就更新对应 spec。
+- 具体流程写在 product spec 里,跨流程的产品优先级写在这里。
+
+## 禁区模式
+
+- 隐蔽的破坏性操作
+- 没有用户反馈的静默失败
+- 用户可见状态没有明确真相来源
+- 不能用一句话解释清楚的功能
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/QUALITY_SCORE.md b/docs/resources/zh/openai-advanced/repo-template/docs/QUALITY_SCORE.md
new file mode 100644
index 0000000..63c9867
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/QUALITY_SCORE.md
@@ -0,0 +1,39 @@
+# QUALITY_SCORE.md
+
+这份文档用来跟踪仓库是在变强还是变弱。
+
+## 评级标准
+
+- `A`:验证通过、可读、稳定、边界执行到位
+- `B`:可用,只有少量缺口
+- `C`:部分可用,存在明显混乱或不稳定
+- `D`:损坏、不安全,或结构上说不清楚
+
+## 产品领域
+
+| 领域 | 评级 | 验证状态 | Agent 可读性 | 测试稳定性 | 关键缺口 | 上次更新 |
+|------|------|---------|-------------|-----------|---------|---------|
+| `[domain-a]` | - | - | - | - | - | - |
+| `[domain-b]` | - | - | - | - | - | - |
+| `[domain-c]` | - | - | - | - | - | - |
+
+## 架构层
+
+| 层级 | 评级 | 边界执行 | Agent 可读性 | 关键缺口 | 上次更新 |
+|------|------|---------|-------------|---------|---------|
+| Types | - | - | - | - | - |
+| Services | - | - | - | - | - |
+| Runtime | - | - | - | - | - |
+| UI | - | - | - | - | - |
+
+## Benchmark 快照
+
+| 日期 | Harness 变体 | 完成率 | 重试次数 | Review 前缺陷数 | 备注 |
+|------|-------------|-------|---------|----------------|------|
+| YYYY-MM-DD | `[baseline / improved / simplified]` | - | - | - | - |
+
+## 简化实验日志
+
+| 日期 | 移除的组件 | 结果 | 决策 |
+|------|-----------|------|------|
+| YYYY-MM-DD | `[component]` | `[degraded / unchanged]` | `[restore / keep removed]` |
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/RELIABILITY.md b/docs/resources/zh/openai-advanced/repo-template/docs/RELIABILITY.md
new file mode 100644
index 0000000..0f8c5a5
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/RELIABILITY.md
@@ -0,0 +1,32 @@
+# RELIABILITY.md
+
+这份文件定义系统如何证明自己健康、可诊断、可重启。
+
+## 标准路径
+
+- Bootstrap:`[command]`
+- Verification:`[command]`
+- 启动应用或服务:`[command]`
+- 调试或查看运行态:`[command]`
+
+## 必需运行信号
+
+- 启动与关键流程的结构化日志
+- 关键服务的 health check
+- 条件允许时为慢路径提供 trace 或 timing 数据
+- 对可恢复失败提供用户可见的错误状态
+
+## 黄金旅程
+
+- `[journey 1]`
+- `[journey 2]`
+- `[journey 3]`
+
+每条黄金旅程都应该有可重复的验证路径和清晰的失败信号。
+
+## 可靠性规则
+
+- 只要系统不能干净重启,功能就不能算完成。
+- 运行失败必须能从 repo-local 信号里定位。
+- 某类失败模式一旦反复出现,就给它补 benchmark 或 guardrail。
+- cleanup 属于可靠性的一部分,不是另外一件事。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/SECURITY.md b/docs/resources/zh/openai-advanced/repo-template/docs/SECURITY.md
new file mode 100644
index 0000000..147a4d1
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/SECURITY.md
@@ -0,0 +1,27 @@
+# SECURITY.md
+
+这份文件定义那些 agent 绝不能靠猜来处理的安全规则。
+
+## Secrets 与凭证
+
+- 绝不把 secrets 硬编码进源码或文档。
+- 在这里记录允许的 secret 加载路径。
+- 从日志和截图里去掉 token、API key 与个人数据。
+
+## 不可信输入
+
+- 外部内容在验证前一律视为不可信。
+- 把允许的抓取或执行边界写在这里。
+- 如果存在 prompt injection 或 command injection 风险,要把 guardrail 记录清楚。
+
+## 外部动作
+
+- 列出哪些动作必须显式批准。
+- 记录哪些生产或破坏性命令默认不能跑。
+- 调试和验证优先走 sandbox-safe 路径。
+
+## 依赖与评审规则
+
+- 新依赖必须在 active plan 里说明理由。
+- 涉及安全的改动必须有显式验证步骤。
+- 反复出现的安全 review 评论要升级成检查,而不是变成口口相传的经验。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/design-docs/core-beliefs.md b/docs/resources/zh/openai-advanced/repo-template/docs/design-docs/core-beliefs.md
new file mode 100644
index 0000000..e183d8d
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/design-docs/core-beliefs.md
@@ -0,0 +1,9 @@
+# Core Beliefs
+
+- 仓库就是 agent 的 system of record。
+- `AGENTS.md` 是路由器,不是百科全书。
+- 验证证据比自信更重要。
+- 一次做好一个有边界的任务,胜过同时开很多半成品。
+- 反复出现的人类反馈要升级成可复用的 harness 规则。
+- cleanup 与 simplification 都是交付的一部分,不是事后补救。
+- 如果 agent 不能在仓库里发现某个事实,就把这个事实视为运行上不存在。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/design-docs/index.md b/docs/resources/zh/openai-advanced/repo-template/docs/design-docs/index.md
new file mode 100644
index 0000000..dcad634
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/design-docs/index.md
@@ -0,0 +1,21 @@
+# 设计文档索引
+
+把这份索引当成设计历史的可发现地图。
+
+## Accepted
+
+- `core-beliefs.md`:agent-first 的运行信念与持久项目规范
+
+## Proposed
+
+- `[在这里添加新的设计文档路径]`
+
+## Deprecated
+
+- `[把被替代或过期的设计文档移到这里,并给出替代链接]`
+
+## 维护规则
+
+- 每份设计文档都应该有 owner 或更新触发条件。
+- 过期文档要么删除,要么明确标成 deprecated,不要让它悄悄漂移。
+- active execution plan 要链接自己依赖的设计文档。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/exec-plans/active/README.md b/docs/resources/zh/openai-advanced/repo-template/docs/exec-plans/active/README.md
new file mode 100644
index 0000000..7bedbb4
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/exec-plans/active/README.md
@@ -0,0 +1,9 @@
+# Active Plans
+
+这个文件夹里每一份 markdown 都代表一份当前仍在执行的计划。
+
+建议文件名格式:
+
+- `YYYY-MM-DD-short-topic.md`
+
+每份 active plan 都应该足够新,让一个没有聊天上下文的新 agent 也能只靠仓库继续推进。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/exec-plans/completed/README.md b/docs/resources/zh/openai-advanced/repo-template/docs/exec-plans/completed/README.md
new file mode 100644
index 0000000..520632f
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/exec-plans/completed/README.md
@@ -0,0 +1,3 @@
+# Completed Plans
+
+已完成的计划移动到这里,不要直接删掉。完成计划也是仓库记忆面的一部分,后续 agent 需要靠它理解代码为什么会变成现在这样。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/exec-plans/tech-debt-tracker.md b/docs/resources/zh/openai-advanced/repo-template/docs/exec-plans/tech-debt-tracker.md
new file mode 100644
index 0000000..e5b7c35
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/exec-plans/tech-debt-tracker.md
@@ -0,0 +1,7 @@
+# 技术债跟踪
+
+这份文件只记录那些真实存在、已经确认、并且被有意识延后的技术债。
+
+| 日期 | 区域 | 债务 | 为什么延后 | 风险 | 下次触发点 |
+|------|------|------|-----------|------|-----------|
+| YYYY-MM-DD | `[area]` | `[debt]` | `[reason]` | `[risk]` | `[when to revisit]` |
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/generated/db-schema.md b/docs/resources/zh/openai-advanced/repo-template/docs/generated/db-schema.md
new file mode 100644
index 0000000..7232451
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/generated/db-schema.md
@@ -0,0 +1,13 @@
+# Database Schema
+
+这个目录用来存放那些生成出来但又值得 agent 直接阅读的工件,避免它每次都去源码里反推。
+
+## 来源
+
+- 生成命令或来源:`[command or source path]`
+- 最近刷新时间:`YYYY-MM-DD`
+
+## 备注
+
+- 生成部分不要手改。
+- 底层 schema 一变,就重新生成这份文件。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/product-specs/index.md b/docs/resources/zh/openai-advanced/repo-template/docs/product-specs/index.md
new file mode 100644
index 0000000..ea7641f
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/product-specs/index.md
@@ -0,0 +1,13 @@
+# Product Specs Index
+
+这个目录用来放当前仍然有效的用户可见行为规格。
+
+## Active Specs
+
+- `new-user-onboarding.md`
+
+## 规则
+
+- spec 重点描述用户可见行为和验收标准。
+- 如果实现和 spec 不一致,要在同一轮会话里更新其中一方。
+- 保持这份索引是最新的,让新 agent 能快速发现产品范围。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/product-specs/new-user-onboarding.md b/docs/resources/zh/openai-advanced/repo-template/docs/product-specs/new-user-onboarding.md
new file mode 100644
index 0000000..16460a8
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/product-specs/new-user-onboarding.md
@@ -0,0 +1,26 @@
+# New User Onboarding
+
+## 目标
+
+描述一个新用户第一次进入产品时应该经历的流程。
+
+## 起始条件
+
+- `[流程开始前的状态]`
+
+## 用户流程
+
+1. `[步骤一]`
+2. `[步骤二]`
+3. `[步骤三]`
+
+## 验收标准
+
+- `[用户可观察到的结果]`
+- `[用户可观察到的结果]`
+- `[用户可观察到的结果]`
+
+## 失败状态
+
+- `[可恢复错误与用户反馈]`
+- `[被阻塞状态与兜底方案]`
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/references/design-system-reference-llms.txt b/docs/resources/zh/openai-advanced/repo-template/docs/references/design-system-reference-llms.txt
new file mode 100644
index 0000000..415075c
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/references/design-system-reference-llms.txt
@@ -0,0 +1,9 @@
+用途:存放给模型阅读的 design system 参考材料。
+
+建议内容:
+- 组件命名规则
+- 间距与字体 token
+- 状态变体
+- 可访问性要求
+
+保持文件简洁;上游设计系统变化时及时刷新。
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/references/nixpacks-llms.txt b/docs/resources/zh/openai-advanced/repo-template/docs/references/nixpacks-llms.txt
new file mode 100644
index 0000000..a8295b1
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/references/nixpacks-llms.txt
@@ -0,0 +1,7 @@
+用途:存放仓库依赖的部署或打包规则的 agent-readable 摘要。
+
+建议内容:
+- build 入口
+- runtime 假设
+- 环境变量要求
+- 常见失败特征
diff --git a/docs/resources/zh/openai-advanced/repo-template/docs/references/uv-llms.txt b/docs/resources/zh/openai-advanced/repo-template/docs/references/uv-llms.txt
new file mode 100644
index 0000000..0f33a52
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/repo-template/docs/references/uv-llms.txt
@@ -0,0 +1,7 @@
+用途:当仓库依赖 `uv` 或类似工具时,存放一份紧凑的 Python 包与环境工作流参考。
+
+建议内容:
+- install 与 sync 命令
+- lockfile 策略
+- virtualenv 约定
+- verification 命令
diff --git a/docs/resources/zh/openai-advanced/sops/README.md b/docs/resources/zh/openai-advanced/sops/README.md
new file mode 100644
index 0000000..4741dae
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/sops/README.md
@@ -0,0 +1,23 @@
+# OpenAI 高级 SOP
+
+这些 SOP 把文章里的工作方式翻成可以直接参考、执行、改造的操作手册。
+
+## 包含哪些 SOP
+
+- [`layered-domain-architecture.md`](./layered-domain-architecture.md):
+ 搭建显式分层与跨领域边界
+- [`encode-knowledge-into-repo.md`](./encode-knowledge-into-repo.md):
+ 把聊天、外部文档、脑内知识变成 repo-local 文档
+- [`observability-feedback-loop.md`](./observability-feedback-loop.md):
+ 给 agent 提供 logs、metrics、traces 与可重复的调试闭环
+- [`chrome-devtools-validation-loop.md`](./chrome-devtools-validation-loop.md):
+ 用浏览器自动化和快照反复验证 UI,直到 clean
+
+## 怎么用
+
+1. 先选和你当前瓶颈最匹配的 SOP。
+2. 按检查清单补齐缺失工件或工具。
+3. 把得到的规则编码回 `repo-template/` 里的文档。
+4. 把反复出现的 review 评论升级成检查、脚本或 guardrail。
+
+这些 SOP 不是让你机械照抄,而是为了让 harness 更可读、更可执行、更可复用。
diff --git a/docs/resources/zh/openai-advanced/sops/chrome-devtools-validation-loop.md b/docs/resources/zh/openai-advanced/sops/chrome-devtools-validation-loop.md
new file mode 100644
index 0000000..e041a4e
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/sops/chrome-devtools-validation-loop.md
@@ -0,0 +1,48 @@
+# SOP:Chrome DevTools 验证闭环
+
+当 UI 改动必须经过真实交互、截图、DOM 状态和 console 输出来判断,而不是只靠读代码时,就用这份 SOP。
+
+## 目标
+
+把 UI 验证变成 agent 可以反复执行的交互闭环,直到这条用户旅程变干净。
+
+## 核心闭环
+
+1. 选定目标页面或 app 实例。
+2. 清掉旧的 console 噪声。
+3. 记录 BEFORE 状态。
+4. 触发 UI 路径。
+5. 观察交互过程中的 runtime events。
+6. 记录 AFTER 状态。
+7. 修复问题,必要时重启 app。
+8. 反复重跑验证,直到这条旅程 clean。
+
+## 必需输入
+
+- 稳定的启动命令
+- 可重复的 UI journey
+- 能抓 DOM、console 或截图的方式
+- 明确“什么算 clean”的规则
+
+## 执行 SOP
+
+1. 把目标旅程写进 active plan。
+2. 用可观察行为定义成功:文本出现、按钮可点、错误消失、console 干净、请求成功。
+3. 交互前先拍初始状态。
+4. 一次只触发一条路径。
+5. 记录 runtime event、DOM 变化和可见输出。
+6. 如果失败,只修最小负责层,然后重启。
+7. 重跑同一路径,对比 BEFORE/AFTER 证据。
+
+## Clean 标准
+
+- 目标可见状态已经出现
+- 没有意外错误
+- console 噪声已理解或清理
+- 重跑同一路径结果一致
+
+## 需要同步更新的仓库工件
+
+- 当前 active execution plan
+- 如果它变成黄金旅程,更新 `docs/RELIABILITY.md`
+- 如果可见行为改变了,更新 product spec
diff --git a/docs/resources/zh/openai-advanced/sops/encode-knowledge-into-repo.md b/docs/resources/zh/openai-advanced/sops/encode-knowledge-into-repo.md
new file mode 100644
index 0000000..190ae6a
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/sops/encode-knowledge-into-repo.md
@@ -0,0 +1,42 @@
+# SOP:把不可见知识编码进仓库
+
+当重要上下文还散落在 Google Docs、聊天记录、ticket 或人的脑子里时,就用这份 SOP。
+
+## 目标
+
+让那些 agent 以前看不见的知识,变成 codebase 里可发现、可读取、可执行的事实。
+
+## 触发信号
+
+- agent 总在追问系统到底怎么运作。
+- 人开始说“这个是 Slack 里定过的”或“按某某上周说的做”。
+- review 里经常引用仓库里根本没写下来的产品、安全或架构规则。
+- 新会话总在重复那些本该已经稳定下来的发现工作。
+
+## 执行 SOP
+
+1. 先列出所有不可见知识来源:外部文档、聊天、默认团队规则、口头决策。
+2. 对每条知识判断:它属于架构、产品行为、安全策略、可靠性要求、执行上下文,还是参考材料?
+3. 按类别编码到对应仓库工件:
+ - 架构 -> `ARCHITECTURE.md`
+ - 产品行为 -> `docs/product-specs/`
+ - 设计理由 -> `docs/design-docs/`
+ - 执行状态 -> `docs/exec-plans/`
+ - 外部参考材料 -> `docs/references/`
+ - 质量或可靠性要求 -> `docs/QUALITY_SCORE.md` 或 `docs/RELIABILITY.md`
+4. 把模糊表达改写成运行上真正有用的表达。
+5. 删除或废弃旧副本,保证仓库里有一个可发现的真相来源。
+
+## 好的编码规则
+
+- 为“可发现”而写,不是为“写得很全”而写。
+- 文件尽量短,名字尽量明确。
+- 相关工件要互相链接。
+- 记录耐久规则,不要把会议流水账原封不动塞进来。
+- 决策形成的同一轮会话里,就把仓库更新掉。
+
+## 完成定义
+
+- 一个全新 agent 不问人也能找到相关规则。
+- 同一个事实不会散落在多个互相打架的文件里。
+- 新工件放在离它所治理的代码或流程最近的地方。
diff --git a/docs/resources/zh/openai-advanced/sops/layered-domain-architecture.md b/docs/resources/zh/openai-advanced/sops/layered-domain-architecture.md
new file mode 100644
index 0000000..09a77aa
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/sops/layered-domain-architecture.md
@@ -0,0 +1,47 @@
+# SOP:分层领域架构
+
+当 agent 反复跨层乱连、在不同层重复逻辑、或者几轮会话后代码越来越难审时,就用这份 SOP。
+
+## 目标
+
+把领域边界写清楚、立起来、能执行,让 agent 在高速度下也不至于悄悄把结构做烂。
+
+## 目标模型
+
+在一个业务领域内部,优先使用这条单向流:
+
+`Types -> Config -> Repo -> Service -> Runtime -> UI`
+
+跨领域关注点通过明确的 provider 或 adapter 进入。共享 utils 保持在领域之外,不能慢慢长成业务逻辑垃圾场。
+
+## 建设检查清单
+
+- 在 `ARCHITECTURE.md` 里列清当前 domains。
+- 在 `ARCHITECTURE.md` 里写清允许的依赖方向。
+- 记录 auth、telemetry、外部 API 等 cross-cutting interface。
+- 为当前最难处理的边界违规写一条短说明。
+- 决定哪些规则应该升级成 lint、test 或 script。
+
+## 执行 SOP
+
+1. 先给代码库画 domain map,再谈实现风格。
+2. 对每个 domain,明确允许的 layer sequence。
+3. 找出所有横切关注点,并把它们改走 provider 或 adapter。
+4. 把含糊的 shared logic 重新放回所属 domain,或抽成真正通用的 utils。
+5. 把规则写进 `ARCHITECTURE.md`。
+6. 先为代价最高的一类违规补一个可执行 guardrail。
+7. 改完后更新质量评分。
+
+## 完成定义
+
+- 一个全新的 agent 能判断某个改动应该落在哪一层。
+- UI 不再直接连 repo 或外部副作用。
+- 横切能力都有明确入口。
+- 至少一条重要边界已经被机械执行。
+
+## 需要同步更新的仓库工件
+
+- `ARCHITECTURE.md`
+- `docs/QUALITY_SCORE.md`
+- 如果设计理由变了,更新 `docs/design-docs/`
+- `docs/PLANS.md` 或当前 active execution plan
diff --git a/docs/resources/zh/openai-advanced/sops/observability-feedback-loop.md b/docs/resources/zh/openai-advanced/sops/observability-feedback-loop.md
new file mode 100644
index 0000000..931946b
--- /dev/null
+++ b/docs/resources/zh/openai-advanced/sops/observability-feedback-loop.md
@@ -0,0 +1,42 @@
+# SOP:Observability Feedback Loop
+
+当调试太慢、agent 总在没证据的情况下宣布成功、或者运行时行为比代码本身还难看懂时,就用这份 SOP。
+
+## 目标
+
+给 agent 一套本地闭环,让它可以基于 logs、metrics、traces 和可重复 workload 来判断系统,而不是只靠看代码猜。
+
+## 最小可用栈
+
+- 应用输出结构化日志
+- 条件允许时输出 metrics 和 traces
+- 本地采集或 fan-out 层
+- 可查询 logs / metrics / traces 的接口
+- 每次改动后都能重跑的 workload 或 user journey
+
+## 执行 SOP
+
+1. 先定义最重要的黄金运行旅程。
+2. 给启动流程和关键路径补结构化日志。
+3. 在合适位置补 latency、failure count、queue depth 之类的 metrics。
+4. 为慢路径或多阶段流程补 traces 或 timing 标记。
+5. 让这些信号能从本地开发环境查询到。
+6. 给 agent 一条可以反复重跑的 workload 或场景。
+7. 强制执行这条闭环:query -> correlate -> reason -> implement -> restart
+ -> rerun -> verify。
+
+## 调试会话检查清单
+
+- 到底哪里失败了?
+- 哪条信号能证明它失败?
+- 失败归属哪一层?
+- 修复后哪条信号发生了变化?
+- App 是否能干净重启?
+- 同一 workload 重跑后是否通过?
+
+## 完成定义
+
+- agent 能用运行证据解释失败模式。
+- 每次改动后都能重跑同一 workload。
+- restart 与 rerun 已经成为正常任务循环的一部分。
+- 可靠性信号已经记录到 `docs/RELIABILITY.md`。
diff --git a/docs/resources/zh/reference/README.md b/docs/resources/zh/reference/README.md
new file mode 100644
index 0000000..1b1643c
--- /dev/null
+++ b/docs/resources/zh/reference/README.md
@@ -0,0 +1,17 @@
+# 中文参考
+
+这一部分解释这些模板该怎么配合使用,而不是把它们当成一堆孤立文件。
+
+## 参考材料
+
+- [`method-map.md`](./method-map.md):把常见长时任务翻车点映射到对应方法和工件
+- [`initializer-agent-playbook.md`](./initializer-agent-playbook.md):初始化代理在第一轮应该产出什么
+- [`coding-agent-startup-flow.md`](./coding-agent-startup-flow.md):后续编码代理每次开工的固定流程
+- [`prompt-calibration.md`](./prompt-calibration.md):根指令应该写到什么程度才合适
+
+## 推荐阅读顺序
+
+1. `method-map.md`
+2. `initializer-agent-playbook.md`
+3. `coding-agent-startup-flow.md`
+4. `prompt-calibration.md`
diff --git a/docs/resources/zh/reference/coding-agent-startup-flow.md b/docs/resources/zh/reference/coding-agent-startup-flow.md
new file mode 100644
index 0000000..1d74379
--- /dev/null
+++ b/docs/resources/zh/reference/coding-agent-startup-flow.md
@@ -0,0 +1,33 @@
+# 编码代理开工流程
+
+初始化完成后,每轮编码会话都按这个流程开始。
+
+## 固定开工模板
+
+1. 运行 `pwd`,确认仓库根目录
+2. 读取 `claude-progress.md`
+3. 读取 `feature_list.json`
+4. 用 `git log --oneline -5` 查看最近提交
+5. 运行 `./init.sh`
+6. 跑一条基础 smoke test 或端到端路径
+7. 如果基础状态已坏,先修这个
+8. 选择最高优先级的未完成功能
+9. 只围绕这个功能工作,直到它被验证或明确 blocked
+
+## 为什么顺序不能乱
+
+- `pwd` 能防止在错误目录里干活
+- progress 和 feature 文件先恢复持久状态
+- 最近提交能解释刚刚发生了什么
+- `init.sh` 让启动过程标准化,而不是靠记忆
+- 基础验证先跑,可以避免在坏状态上继续叠改动
+
+## 对应的收尾流程
+
+同一轮会话结束时,也应该镜像地做这些事:
+
+1. 记录进度
+2. 更新功能状态
+3. 必要时写交接摘要
+4. 提交安全状态的代码
+5. 留下可直接重启的干净环境
diff --git a/docs/resources/zh/reference/initializer-agent-playbook.md b/docs/resources/zh/reference/initializer-agent-playbook.md
new file mode 100644
index 0000000..10c4ad6
--- /dev/null
+++ b/docs/resources/zh/reference/initializer-agent-playbook.md
@@ -0,0 +1,35 @@
+# 初始化代理操作手册
+
+这个手册用于仓库里的第一轮重要会话,也就是正式开始增量开发之前的初始化阶段。
+
+## 目标
+
+先搭出稳定的工作面,让后续会话不必重新推导启动命令、当前状态和任务边界。
+
+## 必需产出
+
+初始化阶段至少应该留下这些工件:
+
+- 一个根指令文件,例如 `AGENTS.md` 或 `CLAUDE.md`
+- 一个机器可读的功能面,例如 `feature_list.json`
+- 一个持久进度工件,例如 `claude-progress.md`
+- 一个标准启动辅助脚本,例如 `init.sh`
+- 一个记录基础脚手架状态的初始安全提交
+
+## 检查清单
+
+1. 定义标准启动路径
+2. 定义标准验证路径
+3. 建立进度日志并写下初始状态
+4. 把工作拆成功能,并给出状态字段
+5. 建立第一个干净的 baseline commit
+
+## 成功标准
+
+一个完全没有前文聊天上下文的新会话,应该能回答:
+
+- 这个仓库是做什么的
+- 怎么启动
+- 怎么验证
+- 还有什么没做完
+- 下一步最佳动作是什么
diff --git a/docs/resources/zh/reference/method-map.md b/docs/resources/zh/reference/method-map.md
new file mode 100644
index 0000000..e2f54ec
--- /dev/null
+++ b/docs/resources/zh/reference/method-map.md
@@ -0,0 +1,16 @@
+# 方法对照表
+
+这个表把最常见的长时 coding-agent 失败模式,对应到最先该补的工件或规则。
+
+| 失败模式 | 实际表现 | 首要修复 | 主要工件 |
+| --- | --- | --- | --- |
+| 冷启动混乱 | 新会话花大量时间重新摸索状态和启动方式 | 让仓库成为 system of record | `claude-progress.md` |
+| 范围蔓延 | 一次启动多个功能,最后没有一个完整收尾 | 限制 active scope | `feature_list.json` |
+| 提前宣布完成 | 代码改了就说 done,但没有可运行证据 | 把完成绑定到验证证据 | `clean-state-checklist.md` |
+| 启动脆弱 | 每轮会话都要重新学怎么启动项目 | 统一启动与验证路径 | `init.sh` |
+| 交接薄弱 | 下一轮看不出哪里可用、哪里坏了、接下来做什么 | 明确写交接摘要 | `session-handoff.md` |
+| 评审主观 | 质量判断依赖个人记忆和感觉 | 用固定维度做评分 | `evaluator-rubric.md` |
+
+## 使用原则
+
+优先补最能直接消除当前失败模式的那个工件,不要一出问题就把更多规则堆进一个超长 instruction 文件里。
diff --git a/docs/resources/zh/reference/prompt-calibration.md b/docs/resources/zh/reference/prompt-calibration.md
new file mode 100644
index 0000000..f89002c
--- /dev/null
+++ b/docs/resources/zh/reference/prompt-calibration.md
@@ -0,0 +1,23 @@
+# Prompt 校准
+
+根指令文件应该定义工作框架,而不是把所有动作写死。
+
+## 应该留在根文件里的内容
+
+- 仓库用途和范围
+- 启动路径
+- 验证路径
+- 不可违反的约束
+- 必需的状态工件
+- 会话结束规则
+
+## 应该移出根文件的内容
+
+- 过长的历史边角案例
+- 只属于某个子系统的细节实现说明
+- 更适合贴在代码附近的局部架构笔记
+- 只对单一模块成立的示例
+
+## 工作原则
+
+根文件的职责是让新会话快速建立方向感。如果它开始变成“过去每次失败都往里加一句”的堆叠场,就应该把细节拆到更小、更明确的文档里,再从根文件跳转过去。
diff --git a/docs/resources/zh/templates/AGENTS.md b/docs/resources/zh/templates/AGENTS.md
new file mode 100644
index 0000000..66d84dc
--- /dev/null
+++ b/docs/resources/zh/templates/AGENTS.md
@@ -0,0 +1,50 @@
+# AGENTS.md
+
+这个仓库面向长时运行的 coding agent 工作流。目标不是尽可能快地产出代码,而是让每一轮会话结束后,下一个会话仍然能无猜测地继续工作。
+
+## 开工流程
+
+写代码前先做这些事:
+
+1. 用 `pwd` 确认当前目录。
+2. 读取 `claude-progress.md`,了解最新已验证状态和下一步。
+3. 读取 `feature_list.json`,选择优先级最高的未完成功能。
+4. 用 `git log --oneline -5` 看最近提交。
+5. 运行 `./init.sh`。
+6. 在开始新功能前,先跑必需的 smoke test 或端到端验证。
+
+如果基础验证一开始就失败,先修基础状态,不要在坏的起点上继续叠新功能。
+
+## 工作规则
+
+- 一次只做一个功能。
+- 不要因为“代码已经写了”就把功能标记为完成。
+- 除非为了消除当前 blocker 的窄范围修复,否则不要扩大到其他功能。
+- 实现过程中不要悄悄改弱验证规则。
+- 优先依赖仓库里的持久化文件,而不是聊天记录。
+
+## 必需文件
+
+- `feature_list.json`:功能状态的唯一事实来源
+- `claude-progress.md`:会话进度和当前已验证状态
+- `init.sh`:统一的启动与验证入口
+- `session-handoff.md`:较长会话可选的交接摘要
+
+## 完成定义
+
+一个功能只有在以下条件都满足时才算完成:
+
+- 目标行为已经实现
+- 要求的验证真的跑过
+- 证据记录在 `feature_list.json` 或 `claude-progress.md`
+- 仓库仍然能按标准启动路径重新开始工作
+
+## 收尾
+
+结束会话前:
+
+1. 更新 `claude-progress.md`
+2. 更新 `feature_list.json`
+3. 记录仍未解决的风险或 blocker
+4. 在工作处于安全状态后,用清晰的提交信息提交
+5. 保证下一轮会话可以直接运行 `./init.sh`
diff --git a/docs/resources/zh/templates/CLAUDE.md b/docs/resources/zh/templates/CLAUDE.md
new file mode 100644
index 0000000..8d0bc63
--- /dev/null
+++ b/docs/resources/zh/templates/CLAUDE.md
@@ -0,0 +1,43 @@
+# CLAUDE.md
+
+你正在一个为长时实现工作设计的仓库中工作。优先保证可靠完成、跨会话连续性和显式验证,而不是表面上的速度。
+
+## 固定工作循环
+
+每轮会话开始时:
+
+1. 运行 `pwd`,确认当前在正确的仓库根目录
+2. 读取 `claude-progress.md`
+3. 读取 `feature_list.json`
+4. 用 `git log --oneline -5` 查看最近提交
+5. 运行 `./init.sh`
+6. 检查基础 smoke test 或端到端路径是否已经损坏
+
+然后只选择一个未完成功能,围绕它工作,直到它被验证通过,或者被明确记录为 blocked。
+
+## 规则
+
+- 同一时间只能有一个 active feature
+- 没有可运行证据时,不要声称完成
+- 不要通过重写功能清单来隐藏未完成工作
+- 不要为了“看起来完成”而删除或削弱测试
+- 以仓库内文件作为 system of record
+
+## 必需文件
+
+- `feature_list.json`
+- `claude-progress.md`
+- `init.sh`
+- 需要简短交接时使用 `session-handoff.md`
+
+## 完成门槛
+
+只有在要求的验证成功且结果被记录后,功能状态才可以切换到 `passing`。
+
+## 结束前
+
+1. 更新进度日志
+2. 更新功能状态
+3. 记录仍然损坏或未验证的内容
+4. 在仓库可安全恢复后提交
+5. 给下一轮会话留下干净的重启路径
diff --git a/docs/resources/zh/templates/README.md b/docs/resources/zh/templates/README.md
new file mode 100644
index 0000000..9395970
--- /dev/null
+++ b/docs/resources/zh/templates/README.md
@@ -0,0 +1,226 @@
+# 模板使用指南
+
+这些模板可以直接复制到你的项目里用。每个文件在 agent 的工作流程中各有分工。复制过去后,把里面的命令、路径、功能名称和验证步骤换成你自己项目的。
+
+## 怎么开始
+
+先把这四个文件复制到项目根目录:
+
+1. `AGENTS.md` 或 `CLAUDE.md`
+2. `init.sh`
+3. `claude-progress.md`
+4. `feature_list.json`
+
+等项目变复杂了,再补其余的文件。
+
+---
+
+## AGENTS.md
+
+根指令文件。agent 每次开工会先读这个文件。它定义了工作规则:写代码前要做什么、工作过程中怎么守规矩、收尾时要检查什么。
+
+**怎么用:**
+
+- 复制到项目根目录
+- 把开工流程里的步骤换成你自己项目的路径和命令
+- 工作规则按你们团队的约定调整
+- 完成定义那一段别改——那是整个 harness 最关键的部分
+
+**它帮 agent 做什么:**
+
+- 让它在开始工作前先读进度和功能状态
+- 逼它一次只做一个功能
+- 要求它拿出证据才能标记完成
+- 定义了什么叫"干净收尾"
+
+用 `AGENTS.md` 给 Codex 或其他 agent。用 `CLAUDE.md` 给 Claude Code——内容一样,格式按 Claude 的指令风格来的。
+
+## init.sh
+
+启动脚本。一条命令完成依赖安装、验证和打印启动命令。
+
+**怎么用:**
+
+- 复制到项目根目录
+- 改顶部这三个变量:
+ - `INSTALL_CMD` — 你的依赖安装命令(比如 `npm install`、`pip install -r requirements.txt`)
+ - `VERIFY_CMD` — 你的基础验证命令(比如 `npm test`、`pytest`)
+ - `START_CMD` — 你的开发服务器启动命令(比如 `npm run dev`)
+- 加执行权限:`chmod +x init.sh`
+
+**它做什么:**
+
+1. 打印当前目录(确认跑在正确的地方)
+2. 安装依赖
+3. 跑验证命令
+4. 打印启动命令(如果设了 `RUN_START_COMMAND=1` 就直接启动)
+
+如果验证失败了,agent 应该停下来先修基础状态,不要在坏的基础上继续叠新功能。
+
+## claude-progress.md
+
+进度日志。每轮会话往里写,每轮新会话先读它。
+
+**怎么用:**
+
+- 复制到项目根目录
+- 把"当前已验证状态"那段填上你的项目信息
+- 每轮会话结束后更新会话记录
+
+**每个字段的意思:**
+
+- **当前已验证状态** — 项目当前进展的唯一真相
+ - `仓库根目录` — 项目在哪
+ - `标准启动路径` — 把项目跑起来的命令
+ - `标准验证路径` — 跑测试的命令
+ - `当前最高优先级未完成功能` — 下一轮该做什么
+ - `当前 blocker` — 哪里卡住了
+- **会话记录** — 每轮一条
+ - `本轮目标` — 打算做什么
+ - `已完成` — 实际做了什么
+ - `运行过的验证` — 跑了什么测试
+ - `已记录证据` — 留下了什么证明
+ - `提交记录` — 提了什么 commit
+ - `已知风险或未解决问题` — 哪里可能有问题
+ - `下一步最佳动作` — 下一轮从哪开始
+
+## feature_list.json
+
+功能清单。机器可读的功能列表,每个功能有状态、验证步骤和证据。
+
+**怎么用:**
+
+- 复制到项目根目录
+- 把示例功能换成你自己的
+- 每个功能需要填:
+ - `id` — 短的唯一标识
+ - `priority` — 整数,越小越优先
+ - `area` — 属于应用的哪块(比如 "chat"、"import"、"search")
+ - `title` — 简短描述
+ - `user_visible_behavior` — 功能正常时用户能看到什么
+ - `status` — 四种状态之一:`not_started`、`in_progress`、`blocked`、`passing`
+ - `verification` — 逐步验证步骤
+ - `evidence` — 验证通过的记录(agent 填)
+ - `notes` — 额外说明
+
+**状态规则:**
+
+- `not_started` — 还没碰
+- `in_progress` — 当前正在做的那个(同一时间只能有一个)
+- `blocked` — 有记录的阻塞问题,推不动
+- `passing` — 验证通过,证据已记录
+
+agent 任何时候只能有一个功能处于 `in_progress`。
+
+## session-handoff.md
+
+会话交接摘要。一轮会话结束时写,下一轮开始时读。让接手的人(或 agent)快速了解现状。
+
+**怎么用:**
+
+- 复制到项目根目录
+- 每轮会话结束时填写(也可以让 agent 自己填)
+
+**每段写什么:**
+
+- **当前已验证** — 哪些是确认能用的,跑过什么验证
+- **本轮改动** — 改了什么代码或基础设施
+- **仍损坏或未验证** — 已知问题和风险区
+- **下一步最佳动作** — 下一轮该做什么,哪些东西不要动
+- **命令** — 启动、验证、调试命令,方便快速参考
+
+短会话可以不写这个文件。会话长了或者项目有多个并行区域时,它就很关键了。
+
+## clean-state-checklist.md
+
+收尾检查清单。每次会话结束前过一遍,确保仓库处于下一轮可以直接开工的状态。
+
+**怎么用:**
+
+- 复制到项目根目录
+- 关掉会话前逐项检查
+- agent 的收尾流程里也应该包含这些检查
+
+**检查什么:**
+
+- 标准启动路径还能用
+- 标准验证还能跑
+- 进度日志已更新
+- 功能清单真实反映了 passing 和未验证的边界(没有假 passing)
+- 没有半成品处于未记录状态
+- 下一轮会话不需要人工修复就能继续
+
+## evaluator-rubric.md
+
+评审评分表。会话结束后或到里程碑时,用它评估 agent 做的东西够不够格。
+
+**怎么用:**
+
+- 复制到项目根目录
+- 一轮(或几轮)会话后,按六个维度打分
+- 每个维度 0-2 分
+
+**六个维度:**
+
+1. **正确性** — 实现出来的行为是否符合目标功能
+2. **验证** — 要求的检查是否真的跑过,并留下证据
+3. **范围纪律** — 是否基本保持在选定功能范围内
+4. **可靠性** — 结果是否能在重启或重跑后继续工作
+5. **可维护性** — 代码和文档是否清楚到足以交给下一轮会话
+6. **交接准备度** — 新会话是否能只靠仓库内文件继续推进
+
+**结论选项:**
+
+- Accept — 达标
+- Revise — 需要修补才能接受
+- Block — 有根本性问题,需要先解决
+
+**Evaluator 需要校准。** 开箱即用的 agent 做评审很弱——它会发现问题,然后把自己说服到通过。你需要反复校准:
+
+1. 用 evaluator 给一个已完成的 sprint 打分。
+2. 把它的分数和你自己的人工判断对比。
+3. 有分歧的地方,把 rubric 里的通过/失败标准写得更具体。
+4. 对同一个输出重新跑 evaluator,看对齐了没有。
+5. 重复直到 evaluator 的判断和人工评审基本一致。
+
+预计需要 3-5 轮校准。每轮记录改了什么、为什么改。
+
+## quality-document.md
+
+质量快照。给项目的每个产品领域和架构层打分,跟踪代码库随时间是变强了还是变弱了。
+
+**怎么用:**
+
+- 复制到项目根目录
+- 开始会话前:读它,了解代码库哪里最弱
+- 会话结束后:更新评级
+- 长期:对比不同时间点的快照,看哪些 harness 改动真正改善了代码库健康度
+
+**评什么:**
+
+- **产品领域**(如文档导入、问答流程、索引):每个领域按验证状态、Agent 可读性、测试稳定性、关键缺口打分
+- **架构层**(如 Main Process、Preload、Renderer、Services):每层按边界执行和 Agent 可读性打分
+
+**为什么需要它:**
+
+Evaluator rubric 评的是单次 agent 输出的质量。Quality document 评的是代码库本身的质量。它们回答的是不同的问题:
+
+- Evaluator rubric:"这轮 agent 做得好不好?"
+- Quality document:"这个项目是在变强还是变弱?"
+
+**什么时候更新:**
+
+- 每轮重要会话之后
+- 做基准对比之前
+- 做清理或简化之后
+- 换新 agent 或新模型时
+
+**和 harness 简化的关系:**
+
+Quality document 也可以用来验证 harness 是否可以简化。Harness 里的每个组件都编码了一个假设——"模型做不到这件事"。模型变强后,这些假设就过时了。检查某个组件是否还有必要:
+
+1. 拍一份 quality document 快照。
+2. 移除一个 harness 组件。
+3. 跑基准测试。
+4. 再拍一份快照。
+5. 对比——评级没降,说明那个组件是多余的。降了,就恢复。
diff --git a/docs/resources/zh/templates/claude-progress.md b/docs/resources/zh/templates/claude-progress.md
new file mode 100644
index 0000000..8ee42ee
--- /dev/null
+++ b/docs/resources/zh/templates/claude-progress.md
@@ -0,0 +1,35 @@
+# 进度日志
+
+## 当前已验证状态
+
+- 仓库根目录:
+- 标准启动路径:
+- 标准验证路径:
+- 当前最高优先级未完成功能:
+- 当前 blocker:
+
+## 会话记录
+
+### Session 001
+
+- 日期:
+- 本轮目标:
+- 已完成:
+- 运行过的验证:
+- 已记录证据:
+- 提交记录:
+- 更新过的文件或工件:
+- 已知风险或未解决问题:
+- 下一步最佳动作:
+
+### Session 002
+
+- 日期:
+- 本轮目标:
+- 已完成:
+- 运行过的验证:
+- 已记录证据:
+- 提交记录:
+- 更新过的文件或工件:
+- 已知风险或未解决问题:
+- 下一步最佳动作:
diff --git a/docs/resources/zh/templates/clean-state-checklist.md b/docs/resources/zh/templates/clean-state-checklist.md
new file mode 100644
index 0000000..6a2717d
--- /dev/null
+++ b/docs/resources/zh/templates/clean-state-checklist.md
@@ -0,0 +1,8 @@
+# 干净状态检查清单
+
+- [ ] 标准启动路径仍然可用
+- [ ] 标准验证路径仍然可运行
+- [ ] 当前进度已经记录到进度日志
+- [ ] 功能状态真实反映了 passing 和未验证的边界
+- [ ] 没有任何半成品步骤处于未记录状态
+- [ ] 下一轮会话无需人工修复即可继续
diff --git a/docs/resources/zh/templates/evaluator-rubric.md b/docs/resources/zh/templates/evaluator-rubric.md
new file mode 100644
index 0000000..cedc842
--- /dev/null
+++ b/docs/resources/zh/templates/evaluator-rubric.md
@@ -0,0 +1,24 @@
+# 评审评分表
+
+在实现完成后、正式验收前,用这张表做一次评审。
+
+| 维度 | 问题 | 分数 (0-2) | 备注 |
+| --- | --- | --- | --- |
+| 正确性 | 实现出来的行为是否符合目标功能? | | |
+| 验证 | 要求的检查是否真的跑过,并留下证据? | | |
+| 范围纪律 | 这一轮是否基本保持在选定功能范围内? | | |
+| 可靠性 | 结果是否能在重启或重跑后继续工作? | | |
+| 可维护性 | 代码和文档是否清楚到足以交给下一轮会话? | | |
+| 交接准备度 | 新会话是否能只靠仓库内工件继续推进? | | |
+
+## 结论
+
+- Accept
+- Revise
+- Block
+
+## 后续动作
+
+- 缺失的证据:
+- 必须补的修复:
+- 下次复审触发条件:
diff --git a/docs/resources/zh/templates/feature_list.json b/docs/resources/zh/templates/feature_list.json
new file mode 100644
index 0000000..41b9753
--- /dev/null
+++ b/docs/resources/zh/templates/feature_list.json
@@ -0,0 +1,64 @@
+{
+ "project": "替换成你的项目名",
+ "last_updated": "YYYY-MM-DD",
+ "rules": {
+ "single_active_feature": true,
+ "passing_requires_evidence": true,
+ "do_not_skip_verification": true
+ },
+ "status_legend": {
+ "not_started": "功能还没开始做。",
+ "in_progress": "这个功能是当前唯一正在进行的任务。",
+ "blocked": "因为已记录的阻塞问题,当前无法继续推进。",
+ "passing": "要求的验证已经通过,并且证据已经记录。"
+ },
+ "features": [
+ {
+ "id": "chat-001",
+ "priority": 1,
+ "area": "chat",
+ "title": "创建新会话",
+ "user_visible_behavior": "用户点击 New Chat 后,可以看到一个新的空白对话。",
+ "status": "not_started",
+ "verification": [
+ "打开应用。",
+ "点击 New Chat。",
+ "确认侧边栏出现一个新会话。",
+ "确认主面板显示空白对话状态。"
+ ],
+ "evidence": [],
+ "notes": ""
+ },
+ {
+ "id": "chat-002",
+ "priority": 2,
+ "area": "chat",
+ "title": "在当前会话里发送消息",
+ "user_visible_behavior": "用户提交一条消息后,可以在当前线程中看到它。",
+ "status": "not_started",
+ "verification": [
+ "打开一个已有会话。",
+ "在输入框中输入消息。",
+ "提交消息。",
+ "确认线程中出现这条新消息。"
+ ],
+ "evidence": [],
+ "notes": ""
+ },
+ {
+ "id": "chat-003",
+ "priority": 3,
+ "area": "chat",
+ "title": "持久化保存会话列表",
+ "user_visible_behavior": "应用重启后,用户仍能看到之前创建的会话。",
+ "status": "not_started",
+ "verification": [
+ "创建两个会话。",
+ "重启应用。",
+ "确认两个会话仍显示在侧边栏中。"
+ ],
+ "evidence": [],
+ "notes": ""
+ }
+ ]
+}
diff --git a/docs/resources/zh/templates/init.sh b/docs/resources/zh/templates/init.sh
new file mode 100755
index 0000000..c153b2a
--- /dev/null
+++ b/docs/resources/zh/templates/init.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+cd "$ROOT_DIR"
+
+# 按你的项目实际情况替换这些命令。
+INSTALL_CMD=(npm install)
+VERIFY_CMD=(npm test)
+START_CMD=(npm run dev)
+
+echo "==> 当前目录: $PWD"
+echo "==> 同步依赖"
+"${INSTALL_CMD[@]}"
+
+echo "==> 运行基础验证"
+"${VERIFY_CMD[@]}"
+
+echo "==> 启动命令"
+printf ' %q' "${START_CMD[@]}"
+printf '\n'
+
+if [ "${RUN_START_COMMAND:-0}" = "1" ]; then
+ echo "==> 启动应用"
+ exec "${START_CMD[@]}"
+fi
+
+echo "如果希望 init.sh 直接启动应用,请设置 RUN_START_COMMAND=1。"
diff --git a/docs/resources/zh/templates/quality-document.md b/docs/resources/zh/templates/quality-document.md
new file mode 100644
index 0000000..a21367b
--- /dev/null
+++ b/docs/resources/zh/templates/quality-document.md
@@ -0,0 +1,43 @@
+# 质量文档
+
+每个产品领域和架构层的质量快照。agent 和人都能通过这份文档快速了解项目哪里强、哪里弱。
+
+**更新时机:** 每轮重要会话结束后,或开始新一阶段工作前。
+
+**评级标准:**
+
+- **A**:验证全部通过,架构干净,agent 能读懂,测试稳定
+- **B**:验证通过,基本干净,可读性或测试覆盖有少量缺口
+- **C**:部分可用,有已知缺口,部分代码 agent 不容易理解
+- **D**:不可用,或存在重大结构问题
+
+---
+
+## 产品领域
+
+| 领域 | 评级 | 验证状态 | Agent 可读性 | 测试稳定性 | 关键缺口 | 上次更新 |
+|------|------|---------|-------------|-----------|---------|---------|
+| 文档导入 | - | - | - | - | - | - |
+| 文档管理 | - | - | - | - | - | - |
+| 文档索引 | - | - | - | - | - | - |
+| 问答流程 | - | - | - | - | - | - |
+| 引用式回答 | - | - | - | - | - | - |
+
+## 架构层
+
+| 层级 | 评级 | 边界执行 | Agent 可读性 | 关键缺口 | 上次更新 |
+|------|------|---------|-------------|---------|---------|
+| Main Process | - | - | - | - | - |
+| Preload | - | - | - | - | - |
+| Renderer | - | - | - | - | - |
+| Services | - | - | - | - | - |
+
+## 变更历史
+
+### YYYY-MM-DD
+
+- 变更内容:
+- 提升:
+- 下降:
+- 新发现的缺口:
+- 已关闭的缺口:
diff --git a/docs/resources/zh/templates/session-handoff.md b/docs/resources/zh/templates/session-handoff.md
new file mode 100644
index 0000000..a24fc89
--- /dev/null
+++ b/docs/resources/zh/templates/session-handoff.md
@@ -0,0 +1,30 @@
+# 会话交接
+
+## 当前已验证
+
+- 现在明确可用的部分:
+- 这轮实际跑过的验证:
+
+## 本轮改动
+
+- 新增了哪些代码或行为:
+- 基础设施或 harness 发生了哪些变化:
+
+## 仍损坏或未验证
+
+- 已知缺陷:
+- 未验证路径:
+- 下一轮会话需要注意的风险:
+
+## 下一步最佳动作
+
+- 最高优先级未完成功能:
+- 为什么它是下一步:
+- 什么结果才算 passing:
+- 这一步中哪些东西不要动:
+
+## 命令
+
+- 启动命令:
+- 验证命令:
+- 定向调试命令: