Loading...
Loading...
Compare original and translation side by side
# Secrets and credentials
.env, .env.*, *.pem, *.key, credentials.json, secrets.*, *secret*, *credential*, *password*
# Authentication tokens
token.json, .npmrc, .pypirc
# Cloud provider credentials
.aws/credentials, .gcloud/, service-account*.json# 密钥和凭证
.env, .env.*, *.pem, *.key, credentials.json, secrets.*, *secret*, *credential*, *password*
# 认证令牌
token.json, .npmrc, .pypirc
# 云服务商凭证
.aws/credentials, .gcloud/, service-account*.jsonnode_modules/venv/vendor/dist/build/__pycache__/node_modules/venv/vendor/dist/build/__pycache__/references/exploration-strategies.mdreferences/exploration-strategies.mdls -lapackage.jsongo.modpyproject.tomlrequirements.txtsetup.pypom.xmlbuild.gradleCargo.tomlreferences/exploration-strategies.mdpyproject.tomlsetup.pyrequirements.txtpackage.jsongo.modundefinedls -lapackage.jsongo.modpyproject.tomlrequirements.txtsetup.pypom.xmlbuild.gradleCargo.tomlreferences/exploration-strategies.mdpyproject.tomlsetup.pyrequirements.txtpackage.jsongo.modundefined
**Step 4: Check for CLAUDE.md**
Read any `.claude/CLAUDE.md` or `CLAUDE.md` in the repository root. Follow its instructions throughout remaining phases.
**Step 5: Document findings**
```markdown
**步骤4:检查CLAUDE.md**
读取仓库根目录下的`.claude/CLAUDE.md`或`CLAUDE.md`文件。在剩余阶段中遵循其指示。
**步骤5:记录检测结果**
```markdown
**Gate**: Project type identified (language + framework). Tech stack documented. Build/run commands known. Proceed ONLY when gate passes.
**准入条件**:已识别项目类型(语言 + 框架),已记录技术栈,已知晓构建/运行命令。仅当满足条件时方可进入下一阶段。references/exploration-strategies.mdmain__main__find . -type d \
-not -path '*/\.*' \
-not -path '*/node_modules/*' \
-not -path '*/venv/*' \
-not -path '*/vendor/*' \
-not -path '*/dist/*' \
-not -path '*/build/*' \
| head -50| Pattern | Layer |
|---|---|
| Data |
| API |
| Business logic |
| Utilities |
| Tests |
| Configuration |
| CLI |
undefinedreferences/exploration-strategies.mdmain__main__find . -type d \
-not -path '*/\.*' \
-not -path '*/node_modules/*' \
-not -path '*/venv/*' \
-not -path '*/vendor/*' \
-not -path '*/dist/*' \
-not -path '*/build/*' \
| head -50| 模式 | 层级 |
|---|---|
| 数据层 |
| API层 |
| 业务逻辑层 |
| 工具层 |
| 测试层 |
| 配置层 |
| CLI层 |
undefined
Document: entity relationships (which models reference which), primary data structures and their fields, database technology, migration strategy.
**Step 4: Discover API surface**
Search for route, handler, and controller files. Read 3-5 key API files.
```markdown
记录内容:实体关系(哪些模型相互引用)、主要数据结构及其字段、数据库技术、迁移策略。
**步骤4:发现API接口**
搜索路由、处理器和控制器文件。读取3-5个关键API文件。
```markdown
Document: endpoint structure and URL patterns, HTTP methods and request/response formats, authentication and authorization patterns, API versioning strategy.
**Step 5: Identify configuration**
Find `.env.example`, config files, and settings modules.
```bash
记录内容:端点结构和URL模式、HTTP方法和请求/响应格式、认证和授权模式、API版本控制策略。
**步骤5:识别配置**
查找`.env.example`、配置文件和设置模块。
```bash
Document: required environment variables and their purpose, external service dependencies (databases, APIs, caches, queues), feature flags or runtime options.
**Step 6: Examine test structure**
Find test files and test configuration. Read 2-3 representative tests.
```bash
记录内容:所需环境变量及其用途、外部服务依赖(数据库、API、缓存、队列)、功能标志或运行时选项。
**步骤6:检查测试结构**
查找测试文件和测试配置。读取2-3个代表性测试文件。
```bash
Document: testing framework, test organization (co-located vs separate directory), common patterns (fixtures, factories, mocks), coverage tooling.
**Gate**: Entry points identified. Core modules mapped. Data layer understood. API surface discovered. Configuration examined. Test structure documented. Proceed ONLY when gate passes.
记录内容:测试框架、测试组织方式(与代码同目录/单独目录)、常见模式(夹具、工厂、模拟)、覆盖率工具。
**准入条件**:已识别入口点,已映射核心模块,已理解数据层,已发现API接口,已检查配置,已记录测试结构。仅当满足条件时方可进入下一阶段。undefinedundefined
**Step 2: Map key abstractions**
Identify the 5-10 most important types, classes, or modules:
```markdown
**步骤2:映射关键抽象**
识别5-10个最重要的类型、类或模块:
```markdown
Document: core domain concepts, primary interfaces/abstractions, component communication (direct calls, events, queues).
**Step 3: Document data flow**
Trace a typical request from entry point through the full stack:
```markdown
记录内容:核心领域概念、主要接口/抽象、组件通信方式(直接调用、事件、队列)。
**步骤3:记录数据流**
跟踪典型请求从入口点到整个栈的完整流程:
```markdown
**Step 4: Analyze recent activity**
```bash
git log --oneline --no-decorate -10
**步骤4:分析近期活动**
```bash
git log --oneline --no-decorate -10references/report-template.mdundefinedreferences/report-template.mdundefined| I want to add... | Put it in... | Follow the pattern in... |
|---|---|---|
| [category from exploration] | [directory path] | [concrete example file path] |
Populate this table from evidence gathered in Phases 2-3. Every entry MUST reference a real file that already exists in the codebase. If a category has no clear home, note that explicitly rather than guessing.
**Step 4: Post-exploration secret scan**
Before presenting results, scan all output for accidentally captured secrets. Even with the forbidden-files guardrail, secrets can appear in non-obvious places (config comments, inline connection strings, hardcoded tokens in source).
```bash| 我要添加... | 应放在... | 参考示例文件... |
|---|---|---|
| [探索中发现的类别] | [目录路径] | [具体示例文件路径] |
使用阶段2-3中收集的证据填充此表格。每个条目必须引用代码库中已存在的真实文件。如果某个类别没有明确的存放位置,请明确注明,不要猜测。
**步骤4:探索后敏感信息扫描**
呈现结果前,扫描所有输出以检查是否意外捕获敏感信息。即使有敏感文件防护,敏感信息仍可能出现在非明显位置(配置注释、内联连接字符串、源代码中的硬编码令牌)。
```bash
If any matches are found:
1. Do NOT present the raw output to the user
2. Redact the matched lines (replace values with `[REDACTED]`)
3. Flag the finding: "Secret pattern detected in exploration output -- redacted before display. Review [file path] manually."
**Step 5: Output report**
Display complete markdown report to stdout. If export behavior is enabled, also write to file.
**Gate**: Report has all sections filled. All paths are absolute. All claims cite evidence. "Where to Add New Code" section populated with real file references. Secret scan passed (no unredacted secrets in output). Report is actionable for onboarding. Quality check passes. Total files examined count is accurate.
---
如果发现匹配项:
1. 不要向用户呈现原始输出
2. 编辑匹配行(将值替换为`[REDACTED]`)
3. 标记发现:“在探索输出中检测到敏感信息模式——显示前已编辑。请手动检查[文件路径]。”
**步骤5:输出报告**
将完整的Markdown报告显示到标准输出。如果启用了导出行为,同时写入到文件。
**准入条件**:报告所有章节已填充,所有路径为绝对路径,所有结论均有证据支持,“新增代码位置指南”章节已使用真实文件引用填充,敏感信息扫描通过(输出中无未编辑的敏感信息),报告对入职有实际指导意义,质量检查通过,已检查文件总数准确。
---| Agent | Focus | Output File |
|---|---|---|
| Technology Stack | Languages, frameworks, dependencies, build tools, CI/CD pipelines, runtime requirements | |
| Architecture | Module structure, data flow, API boundaries, state management, component relationships, entry points | |
| Code Quality | Test coverage patterns, linting config, type safety, documentation density, code style conventions | |
| Risks & Concerns | Technical debt indicators, security patterns, dependency health, TODO/FIXME/HACK density, deprecated APIs | |
| Agent | 聚焦领域 | 输出文件 |
|---|---|---|
| 技术栈 | 语言、框架、依赖项、构建工具、CI/CD流水线、运行时要求 | |
| 架构 | 模块结构、数据流、API边界、状态管理、组件关系、入口点 | |
| 代码质量 | 测试覆盖模式、代码检查配置、类型安全、文档密度、代码风格规范 | |
| 风险与关注点 | 技术债务指标、安全模式、依赖项健康状况、TODO/FIXME/HACK密度、已弃用API | |
You are exploring a [language/framework] codebase focused on [DOMAIN].
Project root: [absolute path]
Project type: [from DETECT phase]
RULES:
- Read-only. NEVER modify files.
- NEVER read files matching forbidden patterns: .env, .env.*, *.pem, *.key, credentials.json, secrets.*, *secret*, *credential*, *password*, token.json, .npmrc, .pypirc, .aws/credentials, .gcloud/, service-account*.json
- All file paths in output MUST be absolute.
- Every claim MUST cite an examined file.
Write your findings to: exploration/[domain].md你正在探索一个[语言/框架]代码库,聚焦于[领域]。
项目根目录:[绝对路径]
项目类型:[来自DETECT阶段]
规则:
- 只读操作。**绝不**修改文件。
- **绝不**读取匹配以下模式的文件:.env, .env.*, *.pem, *.key, credentials.json, secrets.*, *secret*, *credential*, *password*, token.json, .npmrc, .pypirc, .aws/credentials, .gcloud/, service-account*.json
- 输出中所有文件路径必须为绝对路径。
- 所有结论必须引用已检查的文件。
请将你的发现写入:exploration/[领域].mdmain.pysrc/models/routes/main.pysrc/models/routes/go.modcmd/server/main.gointernal/go.modcmd/server/main.gointernal/package.jsonsrc/index.tspackage.jsonsrc/index.tspwdpwd.git/.git//abs/path/config/database.pypostgresql://.../绝对路径/config/database.pypostgresql://...models/models/| Rationalization | Why It's Wrong | Required Action |
|---|---|---|
| "I can infer the architecture from the README" | README may be outdated or incomplete | Examine actual source files |
| "Config files are enough to understand the project" | Config shows dependencies, not architecture | Read entry points and core modules |
| "20 files is enough for any project" | Some areas need deeper sampling | Adjust per category, note limitations |
| "Report looks complete" | Looking complete != being complete | Verify every section has file-backed evidence |
| 合理化借口 | 错误原因 | 正确做法 |
|---|---|---|
| “我可以从README推断架构” | README可能过时或不完整 | 检查实际源代码文件 |
| “配置文件足以理解项目” | 配置仅显示依赖项,不显示架构 | 读取入口点和核心模块 |
| “20个文件足够覆盖任何项目” | 某些领域需要更深入的抽样 | 根据类别调整,记录限制 |
| “报告看起来完整了” | 看起来完整不等于实际完整 | 验证每个章节均有文件证据支持 |
${CLAUDE_SKILL_DIR}/references/report-template.md${CLAUDE_SKILL_DIR}/references/exploration-strategies.md${CLAUDE_SKILL_DIR}/references/report-template.md${CLAUDE_SKILL_DIR}/references/exploration-strategies.md