Loading...
Loading...
Compare original and translation side by side
Analyzes bounded contexts from the project's source tree, extracts domain knowledge per context, writesfiles, and producesai-context/features/<context>.mdwith coverage metrics.teach-report.md
/codebase-teach从项目源码树中分析Bounded Contexts,提取每个上下文的领域知识,生成文件,并输出包含覆盖度指标的ai-context/features/<context>.md文件。teach-report.md
/codebase-teachcodebase-teachai-context/features/memory-updatememory-initcodebase-teachai-context/features/memory-updatememory-initstatus: blockedstatus: failedai-context/stack.mdai-context/architecture.mdai-context/conventions.mdCLAUDE.md## Skills RegistryINFO: [filename] not found — proceeding without it.Last updated:Last analyzed:NOTE: [filename] last updated [date] — context may be stale. Consider running /memory-update or /project-analyze.config.yamlteach_max_files_per_contextmax_files = teach_max_files_per_contextmax_files = 10"File cap per context: [max_files] (source: config.yaml)""File cap per context: 10 (default)"status: blockedstatus: failedai-context/stack.mdai-context/architecture.mdai-context/conventions.mdCLAUDE.md## Skills RegistryINFO: [filename] not found — proceeding without it.Last updated:Last analyzed:NOTE: [filename] last updated [date] — context may be stale. Consider running /memory-update or /project-analyze.config.yamlteach_max_files_per_contextmax_files = teach_max_files_per_contextmax_files = 10"File cap per context: [max_files] (source: config.yaml)""File cap per context: 10 (default)"src/src/auth/src/payments/app/features/domain/ai-context/features/sharedutilscommonlibtypeshookscomponents__tests__testtestsnode_modules.gitai-context/features/.md__template.md{ slug: kebab-case of directory name, dir_path, existing_feature_file: bool }UserProfileuser-profileauth_serviceauth-service"No bounded context directories detected."teach-report.md/memory-initai-context/features/"INFO: ai-context/features/ not found — feature files will be created if possible."teach-report.mdcontext_list = [{ slug, dir_path, existing_feature_file: bool }, ...]"Detected context: [slug] — [dir_path] (feature file: [exists|absent])"src/src/auth/src/payments/app/features/domain/ai-context/features/sharedutilscommonlibtypeshookscomponents__tests__testtestsnode_modules.gitai-context/features/.md__template.md{ slug: 目录名称的短横线分隔格式, dir_path, existing_feature_file: bool }UserProfileuser-profileauth_serviceauth-service"No bounded context directories detected."teach-report.md/memory-initai-context/features/"INFO: ai-context/features/ not found — feature files will be created if possible."teach-report.mdcontext_list = [{ slug, dir_path, existing_feature_file: bool }, ...]"Detected context: [slug] — [dir_path] (feature file: [exists|absent])"context_listdir_path.ts.tsx.js.jsx.py.java.kt.rb.go.ex.exs.cs.rs.php.swift*.test.**.spec.*test_**_test.**.d.ts*.min.*max_filesmax_files"[slug]: [total] files found — sampling [max_files] (cap applied)"skipped_filescontext_knowledge = { slug, rules[], invariants[], entities[], integrations[], files_read[], skipped[] }dir_path.ts.tsx.js.jsx.py.java.kt.rb.go.ex.exs.cs.rs.php.swift*.test.**.spec.*test_**_test.**.d.ts*.min.*max_filesmax_files"[slug]: [total] files found — sampling [max_files] (cap applied)"skipped_filescontext_knowledge = { slug, rules[], invariants[], entities[], integrations[], files_read[], skipped[] }ai-context/features/<slug>.mdai-context/features/<slug>.mdai-context/features/<slug>.mdai-context/features/[auto-updated]ai-context/features/<slug>.md<!-- [auto-updated]: codebase-teach ... --><!-- [/auto-updated] -->[auto-updated][auto-updated][auto-updated][auto-updated]undefinedai-context/features/<slug>.mdai-context/features/[auto-updated]ai-context/features/<slug>.md<!-- [auto-updated]: codebase-teach ... --><!-- [/auto-updated] -->[auto-updated][auto-updated][auto-updated][auto-updated]undefined| Entity | Key Fields |
|---|---|
| [Name] | [field1, field2, ...] |
| 实体 | 核心字段 |
|---|---|
| [名称] | [field1, field2, ...] |
**`_template.md` guard:** never read, write, or treat any file whose name begins with `_` as a feature context. Skip entirely.
---
**`_template.md`防护规则:** 永远不要读取、写入或处理任何以下划线`_`开头的feature上下文文件,直接跳过。
---teach-report.mdteach-report.mddocumented_contexts = count of contexts that have an ai-context/features/<slug>.md file after Step 3
total_contexts = count of contexts in context_list
coverage_pct = (documented_contexts / total_contexts) * 100 (0 if total_contexts == 0)
gap_list = contexts in context_list where existing_feature_file was false before Step 3
AND no file was created in Step 3teach-report.mdanalysis-report.mdundefineddocumented_contexts = 步骤3完成后拥有ai-context/features/<slug>.md文件的上下文数量
total_contexts = 上下文列表中的总数量
coverage_pct = (documented_contexts / total_contexts) * 100 (若total_contexts为0则为0)
gap_list = 步骤3之前existing_feature_file为false且步骤3未生成文件的上下文teach-report.mdanalysis-report.mdundefined
If `ai-context/features/` was absent at run time, append to the Summary section:
> Note: ai-context/features/ was absent at run time. Recommend running /memory-init to scaffold the directory before re-running /codebase-teach.
---
若运行时`ai-context/features/`目录不存在,在摘要部分追加:
> 注意:运行时未找到ai-context/features/目录。建议先运行/memory-init指令生成目录结构,再重新运行/codebase-teach。
---ai-context/stack.mdai-context/architecture.mdai-context/conventions.mdai-context/known-issues.mdai-context/changelog-ai.mddocs/_ai-context/features/[auto-updated]teach_max_files_per_contextteach-report.mdteach-report.md[auto-updated]<!-- [auto-updated]: codebase-teach — last run: YYYY-MM-DD --><!-- [/auto-updated] -->project-analyzeai-context/stack.mdai-context/architecture.mdai-context/conventions.mdai-context/known-issues.mdai-context/changelog-ai.mddocs/ai-context/features/_[auto-updated]teach_max_files_per_contextteach-report.mdteach-report.md[auto-updated]<!-- [auto-updated]: codebase-teach — last run: YYYY-MM-DD --><!-- [/auto-updated] -->project-analyzeteach-report.mdteach-report.md| Section | Content |
|---|---|
| Summary | Contexts detected, documented, coverage % |
| Coverage | Percentage and ratio |
| Gaps | Contexts found in code but undocumented (or "None") |
| Files Read | Per-context list of files sampled and skipped |
| Sections Written / Updated | Per-feature-file: created or updated, which sections |
| 章节 | 内容 |
|---|---|
| 摘要 | 检测到的上下文数量、已文档化数量、覆盖度百分比 |
| 覆盖度详情 | 覆盖度百分比及比例 |
| 覆盖缺口 | 代码中存在但未文档化的上下文(或"无缺口") |
| 读取的文件 | 按上下文列出已采样和已跳过的文件 |
| 已写入/更新的章节 | 按feature文件列出:已创建或已更新、已处理的章节 |
ai-context/features/<context>.mdai-context/features/<context>.md[auto-updated][auto-updated]