claude-code-workflow 7.2.13 → 7.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,6 +72,12 @@ All `AskUserQuestion` calls MUST comply:
72
72
 
73
73
  **Principles**: Immediacy (record as-it-happens), Completeness (context+options+chosen+reason+rejected), Traceability (later phases trace back), Depth (capture reasoning, not just outcomes)
74
74
 
75
+ **Technical Solution Triggers** — record using Technical Solution Record Format when ANY of:
76
+ - An implementation approach is described with specific files/patterns/code changes
77
+ - Two or more alternatives are compared with trade-offs
78
+ - User confirms, modifies, or rejects a proposed approach
79
+ - A concrete code change strategy emerges (what to modify, how, why)
80
+
75
81
  ### Output Artifacts
76
82
 
77
83
  | Phase | Artifact | Description |
@@ -325,36 +331,7 @@ CONSTRAINTS: Focus on ${dimensions.join(', ')} | Do NOT re-discover files — us
325
331
  - Present to user at beginning of Phase 3: "初始探索完成后,以下意图的覆盖情况:[list]。接下来的讨论将重点关注未覆盖的部分。"
326
332
  - Purpose: Early course correction — catch drift before spending multiple interactive rounds
327
333
 
328
- **exploration-codebase.json Schema** (shared Layer 1):
329
- - `session_id`, `timestamp`, `topic`, `dimensions[]`
330
- - `relevant_files[]`: {path, annotation, dimensions[]}
331
- - `patterns[]`, `module_map`: {}
332
- - `questions_for_user[]`, `_metadata`
333
-
334
- **research.json Schema** (external research findings):
335
- - `topic`, `mode` (detail-verification|api-research|design-research), `timestamp`
336
- - `findings[]`: {finding, detail, confidence, source_url}
337
- - `best_practices[]`: {practice, rationale, source}
338
- - `alternatives[]`: {option, pros, cons, verdict}
339
- - `pitfalls[]`: {issue, mitigation, source}
340
- - `codebase_gaps[]`: {gap, current_approach, recommended_approach}
341
- - `sources[]`: {title, url, key_takeaway}
342
- - `_metadata`: {queries_executed, results_found}
343
-
344
- **explorations.json Schema** (single — Layer 1 + CLI analysis + research merged):
345
- - `session_id`, `timestamp`, `topic`, `dimensions[]`
346
- - `sources[]`: {type, file/summary}
347
- - `key_findings[]`, `code_anchors[]`: {file, lines, snippet, significance}
348
- - `call_chains[]`: {entry, chain, files}
349
- - `discussion_points[]`, `open_questions[]`
350
- - `technical_solutions[]`: {round, solution, problem, rationale, alternatives, status: proposed|validated|rejected, evidence_refs[], next_action}
351
- - `external_research`: {findings[], best_practices[], codebase_gaps[], sources[]} — merged from research.json if available
352
-
353
- **perspectives.json Schema** (multi — Layer 1 shared + per-perspective Layer 2-3 + research):
354
- - `shared_discovery`: {relevant_files[], patterns[], module_map}
355
- - `perspectives[]`: [{name, tool, findings, insights, questions, code_anchors[], call_chains[]}]
356
- - `external_research`: {findings[], best_practices[], codebase_gaps[], sources[]} — merged from research.json if available
357
- - `synthesis`: {convergent_themes, conflicting_views, unique_contributions}
334
+ > All JSON schemas consolidated in `<schemas>` section below.
358
335
 
359
336
  | Condition | Action |
360
337
  |-----------|--------|
