mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
- Implemented ConfigBackupService for backing up local configuration files. - Added ConfigSyncService to download configuration files from GitHub with remote-first conflict resolution. - Created VersionChecker to check application version against the latest GitHub release with caching. - Introduced security validation utilities for input validation to prevent common vulnerabilities. - Developed utility functions to start and stop Docusaurus documentation server.
1 line
29 KiB
JavaScript
1 line
29 KiB
JavaScript
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[511],{929(e,n,s){s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>x,frontMatter:()=>o,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"workflows/level-3-standard","title":"Level 3 - Standard Workflows","description":"Complete planning with persistent session management for multi-module changes","source":"@site/docs/workflows/level-3-standard.mdx","sourceDirName":"workflows","slug":"/workflows/level-3-standard","permalink":"/docs/workflows/level-3-standard","draft":false,"unlisted":false,"editUrl":"https://github.com/ccw/docs/tree/main/docs/workflows/level-3-standard.mdx","tags":[],"version":"current","sidebarPosition":4,"frontMatter":{"title":"Level 3 - Standard Workflows","description":"Complete planning with persistent session management for multi-module changes","sidebar_position":4},"sidebar":"docs","previous":{"title":"Level 2: Rapid","permalink":"/docs/workflows/level-2-rapid"},"next":{"title":"Level 4: Brainstorm","permalink":"/docs/workflows/level-4-brainstorm"}}');var r=s(2540),l=s(1184),i=s(1540);const o={title:"Level 3 - Standard Workflows",description:"Complete planning with persistent session management for multi-module changes",sidebar_position:4},c="Level 3: Standard Workflows",d={},a=[{value:"Overview",id:"overview",level:2},{value:"Included Workflows",id:"included-workflows",level:2},{value:"Common Characteristics",id:"common-characteristics",level:3},{value:"Workflow 1: plan -> verify -> execute",id:"workflow-1-plan---verify---execute",level:2},{value:"Command",id:"command",level:3},{value:"Flow Diagram",id:"flow-diagram",level:3},{value:"Process Phases",id:"process-phases",level:3},{value:"Artifacts",id:"artifacts",level:3},{value:"Use Cases",id:"use-cases",level:3},{value:"Workflow 2: tdd-plan -> execute -> tdd-verify",id:"workflow-2-tdd-plan---execute---tdd-verify",level:2},{value:"Command",id:"command-1",level:3},{value:"Flow Diagram",id:"flow-diagram-1",level:3},{value:"Process Phases",id:"process-phases-1",level:3},{value:"TDD Task Structure",id:"tdd-task-structure",level:3},{value:"The Iron Law",id:"the-iron-law",level:3},{value:"Use Cases",id:"use-cases-1",level:3},{value:"Workflow 3: test-fix-gen -> test-cycle-execute",id:"workflow-3-test-fix-gen---test-cycle-execute",level:2},{value:"Command",id:"command-2",level:3},{value:"Flow Diagram",id:"flow-diagram-2",level:3},{value:"Process Phases",id:"process-phases-2",level:3},{value:"Dual-Mode Support",id:"dual-mode-support",level:3},{value:"Artifacts",id:"artifacts-1",level:3},{value:"Use Cases",id:"use-cases-2",level:3},{value:"Level 3 Comparison Table",id:"level-3-comparison-table",level:2},{value:"Execution: execute",id:"execution-execute",level:2},{value:"Key Features",id:"key-features",level:3},{value:"Related Workflows",id:"related-workflows",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"level-3-standard-workflows",children:"Level 3: Standard Workflows"})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Complexity"}),": Medium-High | ",(0,r.jsx)(n.strong,{children:"Artifacts"}),": Persistent session files | ",(0,r.jsx)(n.strong,{children:"State"}),": Full session management"]}),"\n",(0,r.jsx)(n.p,{children:"Level 3 workflows provide complete planning with persistent session management. They're designed for multi-module changes that require traceability, verification, and structured execution."}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(i.A,{chart:"\n flowchart TD\n Start([User Input]) --\x3e Select{Select Workflow}\n\n Select --\x3e|Standard<br/>development| Plan[plan]\n Select --\x3e|Test-driven| TDD[tdd-plan]\n Select --\x3e|Test fix| TestFix[test-fix-gen]\n\n Plan --\x3e Verify[plan-verify<br/>Optional]\n TDD --\x3e Verify\n Verify --\x3e Execute[execute]\n\n TestFix --\x3e TestCycle[test-cycle-execute]\n\n Execute --\x3e Review{Review?}\n TestCycle --\x3e Review\n\n Review --\x3e|Yes| RevCycle[review-session-cycle]\n Review --\x3e|No| TestQ{Tests?}\n RevCycle --\x3e RevFix[review-cycle-fix]\n RevFix --\x3e TestQ\n\n TestQ --\x3e|Yes| TFG[test-fix-gen]\n TestQ --\x3e|No| Complete([session:complete])\n\n TFG --\x3e TCE[test-cycle-execute]\n TCE --\x3e Complete\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef workflow fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef execute fill:#c5e1a5,stroke:#388e3c\n\n class Start,Complete startend,Select,Review,TestQ decision,Plan,TDD,TestFix workflow,Verify,Execute,TestCycle,RevCycle,RevFix,TFG,TCE execute\n"}),"\n",(0,r.jsx)(n.h2,{id:"included-workflows",children:"Included Workflows"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Workflow"}),(0,r.jsx)(n.th,{children:"Purpose"}),(0,r.jsx)(n.th,{children:"Phases"}),(0,r.jsx)(n.th,{children:"Artifact Location"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"plan"})}),(0,r.jsx)(n.td,{children:"Complex feature development"}),(0,r.jsx)(n.td,{children:"5 phases"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:".workflow/active/{session}/"})})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"tdd-plan"})}),(0,r.jsx)(n.td,{children:"Test-driven development"}),(0,r.jsx)(n.td,{children:"6 phases"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:".workflow/active/{session}/"})})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"test-fix-gen"})}),(0,r.jsx)(n.td,{children:"Test fix generation"}),(0,r.jsx)(n.td,{children:"5 phases"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:".workflow/active/WFS-test-{session}/"})})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"common-characteristics",children:"Common Characteristics"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Property"}),(0,r.jsx)(n.th,{children:"Value"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Complexity"})}),(0,r.jsx)(n.td,{children:"Medium-High"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Artifacts"})}),(0,r.jsxs)(n.td,{children:["Persistent files (",(0,r.jsx)(n.code,{children:".workflow/active/{session}/"}),")"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"State"})}),(0,r.jsx)(n.td,{children:"Full session management"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Verification"})}),(0,r.jsx)(n.td,{children:"Built-in verification steps"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Execution"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"/workflow:execute"})})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Use Case"})}),(0,r.jsx)(n.td,{children:"Multi-module, traceable tasks"})]})]})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"workflow-1-plan---verify---execute",children:"Workflow 1: plan -> verify -> execute"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"5-phase complete planning workflow"})}),"\n",(0,r.jsx)(n.h3,{id:"command",children:"Command"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'/workflow:plan "Implement OAuth2 authentication system"\n/workflow:plan-verify # Verify plan (recommended)\n/workflow:execute\n/workflow:review # (optional) Review\n'})}),"\n",(0,r.jsx)(n.h3,{id:"flow-diagram",children:"Flow Diagram"}),"\n",(0,r.jsx)(i.A,{chart:"\n flowchart TD\n A([Start]) --\x3e B[Phase 1: Session Discovery]\n B --\x3e C[/workflow:session:start<br/>--auto/]\n C --\x3e D[Return: sessionId]\n\n D --\x3e E[Phase 2: Context Gathering]\n E --\x3e F[/workflow:tools:context-gather/]\n F --\x3e G[Return: context-package.json<br/>+ conflict_risk]\n\n G --\x3e H{conflict_risk<br/>>= medium?}\n H --\x3e|Yes| I[Phase 3: Conflict Resolution]\n H --\x3e|No| J[Phase 4: Task Generation]\n I --\x3e K[/workflow:tools:conflict<br/>-resolution/]\n K --\x3e J\n\n J --\x3e L[/workflow:tools:task-generate<br/>-agent/]\n L --\x3e M[Return: IMPL_PLAN.md<br/>+ IMPL-*.json<br/>+ TODO_LIST.md]\n\n M --\x3e N[Return Summary<br/>+ Next Steps]\n N --\x3e O([Plan Complete])\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef action fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef tool fill:#ffecb3,stroke:#ffa000\n\n class A,O startend,H decision,B,E,G,J,M,N action,C,F,K,L tool\n"}),"\n",(0,r.jsx)(n.h3,{id:"process-phases",children:"Process Phases"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 1: Session Discovery"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'/workflow:session:start --auto "Implement OAuth2 authentication system"\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Creates or discovers workflow session"}),"\n",(0,r.jsxs)(n.li,{children:["Returns: ",(0,r.jsx)(n.code,{children:"sessionId"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 2: Context Gathering"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:tools:context-gather\n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Analyzes codebase structure"}),"\n",(0,r.jsx)(n.li,{children:"Identifies tech stack and patterns"}),"\n",(0,r.jsxs)(n.li,{children:["Returns: ",(0,r.jsx)(n.code,{children:"context-package.json"})," + ",(0,r.jsx)(n.code,{children:"conflict_risk"})]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Phase 3: Conflict Resolution"})," (Conditional)"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"# Only if conflict_risk >= medium\n/workflow:tools:conflict-resolution\n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Detects potential conflicts"}),"\n",(0,r.jsx)(n.li,{children:"Resolves dependency issues"}),"\n",(0,r.jsx)(n.li,{children:"Ensures clean execution path"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 4: Task Generation"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:tools:task-generate-agent\n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Generates structured tasks"}),"\n",(0,r.jsx)(n.li,{children:"Creates dependency graph"}),"\n",(0,r.jsxs)(n.li,{children:["Returns: ",(0,r.jsx)(n.code,{children:"IMPL_PLAN.md"})," + ",(0,r.jsx)(n.code,{children:"IMPL-*.json"})," + ",(0,r.jsx)(n.code,{children:"TODO_LIST.md"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"artifacts",children:"Artifacts"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Location"}),": ",(0,r.jsx)(n.code,{children:".workflow/active/{WFS-session}/"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:".workflow/active/WFS-oauth2-auth-2025-02-03/\n\u251c\u2500\u2500 workflow-session.json # Session metadata\n\u251c\u2500\u2500 IMPL_PLAN.md # Implementation plan\n\u251c\u2500\u2500 TODO_LIST.md # Progress tracking\n\u251c\u2500\u2500 .task/\n\u2502 \u251c\u2500\u2500 IMPL-001.json # Main task\n\u2502 \u251c\u2500\u2500 IMPL-002.json\n\u2502 \u2514\u2500\u2500 ...\n\u2514\u2500\u2500 .process/\n \u251c\u2500\u2500 context-package.json # Project context\n \u251c\u2500\u2500 conflict-resolution.json # Conflict analysis\n \u2514\u2500\u2500 planning-notes.md\n"})}),"\n",(0,r.jsx)(n.h3,{id:"use-cases",children:"Use Cases"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Multi-module changes"}),"\n",(0,r.jsx)(n.li,{children:"Refactoring"}),"\n",(0,r.jsx)(n.li,{children:"Dependency analysis needed"}),"\n"]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"workflow-2-tdd-plan---execute---tdd-verify",children:"Workflow 2: tdd-plan -> execute -> tdd-verify"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"6-phase test-driven development workflow"})}),"\n",(0,r.jsx)(n.h3,{id:"command-1",children:"Command"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'/workflow:tdd-plan "Implement user registration with TDD"\n/workflow:execute # Follow Red-Green-Refactor\n/workflow:tdd-verify # Verify TDD compliance\n'})}),"\n",(0,r.jsx)(n.h3,{id:"flow-diagram-1",children:"Flow Diagram"}),"\n",(0,r.jsx)(i.A,{chart:"\n flowchart TD\n A([Start]) --\x3e B[Phase 1: Session Discovery]\n B --\x3e C[/workflow:session:start<br/>--type tdd --auto/]\n C --\x3e D[Parse: sessionId]\n\n D --\x3e E[Phase 2: Context Gathering]\n E --\x3e F[/workflow:tools:context-gather/]\n F --\x3e G[Return: context-package.json]\n\n G --\x3e H[Phase 3: Test Coverage Analysis]\n H --\x3e I[/workflow:tools:test-context<br/>-gather/]\n I --\x3e J[Detect test framework<br/>Analyze coverage]\n\n J --\x3e K{conflict_risk<br/>>= medium?}\n K --\x3e|Yes| L[Phase 4: Conflict Resolution]\n K --\x3e|No| M[Phase 5: TDD Task Generation]\n L --\x3e N[/workflow:tools:conflict<br/>-resolution/]\n N --\x3e M\n\n M --\x3e O[/workflow:tools:task-generate<br/>-tdd/]\n O --\x3e P[Generate IMPL tasks with<br/>Red-Green-Refactor cycles]\n\n P --\x3e Q[Phase 6: TDD Structure Validation]\n Q --\x3e R[Verify TDD compliance]\n\n R --\x3e S([TDD Plan Complete])\n\n T[Execute] --\x3e U[/workflow:execute/]\n U --\x3e V[Follow Red-Green-Refactor<br/>cycles in each task]\n\n V --\x3e W[Verify]\n W --\x3e X[/workflow:tdd-verify/]\n X --\x3e Y([Complete])\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef action fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef tool fill:#ffecb3,stroke:#ffa000\n\n class A,S,Y startend,K decision,B,E,G,H,J,M,P,Q,R,T,U,V,X action,C,F,I,N,O,W tool\n"}),"\n",(0,r.jsx)(n.h3,{id:"process-phases-1",children:"Process Phases"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 1: Session Discovery"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'/workflow:session:start --type tdd --auto "TDD: User Registration"\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"TDD Structured Format"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"TDD: [Feature Name]\nGOAL: [Objective]\nSCOPE: [Included/excluded]\nCONTEXT: [Background]\nTEST_FOCUS: [Test scenarios]\n"})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 2: Context Gathering"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:tools:context-gather\n"})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 3: Test Coverage Analysis"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:tools:test-context-gather\n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Detect test framework"}),"\n",(0,r.jsx)(n.li,{children:"Analyze existing test coverage"}),"\n",(0,r.jsx)(n.li,{children:"Identify coverage gaps"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Phase 4: Conflict Resolution"})," (Conditional)"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"# Only if conflict_risk >= medium\n/workflow:tools:conflict-resolution\n"})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 5: TDD Task Generation"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:tools:task-generate-tdd\n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Generate IMPL tasks with built-in Red-Green-Refactor cycles"}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"meta.tdd_workflow: true"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"flow_control.implementation_approach"})," contains 3 steps (red/green/refactor)"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 6: TDD Structure Validation"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Verify TDD structure compliance"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"tdd-task-structure",children:"TDD Task Structure"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": "IMPL-001",\n "title": "Implement user registration",\n "meta": {\n "tdd_workflow": true\n },\n "flow_control": {\n "implementation_approach": [\n {\n "step": 1,\n "title": "Red: Write failing test",\n "description": "Write test that fails"\n },\n {\n "step": 2,\n "title": "Green: Make test pass",\n "description": "Implement minimal code to pass",\n "test_fix_cycle": {\n "max_iterations": 3,\n "pass_threshold": 0.95\n }\n },\n {\n "step": 3,\n "title": "Refactor: Improve code",\n "description": "Refactor while keeping tests green"\n }\n ]\n }\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"the-iron-law",children:"The Iron Law"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST\n"})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Enforcement Method"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Phase 5: ",(0,r.jsx)(n.code,{children:"implementation_approach"})," includes test-first steps (Red -> Green -> Refactor)"]}),"\n",(0,r.jsx)(n.li,{children:"Green phase: Includes test-fix-cycle configuration (max 3 iterations)"}),"\n",(0,r.jsx)(n.li,{children:"Auto-revert: Triggered when max iterations reached without passing tests"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Why Order Matters"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Tests written after code pass immediately -> proves nothing"}),"\n",(0,r.jsx)(n.li,{children:"Test-first forces edge case discovery before implementation"}),"\n",(0,r.jsx)(n.li,{children:"Tests-after verify what was built, not what's required"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"use-cases-1",children:"Use Cases"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Test-driven development"}),"\n",(0,r.jsx)(n.li,{children:"High-quality feature requirements"}),"\n",(0,r.jsx)(n.li,{children:"Critical system components"}),"\n"]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"workflow-3-test-fix-gen---test-cycle-execute",children:"Workflow 3: test-fix-gen -> test-cycle-execute"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"5-phase test fix generation workflow"})}),"\n",(0,r.jsx)(n.h3,{id:"command-2",children:"Command"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'# Session Mode\n/workflow:test-fix-gen WFS-user-auth-v2\n/workflow:test-cycle-execute\n\n# Prompt Mode\n/workflow:test-fix-gen "Test the auth API"\n/workflow:test-cycle-execute\n'})}),"\n",(0,r.jsx)(n.h3,{id:"flow-diagram-2",children:"Flow Diagram"}),"\n",(0,r.jsx)(i.A,{chart:"\n flowchart TD\n A([Start]) --\x3e B{Input Mode?}\n\n B --\x3e|Session<br/>Mode| C[Phase 1: Use Source<br/>Session]\n B --\x3e|Prompt<br/>Mode| D[Phase 1: Create<br/>Test Session]\n\n C --\x3e E[/workflow:session:start<br/>--type test --resume/]\n D --\x3e F[/workflow:session:start<br/>--type test --new/]\n\n E --\x3e G[Phase 2: Gather Test Context]\n F --\x3e H[Phase 2: Gather Test Context]\n\n G --\x3e I[/workflow:tools:test-context<br/>-gather/]\n H --\x3e I\n\n I --\x3e J[Phase 3: Test Generation Analysis]\n J --\x3e K[/workflow:tools:test-concept<br/>-enhanced/]\n K --\x3e L[Multi-layer test requirements<br/>L0: Static, L1: Unit<br/>L2: Integration, L3: E2E]\n\n L --\x3e M[Phase 4: Generate Test Tasks]\n M --\x3e N[/workflow:tools:test-task-generate/]\n N --\x3e O[IMPL-001: generate<br/>+ IMPL-001.5: quality gate<br/>+ IMPL-002: execute fix]\n\n O --\x3e P[Phase 5: Return Summary]\n P --\x3e Q[-> test-cycle-execute]\n\n Q --\x3e R([Test Fix Complete])\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef action fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef tool fill:#ffecb3,stroke:#ffa000\n\n class A,R startend,B decision,C,D,E,F,G,H,J,M,P,Q action,I,K,N tool\n"}),"\n",(0,r.jsx)(n.h3,{id:"process-phases-2",children:"Process Phases"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 1: Create/Use Test Session"})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Session Mode"})," (uses existing session):"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:session:start --type test --resume WFS-user-auth-v2\n"})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Prompt Mode"})," (creates new session):"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:session:start --type test --new\n"})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 2: Gather Test Context"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:tools:test-context-gather\n"})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 3: Test Generation Analysis"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:tools:test-concept-enhanced\n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Multi-layer test requirements:","\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"L0: Static"})," - Type checking, linting"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"L1: Unit"})," - Function-level tests"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"L2: Integration"})," - Component interaction"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"L3: E2E"})," - Full system tests"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 4: Generate Test Tasks"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:tools:test-task-generate\n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"IMPL-001.json"}),": Test understanding & generation"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"IMPL-001.5-review.json"}),": Quality gate"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"IMPL-002.json"}),": Test execution & fix cycle"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Phase 5: Return Summary"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["-> ",(0,r.jsx)(n.code,{children:"/workflow:test-cycle-execute"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"dual-mode-support",children:"Dual-Mode Support"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Mode"}),(0,r.jsx)(n.th,{children:"Input Pattern"}),(0,r.jsx)(n.th,{children:"Context Source"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Session Mode"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"WFS-xxx"})}),(0,r.jsx)(n.td,{children:"Source session summaries"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Prompt Mode"})}),(0,r.jsx)(n.td,{children:"Text/file path"}),(0,r.jsx)(n.td,{children:"Direct codebase analysis"})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"artifacts-1",children:"Artifacts"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Location"}),": ",(0,r.jsx)(n.code,{children:".workflow/active/WFS-test-{session}/"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:".workflow/active/WFS-test-user-auth-2025-02-03/\n\u251c\u2500\u2500 workflow-session.json\n\u251c\u2500\u2500 .task/\n\u2502 \u251c\u2500\u2500 IMPL-001.json # Test understanding & generation\n\u2502 \u251c\u2500\u2500 IMPL-001.5-review.json # Quality gate\n\u2502 \u2514\u2500\u2500 IMPL-002.json # Test execution & fix cycle\n\u2514\u2500\u2500 .process/\n \u251c\u2500\u2500 TEST_ANALYSIS_RESULTS.md\n \u2514\u2500\u2500 test-context-package.json\n"})}),"\n",(0,r.jsx)(n.h3,{id:"use-cases-2",children:"Use Cases"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Test failure fixes"}),"\n",(0,r.jsx)(n.li,{children:"Coverage improvement"}),"\n",(0,r.jsx)(n.li,{children:"Test suite generation"}),"\n"]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"level-3-comparison-table",children:"Level 3 Comparison Table"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Aspect"}),(0,r.jsx)(n.th,{children:"plan"}),(0,r.jsx)(n.th,{children:"tdd-plan"}),(0,r.jsx)(n.th,{children:"test-fix-gen"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Purpose"})}),(0,r.jsx)(n.td,{children:"Complex features"}),(0,r.jsx)(n.td,{children:"Test-driven dev"}),(0,r.jsx)(n.td,{children:"Test fixes"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Phases"})}),(0,r.jsx)(n.td,{children:"5"}),(0,r.jsx)(n.td,{children:"6"}),(0,r.jsx)(n.td,{children:"5"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"TDD"})}),(0,r.jsx)(n.td,{children:"No"}),(0,r.jsx)(n.td,{children:"Yes (Red-Green-Refactor)"}),(0,r.jsx)(n.td,{children:"Optional"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Artifacts"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:".workflow/active/"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:".workflow/active/"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:".workflow/active/WFS-test-*/"})})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Verification"})}),(0,r.jsx)(n.td,{children:"plan-verify"}),(0,r.jsx)(n.td,{children:"tdd-verify"}),(0,r.jsx)(n.td,{children:"Built-in quality gate"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Best For"})}),(0,r.jsx)(n.td,{children:"Multi-module changes"}),(0,r.jsx)(n.td,{children:"High-quality features"}),(0,r.jsx)(n.td,{children:"Test improvements"})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"execution-execute",children:"Execution: execute"}),"\n",(0,r.jsxs)(n.p,{children:["All Level 3 workflows execute via ",(0,r.jsx)(n.code,{children:"execute"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"/workflow:execute --session WFS-{session-id}\n"})}),"\n",(0,r.jsx)(n.h3,{id:"key-features",children:"Key Features"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Dependency analysis"})," - Automatic task dependency resolution"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Parallel execution"})," - Independent tasks run in parallel"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Progress tracking"})," - Session-based TODO updates"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Summaries"})," - Task completion summaries for dependent tasks"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"related-workflows",children:"Related Workflows"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/docs/workflows/level-2-rapid",children:"Level 2: Rapid"})," - Simpler workflow"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/docs/workflows/level-4-brainstorm",children:"Level 4: Brainstorm"})," - Multi-role exploration"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/docs/workflows/level-5-intelligent",children:"Level 5: Intelligent"})," - Automated orchestration"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/docs/workflows/faq",children:"FAQ"})," - Common questions"]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},1184(e,n,s){s.d(n,{R:()=>i,x:()=>o});var t=s(3696);const r={},l=t.createContext(r);function i(e){const n=t.useContext(l);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(l.Provider,{value:n},e.children)}}}]); |