setup-harness

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Setup Harness

Setup Harness

Scaffold the knowledge layer for any repository. Scan, infer, populate.
Install via npx:
bash
npx skills add fellowship-dev/dogfooded-skills/ops/setup-harness
为任意代码仓库搭建知识层,支持扫描、推断、填充功能。
通过npx安装:
bash
npx skills add fellowship-dev/dogfooded-skills/ops/setup-harness

When to Use

使用场景

  • First-time setup of a repo that will receive AI agents (claude-code-review, speckit, etc.)
  • A repo that has agents but no architectural documentation — the #1585-class bug
  • After major restructuring, to refresh stale docs
  • Onboarding a repo into the fellowship-dev harness (target: fellowship-dev/booster-pack)
  • 首次为将接入AI Agent(如claude-code-review、speckit等)的代码仓库进行配置
  • 已有Agent但缺少架构文档的代码仓库——此类问题属于#1585级别的常见缺陷
  • 代码仓库进行重大重构后,更新过时的文档
  • 将代码仓库接入fellowship-dev harness环境(目标仓库:fellowship-dev/booster-pack)

Design Principle

设计原则

"Give the agent a map, not a 1,000-page instruction manual."
CLAUDE.md stays short (~100 lines), acting as a table of contents that points to deeper docs. Progressive disclosure: agents read the overview, then drill into the specific section they need. This skill creates that map from what already exists in the repo.
"给Agent一张地图,而非千页的操作手册。"
CLAUDE.md保持精简(约100行),作为指向详细文档的目录。 渐进式信息披露:Agent先阅读概述,再深入查看所需的具体章节。 本工具会根据代码仓库中已有的内容生成这张“地图”。

What It Creates

生成内容

FilePurpose
ARCHITECTURE.md
Major architectural decisions and critical patterns
QUALITY_SCORE.md
Domain quality grades — updated by the entropy-check skill
docs/code-structure.md
Real discovered patterns ("this is how X works")
docs/code-guidelines.md
Golden principles, enforced mechanically by hookshot
flowchad/
Stub flow definitions for critical paths
.claude/CLAUDE.md
Updated table of contents pointing to all docs
Files that already exist are updated (merged), never overwritten wholesale.

文件用途
ARCHITECTURE.md
记录核心架构决策与关键模式
QUALITY_SCORE.md
领域质量评级 — 由entropy-check工具更新
docs/code-structure.md
记录实际发现的代码模式(如“X功能的实现方式”)
docs/code-guidelines.md
核心编码原则,由hookshot工具自动强制执行
flowchad/
关键路径的流程定义草稿
.claude/CLAUDE.md
更新后的文档目录,指向所有相关文档
已存在的文件会进行更新(合并内容),不会被完全覆盖。

Instructions

操作步骤

0. Identify the Repo

0. 确定目标代码仓库

bash
undefined
bash
undefined

Get repo identity

Get repo identity

git remote get-url origin git rev-parse --show-toplevel
git remote get-url origin git rev-parse --show-toplevel

Capture these for the rest of the skill

Capture these for the rest of the skill

REPO_ROOT=$(git rev-parse --show-toplevel) REPO_NAME=$(basename $(git remote get-url origin) .git)

Ask (or infer from package.json / Gemfile / pyproject.toml):
- What language/framework is this? (Rails, Next.js, Python, etc.)
- What is the primary domain? (e-commerce, content, auth, etc.)

If the repo has a README, read it. Extract: purpose, key concepts, tech stack.
REPO_ROOT=$(git rev-parse --show-toplevel) REPO_NAME=$(basename $(git remote get-url origin) .git)

询问(或从package.json/Gemfile/pyproject.toml文件推断):
- 代码仓库使用的语言/框架是什么?(如Rails、Next.js、Python等)
- 主要业务领域是什么?(如电商、内容、认证等)

如果代码仓库包含README文件,请阅读并提取以下信息:用途、核心概念、技术栈。

1. Discovery Phase

1. 发现阶段

Scan the repo structure to understand what exists:
bash
undefined
扫描代码仓库结构,了解现有内容:
bash
undefined