@@ -402,12 +379,17 @@ const priorContext = `
402
379
 
403
380
  4. **Process Response** (always record user choice + impact to discussion.md):
404
381
 
382
+ **Record-Before-Continue Rule**: Each path below MUST write findings and discussion synthesis to `discussion.md` BEFORE proceeding to Step 5. Specifically, after agent/CLI returns results:
383
+ - Append the exploration results, reasoning, and any technical approaches discussed to the current round section
384
+ - Apply **Technical Solution Triggers** (see Decision Recording Protocol) — if triggered, record using Technical Solution Record Format
385
+ - Only THEN proceed to Step 5 for Current Understanding replacement and TOC update
386
+
405
387
  **继续深入** -> Sub-question to choose direction (AskUserQuestion, single-select, header: "深入方向"):
406
388
  - Dynamically generate **max 3** context-driven options from: unresolved questions, low-confidence findings, unexplored dimensions, user-highlighted areas
407
389
  - Add **1** heuristic option that breaks current frame (e.g., "compare with best practices", "review from security perspective", "explore simpler alternatives")
408
390
  - Total: **max 4 options**. Each specifies: label, description, tool (cli-explore-agent for code-level / Gemini CLI for pattern-level), scope
409
391
  - **"Other" is auto-provided** by AskUserQuestion — covers user-specified custom direction (no need for separate "suggest next step" option)
410
- - Execute selected direction -> merge new code_anchors/call_chains -> record confirmed assumptions + deepen angle
392
+ - Execute selected direction -> merge new code_anchors/call_chains into explorations.json -> **write exploration results, analysis reasoning, and any proposed approaches to discussion.md** -> record confirmed assumptions + deepen angle
411
393
 
412
394
  **外部研究** -> Spawn workflow-research-agent for targeted research:
413
395
  - AskUserQuestion (header: "研究主题", freetext via "Other"): What specific technology/pattern/approach needs external research?
@@ -420,9 +402,7 @@ const priorContext = `
420
402
 
421
403
  **分析完成** -> Exit loop -> Record why concluding
422
404
 
423
- 5. **Update discussion.md**:
424
- - **Append** Round N: user input, direction adjustment, Q&A, corrections, new insights
425
- - **Append Technical Solutions** — for every solution proposed, validated, or rejected this round, record immediately using Technical Solution Record Format in `#### Technical Solutions`
405
+ 5. **Update discussion.md** (after Record-Before-Continue writes are done):
426
406
  - **Replace** `## Current Understanding` block with latest consolidated understanding (follow Consolidation Rules)
427
407
  - **Update** `## Table of Contents` with links to new Round N sections
428
408
 
