claude-code-workflow 6.3.48 → 6.3.49
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.
- package/.claude/CLAUDE.md +6 -8
- package/.claude/agents/action-planning-agent.md +28 -45
- package/.claude/agents/cli-lite-planning-agent.md +93 -1
- package/.claude/agents/code-developer.md +144 -27
- package/.claude/commands/ccw-coordinator.md +175 -21
- package/.claude/commands/ccw-debug.md +832 -0
- package/.claude/commands/ccw.md +90 -9
- package/.claude/commands/cli/cli-init.md +1 -0
- package/.claude/commands/issue/convert-to-plan.md +718 -0
- package/.claude/commands/issue/from-brainstorm.md +382 -0
- package/.claude/commands/memory/tips.md +332 -0
- package/.claude/commands/workflow/analyze-with-file.md +804 -0
- package/.claude/commands/workflow/brainstorm/auto-parallel.md +18 -43
- package/.claude/commands/workflow/brainstorm/role-analysis.md +705 -0
- package/.claude/commands/workflow/brainstorm-with-file.md +1153 -0
- package/.claude/commands/workflow/debug-with-file.md +7 -5
- package/.claude/commands/workflow/execute.md +6 -4
- package/.claude/commands/workflow/lite-plan.md +2 -2
- package/.claude/commands/workflow/plan-verify.md +162 -327
- package/.claude/commands/workflow/plan.md +162 -26
- package/.claude/commands/workflow/replan.md +78 -2
- package/.claude/commands/workflow/{review-fix.md → review-cycle-fix.md} +6 -6
- package/.claude/commands/workflow/review-module-cycle.md +2 -2
- package/.claude/commands/workflow/review-session-cycle.md +2 -2
- package/.claude/commands/workflow/tools/conflict-resolution.md +16 -26
- package/.claude/commands/workflow/tools/context-gather.md +81 -118
- package/.claude/commands/workflow/tools/task-generate-agent.md +94 -10
- package/.claude/skills/ccw-help/command.json +4 -4
- package/.claude/skills/lite-skill-generator/SKILL.md +650 -0
- package/.claude/skills/lite-skill-generator/templates/simple-skill.md +68 -0
- package/.claude/skills/lite-skill-generator/templates/style-guide.md +64 -0
- package/.claude/skills/skill-generator/SKILL.md +277 -85
- package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +4 -15
- package/.claude/skills/skill-generator/phases/02-structure-generation.md +72 -17
- package/.claude/skills/skill-generator/phases/03-phase-generation.md +218 -51
- package/.claude/skills/skill-generator/phases/04-specs-templates.md +111 -41
- package/.claude/skills/skill-generator/phases/05-validation.md +139 -56
- package/.claude/skills/skill-generator/templates/autonomous-action.md +78 -268
- package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +14 -0
- package/.claude/skills/skill-generator/templates/code-analysis-action.md +12 -0
- package/.claude/skills/skill-generator/templates/llm-action.md +12 -0
- package/.claude/skills/skill-generator/templates/script-template.md +368 -0
- package/.claude/skills/skill-generator/templates/sequential-phase.md +14 -0
- package/.claude/skills/skill-generator/templates/skill-md.md +14 -0
- package/.claude/skills/skill-tuning/SKILL.md +130 -266
- package/.claude/skills/skill-tuning/phases/orchestrator.md +95 -283
- package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +90 -198
- package/.claude/skills/skill-tuning/specs/tuning-strategies.md +193 -1345
- package/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json +47 -0
- package/.claude/workflows/cli-templates/schemas/verify-json-schema.json +158 -0
- package/.claude/workflows/cli-tools-usage.md +1 -1
- package/.codex/AGENTS.md +1 -3
- package/.codex/prompts/analyze-with-file.md +607 -0
- package/.codex/prompts/brainstorm-to-cycle.md +455 -0
- package/.codex/prompts/brainstorm-with-file.md +933 -0
- package/.codex/prompts/debug-with-file.md +15 -20
- package/.codex/skills/ccw-cli-tools/SKILL.md +559 -0
- package/ccw/dist/commands/cli.d.ts.map +1 -1
- package/ccw/dist/commands/cli.js +29 -5
- package/ccw/dist/commands/cli.js.map +1 -1
- package/ccw/dist/commands/issue.d.ts +2 -0
- package/ccw/dist/commands/issue.d.ts.map +1 -1
- package/ccw/dist/commands/issue.js +62 -20
- package/ccw/dist/commands/issue.js.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.d.ts.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.js +5 -3
- package/ccw/dist/config/litellm-api-config-manager.js.map +1 -1
- package/ccw/dist/config/litellm-provider-models.d.ts +73 -0
- package/ccw/dist/config/litellm-provider-models.d.ts.map +1 -0
- package/ccw/dist/config/litellm-provider-models.js +172 -0
- package/ccw/dist/config/litellm-provider-models.js.map +1 -0
- package/ccw/dist/config/provider-models.d.ts +25 -51
- package/ccw/dist/config/provider-models.d.ts.map +1 -1
- package/ccw/dist/config/provider-models.js +84 -149
- package/ccw/dist/config/provider-models.js.map +1 -1
- package/ccw/dist/config/storage-paths.d.ts.map +1 -1
- package/ccw/dist/config/storage-paths.js +23 -5
- package/ccw/dist/config/storage-paths.js.map +1 -1
- package/ccw/dist/core/auth/csrf-middleware.js +3 -3
- package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
- package/ccw/dist/core/dashboard-generator.d.ts.map +1 -1
- package/ccw/dist/core/dashboard-generator.js +3 -1
- package/ccw/dist/core/dashboard-generator.js.map +1 -1
- package/ccw/dist/core/routes/claude-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/claude-routes.js +206 -14
- package/ccw/dist/core/routes/claude-routes.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/commands-routes.d.ts +7 -0
- package/ccw/dist/core/routes/commands-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/commands-routes.js +480 -0
- package/ccw/dist/core/routes/commands-routes.js.map +1 -0
- package/ccw/dist/core/routes/model-routes.d.ts +11 -0
- package/ccw/dist/core/routes/model-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/model-routes.js +112 -0
- package/ccw/dist/core/routes/model-routes.js.map +1 -0
- package/ccw/dist/core/routes/nav-status-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/nav-status-routes.js +84 -1
- package/ccw/dist/core/routes/nav-status-routes.js.map +1 -1
- package/ccw/dist/core/routes/provider-routes.d.ts +11 -0
- package/ccw/dist/core/routes/provider-routes.d.ts.map +1 -0
- package/ccw/dist/core/routes/provider-routes.js +67 -0
- package/ccw/dist/core/routes/provider-routes.js.map +1 -0
- package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/skills-routes.js +219 -7
- package/ccw/dist/core/routes/skills-routes.js.map +1 -1
- package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/system-routes.js +58 -6
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/dist/core/server.d.ts.map +1 -1
- package/ccw/dist/core/server.js +13 -0
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/dist/mcp-server/index.js +2 -2
- package/ccw/dist/mcp-server/index.js.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.d.ts +48 -11
- package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.js +146 -50
- package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
- package/ccw/dist/tools/cli-config-manager.d.ts +1 -13
- package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
- package/ccw/dist/tools/cli-config-manager.js +3 -27
- package/ccw/dist/tools/cli-config-manager.js.map +1 -1
- package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
- package/ccw/dist/tools/cli-executor-core.js +7 -2
- package/ccw/dist/tools/cli-executor-core.js.map +1 -1
- package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
- package/ccw/dist/tools/cli-history-store.d.ts +11 -0
- package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
- package/ccw/dist/tools/cli-history-store.js +82 -2
- package/ccw/dist/tools/cli-history-store.js.map +1 -1
- package/ccw/dist/tools/command-registry.d.ts +7 -0
- package/ccw/dist/tools/command-registry.d.ts.map +1 -1
- package/ccw/dist/tools/command-registry.js +14 -1
- package/ccw/dist/tools/command-registry.js.map +1 -1
- package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -1
- package/ccw/dist/tools/generate-module-docs.js +11 -7
- package/ccw/dist/tools/generate-module-docs.js.map +1 -1
- package/ccw/dist/tools/litellm-executor.d.ts +1 -0
- package/ccw/dist/tools/litellm-executor.d.ts.map +1 -1
- package/ccw/dist/tools/litellm-executor.js +11 -9
- package/ccw/dist/tools/litellm-executor.js.map +1 -1
- package/ccw/dist/types/skill-types.d.ts +97 -0
- package/ccw/dist/types/skill-types.d.ts.map +1 -0
- package/ccw/dist/types/skill-types.js +6 -0
- package/ccw/dist/types/skill-types.js.map +1 -0
- package/ccw/src/commands/cli.ts +36 -5
- package/ccw/src/commands/issue.ts +81 -26
- package/ccw/src/config/litellm-api-config-manager.ts +5 -3
- package/ccw/src/config/litellm-provider-models.ts +222 -0
- package/ccw/src/config/provider-models.ts +91 -190
- package/ccw/src/config/storage-paths.ts +20 -5
- package/ccw/src/core/auth/csrf-middleware.ts +3 -3
- package/ccw/src/core/dashboard-generator.ts +3 -1
- package/ccw/src/core/routes/claude-routes.ts +233 -15
- package/ccw/src/core/routes/cli-routes.ts +2 -3
- package/ccw/src/core/routes/commands-routes.ts +620 -0
- package/ccw/src/core/routes/nav-status-routes.ts +95 -1
- package/ccw/src/core/routes/provider-routes.ts +78 -0
- package/ccw/src/core/routes/skills-routes.ts +266 -45
- package/ccw/src/core/routes/system-routes.ts +102 -50
- package/ccw/src/core/server.ts +13 -0
- package/ccw/src/mcp-server/index.ts +2 -2
- package/ccw/src/templates/dashboard-css/18-cli-settings.css +35 -0
- package/ccw/src/templates/dashboard-css/37-commands.css +193 -0
- package/ccw/src/templates/dashboard-js/components/navigation.js +4 -0
- package/ccw/src/templates/dashboard-js/i18n.js +116 -0
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +249 -4
- package/ccw/src/templates/dashboard-js/views/commands-manager.js +503 -0
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +7 -7
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js +2 -7
- package/ccw/src/templates/dashboard-js/views/skills-manager.js +164 -23
- package/ccw/src/templates/dashboard.html +7 -0
- package/ccw/src/tools/claude-cli-tools.ts +170 -56
- package/ccw/src/tools/cli-config-manager.ts +2 -33
- package/ccw/src/tools/cli-executor-core.ts +8 -2
- package/ccw/src/tools/cli-history-store.ts +92 -2
- package/ccw/src/tools/command-registry.ts +16 -1
- package/ccw/src/tools/generate-module-docs.ts +11 -7
- package/ccw/src/tools/litellm-executor.ts +13 -9
- package/ccw/src/types/skill-types.ts +99 -0
- package/package.json +1 -1
- package/.claude/commands/enhance-prompt.md +0 -93
- package/.claude/commands/memory/code-map-memory.md +0 -687
- package/.claude/commands/memory/docs.md +0 -615
- package/.claude/commands/memory/load-skill-memory.md +0 -182
- package/.claude/commands/memory/skill-memory.md +0 -525
- package/.claude/commands/memory/swagger-docs.md +0 -773
- package/.claude/commands/memory/tech-research-rules.md +0 -310
- package/.claude/commands/memory/workflow-skill-memory.md +0 -517
- package/.claude/commands/task/breakdown.md +0 -208
- package/.claude/commands/task/create.md +0 -152
- package/.claude/commands/task/execute.md +0 -270
- package/.claude/commands/task/replan.md +0 -441
- package/.claude/commands/version.md +0 -254
- package/.claude/commands/workflow/action-plan-verify.md +0 -485
- package/.claude/commands/workflow/brainstorm/api-designer.md +0 -587
- package/.claude/commands/workflow/brainstorm/data-architect.md +0 -220
- package/.claude/commands/workflow/brainstorm/product-manager.md +0 -200
- package/.claude/commands/workflow/brainstorm/product-owner.md +0 -200
- package/.claude/commands/workflow/brainstorm/scrum-master.md +0 -200
- package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +0 -200
- package/.claude/commands/workflow/brainstorm/system-architect.md +0 -389
- package/.claude/commands/workflow/brainstorm/ui-designer.md +0 -221
- package/.claude/commands/workflow/brainstorm/ux-expert.md +0 -221
- package/.claude/commands/workflow/debug.md +0 -331
- package/.claude/commands/workflow/develop-with-file.md +0 -1044
- package/.claude/skills/ccw-loop/README.md +0 -303
- package/.claude/skills/skill-generator/templates/script-bash.md +0 -277
- package/.claude/skills/skill-generator/templates/script-python.md +0 -198
- package/.codex/prompts/debug.md +0 -318
- package/ccw/src/core/routes/mcp-routes.ts.backup +0 -549
|
@@ -2,276 +2,174 @@
|
|
|
2
2
|
|
|
3
3
|
Classification of skill execution issues with detection patterns and severity criteria.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
|
8
|
-
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
5
|
+
## Quick Reference
|
|
6
|
+
|
|
7
|
+
| Category | Priority | Detection | Fix Strategy |
|
|
8
|
+
|----------|----------|-----------|--------------|
|
|
9
|
+
| Authoring Violation | P0 | Intermediate files, state bloat, file relay | eliminate_intermediate, minimize_state |
|
|
10
|
+
| Data Flow Disruption | P1 | Scattered state, inconsistent formats | state_centralization, schema_enforcement |
|
|
11
|
+
| Agent Coordination | P2 | Fragile chains, no error handling | error_wrapping, result_validation |
|
|
12
|
+
| Context Explosion | P3 | Unbounded history, full content passing | sliding_window, path_reference |
|
|
13
|
+
| Long-tail Forgetting | P4 | Early constraint loss | constraint_injection, checkpoint_restore |
|
|
14
|
+
| Token Consumption | P5 | Verbose prompts, redundant I/O | prompt_compression, lazy_loading |
|
|
15
|
+
| Doc Redundancy | P6 | Repeated definitions | consolidate_to_ssot |
|
|
16
|
+
| Doc Conflict | P7 | Inconsistent definitions | reconcile_definitions |
|
|
12
17
|
|
|
13
18
|
---
|
|
14
19
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
### 0. Authoring Principles Violation (P0)
|
|
18
|
-
|
|
19
|
-
**Definition**: 违反 skill 撰写首要准则(简洁高效、去除存储、上下文流转)。
|
|
20
|
+
## 0. Authoring Principles Violation (P0)
|
|
20
21
|
|
|
21
|
-
**
|
|
22
|
-
- 不必要的中间文件存储
|
|
23
|
-
- State schema 过度膨胀
|
|
24
|
-
- 文件中转代替上下文传递
|
|
25
|
-
- 重复数据存储
|
|
22
|
+
**Definition**: Violates skill authoring principles (simplicity, no intermediate files, context passing).
|
|
26
23
|
|
|
27
24
|
**Detection Patterns**:
|
|
28
25
|
|
|
29
|
-
| Pattern ID |
|
|
30
|
-
|
|
31
|
-
| APV-001 | `/Write\([^)]*temp
|
|
32
|
-
| APV-002 | `/Write\([^)]+\)[\s\S]{0,50}Read\([^)]+\)/` |
|
|
33
|
-
| APV-003 | State schema > 15 fields |
|
|
34
|
-
| APV-004 | `/_history\s*[.=].*push
|
|
35
|
-
| APV-005 | `/debug_
|
|
36
|
-
| APV-006 | Same data in multiple
|
|
37
|
-
|
|
38
|
-
**Impact Levels**:
|
|
39
|
-
- **Critical**: 中间文件 > 5 个,严重违反原则
|
|
40
|
-
- **High**: State 字段 > 20 个,或存在文件中转
|
|
41
|
-
- **Medium**: 存在调试字段或轻微冗余
|
|
42
|
-
- **Low**: 轻微的命名不规范
|
|
26
|
+
| Pattern ID | Check | Description |
|
|
27
|
+
|------------|-------|-------------|
|
|
28
|
+
| APV-001 | `/Write\([^)]*temp-\|intermediate-/` | Intermediate file writes |
|
|
29
|
+
| APV-002 | `/Write\([^)]+\)[\s\S]{0,50}Read\([^)]+\)/` | Write-then-read relay |
|
|
30
|
+
| APV-003 | State schema > 15 fields | Excessive state fields |
|
|
31
|
+
| APV-004 | `/_history\s*[.=].*push\|concat/` | Unbounded array growth |
|
|
32
|
+
| APV-005 | `/debug_\|_cache\|_temp/` in state | Debug/cache field residue |
|
|
33
|
+
| APV-006 | Same data in multiple fields | Duplicate storage |
|
|
43
34
|
|
|
44
|
-
|
|
35
|
+
**Impact**: Critical (>5 intermediate files), High (>20 state fields), Medium (debug fields), Low (naming issues)
|
|
45
36
|
|
|
46
|
-
|
|
37
|
+
---
|
|
47
38
|
|
|
48
|
-
|
|
39
|
+
## 1. Context Explosion (P3)
|
|
49
40
|
|
|
50
|
-
**
|
|
51
|
-
- Unbounded conversation history
|
|
52
|
-
- Full content passing instead of references
|
|
53
|
-
- Missing summarization mechanisms
|
|
54
|
-
- Agent returning full output instead of path+summary
|
|
41
|
+
**Definition**: Unbounded token accumulation causing prompt size growth.
|
|
55
42
|
|
|
56
43
|
**Detection Patterns**:
|
|
57
44
|
|
|
58
|
-
| Pattern ID |
|
|
59
|
-
|
|
45
|
+
| Pattern ID | Check | Description |
|
|
46
|
+
|------------|-------|-------------|
|
|
60
47
|
| CTX-001 | `/history\s*[.=].*push\|concat/` | History array growth |
|
|
61
48
|
| CTX-002 | `/JSON\.stringify\s*\(\s*state\s*\)/` | Full state serialization |
|
|
62
49
|
| CTX-003 | `/Read\([^)]+\)\s*[\+,]/` | Multiple file content concatenation |
|
|
63
50
|
| CTX-004 | `/return\s*\{[^}]*content:/` | Agent returning full content |
|
|
64
|
-
| CTX-005 | File
|
|
51
|
+
| CTX-005 | File > 5000 chars without summarization | Long prompts |
|
|
65
52
|
|
|
66
|
-
**Impact
|
|
67
|
-
- **Critical**: Context exceeds model limit (128K tokens)
|
|
68
|
-
- **High**: Context > 50K tokens per iteration
|
|
69
|
-
- **Medium**: Context grows 10%+ per iteration
|
|
70
|
-
- **Low**: Potential for growth but currently manageable
|
|
53
|
+
**Impact**: Critical (>128K tokens), High (>50K per iteration), Medium (10%+ growth), Low (manageable)
|
|
71
54
|
|
|
72
55
|
---
|
|
73
56
|
|
|
74
|
-
|
|
57
|
+
## 2. Long-tail Forgetting (P4)
|
|
75
58
|
|
|
76
|
-
**Definition**: Loss of early instructions
|
|
77
|
-
|
|
78
|
-
**Root Causes**:
|
|
79
|
-
- No explicit constraint propagation
|
|
80
|
-
- Reliance on implicit context
|
|
81
|
-
- Missing checkpoint/restore mechanisms
|
|
82
|
-
- State schema without requirements field
|
|
59
|
+
**Definition**: Loss of early instructions/constraints in long chains.
|
|
83
60
|
|
|
84
61
|
**Detection Patterns**:
|
|
85
62
|
|
|
86
|
-
| Pattern ID |
|
|
87
|
-
|
|
88
|
-
| MEM-001 | Later phases missing constraint reference | Constraint not
|
|
63
|
+
| Pattern ID | Check | Description |
|
|
64
|
+
|------------|-------|-------------|
|
|
65
|
+
| MEM-001 | Later phases missing constraint reference | Constraint not forwarded |
|
|
89
66
|
| MEM-002 | `/\[TASK\][^[]*(?!\[CONSTRAINTS\])/` | Task without constraints section |
|
|
90
67
|
| MEM-003 | Key phases without checkpoint | Missing state preservation |
|
|
91
|
-
| MEM-004 | State
|
|
68
|
+
| MEM-004 | State lacks `original_requirements` | No constraint persistence |
|
|
92
69
|
| MEM-005 | No verification phase | Output not checked against intent |
|
|
93
70
|
|
|
94
|
-
**Impact
|
|
95
|
-
- **Critical**: Original goal completely lost
|
|
96
|
-
- **High**: Key constraints ignored in output
|
|
97
|
-
- **Medium**: Some requirements missing
|
|
98
|
-
- **Low**: Minor goal drift
|
|
71
|
+
**Impact**: Critical (goal lost), High (constraints ignored), Medium (some missing), Low (minor drift)
|
|
99
72
|
|
|
100
73
|
---
|
|
101
74
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
**Definition**: Inconsistent state management causing data loss or corruption.
|
|
75
|
+
## 3. Data Flow Disruption (P1)
|
|
105
76
|
|
|
106
|
-
**
|
|
107
|
-
- Multiple state storage locations
|
|
108
|
-
- Inconsistent field naming
|
|
109
|
-
- Missing schema validation
|
|
110
|
-
- Format transformation without normalization
|
|
77
|
+
**Definition**: Inconsistent state management causing data loss/corruption.
|
|
111
78
|
|
|
112
79
|
**Detection Patterns**:
|
|
113
80
|
|
|
114
|
-
| Pattern ID |
|
|
115
|
-
|
|
81
|
+
| Pattern ID | Check | Description |
|
|
82
|
+
|------------|-------|-------------|
|
|
116
83
|
| DF-001 | Multiple state file writes | Scattered state storage |
|
|
117
84
|
| DF-002 | Same concept, different names | Field naming inconsistency |
|
|
118
85
|
| DF-003 | JSON.parse without validation | Missing schema validation |
|
|
119
86
|
| DF-004 | Files written but never read | Orphaned outputs |
|
|
120
87
|
| DF-005 | Autonomous skill without state-schema | Undefined state structure |
|
|
121
88
|
|
|
122
|
-
**Impact
|
|
123
|
-
- **Critical**: Data loss or corruption
|
|
124
|
-
- **High**: State inconsistency between phases
|
|
125
|
-
- **Medium**: Potential for inconsistency
|
|
126
|
-
- **Low**: Minor naming inconsistencies
|
|
89
|
+
**Impact**: Critical (data loss), High (state inconsistency), Medium (potential inconsistency), Low (naming)
|
|
127
90
|
|
|
128
91
|
---
|
|
129
92
|
|
|
130
|
-
|
|
93
|
+
## 4. Agent Coordination Failure (P2)
|
|
131
94
|
|
|
132
95
|
**Definition**: Fragile agent call patterns causing cascading failures.
|
|
133
96
|
|
|
134
|
-
**Root Causes**:
|
|
135
|
-
- Missing error handling in Task calls
|
|
136
|
-
- No result validation
|
|
137
|
-
- Inconsistent agent configurations
|
|
138
|
-
- Deeply nested agent calls
|
|
139
|
-
|
|
140
97
|
**Detection Patterns**:
|
|
141
98
|
|
|
142
|
-
| Pattern ID |
|
|
143
|
-
|
|
99
|
+
| Pattern ID | Check | Description |
|
|
100
|
+
|------------|-------|-------------|
|
|
144
101
|
| AGT-001 | Task without try-catch | Missing error handling |
|
|
145
102
|
| AGT-002 | Result used without validation | No return value check |
|
|
146
|
-
| AGT-003 | >
|
|
103
|
+
| AGT-003 | >3 different agent types | Agent type proliferation |
|
|
147
104
|
| AGT-004 | Nested Task in prompt | Agent calling agent |
|
|
148
105
|
| AGT-005 | Task used but not in allowed-tools | Tool declaration mismatch |
|
|
149
106
|
| AGT-006 | Multiple return formats | Inconsistent agent output |
|
|
150
107
|
|
|
151
|
-
**Impact
|
|
152
|
-
- **Critical**: Workflow crash on agent failure
|
|
153
|
-
- **High**: Unpredictable agent behavior
|
|
154
|
-
- **Medium**: Occasional coordination issues
|
|
155
|
-
- **Low**: Minor inconsistencies
|
|
108
|
+
**Impact**: Critical (crash on failure), High (unpredictable behavior), Medium (occasional issues), Low (minor)
|
|
156
109
|
|
|
157
110
|
---
|
|
158
111
|
|
|
159
|
-
|
|
112
|
+
## 5. Documentation Redundancy (P6)
|
|
160
113
|
|
|
161
|
-
**Definition**:
|
|
162
|
-
|
|
163
|
-
**Root Causes**:
|
|
164
|
-
- 缺乏单一真相来源 (SSOT)
|
|
165
|
-
- 复制粘贴代替引用
|
|
166
|
-
- 硬编码配置代替集中管理
|
|
114
|
+
**Definition**: Same definition (State Schema, mappings, types) repeated across files.
|
|
167
115
|
|
|
168
116
|
**Detection Patterns**:
|
|
169
117
|
|
|
170
|
-
| Pattern ID |
|
|
171
|
-
|
|
172
|
-
| DOC-RED-001 |
|
|
173
|
-
| DOC-RED-002 |
|
|
174
|
-
| DOC-RED-003 | `/interface\s+(\w+)/`
|
|
118
|
+
| Pattern ID | Check | Description |
|
|
119
|
+
|------------|-------|-------------|
|
|
120
|
+
| DOC-RED-001 | Cross-file semantic comparison | State Schema duplication |
|
|
121
|
+
| DOC-RED-002 | Code block vs spec comparison | Hardcoded config duplication |
|
|
122
|
+
| DOC-RED-003 | `/interface\s+(\w+)/` same-name scan | Interface/type duplication |
|
|
175
123
|
|
|
176
|
-
**Impact
|
|
177
|
-
- **High**: 核心定义(State Schema, 映射表)重复
|
|
178
|
-
- **Medium**: 类型定义重复
|
|
179
|
-
- **Low**: 示例代码重复
|
|
124
|
+
**Impact**: High (core definitions), Medium (type definitions), Low (example code)
|
|
180
125
|
|
|
181
126
|
---
|
|
182
127
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
**Definition**: Excessive token usage from verbose prompts, large state objects, or inefficient I/O patterns.
|
|
128
|
+
## 6. Token Consumption (P5)
|
|
186
129
|
|
|
187
|
-
**
|
|
188
|
-
- Long static prompts without compression
|
|
189
|
-
- State schema with too many fields
|
|
190
|
-
- Full content embedding instead of path references
|
|
191
|
-
- Arrays growing unbounded without sliding windows
|
|
192
|
-
- Write-then-read file relay patterns
|
|
130
|
+
**Definition**: Excessive token usage from verbose prompts, large state, inefficient I/O.
|
|
193
131
|
|
|
194
132
|
**Detection Patterns**:
|
|
195
133
|
|
|
196
|
-
| Pattern ID |
|
|
197
|
-
|
|
134
|
+
| Pattern ID | Check | Description |
|
|
135
|
+
|------------|-------|-------------|
|
|
198
136
|
| TKN-001 | File size > 4KB | Verbose prompt files |
|
|
199
137
|
| TKN-002 | State fields > 15 | Excessive state schema |
|
|
200
138
|
| TKN-003 | `/Read\([^)]+\)\s*[\+,]/` | Full content passing |
|
|
201
139
|
| TKN-004 | `/.push\|concat(?!.*\.slice)/` | Unbounded array growth |
|
|
202
140
|
| TKN-005 | `/Write\([^)]+\)[\s\S]{0,100}Read\([^)]+\)/` | Write-then-read pattern |
|
|
203
141
|
|
|
204
|
-
**Impact
|
|
205
|
-
- **High**: Multiple TKN-003/TKN-004 issues causing significant token waste
|
|
206
|
-
- **Medium**: Several verbose files or state bloat
|
|
207
|
-
- **Low**: Minor optimization opportunities
|
|
142
|
+
**Impact**: High (multiple TKN-003/004), Medium (verbose files), Low (minor optimization)
|
|
208
143
|
|
|
209
144
|
---
|
|
210
145
|
|
|
211
|
-
|
|
146
|
+
## 7. Documentation Conflict (P7)
|
|
212
147
|
|
|
213
|
-
**Definition**:
|
|
214
|
-
|
|
215
|
-
**Root Causes**:
|
|
216
|
-
- 定义更新后未同步其他位置
|
|
217
|
-
- 实现与文档漂移
|
|
218
|
-
- 缺乏一致性校验
|
|
148
|
+
**Definition**: Same concept defined inconsistently across files.
|
|
219
149
|
|
|
220
150
|
**Detection Patterns**:
|
|
221
151
|
|
|
222
|
-
| Pattern ID |
|
|
223
|
-
|
|
224
|
-
| DOC-CON-001 |
|
|
225
|
-
| DOC-CON-002 |
|
|
152
|
+
| Pattern ID | Check | Description |
|
|
153
|
+
|------------|-------|-------------|
|
|
154
|
+
| DOC-CON-001 | Key-value consistency check | Same key, different values |
|
|
155
|
+
| DOC-CON-002 | Implementation vs docs comparison | Hardcoded vs documented mismatch |
|
|
226
156
|
|
|
227
|
-
**Impact
|
|
228
|
-
- **Critical**: 优先级/类别定义冲突
|
|
229
|
-
- **High**: 策略映射不一致
|
|
230
|
-
- **Medium**: 示例与实际不符
|
|
157
|
+
**Impact**: Critical (priority/category conflicts), High (strategy mapping inconsistency), Medium (example mismatch)
|
|
231
158
|
|
|
232
159
|
---
|
|
233
160
|
|
|
234
|
-
## Severity
|
|
235
|
-
|
|
236
|
-
### Global Severity Matrix
|
|
237
|
-
|
|
238
|
-
| Severity | Definition | Action Required |
|
|
239
|
-
|----------|------------|-----------------|
|
|
240
|
-
| **Critical** | Blocks execution or causes data loss | Immediate fix required |
|
|
241
|
-
| **High** | Significantly impacts reliability | Should fix before deployment |
|
|
242
|
-
| **Medium** | Affects quality or maintainability | Fix in next iteration |
|
|
243
|
-
| **Low** | Minor improvement opportunity | Optional fix |
|
|
244
|
-
|
|
245
|
-
### Severity Calculation
|
|
161
|
+
## Severity Calculation
|
|
246
162
|
|
|
247
163
|
```javascript
|
|
248
|
-
function
|
|
249
|
-
const weights = {
|
|
250
|
-
impact_on_execution: 40, // Does it block workflow?
|
|
251
|
-
data_integrity_risk: 30, // Can it cause data loss?
|
|
252
|
-
frequency: 20, // How often does it occur?
|
|
253
|
-
complexity_to_fix: 10 // How hard to fix?
|
|
254
|
-
};
|
|
255
|
-
|
|
164
|
+
function calculateSeverity(issue) {
|
|
165
|
+
const weights = { execution: 40, data_integrity: 30, frequency: 20, complexity: 10 };
|
|
256
166
|
let score = 0;
|
|
257
167
|
|
|
258
|
-
|
|
259
|
-
if (issue.
|
|
260
|
-
else if (issue.degrades_execution) score += weights.impact_on_execution * 0.5;
|
|
261
|
-
|
|
262
|
-
// Data integrity
|
|
263
|
-
if (issue.causes_data_loss) score += weights.data_integrity_risk;
|
|
264
|
-
else if (issue.causes_inconsistency) score += weights.data_integrity_risk * 0.5;
|
|
265
|
-
|
|
266
|
-
// Frequency
|
|
168
|
+
if (issue.blocks_execution) score += weights.execution;
|
|
169
|
+
if (issue.causes_data_loss) score += weights.data_integrity;
|
|
267
170
|
if (issue.occurs_every_run) score += weights.frequency;
|
|
268
|
-
|
|
171
|
+
if (issue.fix_complexity === 'low') score += weights.complexity;
|
|
269
172
|
|
|
270
|
-
// Complexity (inverse - easier to fix = higher priority)
|
|
271
|
-
if (issue.fix_complexity === 'low') score += weights.complexity_to_fix;
|
|
272
|
-
else if (issue.fix_complexity === 'medium') score += weights.complexity_to_fix * 0.5;
|
|
273
|
-
|
|
274
|
-
// Map score to severity
|
|
275
173
|
if (score >= 70) return 'critical';
|
|
276
174
|
if (score >= 50) return 'high';
|
|
277
175
|
if (score >= 30) return 'medium';
|
|
@@ -283,36 +181,30 @@ function calculateIssueSeverity(issue) {
|
|
|
283
181
|
|
|
284
182
|
## Fix Mapping
|
|
285
183
|
|
|
286
|
-
| Problem
|
|
287
|
-
|
|
288
|
-
|
|
|
289
|
-
| Context Explosion | sliding_window, path_reference, context_summarization |
|
|
290
|
-
| Long-tail Forgetting | constraint_injection, state_constraints_field, checkpoint |
|
|
291
|
-
| Data Flow Disruption | state_centralization, schema_enforcement, field_normalization |
|
|
292
|
-
| Agent Coordination | error_wrapping, result_validation, flatten_nesting |
|
|
293
|
-
|
|
|
294
|
-
|
|
|
295
|
-
|
|
|
184
|
+
| Problem | Strategies (priority order) |
|
|
185
|
+
|---------|---------------------------|
|
|
186
|
+
| Authoring Violation | eliminate_intermediate_files, minimize_state, context_passing |
|
|
187
|
+
| Context Explosion | sliding_window, path_reference, context_summarization |
|
|
188
|
+
| Long-tail Forgetting | constraint_injection, state_constraints_field, checkpoint |
|
|
189
|
+
| Data Flow Disruption | state_centralization, schema_enforcement, field_normalization |
|
|
190
|
+
| Agent Coordination | error_wrapping, result_validation, flatten_nesting |
|
|
191
|
+
| Token Consumption | prompt_compression, lazy_loading, output_minimization, state_field_reduction |
|
|
192
|
+
| Doc Redundancy | consolidate_to_ssot, centralize_mapping_config |
|
|
193
|
+
| Doc Conflict | reconcile_conflicting_definitions |
|
|
296
194
|
|
|
297
195
|
---
|
|
298
196
|
|
|
299
197
|
## Cross-Category Dependencies
|
|
300
198
|
|
|
301
|
-
Some issues may trigger others:
|
|
302
|
-
|
|
303
199
|
```
|
|
304
|
-
Context Explosion
|
|
305
|
-
|
|
200
|
+
Context Explosion → Long-tail Forgetting
|
|
201
|
+
(Large context pushes important info out)
|
|
306
202
|
|
|
307
|
-
Data Flow Disruption
|
|
308
|
-
|
|
203
|
+
Data Flow Disruption → Agent Coordination Failure
|
|
204
|
+
(Inconsistent data causes agent failures)
|
|
309
205
|
|
|
310
|
-
Agent Coordination Failure
|
|
311
|
-
|
|
206
|
+
Agent Coordination Failure → Context Explosion
|
|
207
|
+
(Failed retries add to context)
|
|
312
208
|
```
|
|
313
209
|
|
|
314
|
-
|
|
315
|
-
1. **P0 Data Flow** - Foundation for other fixes
|
|
316
|
-
2. **P1 Agent Coordination** - Stability
|
|
317
|
-
3. **P2 Context Explosion** - Efficiency
|
|
318
|
-
4. **P3 Long-tail Forgetting** - Quality
|
|
210
|
+
**Fix Order**: P1 Data Flow → P2 Agent → P3 Context → P4 Memory
|