Top-level structure

Top-level structure

ls -la $REPO_ROOT
ls -la $REPO_ROOT

Source directories (skip node_modules, .git, vendor, tmp)

Source directories (skip node_modules, .git, vendor, tmp)

find $REPO_ROOT -maxdepth 3 -type d
! -path '/.git/'
! -path '/node_modules/'
! -path '/vendor/'
! -path '/tmp/'
! -path '/.next/'
! -path '/dist/'
| sort
find $REPO_ROOT -maxdepth 3 -type d
! -path '/.git/'
! -path '/node_modules/'
! -path '/vendor/'
! -path '/tmp/'
! -path '/.next/'
! -path '/dist/'
| sort

Key files

Key files

ls $REPO_ROOT/docs/ 2>/dev/null || echo "No docs/" ls $REPO_ROOT/.claude/ 2>/dev/null || echo "No .claude/" ls $REPO_ROOT/flowchad/ 2>/dev/null || echo "No flowchad/" ls $REPO_ROOT/.github/workflows/ 2>/dev/null || echo "No workflows"
ls $REPO_ROOT/docs/ 2>/dev/null || echo "No docs/" ls $REPO_ROOT/.claude/ 2>/dev/null || echo "No .claude/" ls $REPO_ROOT/flowchad/ 2>/dev/null || echo "No flowchad/" ls $REPO_ROOT/.github/workflows/ 2>/dev/null || echo "No workflows"

Detect framework

Detect framework

ls $REPO_ROOT/Gemfile $REPO_ROOT/package.json $REPO_ROOT/pyproject.toml
$REPO_ROOT/go.mod $REPO_ROOT/Cargo.toml 2>/dev/null

**Infer domains from directory structure.** Examples:
- `app/models/` + `app/controllers/` → Rails MVC domains
- `src/components/` + `src/pages/` → Next.js frontend domains
- `services/` + `workers/` → Service-oriented domains
- `lib/` + `spec/` → Library pattern

Record: list of inferred domains (e.g., Content Model, Auth, API, Frontend Routing, Background Jobs).
ls $REPO_ROOT/Gemfile $REPO_ROOT/package.json $REPO_ROOT/pyproject.toml
$REPO_ROOT/go.mod $REPO_ROOT/Cargo.toml 2>/dev/null

**根据目录结构推断业务领域**,示例:
- `app/models/` + `app/controllers/` → Rails MVC领域
- `src/components/` + `src/pages/` → Next.js前端领域
- `services/` + `workers/` → 面向服务架构领域
- `lib/` + `spec/` → 类库模式领域

记录:推断出的业务领域列表(如内容模型、认证、API、前端路由、后台任务等)。

2. Pattern Discovery

2. 模式发现

For each inferred domain, grep for critical patterns:
bash
undefined
针对每个推断出的领域,使用grep查找关键模式:
bash
undefined

Entry points (routes, controllers, resolvers)

Entry points (routes, controllers, resolvers)

grep -r "def " $REPO_ROOT/app/controllers/ --include=".rb" -l 2>/dev/null | head -10 grep -r "export default" $REPO_ROOT/src/pages/ --include=".tsx" -l 2>/dev/null | head -10
grep -r "def " $REPO_ROOT/app/controllers/ --include=".rb" -l 2>/dev/null | head -10 grep -r "export default" $REPO_ROOT/src/pages/ --include=".tsx" -l 2>/dev/null | head -10

Key abstractions (base classes, mixins, concerns)

Key abstractions (base classes, mixins, concerns)

grep -rl "class.*Base|module.*Concern|extends.*Component"
$REPO_ROOT/app $REPO_ROOT/lib $REPO_ROOT/src 2>/dev/null | head -10
grep -rl "class.*Base|module.*Concern|extends.*Component"
$REPO_ROOT/app $REPO_ROOT/lib $REPO_ROOT/src 2>/dev/null | head -10

Shared utilities (helpers, services)

Shared utilities (helpers, services)