@@ -621,7 +601,45 @@ ${implScope.map((item, i) => `${i+1}. **${item.objective}** [${item.priority}]
621
601
 
622
602
  **TodoWrite**: Update `next-step` -> `"completed"` after user selection is handled
623
603
 
624
- **conclusions.json Schema**:
604
+ > conclusions.json schema: see `<schemas>` section below.
605
+ </step>
606
+
607
+ </process>
608
+
609
+ <schemas>
610
+
611
+ **exploration-codebase.json** (shared Layer 1):
612
+ - `session_id`, `timestamp`, `topic`, `dimensions[]`
613
+ - `relevant_files[]`: {path, annotation, dimensions[]}
614
+ - `patterns[]`, `module_map`: {}
615
+ - `questions_for_user[]`, `_metadata`
616
+
617
+ **research.json** (external research findings):
618
+ - `topic`, `mode` (detail-verification|api-research|design-research), `timestamp`
619
+ - `findings[]`: {finding, detail, confidence, source_url}
620
+ - `best_practices[]`: {practice, rationale, source}
621
+ - `alternatives[]`: {option, pros, cons, verdict}
622
+ - `pitfalls[]`: {issue, mitigation, source}
623
+ - `codebase_gaps[]`: {gap, current_approach, recommended_approach}
624
+ - `sources[]`: {title, url, key_takeaway}
625
+ - `_metadata`: {queries_executed, results_found}
626
+
627
+ **explorations.json** (single — Layer 1 + CLI analysis + research merged):
628
+ - `session_id`, `timestamp`, `topic`, `dimensions[]`
629
+ - `sources[]`: {type, file/summary}
630
+ - `key_findings[]`, `code_anchors[]`: {file, lines, snippet, significance}
631
+ - `call_chains[]`: {entry, chain, files}
632
+ - `discussion_points[]`, `open_questions[]`
633
+ - `technical_solutions[]`: {round, solution, problem, rationale, alternatives, status: proposed|validated|rejected, evidence_refs[], next_action}
634
+ - `external_research`: {findings[], best_practices[], codebase_gaps[], sources[]} — merged from research.json if available
635
+
636
+ **perspectives.json** (multi — Layer 1 shared + per-perspective Layer 2-3 + research):
637
+ - `shared_discovery`: {relevant_files[], patterns[], module_map}
638
+ - `perspectives[]`: [{name, tool, findings, insights, questions, code_anchors[], call_chains[]}]
639
+ - `external_research`: {findings[], best_practices[], codebase_gaps[], sources[]} — merged from research.json if available
640
+ - `synthesis`: {convergent_themes, conflicting_views, unique_contributions}
641
+
642
+ **conclusions.json**:
625
643
  - `session_id`, `topic`, `completed`, `total_rounds`, `summary`
626
644
  - `key_conclusions[]`: {point, evidence, confidence, code_anchor_refs[]}
627
645
  - `code_anchors[]`: {file, lines, snippet, significance}
@@ -631,9 +649,8 @@ ${implScope.map((item, i) => `${i+1}. **${item.objective}** [${item.priority}]
631
649
  - `decision_trail[]`: {round, decision, context, options_considered, chosen, rejected_reasons, reason, impact}
632
650
  - `narrative_trail[]`: {round, starting_point, key_progress, hypothesis_impact, updated_understanding, remaining_questions}
633
651
  - `intent_coverage[]`: {intent, status, where_addressed, notes}
634
- </step>
635
652
 
636
- </process>
653
+ </schemas>
637
654
 
638
655
  <error_codes>
639
656
 
@@ -721,9 +738,6 @@ Present 2-3 top directions per dimension, allow multi-select + custom.
721
738
  | Preserve key learnings | Keep insights valuable for future reference |
722
739
 
723
740
  </configuration>
724
-
725
- > **Lite-plan handoff**: Phase 4「执行任务」builds structured `handoff-spec` JSON (implementation_scope with acceptance_criteria, code_anchors, key_findings) embedded in `## Prior Analysis` block. lite-plan parses `json:handoff-spec` to directly map scope items → tasks, skipping exploration and using acceptance_criteria as convergence.criteria.
726
-
727
741
  ---
728
742
 
729
743
  **Now execute analyze-with-file for**: $ARGUMENTS
@@ -340,9 +340,6 @@ Generate implementation plan and write plan.json.
340
340
  - ${sessionFolder}/plan.json (plan overview — NO embedded tasks[])
341
341
  - ${sessionFolder}/.task/TASK-*.json (independent task files, one per task)
342
342
 
343
- ## Schema Reference
344
- Execute: cat ~/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json
345
-
346
343
  ## Project Context (MANDATORY)
347
344
  Execute: ccw spec load --category planning
348
345
  **CRITICAL**: All generated tasks MUST comply with constraints in specs/*.md
@@ -392,7 +389,6 @@ ${complexity}
392
389
  ## Requirements
393
390
  - _metadata.exploration_angles: ${JSON.stringify(manifest.explorations.map(e => e.angle))}
394
391
  - Two-layer output: plan.json (task_ids[], NO tasks[]) + .task/TASK-*.json
395
- - Follow plan-overview-base-schema.json for plan.json, task-schema.json for .task/*.json
396
392
  - Field names: files[].change (not modification_points), convergence.criteria (not acceptance)
397
393
 
398
394
  ## Task Grouping Rules
@@ -405,9 +401,9 @@ ${complexity}
405
401
  7. **Prefer parallel**: Most tasks should be independent
406
402
 
407
403
  ## Execution
408
- 1. Read schema → 2. ccw spec load → 3. Read ALL exploration files → 4. Synthesize + generate
409
- 5. Write: planning-context.md, .task/TASK-*.json, plan.json (task_ids[], NO tasks[])
410
- 6. Return brief completion summary
404
+ 1. ccw spec load → 2. Read ALL exploration files → 3. Synthesize + generate
405
+ 4. Write: planning-context.md, .task/TASK-*.json, plan.json (task_ids[], NO tasks[])
406
+ 5. Return brief completion summary
411
407
  `
412
408
  )
413
409
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-workflow",
3
- "version": "7.2.13",
3
+ "version": "7.2.14",
4
4
  "description": "JSON-driven multi-agent development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution",
5
5
  "type": "module",
6
6
  "main": "ccw/dist/index.js",