claude-code-workflow 7.2.3 → 7.2.4
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/agents/team-worker.md +2 -2
- package/.claude/skills/team-arch-opt/SKILL.md +1 -1
- package/.claude/skills/team-arch-opt/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-arch-opt/specs/team-config.json +1 -1
- package/.claude/skills/team-brainstorm/SKILL.md +2 -2
- package/.claude/skills/team-brainstorm/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-designer/SKILL.md +2 -2
- package/.claude/skills/team-designer/phases/03-content-generation.md +2 -2
- package/.claude/skills/team-edict/SKILL.md +1 -1
- package/.claude/skills/team-edict/role-specs/xingbu.md +1 -1
- package/.claude/skills/team-edict/roles/coordinator/role.md +4 -4
- package/.claude/skills/team-frontend/SKILL.md +1 -1
- package/.claude/skills/team-frontend/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-frontend-debug/SKILL.md +1 -1
- package/.claude/skills/team-frontend-debug/roles/coordinator/commands/dispatch.md +11 -11
- package/.claude/skills/team-issue/SKILL.md +2 -2
- package/.claude/skills/team-issue/roles/coordinator/commands/monitor.md +2 -2
- package/.claude/skills/team-iterdev/SKILL.md +1 -1
- package/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-lifecycle-v4/SKILL.md +2 -2
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +2 -2
- package/.claude/skills/team-perf-opt/SKILL.md +1 -1
- package/.claude/skills/team-perf-opt/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-perf-opt/roles/coordinator/role.md +1 -1
- package/.claude/skills/team-perf-opt/specs/team-config.json +1 -1
- package/.claude/skills/team-planex/SKILL.md +1 -1
- package/.claude/skills/team-planex/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-quality-assurance/SKILL.md +1 -1
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +1 -1
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +3 -3
- package/.claude/skills/team-review/SKILL.md +1 -1
- package/.claude/skills/team-review/roles/coordinator/commands/dispatch.md +1 -1
- package/.claude/skills/team-review/roles/coordinator/commands/monitor.md +4 -4
- package/.claude/skills/team-roadmap-dev/SKILL.md +1 -1
- package/.claude/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +4 -4
- package/.claude/skills/team-roadmap-dev/specs/pipelines.md +3 -3
- package/.claude/skills/team-roadmap-dev/specs/team-config.json +1 -1
- package/.claude/skills/team-tech-debt/SKILL.md +1 -1
- package/.claude/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-testing/SKILL.md +1 -1
- package/.claude/skills/team-testing/roles/coordinator/commands/dispatch.md +1 -1
- package/.claude/skills/team-testing/roles/coordinator/commands/monitor.md +7 -7
- package/.claude/skills/team-uidesign/SKILL.md +1 -1
- package/.claude/skills/team-uidesign/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-ultra-analyze/SKILL.md +1 -1
- package/.claude/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +5 -5
- package/.claude/skills/team-ultra-analyze/roles/coordinator/role.md +1 -1
- package/.claude/skills/team-ux-improve/SKILL.md +1 -1
- package/.claude/skills/team-ux-improve/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-ux-improve/roles/coordinator/role.md +2 -2
- package/.claude/skills/team-ux-improve/specs/pipelines.md +1 -1
- package/.claude/skills/team-ux-improve/specs/team-config.json +1 -1
- package/.codex/skills/team-arch-opt/SKILL.md +38 -0
- package/.codex/skills/team-arch-opt/instructions/agent-instruction.md +114 -114
- package/.codex/skills/team-brainstorm/SKILL.md +725 -687
- package/.codex/skills/team-coordinate/SKILL.md +38 -0
- package/.codex/skills/team-designer/SKILL.md +691 -653
- package/.codex/skills/team-designer/schemas/tasks-schema.md +180 -180
- package/.codex/skills/team-edict/SKILL.md +781 -742
- package/.codex/skills/team-edict/agents/aggregator.md +246 -246
- package/.codex/skills/team-edict/agents/qa-verifier.md +274 -274
- package/.codex/skills/team-edict/agents/shangshu-dispatcher.md +247 -247
- package/.codex/skills/team-edict/agents/zhongshu-planner.md +198 -198
- package/.codex/skills/team-edict/instructions/agent-instruction.md +177 -177
- package/.codex/skills/team-executor/SKILL.md +38 -0
- package/.codex/skills/team-frontend/SKILL.md +38 -0
- package/.codex/skills/team-frontend-debug/SKILL.md +38 -0
- package/.codex/skills/team-issue/SKILL.md +740 -702
- package/.codex/skills/team-iterdev/SKILL.md +826 -788
- package/.codex/skills/team-lifecycle/SKILL.md +38 -0
- package/.codex/skills/team-lifecycle/agents/analyst.md +6 -6
- package/.codex/skills/team-lifecycle/agents/discuss-agent.md +1 -1
- package/.codex/skills/team-lifecycle/agents/explore-agent.md +3 -3
- package/.codex/skills/team-lifecycle/agents/writer.md +3 -3
- package/.codex/skills/team-lifecycle/phases/01-requirement-clarification.md +1 -1
- package/.codex/skills/team-lifecycle/phases/02-team-initialization.md +1 -1
- package/.codex/skills/team-lifecycle/phases/03-task-chain-creation.md +1 -1
- package/.codex/skills/team-lifecycle/phases/04-pipeline-coordination.md +1 -1
- package/.codex/skills/team-lifecycle/phases/05-completion-report.md +1 -1
- package/.codex/skills/team-lifecycle-v4/SKILL.md +775 -737
- package/.codex/skills/team-perf-opt/SKILL.md +38 -0
- package/.codex/skills/team-perf-opt/instructions/agent-instruction.md +122 -122
- package/.codex/skills/team-planex/SKILL.md +38 -0
- package/.codex/skills/team-planex-v2/SKILL.md +39 -1
- package/.codex/skills/team-quality-assurance/SKILL.md +38 -0
- package/.codex/skills/team-review/SKILL.md +38 -0
- package/.codex/skills/team-roadmap-dev/SKILL.md +38 -0
- package/.codex/skills/team-tech-debt/SKILL.md +38 -0
- package/.codex/skills/team-testing/SKILL.md +38 -0
- package/.codex/skills/team-uidesign/SKILL.md +38 -0
- package/.codex/skills/team-ultra-analyze/SKILL.md +787 -749
- package/.codex/skills/team-ux-improve/SKILL.md +38 -0
- package/ccw/dist/tools/smart-search.d.ts +23 -0
- package/ccw/dist/tools/smart-search.d.ts.map +1 -1
- package/ccw/dist/tools/smart-search.js +41 -10
- package/ccw/dist/tools/smart-search.js.map +1 -1
- package/codex-lens/src/codexlens/config.py +32 -0
- package/codex-lens/src/codexlens/storage/index_tree.py +101 -33
- package/package.json +1 -1
|
@@ -599,3 +599,41 @@ All agents share `discoveries.ndjson` for UX findings.
|
|
|
599
599
|
8. **Lifecycle Balance**: Every spawn_agent has matching close_agent
|
|
600
600
|
9. **Cleanup Temp Files**: Remove wave-{N}.csv after merge
|
|
601
601
|
10. **DO NOT STOP**: Continuous execution until all waves complete
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
---
|
|
605
|
+
|
|
606
|
+
## Coordinator Role Constraints (Main Agent)
|
|
607
|
+
|
|
608
|
+
**CRITICAL**: The coordinator (main agent executing this skill) is responsible for **orchestration only**, NOT implementation.
|
|
609
|
+
|
|
610
|
+
15. **Coordinator Does NOT Execute Code**: The main agent MUST NOT write, modify, or implement any code directly. All implementation work is delegated to spawned team agents. The coordinator only:
|
|
611
|
+
- Spawns agents with task assignments
|
|
612
|
+
- Waits for agent callbacks
|
|
613
|
+
- Merges results and coordinates workflow
|
|
614
|
+
- Manages workflow transitions between phases
|
|
615
|
+
|
|
616
|
+
16. **Patient Waiting is Mandatory**: Agent execution takes significant time (typically 10-30 minutes per phase, sometimes longer). The coordinator MUST:
|
|
617
|
+
- Wait patiently for `wait()` calls to complete
|
|
618
|
+
- NOT skip workflow steps due to perceived delays
|
|
619
|
+
- NOT assume agents have failed just because they're taking time
|
|
620
|
+
- Trust the timeout mechanisms defined in the skill
|
|
621
|
+
|
|
622
|
+
17. **Use send_input for Clarification**: When agents need guidance or appear stuck, the coordinator MUST:
|
|
623
|
+
- Use `send_input()` to ask questions or provide clarification
|
|
624
|
+
- NOT skip the agent or move to next phase prematurely
|
|
625
|
+
- Give agents opportunity to respond before escalating
|
|
626
|
+
- Example: `send_input({ id: agent_id, message: "Please provide status update or clarify blockers" })`
|
|
627
|
+
|
|
628
|
+
18. **No Workflow Shortcuts**: The coordinator MUST NOT:
|
|
629
|
+
- Skip phases or stages defined in the workflow
|
|
630
|
+
- Bypass required approval or review steps
|
|
631
|
+
- Execute dependent tasks before prerequisites complete
|
|
632
|
+
- Assume task completion without explicit agent callback
|
|
633
|
+
- Make up or fabricate agent results
|
|
634
|
+
|
|
635
|
+
19. **Respect Long-Running Processes**: This is a complex multi-agent workflow that requires patience:
|
|
636
|
+
- Total execution time may range from 30-90 minutes or longer
|
|
637
|
+
- Each phase may take 10-30 minutes depending on complexity
|
|
638
|
+
- The coordinator must remain active and attentive throughout the entire process
|
|
639
|
+
- Do not terminate or skip steps due to time concerns
|
|
@@ -97,6 +97,7 @@ interface SearchMetadata {
|
|
|
97
97
|
use_gpu?: boolean;
|
|
98
98
|
cascade_strategy?: string;
|
|
99
99
|
staged_stage2_mode?: string;
|
|
100
|
+
preset?: string;
|
|
100
101
|
}
|
|
101
102
|
interface SearchResult {
|
|
102
103
|
success: boolean;
|
|
@@ -108,6 +109,21 @@ interface SearchResult {
|
|
|
108
109
|
status?: unknown;
|
|
109
110
|
message?: string;
|
|
110
111
|
}
|
|
112
|
+
interface CodexLensConfig {
|
|
113
|
+
config_file?: string;
|
|
114
|
+
index_dir?: string;
|
|
115
|
+
embedding_backend?: string;
|
|
116
|
+
embedding_model?: string;
|
|
117
|
+
reranker_enabled?: boolean;
|
|
118
|
+
reranker_backend?: string;
|
|
119
|
+
reranker_model?: string;
|
|
120
|
+
reranker_top_k?: number;
|
|
121
|
+
api_max_workers?: number;
|
|
122
|
+
api_batch_size?: number;
|
|
123
|
+
cascade_strategy?: string;
|
|
124
|
+
staged_stage2_mode?: string;
|
|
125
|
+
static_graph_enabled?: boolean;
|
|
126
|
+
}
|
|
111
127
|
interface SearchScope {
|
|
112
128
|
workingDirectory: string;
|
|
113
129
|
searchPaths: string[];
|
|
@@ -116,6 +132,12 @@ interface SearchScope {
|
|
|
116
132
|
declare function parseCodexLensJsonOutput(output: string | undefined): any | null;
|
|
117
133
|
declare function parsePlainTextFileMatches(output: string | undefined, scope: SearchScope): SemanticMatch[];
|
|
118
134
|
declare function hasCentralizedVectorArtifacts(indexRoot: unknown): boolean;
|
|
135
|
+
declare function resolveEmbeddingSelection(requestedBackend: string | undefined, requestedModel: string | undefined, config: CodexLensConfig | null | undefined): {
|
|
136
|
+
backend?: string;
|
|
137
|
+
model?: string;
|
|
138
|
+
preset: 'explicit' | 'config' | 'bulk-local-fast';
|
|
139
|
+
note?: string;
|
|
140
|
+
};
|
|
119
141
|
/**
|
|
120
142
|
* Query intent used to adapt RRF weights (Python parity).
|
|
121
143
|
*
|
|
@@ -149,6 +171,7 @@ export declare const __testables: {
|
|
|
149
171
|
parseCodexLensJsonOutput: typeof parseCodexLensJsonOutput;
|
|
150
172
|
parsePlainTextFileMatches: typeof parsePlainTextFileMatches;
|
|
151
173
|
hasCentralizedVectorArtifacts: typeof hasCentralizedVectorArtifacts;
|
|
174
|
+
resolveEmbeddingSelection: typeof resolveEmbeddingSelection;
|
|
152
175
|
};
|
|
153
176
|
export declare function executeInitWithProgress(params: Record<string, unknown>, onProgress?: (progress: ProgressInfo) => void): Promise<SearchResult>;
|
|
154
177
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-search.d.ts","sourceRoot":"","sources":["../../src/tools/smart-search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAU/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAUpD,UAAU,UAAU;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAyMD,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM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AM,EAAE,OAAO,CAAC,EAC/B,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,GAC5C,OAAO,CAAC,YAAY,CAAC,CAsEvB"}
|
|
@@ -68,8 +68,8 @@ const ParamsSchema = z.object({
|
|
|
68
68
|
maxResults: z.number().default(5), // Default 5 with full content
|
|
69
69
|
includeHidden: z.boolean().default(false),
|
|
70
70
|
languages: z.array(z.string()).optional(),
|
|
71
|
-
embeddingBackend: z.string().optional().describe('Embedding backend for action="embed": fastembed/local or litellm/api.'),
|
|
72
|
-
embeddingModel: z.string().optional().describe('Embedding model/profile for action="embed". Examples: "code", "fast", "qwen3-embedding-sf".'),
|
|
71
|
+
embeddingBackend: z.string().optional().describe('Embedding backend for action="embed": fastembed/local or litellm/api. Default bulk preset: local-fast.'),
|
|
72
|
+
embeddingModel: z.string().optional().describe('Embedding model/profile for action="embed". Examples: "code", "fast", "qwen3-embedding-sf". Default bulk preset uses "fast".'),
|
|
73
73
|
apiMaxWorkers: z.number().int().min(1).optional().describe('Max concurrent API embedding workers for action="embed". Recommended: 8-16 for litellm/api when multiple endpoints are configured.'),
|
|
74
74
|
force: z.boolean().default(false).describe('Force regeneration for action="embed".'),
|
|
75
75
|
limit: z.number().default(5), // Default 5 with full content
|
|
@@ -707,6 +707,34 @@ function normalizeEmbeddingBackend(backend) {
|
|
|
707
707
|
}
|
|
708
708
|
return normalized;
|
|
709
709
|
}
|
|
710
|
+
function resolveEmbeddingSelection(requestedBackend, requestedModel, config) {
|
|
711
|
+
const normalizedRequestedBackend = normalizeEmbeddingBackend(requestedBackend);
|
|
712
|
+
const normalizedRequestedModel = requestedModel?.trim() || undefined;
|
|
713
|
+
if (normalizedRequestedBackend) {
|
|
714
|
+
return {
|
|
715
|
+
backend: normalizedRequestedBackend,
|
|
716
|
+
model: normalizedRequestedModel || config?.embedding_model,
|
|
717
|
+
preset: 'explicit',
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
if (normalizedRequestedModel) {
|
|
721
|
+
const inferredBackend = config?.embedding_backend
|
|
722
|
+
|| (['fast', 'code'].includes(normalizedRequestedModel) ? 'fastembed' : undefined);
|
|
723
|
+
return {
|
|
724
|
+
backend: inferredBackend,
|
|
725
|
+
model: normalizedRequestedModel,
|
|
726
|
+
preset: inferredBackend ? 'config' : 'explicit',
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
return {
|
|
730
|
+
backend: 'fastembed',
|
|
731
|
+
model: 'fast',
|
|
732
|
+
preset: 'bulk-local-fast',
|
|
733
|
+
note: config?.embedding_backend && config.embedding_backend !== 'fastembed'
|
|
734
|
+
? `Using recommended bulk indexing preset: local-fast instead of configured ${config.embedding_backend}. Pass embeddingBackend="api" to force remote API embeddings.`
|
|
735
|
+
: 'Using recommended bulk indexing preset: local-fast. Pass embeddingBackend="api" to force remote API embeddings.',
|
|
736
|
+
};
|
|
737
|
+
}
|
|
710
738
|
const EMBED_PROGRESS_PREFIX = '__CCW_EMBED_PROGRESS__';
|
|
711
739
|
function resolveEmbeddingEndpoints(backend) {
|
|
712
740
|
if (backend !== 'litellm') {
|
|
@@ -930,8 +958,9 @@ async function executeEmbedAction(params) {
|
|
|
930
958
|
};
|
|
931
959
|
}
|
|
932
960
|
const currentStatus = await checkIndexStatus(scope.workingDirectory);
|
|
933
|
-
const
|
|
934
|
-
const
|
|
961
|
+
const embeddingSelection = resolveEmbeddingSelection(embeddingBackend, embeddingModel, currentStatus.config);
|
|
962
|
+
const normalizedBackend = embeddingSelection.backend;
|
|
963
|
+
const trimmedModel = embeddingSelection.model;
|
|
935
964
|
const endpoints = resolveEmbeddingEndpoints(normalizedBackend);
|
|
936
965
|
const configuredApiMaxWorkers = currentStatus.config?.api_max_workers;
|
|
937
966
|
const effectiveApiMaxWorkers = typeof apiMaxWorkers === 'number'
|
|
@@ -973,12 +1002,13 @@ async function executeEmbedAction(params) {
|
|
|
973
1002
|
path: scope.workingDirectory,
|
|
974
1003
|
backend: normalizedBackend || indexStatus?.config?.embedding_backend,
|
|
975
1004
|
embeddings_coverage_percent: coverage,
|
|
976
|
-
api_max_workers: effectiveApiMaxWorkers,
|
|
1005
|
+
api_max_workers: normalizedBackend === 'litellm' ? effectiveApiMaxWorkers : undefined,
|
|
977
1006
|
endpoint_count: endpoints.length,
|
|
978
1007
|
use_gpu: true,
|
|
979
1008
|
cascade_strategy: currentStatus.config?.cascade_strategy,
|
|
980
1009
|
staged_stage2_mode: currentStatus.config?.staged_stage2_mode,
|
|
981
|
-
note: progressMessage,
|
|
1010
|
+
note: [embeddingSelection.note, progressMessage].filter(Boolean).join(' | ') || undefined,
|
|
1011
|
+
preset: embeddingSelection.preset,
|
|
982
1012
|
},
|
|
983
1013
|
status: indexStatus,
|
|
984
1014
|
};
|
|
@@ -2131,8 +2161,8 @@ Recommended MCP flow: use **action=\"search\"** for lookups, **action=\"init\"**
|
|
|
2131
2161
|
|
|
2132
2162
|
* **embed**: Generate semantic/vector embeddings for an indexed project.
|
|
2133
2163
|
* *path* (string): Directory to embed (default: current).
|
|
2134
|
-
* *embeddingBackend* (string): 'litellm'/'api' for remote API embeddings, 'fastembed'/'local' for local embeddings.
|
|
2135
|
-
* *embeddingModel* (string): Embedding model/profile to use.
|
|
2164
|
+
* *embeddingBackend* (string): 'litellm'/'api' for remote API embeddings, 'fastembed'/'local' for local embeddings. Default bulk preset: local-fast.
|
|
2165
|
+
* *embeddingModel* (string): Embedding model/profile to use. Default bulk preset uses 'fast'.
|
|
2136
2166
|
* *apiMaxWorkers* (number): Max concurrent API embedding workers. Defaults to auto-sizing from the configured endpoint pool.
|
|
2137
2167
|
* *force* (boolean): Regenerate embeddings even if they already exist.
|
|
2138
2168
|
|
|
@@ -2234,11 +2264,11 @@ Recommended MCP flow: use **action=\"search\"** for lookups, **action=\"init\"**
|
|
|
2234
2264
|
},
|
|
2235
2265
|
embeddingBackend: {
|
|
2236
2266
|
type: 'string',
|
|
2237
|
-
description: 'Embedding backend for action="embed": litellm/api (remote API) or fastembed/local (local GPU/CPU).',
|
|
2267
|
+
description: 'Embedding backend for action="embed": litellm/api (remote API) or fastembed/local (local GPU/CPU). Default bulk preset: local-fast.',
|
|
2238
2268
|
},
|
|
2239
2269
|
embeddingModel: {
|
|
2240
2270
|
type: 'string',
|
|
2241
|
-
description: 'Embedding model/profile for action="embed". Examples: "code", "fast", "qwen3-embedding-sf".',
|
|
2271
|
+
description: 'Embedding model/profile for action="embed". Examples: "code", "fast", "qwen3-embedding-sf". Default bulk preset uses "fast".',
|
|
2242
2272
|
},
|
|
2243
2273
|
apiMaxWorkers: {
|
|
2244
2274
|
type: 'number',
|
|
@@ -2653,6 +2683,7 @@ export const __testables = {
|
|
|
2653
2683
|
parseCodexLensJsonOutput,
|
|
2654
2684
|
parsePlainTextFileMatches,
|
|
2655
2685
|
hasCentralizedVectorArtifacts,
|
|
2686
|
+
resolveEmbeddingSelection,
|
|
2656
2687
|
};
|
|
2657
2688
|
export async function executeInitWithProgress(params, onProgress) {
|
|
2658
2689
|
const path = params.path || '.';
|