ls $REPO_ROOT/app/services/ $REPO_ROOT/lib/ $REPO_ROOT/src/lib/ 2>/dev/null
ls $REPO_ROOT/app/services/ $REPO_ROOT/lib/ $REPO_ROOT/src/lib/ 2>/dev/null

Critical paths (auth, payment, data mutations)

Critical paths (auth, payment, data mutations)

grep -rl "authenticate|authorize|payment|stripe|checkout|redirect"
$REPO_ROOT/app $REPO_ROOT/src 2>/dev/null | head -20

Read 2-3 key files per domain to understand the actual pattern. Do not rely solely on filenames.

Identify **critical paths** — sequences where a bug causes significant user harm:
- Auth flows (login, token refresh, permission checks)
- Data mutation flows (create/update/delete with side effects)
- Payment flows (if applicable)
- External API integrations (webhooks, third-party calls)
grep -rl "authenticate|authorize|payment|stripe|checkout|redirect"
$REPO_ROOT/app $REPO_ROOT/src 2>/dev/null | head -20

每个领域阅读2-3个关键文件,以理解实际的代码模式,不要仅依赖文件名。

识别**关键路径**——即出现Bug会对用户造成严重影响的流程:
- 认证流程(登录、令牌刷新、权限校验)
- 数据变更流程(带有副作用的创建/更新/删除操作)
- 支付流程(如适用)
- 外部API集成(Webhook、第三方调用)

3. Write ARCHITECTURE.md

3. 编写ARCHITECTURE.md

Create or update
$REPO_ROOT/ARCHITECTURE.md
:
markdown
undefined
创建或更新
$REPO_ROOT/ARCHITECTURE.md
文件:
markdown
undefined

Architecture — {REPO_NAME}

Architecture — {REPO_NAME}

Last updated: {DATE} by setup-harness
Last updated: {DATE} by setup-harness

Overview

Overview

{1-2 paragraphs: what this system does, its primary responsibility, who uses it}
{1-2 paragraphs: what this system does, its primary responsibility, who uses it}

Tech Stack

Tech Stack

LayerTechnologyNotes
Runtime{e.g., Ruby 3.2 / Rails 7}
Frontend{e.g., Next.js 14 / React}
Database{e.g., PostgreSQL 15}
Background{e.g., Sidekiq / Que}
Auth{e.g., Devise + JWT}
LayerTechnologyNotes
Runtime{e.g., Ruby 3.2 / Rails 7}
Frontend{e.g., Next.js 14 / React}
Database{e.g., PostgreSQL 15}
Background{e.g., Sidekiq / Que}
Auth{e.g., Devise + JWT}

Domains

Domains

{For each inferred domain:}
{For each inferred domain:}

{Domain Name}

{Domain Name}

Files:
{primary directory path}
Pattern: {1-2 sentences describing how this domain works, with actual file/class names}
Critical paths:
  • {Path name}:
    {entry point}
    {key step}
    {outcome}
Known gotchas:
  • {Any patterns that are non-obvious or commonly misunderstood}
Files:
{primary directory path}
Pattern: {1-2 sentences describing how this domain works, with actual file/class names}
Critical paths:
  • {Path name}:
    {entry point}
    {key step}
    {outcome}
Known gotchas:
  • {Any patterns that are non-obvious or commonly misunderstood}

Architectural Decisions

Architectural Decisions

{Document any non-obvious decisions found during scan. Leave this section for humans to fill in if nothing is discovered.}
{Document any non-obvious decisions found during scan. Leave this section for humans to fill in if nothing is discovered.}

Decision: {Short name}

Decision: {Short name}

  • Context: {What problem this solves}
  • Decision: {What was chosen}
  • Consequences: {Trade-offs}
  • Context: {What problem this solves}
  • Decision: {What was chosen}
  • Consequences: {Trade-offs}

Agent Guidance

Agent Guidance

When modifying code in this repo:
  1. Read the relevant domain section above before touching files in that directory
  2. Check
    docs/code-structure.md
    for how the pattern works
  3. Check
    docs/code-guidelines.md
    for rules that must be followed
  4. Check
    QUALITY_SCORE.md
    to understand domain health
