Loading...
Loading...
Compare original and translation side by side
AskUserQuestionTaskAskUserQuestionrequest_user_inputTaskspawn_agentwaitsend_inputclose_agentReadWriteGlobexec_commandapply_patchASK_USER(...)AskUserQuestionTaskAskUserQuestionrequest_user_inputTaskspawn_agentwaitsend_inputclose_agentReadWriteGlobexec_commandapply_patchASK_USER(...)| Keywords | Mode |
|---|---|
| "review steerings", "transform steerings", "fix format" | → Review Mode (Step R) |
| "continue steerings", "continue session", "resume interview" | → Interview Mode (Step 0) with session check |
| "steerings", "tacit knowledge", "interview", "conventions" | → Interview Mode (Step 0) |
| 关键词 | 模式 |
|---|---|
| "review steerings"、"transform steerings"、"fix format" | → 审核模式(步骤R) |
| "continue steerings"、"continue session"、"resume interview" | → 访谈模式(步骤0),并检查会话 |
| "steerings"、"tacit knowledge"、"interview"、"conventions" | → 访谈模式(步骤0) |
.sessions/sessions/docs/sessions/ASK_USER(...)questions:
- question: "Found existing session(s). Continue or start fresh?"
header: "Session"
options:
- label: "Continue {sessionId}"
description: "Resume incomplete session ({N} of {M} packs done)"
- label: "Start new session"
description: "Create fresh session with new ID"sessionsPathsessionId{sessionsPath}{sessionId}/{packId}.md## Interview### QcompletedPacks[]explore-docs-conventions.mdexplore-repo-context.md.sessions/sessions/docs/sessions/ASK_USER(...)questions:
- question: "发现现有会话。继续还是重新开始?"
header: "会话"
options:
- label: "继续 {sessionId}"
description: "恢复未完成的会话(已完成{N}/{M}个包)"
- label: "开始新会话"
description: "创建带有新ID的全新会话"sessionsPathsessionId{sessionsPath}{sessionId}/{packId}.md## Interview### QcompletedPacks[]explore-docs-conventions.mdexplore-repo-context.mdASK_USER(...)questions:
- question: "Where should steering files be saved?"
header: "Steerings"
options: ["./steerings/", "docs/steerings/", ".memory-bank/steerings/", "Custom"]
- question: "Where should session files be saved?"
header: "Sessions"
options: ["./sessions/", ".sessions/", "docs/sessions/", "Custom"]
- question: "Where should action items be saved?"
header: "Backlog"
options: ["./backlog/", "Same as steerings parent", ".backlog/", "Custom"]steeringsPathsessionsPathbacklogPathsteerings/sessions/backlog/ASK_USER(...)questions:
- question: "Steering文件应保存至何处?"
header: "Steerings"
options: ["./steerings/", "docs/steerings/", ".memory-bank/steerings/", "自定义"]
- question: "会话文件应保存至何处?"
header: "会话"
options: ["./sessions/", ".sessions/", "docs/sessions/", "自定义"]
- question: "行动项应保存至何处?"
header: "待办清单"
options: ["./backlog/", "与steerings父目录相同", ".backlog/", "自定义"]steeringsPathsessionsPathbacklogPathsteerings/sessions/backlog/sessionIdsessionIdpackIdpackNamepackType: "custom"customTopicDescriptionASK_USER(...)packIdpackNamepackType: "custom"customTopicDescriptionASK_USER(...)ASK_USER(...)questions:
- question: "Interview mode preference?"
header: "Mode"
options:
- label: "Interactive (default)"
description: "Answer questions one-by-one with discussion"
- label: "Fast mode"
description: "Answer all questions at once, faster execution"interviewMode| Pack | ID |
|---|---|
| Codebase Topology & Ownership | |
| Architecture & Design Invariants | |
| Business Domain Contracts | |
| Quality & Style Assurance | |
| Testing & Verification Strategy | |
| Risk & Historical Landmines | |
| Security, Data & Compliance | |
| Delivery Lifecycle & Change Flow | |
ASK_USER(...)questions:
- question: "偏好的访谈模式?"
header: "模式"
options:
- label: "交互式(默认)"
description: "逐个回答问题并进行讨论"
- label: "快速模式"
description: "一次性回答所有问题,执行速度更快"interviewMode| 包 | ID |
|---|---|
| 代码库拓扑与所有权 | |
| 架构与设计不变量 | |
| 业务领域契约 | |
| 质量与风格保障 | |
| 测试与验证策略 | |
| 风险与历史隐患 | |
| 安全、数据与合规 | |
| 交付生命周期与变更流程 | |
{sessionsPath}{sessionId}Analyze repository for: steering files, CONVENTIONS.md, ARCHITECTURE.md,
CLAUDE.md, README conventions, eslint/prettier/tsconfig.
OUTPUT: Write to `{sessionsPath}{sessionId}/explore-docs-conventions.md`, return path.Analyze: project purpose, tech stack, directory structure, main modules, patterns.
OUTPUT: Write to `{sessionsPath}{sessionId}/explore-repo-context.md`, return path.docsConventionsReportPathrepoContextReportPath{sessionsPath}{sessionId}分析仓库中的以下内容:steering文件、CONVENTIONS.md、ARCHITECTURE.md、
CLAUDE.md、README约定、eslint/prettier/tsconfig配置。
输出:写入至`{sessionsPath}{sessionId}/explore-docs-conventions.md`,返回路径。分析:项目用途、技术栈、目录结构、主要模块、模式。
输出:写入至`{sessionsPath}{sessionId}/explore-repo-context.md`,返回路径。docsConventionsReportPathrepoContextReportPathcompletedPacks[]Continuing session: {sessionId}
✅ Completed: {completedPacks.join(', ')}
⏳ Remaining: {remainingPacks.join(', ')}waitrun_in_background: trueTaskspawn_agentwaitsubagent_type: "general-purpose"
description: "Interview for {packName}"
prompt: |
Conduct interview for a single pack and save results.
## Pack Info
- Pack ID: {packId}
- Pack Name: {packName}
- Pack Type: {packType} # "predefined" or "custom"
- Custom Description: {customTopicDescription} # only if custom
## Context Files
- Pack Reference: pack-reference.md
- Repo Context: {repoContextReportPath}
- Docs & Conventions: {docsConventionsReportPath}
## Output
- Path: {sessionsPath}{sessionId}/{packId}.md
## Instructions
### 1. Read Context
Read pack-reference.md to get question themes for this pack.
Read repoContextReportPath and docsConventionsReportPath for grounding.
These reports contain ALL necessary findings - do NOT run additional explores.
### 2. Generate Questions
Question count:
- Predefined: 5
- Custom (narrow): 3-4
- Custom (medium): 5
- Custom (broad): 6-7
Guidelines:
- Ground ONLY in the provided explore reports + existing docs
- Reference actual code: "I see X in Y file..." (from reports)
- Ask about conventions, not roadmap
- Offer 4 options (A/B/C/D)
- Mark one as "⭐ Recommended" at end of description
Pattern:
Q: I found {finding}. How should {convention question}?
A) {Option} — {rationale}
B) {Option} — {rationale} ⭐ Recommended
C) {Option} — {rationale}
D) {Option} — {rationale}
### 3. Conduct Interview
If interviewMode is "fast":
- Present all questions in a single markdown code block
- User responds with all answers at once (e.g., "A, B, A, C, B")
If interviewMode is "interactive":
- Present via `ASK_USER(...)` (max 4 questions per call if your runtime supports batching)
### 4. Classify Responses
For each response, classify as:
- CONVENTION: Timeless, future-focused ("When implementing X, do Y")
- ACTION_ITEM: Temporal, fixes current state ("Replace X", "Fix X")
### 5. Extract and Save Results
Extract rules immediately (not full Q&A) and write to {sessionsPath}{sessionId}/{packId}.md:
- CONVENTION items → "## Conventions" section
- ACTION_ITEM items → "## Action Items" section with severity
- Optionally preserve raw Q&A in collapsed "## Raw Interview" section{sessionsPath}
└── {sessionId}/
├── codebase-topology-ownership.md
├── architecture-design-invariants.md
├── {custom-pack-id}.md
└── ...undefinedcompletedPacks[]正在续接会话:{sessionId}
✅ 已完成:{completedPacks.join(', ')}
⏳ 剩余:{remainingPacks.join(', ')}waitTaskrun_in_background: truespawn_agentwaitsubagent_type: "general-purpose"
description: "针对{packName}的访谈"
prompt: |
针对单个包进行访谈并保存结果。
## 包信息
- 包ID: {packId}
- 包名称: {packName}
- 包类型: {packType} # "predefined"或"custom"
- 自定义描述: {customTopicDescription} # 仅自定义包需要
## 上下文文件
- 包参考: pack-reference.md
- 仓库上下文: {repoContextReportPath}
- 文档与约定规范: {docsConventionsReportPath}
## 输出
- 路径: {sessionsPath}{sessionId}/{packId}.md
## 说明
### 1. 读取上下文
读取pack-reference.md以获取此包的问题主题。
读取repoContextReportPath和docsConventionsReportPath以获取背景信息。
这些报告包含所有必要的发现结果 - 无需运行额外的探索任务。
### 2. 生成问题
问题数量:
- 预定义包:5个
- 自定义(窄范围):3-4个
- 自定义(中等范围):5个
- 自定义(宽范围):6-7个
指导原则:
- 仅基于提供的探索报告和现有文档生成问题
- 引用实际代码:“我在Y文件中发现X...”(来自报告)
- 询问约定规范,而非路线图
- 提供4个选项(A/B/C/D)
- 在描述末尾标记一个“⭐ 推荐”选项
格式:
Q: 我发现了{finding}。{约定规范问题}应如何处理?
A) {选项} — {理由}
B) {选项} — {理由} ⭐ 推荐
C) {选项} — {理由}
D) {选项} — {理由}
### 3. 开展访谈
如果interviewMode为"fast":
- 将所有问题放在一个markdown代码块中展示
- 用户一次性回复所有答案(例如:"A, B, A, C, B")
如果interviewMode为"interactive":
- 通过`ASK_USER(...)`展示问题(如果你的运行环境支持批量处理,每次最多展示4个问题)
### 4. 分类回复
对每个回复进行分类:
- CONVENTION(约定规范):长期有效、面向未来(“实现X时,执行Y”)
- ACTION_ITEM(行动项):临时、修复当前状态(“替换X”、“修复X”)
### 5. 提取并保存结果
立即提取规则(而非完整的问答内容)并写入至{sessionsPath}{sessionId}/{packId}.md:
- CONVENTION条目 → "## 约定规范"章节
- ACTION_ITEM条目 → "## 行动项"章节,并标注优先级
- 可选:将原始问答内容保留在折叠的"## 原始访谈"章节中{sessionsPath}
└── {sessionId}/
├── codebase-topology-ownership.md
├── architecture-design-invariants.md
├── {custom-pack-id}.md
└── ...undefinedundefinedundefined{sessionsPath}{sessionId}/{packId}.md{sessionsPath}{sessionId}/{packId}.mdsubagent_type: "general-purpose"
description: "Generate steerings and action items"
prompt: |
Generate steerings AND action items from interview sessions.
Session directory: {sessionsPath}{sessionId}/
(contains one .md file per pack with classifications)
Docs report: {docsConventionsReportPath}
Repo report: {repoContextReportPath}
Template: steering-template.md
Output paths: {steeringsPath}, {backlogPath}
Instructions:
1. Read all pack files from session directory
2. Extract CONVENTION items → generate steering files
3. Extract ACTION_ITEM items → generate backlog file
4. Generate index.md for steerings| Pack ID | Filename |
|---|---|
| codebase-topology-ownership | code-ownership.md |
| architecture-design-invariants | architecture-invariants.md |
| business-domain-contracts | domain-invariants.md |
| quality-style-assurance | quality-and-style.md |
| testing-verification-strategy | testing-strategy.md |
| risk-historical-landmines | risk-registry.md |
| security-data-compliance | security-and-compliance.md |
| delivery-lifecycle-change-flow | delivery-lifecycle.md |
| {custom-pack-id} | {custom-pack-id}.md |
{backlogPath}steering-specs-action-items.mdsubagent_type: "general-purpose"
description: "生成Steerings和行动项"
prompt: |
从访谈会话中生成Steerings和行动项。
会话目录: {sessionsPath}{sessionId}/
(包含每个包对应的.md文件,且已包含分类信息)
文档报告: {docsConventionsReportPath}
仓库报告: {repoContextReportPath}
模板: steering-template.md
输出路径: {steeringsPath}, {backlogPath}
说明:
1. 读取会话目录中的所有包文件
2. 提取CONVENTION条目 → 生成Steering文件
3. 提取ACTION_ITEM条目 → 生成待办清单文件
4. 为Steerings生成index.md| 包ID | 文件名 |
|---|---|
| codebase-topology-ownership | code-ownership.md |
| architecture-design-invariants | architecture-invariants.md |
| business-domain-contracts | domain-invariants.md |
| quality-style-assurance | quality-and-style.md |
| testing-verification-strategy | testing-strategy.md |
| risk-historical-landmines | risk-registry.md |
| security-data-compliance | security-and-compliance.md |
| delivery-lifecycle-change-flow | delivery-lifecycle.md |
| {custom-pack-id} | {custom-pack-id}.md |
{backlogPath}steering-specs-action-items.mdGenerated steerings:
- {steeringsPath}*.md (N rules, M practices each)
- {steeringsPath}index.md
Action Items: {backlogPath}steering-specs-action-items.md
- 🔴 Critical: N | 🟡 High: N | 🟢 Medium: N
Session: {sessionsPath}{sessionId}/
- {packId-1}.md
- {packId-2}.md
- ...已生成的Steerings:
- {steeringsPath}*.md(每个文件包含N条规则、M项实践)
- {steeringsPath}index.md
行动项: {backlogPath}steering-specs-action-items.md
- 🔴 严重: N | 🟡 高: N | 🟢 中: N
会话: {sessionsPath}{sessionId}/
- {packId-1}.md
- {packId-2}.md
- ...steerings/docs/steerings/.steerings/steerings/docs/steerings/.steerings/subagent_type: "Explore"
prompt: |
Analyze steering files in {steeringsPath}:
- Structure: Intent → Rules → Practices → Meta?
- Rules: numbered, prescriptive, no metadata?
- Code examples: 5-15 lines?
- File size: <200 lines?
Report compliant vs non-compliant files with specific issues.subagent_type: "Explore"
prompt: |
分析{steeringsPath}中的Steering文件:
- 结构:是否遵循Intent → Rules → Practices → Meta?
- 规则:是否编号、指令明确、无元数据?
- 代码示例:是否为5-15行?
- 文件大小:是否小于200行?
报告符合规范和不符合规范的文件,并列出具体问题。✅ Compliant: file1.md, file2.md
⚠️ Need transformation:
- file3.md: Missing Intent, verbose rules
- file4.md: Code examples too long✅ 符合规范:file1.md、file2.md
⚠️ 需要转换:
- file3.md:缺少Intent,规则过于冗长
- file4.md:代码示例过长.sessions/sessions/docs/sessions/{steeringsPath}*.md{steeringsPath}index.md{backlogPath}steering-specs-action-items.md{sessionsPath}{sessionId}/{packId}.md{sessionsPath}explore-*.md.sessions/sessions/docs/sessions/{steeringsPath}*.md{steeringsPath}index.md{backlogPath}steering-specs-action-items.md{sessionsPath}{sessionId}/{packId}.md{sessionsPath}explore-*.md