From 7b677b20fbb25395172c70c1ca4af7583fc38ef2 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Fri, 16 Jan 2026 14:01:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=96=87=E6=A1=A3=EF=BC=8C=E4=BF=AE=E6=AD=A3=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=96=87=E5=92=8C=E5=AD=A6=E4=B9=A0=E5=9B=BA?= =?UTF-8?q?=E5=8C=96=E6=B5=81=E7=A8=8B=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/commands/workflow/init.md | 2 +- .claude/commands/workflow/session/complete.md | 27 +++++++++++++++++++ .../commands/workflow/tools/context-gather.md | 4 +-- .claude/workflows/chinese-response.md | 2 +- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.claude/commands/workflow/init.md b/.claude/commands/workflow/init.md index f8d3e1bf..686264ff 100644 --- a/.claude/commands/workflow/init.md +++ b/.claude/commands/workflow/init.md @@ -145,7 +145,7 @@ Generate complete project-tech.json following the schema structure: 1. Structural scan: get_modules_by_depth.sh, find, wc -l 2. Semantic analysis: Gemini for patterns/architecture 3. Synthesis: Merge findings -4. ${regenerate ? 'Merge with preserved development_status from .workflow/project-tech.json.backup' : ''} +4. ${regenerate ? 'Merge with preserved development_index and statistics from .workflow/project-tech.json.backup' : ''} 5. Write JSON: Write('.workflow/project-tech.json', jsonContent) 6. Report: Return brief completion summary diff --git a/.claude/commands/workflow/session/complete.md b/.claude/commands/workflow/session/complete.md index 35a4a86e..e91b07a1 100644 --- a/.claude/commands/workflow/session/complete.md +++ b/.claude/commands/workflow/session/complete.md @@ -134,6 +134,32 @@ test -f .workflow/project-tech.json || echo "SKIP" ✓ Feature added to project registry ``` +### Phase 5: Ask About Solidify (Always) + +After successful archival, prompt user to capture learnings: + +```javascript +AskUserQuestion({ + questions: [{ + question: "Would you like to solidify learnings from this session into project guidelines?", + header: "Solidify", + options: [ + { label: "Yes, solidify now", description: "Extract learnings and update project-guidelines.json" }, + { label: "Skip", description: "Archive complete, no learnings to capture" } + ], + multiSelect: false + }] +}) +``` + +**If "Yes, solidify now"**: Execute `/workflow:session:solidify` with the archived session ID. + +**Output**: +``` +Session archived successfully. +→ Run /workflow:session:solidify to capture learnings (recommended) +``` + ## Error Recovery | Phase | Symptom | Recovery | @@ -150,4 +176,5 @@ Phase 1: find session → create .archiving marker Phase 2: read key files → build manifest entry (no writes) Phase 3: mkdir → mv → update manifest.json → rm marker Phase 4: update project-tech.json features array (optional) +Phase 5: ask user → solidify learnings (optional) ``` diff --git a/.claude/commands/workflow/tools/context-gather.md b/.claude/commands/workflow/tools/context-gather.md index ac9efff5..2db25e4a 100644 --- a/.claude/commands/workflow/tools/context-gather.md +++ b/.claude/commands/workflow/tools/context-gather.md @@ -237,7 +237,7 @@ Execute complete context-search-agent workflow for implementation planning: ### Phase 1: Initialization & Pre-Analysis 1. **Project State Loading**: - - Read and parse `.workflow/project-tech.json`. Use its `technology_analysis` section as the foundational `project_context`. This is your primary source for architecture, tech stack, and key components. + - Read and parse `.workflow/project-tech.json`. Use its `overview` section as the foundational `project_context`. This is your primary source for architecture, tech stack, and key components. - Read and parse `.workflow/project-guidelines.json`. Load `conventions`, `constraints`, and `learnings` into a `project_guidelines` section. - If files don't exist, proceed with fresh analysis. 2. **Detection**: Check for existing context-package (early exit if valid) @@ -255,7 +255,7 @@ Execute all discovery tracks: ### Phase 3: Synthesis, Assessment & Packaging 1. Apply relevance scoring and build dependency graph 2. **Synthesize 4-source data**: Merge findings from all sources (archive > docs > code > web). **Prioritize the context from `project-tech.json`** for architecture and tech stack unless code analysis reveals it's outdated. -3. **Populate `project_context`**: Directly use the `technology_analysis` from `project-tech.json` to fill the `project_context` section. Include description, technology_stack, architecture, and key_components. +3. **Populate `project_context`**: Directly use the `overview` from `project-tech.json` to fill the `project_context` section. Include description, technology_stack, architecture, and key_components. 4. **Populate `project_guidelines`**: Load conventions, constraints, and learnings from `project-guidelines.json` into a dedicated section. 5. Integrate brainstorm artifacts (if .brainstorming/ exists, read content) 6. Perform conflict detection with risk assessment diff --git a/.claude/workflows/chinese-response.md b/.claude/workflows/chinese-response.md index cbd0b94c..f0410f35 100644 --- a/.claude/workflows/chinese-response.md +++ b/.claude/workflows/chinese-response.md @@ -4,7 +4,7 @@ - 所有回复使用简体中文 - 技术术语保留英文,首次出现可添加中文解释 -- 代码内容(变量名、注释)保持英文 +- 代码变量名保持英文,注释使用中文 ## 格式规范