If you are about to write code that looks like it already exists — it probably does. Search first.

Populate ALL sections with real discovered content. Do not use `{placeholder}` text in the final file.
When modifying code in this repo:
  1. Read the relevant domain section above before touching files in that directory
  2. Check
    docs/code-structure.md
    for how the pattern works
  3. Check
    docs/code-guidelines.md
    for rules that must be followed
  4. Check
    QUALITY_SCORE.md
    to understand domain health
If you are about to write code that looks like it already exists — it probably does. Search first.

所有章节都需填充实际发现的内容,最终文件中不得使用`{占位符}`文本。

4. Write docs/code-structure.md

4. 编写docs/code-structure.md

Create or update
$REPO_ROOT/docs/code-structure.md
.
This must be real pattern documentation, not a directory listing. For each domain, explain HOW the pattern works, with actual code references.
Template:
markdown
undefined
创建或更新
$REPO_ROOT/docs/code-structure.md
文件。
这必须是真实的代码模式文档,而非目录列表。针对每个领域,结合实际代码引用解释模式的工作原理。
模板:
markdown
undefined

Code Structure — {REPO_NAME}

Code Structure — {REPO_NAME}

Last updated: {DATE} by setup-harness. Update this file when patterns change.
Last updated: {DATE} by setup-harness. Update this file when patterns change.

How to Read This Doc

How to Read This Doc

Each section covers a domain. For each domain:
  • The pattern explains the standard way things work
  • The entry point is where to start reading
  • Don't repeat calls out existing utilities to use instead of reimplementing

Each section covers a domain. For each domain:
  • The pattern explains the standard way things work
  • The entry point is where to start reading
  • Don't repeat calls out existing utilities to use instead of reimplementing

{Domain 1 Name}

{Domain 1 Name}

Directory:
{path}
Directory:
{path}

The Pattern

The Pattern

{Explain the pattern in plain English. Example:}
Controllers in
app/controllers/
inherit from
ApplicationController
. Auth is handled by
before_action :authenticate_user!
— never roll your own. Model validations live on the model, not the controller. Service objects in
app/services/
handle business logic that doesn't belong on a model.
{Explain the pattern in plain English. Example:}
Controllers in
app/controllers/
inherit from
ApplicationController
. Auth is handled by
before_action :authenticate_user!
— never roll your own. Model validations live on the model, not the controller. Service objects in
app/services/
handle business logic that doesn't belong on a model.

Entry Points

Entry Points

ConcernWhere to look
Routes
config/routes.rb
Auth
app/controllers/application_controller.rb
User model
app/models/user.rb
ConcernWhere to look
Routes
config/routes.rb
Auth
app/controllers/application_controller.rb
User model
app/models/user.rb

Don't Repeat

Don't Repeat

  • Redirects: Use
    check_redirect
    in
    lib/redirect_service.rb
    , not a new conditional
  • Permissions: Use
    policy
    objects in
    app/policies/
    , not inline
    if current_user.admin?
  • Email: Use
    UserMailer
    in
    app/mailers/
    , not direct
    ActionMailer::Base

{Repeat for each domain}
  • Redirects: Use
    check_redirect
    in
    lib/redirect_service.rb
    , not a new conditional
  • Permissions: Use
    policy
    objects in
    app/policies/
    , not inline
    if current_user.admin?
  • Email: Use
    UserMailer
    in
    app/mailers/
    , not direct
    ActionMailer::Base

{Repeat for each domain}

Cross-Cutting Concerns

Cross-Cutting Concerns

Error Handling

Error Handling

{How errors are handled across the app}
{How errors are handled across the app}

Logging

Logging

{What gets logged, where, and how}
{What gets logged, where, and how}

Testing

Testing

{Testing strategy — unit/integration split, key helpers, fixture approach}

Read actual source files to populate the "Don't Repeat" section with real utilities. This is the primary fix for the #1585-class bug.
{Testing strategy — unit/integration split, key helpers, fixture approach}

