---
name: team-document-review-learning-loop
description: Bottom-layer workflow for code and document changes in zhctprompt: record intent and evidence as Markdown for AI, generate HTML for human review, capture human feedback, and convert approved practices into skills/knowledge while preserving rejected practices as anti-patterns.
---

# Team Document Review Learning Loop

Use this skill for any meaningful code change, document change, review output, team feedback, or reusable learning in `zhctprompt`.

## Core Rule

Do not let code or document changes exist only as edits or chat messages.

For review-worthy work:

1. Record intent and evidence in Markdown so AI can understand it.
2. Generate or update HTML when humans need to review it.
3. Capture human review explicitly.
4. Absorb approved practices into wiki/skills.
5. Preserve rejected practices as anti-patterns or stop rules.

When the reusable unit is a whole thread or teammate Q&A, also load `standards-stack/agent-skills/skills/team-thread-markdown-record/SKILL.md` and create a per-thread Markdown record under `work/team-learning/thread-records/YYYY-MM-DD/`.

## Trigger Phrases

Use this skill when the user says or implies:

- 所有代码修改或文档修改先记录到本项目
- 每次文档都按照线程形成 Markdown 文档
- 整个团队问答都要进项目记忆
- 未来要训练这些问答
- AI 看 Markdown，人看 HTML
- 让人 review 文档
- 把人的知识经验沉淀到项目内
- 让 AI 学习每个人的经验
- 形成 skill 和知识
- 每天复盘整个团队形成的文档
- 好的地方吸收，不好的地方不要吸收

## Workflow

### 1. Create The AI-Readable Markdown Record

Before or alongside the implementation, create/update Markdown under the correct location:

- cross-project method: `work/<date-topic>/`
- project-specific evidence: `work_<project>/<topic>/`
- team learning: `work/team-learning/`
- stable governance: `standards-stack/prompt/governance/`
- reusable skill: `standards-stack/agent-skills/skills/`

Markdown must include:

- goal
- source context
- target files or projects
- scope and non-goals
- evidence level
- planned output
- validation or review criteria
- human review status

### 2. Create The Human-Readable HTML Review Surface

If the work is meant for human review, generate an HTML page next to the Markdown evidence.

The HTML should include:

- purpose
- source and evidence links
- review checklist
- accepted learning
- rejected anti-patterns
- pending questions
- next actions

HTML is for review. Markdown remains the AI-readable source of truth.

### 3. Capture Human Review

When review feedback exists, write it back to Markdown:

- reviewer
- date
- decision
- good practices to absorb
- bad practices to avoid
- examples
- requested changes
- whether a skill/wiki update is required

Never treat rejected behavior as a positive pattern.

### 4. Convert Learning Into Durable Assets

After review:

- approved repeated practice -> skill or governance rule
- domain knowledge -> wiki or `work_<project>/qa/`
- rejected behavior -> anti-pattern or stop condition
- task outcome -> `control/task-index/items/<task_id>.tsv`
- current recovery -> `HEARTBEAT.md` and `tasks/QUEUE.md`

### 5. Daily Team Review

Daily review should inspect changed Markdown/HTML/evidence files and produce:

- `work/team-learning/daily/YYYY-MM-DD/daily-review.md`
- `work/team-learning/daily/YYYY-MM-DD/daily-review.html`
- optional accepted-patterns, anti-patterns, and skill-update-candidates files

The review should gradually build a practical understanding of each teammate's working style without storing private or sensitive data.

For thread-level material, daily review should prefer reading `work/team-learning/thread-records/YYYY-MM-DD/*.md` before scanning raw chat archives.

## Stop Rules

Stop or mark blocked when:

- review would require secrets or production payloads
- human feedback is ambiguous and would invert the learning
- a criticized behavior could be mistaken for approved practice
- the requested HTML would expose sensitive information
- no source evidence exists for a claim that would be treated as fact

## References

- Governance: `standards-stack/prompt/governance/DOCUMENT_REVIEW_LEARNING_LOOP.md`
- Team Q&A baseline: `standards-stack/prompt/governance/TEAM_SHARED_QA_BASELINE.md`
- Output formats: `standards-stack/agent-skills/skills/output-format-preferences/SKILL.md`
- Knowledge compilation: `standards-stack/agent-skills/skills/llm-wiki-knowledge-base/SKILL.md`
- Thread Markdown records: `standards-stack/agent-skills/skills/team-thread-markdown-record/SKILL.md`
