setup-harness
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSetup 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-harnessWhen 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
生成内容
| File | Purpose |
|---|---|
| Major architectural decisions and critical patterns |
| Domain quality grades — updated by the entropy-check skill |
| Real discovered patterns ("this is how X works") |
| Golden principles, enforced mechanically by hookshot |
| Stub flow definitions for critical paths |
| Updated table of contents pointing to all docs |
Files that already exist are updated (merged), never overwritten wholesale.
| 文件 | 用途 |
|---|---|
| 记录核心架构决策与关键模式 |
| 领域质量评级 — 由entropy-check工具更新 |
| 记录实际发现的代码模式(如“X功能的实现方式”) |
| 核心编码原则,由hookshot工具自动强制执行 |
| 关键路径的流程定义草稿 |
| 更新后的文档目录,指向所有相关文档 |
已存在的文件会进行更新(合并内容),不会被完全覆盖。
Instructions
操作步骤
0. Identify the Repo
0. 确定目标代码仓库
bash
undefinedbash
undefinedGet 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
undefinedTop-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
! -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
! -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
$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
$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
undefinedEntry 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
$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
$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
$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
$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.mdmarkdown
undefined创建或更新文件:
$REPO_ROOT/ARCHITECTURE.mdmarkdown
undefinedArchitecture — {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
| Layer | Technology | Notes |
|---|---|---|
| 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} |
| Layer | Technology | Notes |
|---|---|---|
| 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:
- Read the relevant domain section above before touching files in that directory
- Check for how the pattern works
docs/code-structure.md - Check for rules that must be followed
docs/code-guidelines.md - Check to understand domain health
QUALITY_SCORE.md
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:
- Read the relevant domain section above before touching files in that directory
- Check for how the pattern works
docs/code-structure.md - Check for rules that must be followed
docs/code-guidelines.md - Check to understand domain health
QUALITY_SCORE.md
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.mdThis 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
undefinedCode 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 ininherit fromapp/controllers/. Auth is handled byApplicationController— never roll your own. Model validations live on the model, not the controller. Service objects inbefore_action :authenticate_user!handle business logic that doesn't belong on a model.app/services/
{Explain the pattern in plain English. Example:}
Controllers ininherit fromapp/controllers/. Auth is handled byApplicationController— never roll your own. Model validations live on the model, not the controller. Service objects inbefore_action :authenticate_user!handle business logic that doesn't belong on a model.app/services/
Entry Points
Entry Points
| Concern | Where to look |
|---|---|
| Routes | |
| Auth | |
| User model | |
| Concern | Where to look |
|---|---|
| Routes | |
| Auth | |
| User model | |
Don't Repeat
Don't Repeat
- Redirects: Use in
check_redirect, not a new conditionallib/redirect_service.rb - Permissions: Use objects in
policy, not inlineapp/policies/if current_user.admin? - Email: Use in
UserMailer, not directapp/mailers/ActionMailer::Base
{Repeat for each domain}
- Redirects: Use in
check_redirect, not a new conditionallib/redirect_service.rb - Permissions: Use objects in
policy, not inlineapp/policies/if current_user.admin? - Email: Use in
UserMailer, not directapp/mailers/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.mdmarkdown
undefined创建或更新文件:
$REPO_ROOT/docs/code-guidelines.mdmarkdown
undefinedCode Guidelines — {REPO_NAME}
Code Guidelines — {REPO_NAME}
These are enforced by hookshot hooks and checked by entropy-check scans. Adding a new rule here? Runto generate enforcement hooks./hookshot
These are enforced by hookshot hooks and checked by entropy-check scans. Adding a new rule here? Runto generate enforcement hooks./hookshot
Golden Rules
Golden Rules
These rules are never negotiated. Violations get flagged in PR review.
-
Search before you implement. Before writing a new utility, service, or helper, grep for existing implementations. The codebase has patterns — use them.
-
Domain boundaries are hard. {e.g., "Controllers do not query the database directly. Use service objects. Models do not call external APIs."}
-
{Rule 3} — infer from codebase patterns
-
{Rule 4} — infer from codebase patterns
These rules are never negotiated. Violations get flagged in PR review.
-
Search before you implement. Before writing a new utility, service, or helper, grep for existing implementations. The codebase has patterns — use them.
-
Domain boundaries are hard. {e.g., "Controllers do not query the database directly. Use service objects. Models do not call external APIs."}
-
{Rule 3} — infer from codebase patterns
-
{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
- Read the relevant section in
docs/code-structure.md - Search for an existing implementation
- Check for architectural constraints
ARCHITECTURE.md - 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.- Read the relevant section in
docs/code-structure.md - Search for an existing implementation
- Check for architectural constraints
ARCHITECTURE.md - Ask in a comment rather than guessing
从代码库中推断编码规则。如果发现基类,记录“继承自X,而非直接编写”;如果发现服务模式,记录“使用服务类处理业务逻辑”。规则需具体明确。6. Write QUALITY_SCORE.md
6. 编写QUALITY_SCORE.md
Create :
$REPO_ROOT/QUALITY_SCORE.mdmarkdown
undefined创建文件:
$REPO_ROOT/QUALITY_SCORE.mdmarkdown
undefinedQuality 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
| Domain | Grade | Last audit | Notes |
|---|---|---|---|
| {For each inferred domain:} | |||
| {Domain} | C | {DATE} | Initial scaffold — needs human review |
| Domain | Grade | Last audit | Notes |
|---|---|---|---|
| {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
| Date | Action | Result |
|---|---|---|
| {DATE} | Initial scaffold by setup-harness | {N} domains discovered |
undefined| Date | Action | Result |
|---|---|---|
| {DATE} | Initial scaffold by setup-harness | {N} domains discovered |
undefined7. Create FlowChad Stubs
7. 创建FlowChad流程草稿
For each critical path discovered:
bash
mkdir -p $REPO_ROOT/flowchadFor each critical path, create :
$REPO_ROOT/flowchad/{path-name}.ymlyaml
undefined针对每个发现的关键路径:
bash
mkdir -p $REPO_ROOT/flowchad针对每个关键路径,创建文件:
$REPO_ROOT/flowchad/{path-name}.ymlyaml
undefinedFlowChad 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 if it exists. Add or update the "Knowledge Layer" section:
.claude/CLAUDE.mdmarkdown
undefined如果文件已存在,请先阅读,然后添加或更新“知识层”章节:
.claude/CLAUDE.mdmarkdown
undefinedKnowledge Layer
Knowledge Layer
This repo has a knowledge layer for agents. Read before modifying:
| Doc | What it covers |
|---|---|
| ARCHITECTURE.md | Tech stack, domains, architectural decisions |
| QUALITY_SCORE.md | Domain health grades |
| docs/code-structure.md | How patterns work, what NOT to reimplement |
| docs/code-guidelines.md | Rules enforced by hooks |
| flowchad/ | Critical path flow definitions |
Rule #1: Before modifying code in a domain, read its section in .
Rule #2: Before writing a new utility/service/helper, search for an existing one.
docs/code-structure.md
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:
| Doc | What it covers |
|---|---|
| ARCHITECTURE.md | Tech stack, domains, architectural decisions |
| QUALITY_SCORE.md | Domain health grades |
| docs/code-structure.md | How patterns work, what NOT to reimplement |
| docs/code-guidelines.md | Rules enforced by hooks |
| flowchad/ | Critical path flow definitions |
Rule #1: Before modifying code in a domain, read its section in .
Rule #2: Before writing a new utility/service/helper, search for an existing one.
docs/code-structure.md
保持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 (). This generates:
.claude/skills/hookshot/SKILL.md- — coverage map
.claude/doc-coverage.json - (or
scripts/check-docs.sh) — hook script.claude/check-docs.sh - hooks — PreToolUse wiring
.claude/settings.json - — human-readable hook documentation
docs/hooks.md
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 - 钩子 — PreToolUse配置
.claude/settings.json - — 人类可读的钩子说明文档
docs/hooks.md
如果未安装hookshot,请跳过此步骤,并在总结报告中记录为需手动跟进的事项。
10. Summary Report
10. 总结报告
Output:
undefined输出内容:
undefinedSetup 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 to re-grade after manual review
/entropy-check
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 to re-grade after manual review
/entropy-check
undefined