阅读实际源码文件,为“Don't Repeat”部分填充真实的工具类信息。这是修复#1585级缺陷的核心措施。

5. Write docs/code-guidelines.md

5. 编写docs/code-guidelines.md

Create or update
$REPO_ROOT/docs/code-guidelines.md
:
markdown
undefined
创建或更新
$REPO_ROOT/docs/code-guidelines.md
文件:
markdown
undefined

Code Guidelines — {REPO_NAME}

Code Guidelines — {REPO_NAME}

These are enforced by hookshot hooks and checked by entropy-check scans. Adding a new rule here? Run
/hookshot
to generate enforcement hooks.
These are enforced by hookshot hooks and checked by entropy-check scans. Adding a new rule here? Run
/hookshot
to generate enforcement hooks.

Golden Rules

Golden Rules

These rules are never negotiated. Violations get flagged in PR review.
  1. Search before you implement. Before writing a new utility, service, or helper, grep for existing implementations. The codebase has patterns — use them.
  2. Domain boundaries are hard. {e.g., "Controllers do not query the database directly. Use service objects. Models do not call external APIs."}
  3. {Rule 3} — infer from codebase patterns
  4. {Rule 4} — infer from codebase patterns
These rules are never negotiated. Violations get flagged in PR review.
  1. Search before you implement. Before writing a new utility, service, or helper, grep for existing implementations. The codebase has patterns — use them.
  2. Domain boundaries are hard. {e.g., "Controllers do not query the database directly. Use service objects. Models do not call external APIs."}
  3. {Rule 3} — infer from codebase patterns
  4. {Rule 4} — infer from codebase patterns

Per-Domain Rules

Per-Domain Rules

{Domain}

{Domain}

  • {Specific rule for this domain, inferred from code patterns}
  • {Another rule}
  • {Specific rule for this domain, inferred from code patterns}
  • {Another rule}

Patterns That Look Wrong But Are Correct

Patterns That Look Wrong But Are Correct

{Document any patterns that look like bugs but are intentional. Prevents agents from "fixing" working code.}
{Document any patterns that look like bugs but are intentional. Prevents agents from "fixing" working code.}

Patterns That Look Right But Are Wrong

Patterns That Look Right But Are Wrong

{Document common mistakes — especially ones that pass tests but fail in production.}
{Document common mistakes — especially ones that pass tests but fail in production.}

When in Doubt

When in Doubt

  1. Read the relevant section in
    docs/code-structure.md
  2. Search for an existing implementation
  3. Check
    ARCHITECTURE.md
    for architectural constraints
  4. Ask in a comment rather than guessing

Infer rules from the codebase. If you find a base class, document "inherit from X, not raw". If you find a service pattern, document "use services for business logic". Be specific.
  1. Read the relevant section in
    docs/code-structure.md
  2. Search for an existing implementation
  3. Check
    ARCHITECTURE.md
    for architectural constraints
  4. Ask in a comment rather than guessing

从代码库中推断编码规则。如果发现基类,记录“继承自X,而非直接编写”;如果发现服务模式,记录“使用服务类处理业务逻辑”。规则需具体明确。

6. Write QUALITY_SCORE.md

6. 编写QUALITY_SCORE.md

Create
$REPO_ROOT/QUALITY_SCORE.md
:
markdown
undefined
创建
$REPO_ROOT/QUALITY_SCORE.md
文件:
markdown
undefined

Quality Score — {REPO_NAME}

Quality Score — {REPO_NAME}

Maintained by the entropy-check skill. Do not edit manually. Grade scale: A=all signals green, B=1 signal missing, C=2 missing, D=3+, F=no docs
Last audit: {DATE} (initial scaffold by setup-harness)
Maintained by the entropy-check skill. Do not edit manually. Grade scale: A=all signals green, B=1 signal missing, C=2 missing, D=3+, F=no docs
Last audit: {DATE} (initial scaffold by setup-harness)

Domains

Domains

DomainGradeLast auditNotes
{For each inferred domain:}
{Domain}C{DATE}Initial scaffold — needs human review
DomainGradeLast auditNotes
{For each inferred domain:}
{Domain}C{DATE}Initial scaffold — needs human review

Grade Signals (per domain)

Grade Signals (per domain)

Each domain is graded on:
  • docs/code-structure.md covers this domain
  • FlowChad flows defined for critical paths
  • Last commit date vs last doc update (staleness ≤30 days)
  • Open issues tagged to domain (≤3 open)
  • Test coverage available (if measurable)
Each domain is graded on:
  • docs/code-structure.md covers this domain
  • FlowChad flows defined for critical paths
  • Last commit date vs last doc update (staleness ≤30 days)
  • Open issues tagged to domain (≤3 open)
  • Test coverage available (if measurable)

History

History

DateActionResult
{DATE}Initial scaffold by setup-harness{N} domains discovered
undefined
DateActionResult
{DATE}Initial scaffold by setup-harness{N} domains discovered
undefined

7. Create FlowChad Stubs

7. 创建FlowChad流程草稿

For each critical path discovered:
bash
mkdir -p $REPO_ROOT/flowchad
For each critical path, create
$REPO_ROOT/flowchad/{path-name}.yml
:
yaml
undefined
针对每个发现的关键路径:
bash
mkdir -p $REPO_ROOT/flowchad
针对每个关键路径,创建
$REPO_ROOT/flowchad/{path-name}.yml
文件:
yaml
undefined

FlowChad Flow Definition — {Path Name}

FlowChad Flow Definition — {Path Name}

Generated by setup-harness on {DATE}

Generated by setup-harness on {DATE}

TODO: Validate this flow against actual code and fill in edge cases

TODO: Validate this flow against actual code and fill in edge cases

name: {path-name} description: "{1-line description of what this flow does}" domain: "{domain name}" criticality: high # high | medium | low
steps:
  • id: entry label: "{Entry point — e.g., POST /sessions}" file: "{entry file path}" notes: "TODO: verify"
  • id: step-2 label: "{Next step}" file: "TODO" notes: "TODO: fill in from code"

Add more steps based on code discovery

edges:
  • from: entry to: step-2 condition: "happy path"

Add error/edge paths

open_questions:
  • "TODO: What happens if {edge case}?"

Create stubs for: auth flow, main data mutation flow, and any other critical paths identified.
name: {path-name} description: "{1-line description of what this flow does}" domain: "{domain name}" criticality: high # high | medium | low
steps:
  • id: entry label: "{Entry point — e.g., POST /sessions}" file: "{entry file path}" notes: "TODO: verify"
  • id: step-2 label: "{Next step}" file: "TODO" notes: "TODO: fill in from code"

Add more steps based on code discovery

edges:
  • from: entry to: step-2 condition: "happy path"

Add error/edge paths

open_questions:
  • "TODO: What happens if {edge case}?"

为以下流程创建草稿:认证流程、核心数据变更流程,以及其他所有识别出的关键路径。

8. Update .claude/CLAUDE.md

8. 更新.claude/CLAUDE.md

Read the existing
.claude/CLAUDE.md
if it exists. Add or update the "Knowledge Layer" section:
markdown
undefined
如果
.claude/CLAUDE.md
文件已存在,请先阅读,然后添加或更新“知识层”章节:
markdown
undefined

Knowledge Layer

Knowledge Layer

This repo has a knowledge layer for agents. Read before modifying:
DocWhat it covers
ARCHITECTURE.mdTech stack, domains, architectural decisions
QUALITY_SCORE.mdDomain health grades
docs/code-structure.mdHow patterns work, what NOT to reimplement
docs/code-guidelines.mdRules enforced by hooks
flowchad/Critical path flow definitions
Rule #1: Before modifying code in a domain, read its section in
docs/code-structure.md
. Rule #2: Before writing a new utility/service/helper, search for an existing one.

Keep the total CLAUDE.md under 150 lines. If it's longer, move content to the appropriate dedicated doc.
This repo has a knowledge layer for agents. Read before modifying:
DocWhat it covers
ARCHITECTURE.mdTech stack, domains, architectural decisions
QUALITY_SCORE.mdDomain health grades
docs/code-structure.mdHow patterns work, what NOT to reimplement
docs/code-guidelines.mdRules enforced by hooks
flowchad/Critical path flow definitions
Rule #1: Before modifying code in a domain, read its section in
docs/code-structure.md
. Rule #2: Before writing a new utility/service/helper, search for an existing one.

保持CLAUDE.md总长度不超过150行。如果过长,请将内容迁移至对应的专用文档中。

9. Run Hookshot

9. 运行Hookshot

As the final step, run hookshot to generate enforcement hooks from the docs you just created:
Follow the full hookshot SKILL.md instructions (
.claude/skills/hookshot/SKILL.md
). This generates:
  • .claude/doc-coverage.json
    — coverage map
  • scripts/check-docs.sh
    (or
    .claude/check-docs.sh
    ) — hook script
  • .claude/settings.json
    hooks — PreToolUse wiring
  • docs/hooks.md
    — human-readable hook documentation
If hookshot is not installed, skip this step and note it in the summary report as a manual follow-up.
最后一步,运行hookshot工具,根据你刚创建的文档生成强制执行钩子:
遵循hookshot的完整SKILL.md说明(
.claude/skills/hookshot/SKILL.md
)。运行后将生成:
  • .claude/doc-coverage.json
    — 文档覆盖映射
  • scripts/check-docs.sh
    (或
    .claude/check-docs.sh
    ) — 钩子脚本
  • .claude/settings.json
    钩子 — PreToolUse配置
  • docs/hooks.md
    — 人类可读的钩子说明文档
如果未安装hookshot,请跳过此步骤,并在总结报告中记录为需手动跟进的事项。

10. Summary Report

10. 总结报告

Output:
undefined
输出内容:
undefined

Setup Harness Complete: {REPO_NAME}

Setup Harness Complete: {REPO_NAME}

Discovered

Discovered

  • {N} domains: {list}
  • {N} critical paths: {list}
  • Tech stack: {stack}
  • {N} domains: {list}
  • {N} critical paths: {list}
  • Tech stack: {stack}

Created

Created

  • ✅ ARCHITECTURE.md ({N} domains documented)
  • ✅ QUALITY_SCORE.md ({N} domains graded)
  • ✅ docs/code-structure.md (real patterns, not placeholders)
  • ✅ docs/code-guidelines.md ({N} golden rules)
  • ✅ flowchad/{N} flow stubs
  • ✅ .claude/CLAUDE.md updated (table of contents)
  • ✅ ARCHITECTURE.md ({N} domains documented)
  • ✅ QUALITY_SCORE.md ({N} domains graded)
  • ✅ docs/code-structure.md (real patterns, not placeholders)
  • ✅ docs/code-guidelines.md ({N} golden rules)
  • ✅ flowchad/{N} flow stubs
  • ✅ .claude/CLAUDE.md updated (table of contents)

Hookshot

Hookshot

  • {✅ Hookshot ran successfully — hooks generated / ⚠️ Hookshot not installed — run manually}
  • .claude/doc-coverage.json: {N} entries
  • docs/hooks.md: {generated / skipped}
  • {✅ Hookshot ran successfully — hooks generated / ⚠️ Hookshot not installed — run manually}
  • .claude/doc-coverage.json: {N} entries
  • docs/hooks.md: {generated / skipped}

Grades (initial)

Grades (initial)

{Grade table from QUALITY_SCORE.md}
{Grade table from QUALITY_SCORE.md}

Manual Next Steps

Manual Next Steps

  • Review ARCHITECTURE.md — add architectural decisions the scan missed
  • Review docs/code-structure.md — verify "Don't Repeat" entries are current
  • Complete flowchad/ stubs with actual edge cases
  • Run
    /entropy-check
    to re-grade after manual review
undefined
  • Review ARCHITECTURE.md — add architectural decisions the scan missed
  • Review docs/code-structure.md — verify "Don't Repeat" entries are current
  • Complete flowchad/ stubs with actual edge cases
  • Run
    /entropy-check
    to re-grade after manual review
undefined