sumulige-claude 1.1.2 → 1.2.1
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/.kickoff-hint.txt +3 -2
- package/.claude/CLAUDE.md +138 -0
- package/.claude/README.md +234 -43
- package/.claude/boris-optimizations.md +167 -0
- package/.claude/commands/todos.md +6 -41
- package/.claude/hooks/code-formatter.cjs +0 -0
- package/.claude/hooks/conversation-logger.cjs +222 -0
- package/.claude/hooks/multi-session.cjs +0 -0
- package/.claude/hooks/pre-commit.cjs +0 -0
- package/.claude/hooks/pre-push.cjs +0 -0
- package/.claude/hooks/project-kickoff.cjs +190 -1
- package/.claude/hooks/rag-skill-loader.cjs +0 -0
- package/.claude/hooks/session-restore.cjs +0 -0
- package/.claude/hooks/session-save.cjs +0 -0
- package/.claude/hooks/todo-manager.cjs +141 -262
- package/.claude/hooks/verify-work.cjs +0 -0
- package/.claude/quality-gate.json +9 -3
- package/.claude/rag/skill-index.json +128 -8
- package/.claude/settings.json +115 -0
- package/.claude/settings.local.json +16 -1
- package/.claude/skills/123-skill/SKILL.md +61 -0
- package/.claude/skills/123-skill/examples/basic.md +3 -0
- package/.claude/skills/123-skill/metadata.yaml +30 -0
- package/.claude/skills/123-skill/templates/default.md +3 -0
- package/.claude/skills/SKILLS.md +145 -0
- package/.claude/skills/code-reviewer-123/SKILL.md +61 -0
- package/.claude/skills/code-reviewer-123/examples/basic.md +3 -0
- package/.claude/skills/code-reviewer-123/metadata.yaml +30 -0
- package/.claude/skills/code-reviewer-123/templates/default.md +3 -0
- package/.claude/skills/examples/README.md +47 -0
- package/.claude/skills/examples/basic-task.md +67 -0
- package/.claude/skills/examples/bug-fix-workflow.md +92 -0
- package/.claude/skills/examples/feature-development.md +81 -0
- package/.claude/skills/manus-kickoff/SKILL.md +128 -0
- package/.claude/skills/manus-kickoff/examples/basic.md +84 -0
- package/.claude/skills/manus-kickoff/metadata.yaml +33 -0
- package/.claude/skills/manus-kickoff/templates/PROJECT_KICKOFF.md +89 -0
- package/.claude/skills/manus-kickoff/templates/PROJECT_PROPOSAL.md +227 -0
- package/.claude/skills/manus-kickoff/templates/TASK_PLAN.md +121 -0
- package/.claude/skills/my-skill/SKILL.md +61 -0
- package/.claude/skills/my-skill/examples/basic.md +3 -0
- package/.claude/skills/my-skill/metadata.yaml +30 -0
- package/.claude/skills/my-skill/templates/default.md +3 -0
- package/.claude/skills/template/metadata.yaml +30 -0
- package/.claude/skills/test-skill-name/SKILL.md +61 -0
- package/.claude/skills/test-skill-name/examples/basic.md +3 -0
- package/.claude/skills/test-skill-name/metadata.yaml +30 -0
- package/.claude/skills/test-skill-name/templates/default.md +3 -0
- package/.claude/templates/PROJECT_KICKOFF.md +89 -0
- package/.claude/templates/PROJECT_PROPOSAL.md +227 -0
- package/.claude/templates/TASK_PLAN.md +121 -0
- package/.claude/templates/hooks/README.md +302 -0
- package/.claude/templates/hooks/hook.sh.template +94 -0
- package/.claude/templates/hooks/user-prompt-submit.cjs.template +116 -0
- package/.claude/templates/hooks/user-response-submit.cjs.template +94 -0
- package/.claude/templates/hooks/validate.js +173 -0
- package/.claude/workflow/document-scanner.js +426 -0
- package/.claude/workflow/knowledge-engine.js +941 -0
- package/.claude/workflow/notebooklm/browser.js +1028 -0
- package/.claude/workflow/phases/phase1-research.js +578 -0
- package/.claude/workflow/phases/phase1-research.ts +465 -0
- package/.claude/workflow/phases/phase2-approve.js +722 -0
- package/.claude/workflow/phases/phase3-plan.js +1200 -0
- package/.claude/workflow/phases/phase4-develop.js +894 -0
- package/.claude/workflow/search-cache.js +230 -0
- package/.claude/workflow/templates/approval.md +315 -0
- package/.claude/workflow/templates/development.md +377 -0
- package/.claude/workflow/templates/planning.md +328 -0
- package/.claude/workflow/templates/research.md +250 -0
- package/.claude/workflow/types.js +37 -0
- package/.claude/workflow/web-search.js +278 -0
- package/.claude-plugin/marketplace.json +2 -2
- package/AGENTS.md +200 -0
- package/CHANGELOG.md +25 -14
- package/CLAUDE-template.md +114 -0
- package/README.md +16 -1
- package/cli.js +20 -0
- package/config/official-skills.json +2 -2
- package/config/quality-gate.json +9 -3
- package/development/cache/web-search/search_1193d605f8eb364651fc2f2041b58a31.json +36 -0
- package/development/cache/web-search/search_3798bf06960edc125f744a1abb5b72c5.json +36 -0
- package/development/cache/web-search/search_37c7d4843a53f0d83f1122a6f908a2a3.json +36 -0
- package/development/cache/web-search/search_44166fa0153709ee168485a22aa0ab40.json +36 -0
- package/development/cache/web-search/search_4deaebb1f77e86a8ca066dc5a49c59fd.json +36 -0
- package/development/cache/web-search/search_94da91789466070a7f545612e73c7372.json +36 -0
- package/development/cache/web-search/search_dd5de8491b8b803a3cb01339cd210fb0.json +36 -0
- package/development/knowledge-base/.index.clean.json +0 -0
- package/development/knowledge-base/.index.json +486 -0
- package/development/knowledge-base/test-best-practices.md +29 -0
- package/development/projects/proj_mkh1pazz_ixmt1/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4jvnb_z7rwf/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4jxkd_ewz5a/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4k84n_ni73k/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4wfyd_u9w88/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4wsbo_iahvf/development/projects/proj_mkh4xbpg_4na5w/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4wsbo_iahvf/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4xulg_1ka8x/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4xwhj_gch8j/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase2/requirements.md +226 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase3/PRD.md +345 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase3/TASK_PLAN.md +284 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase3/prototype/README.md +14 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/DEVELOPMENT_LOG.md +35 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/TASKS.md +34 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/.env.example +5 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/README.md +60 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/package.json +25 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/src/index.js +70 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/src/routes/index.js +48 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/tests/health.test.js +20 -0
- package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/tests/jest.config.js +21 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase2/requirements.md +226 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase3/PRD.md +345 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase3/TASK_PLAN.md +284 -0
- package/development/projects/proj_mkh7veqg_3lypc/phase3/prototype/README.md +14 -0
- package/development/projects/proj_mkh8k8fo_rmqn5/phase1/feasibility-report.md +160 -0
- package/development/projects/proj_mkh8xyhy_1vshq/phase1/feasibility-report.md +178 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase1/feasibility-report.md +377 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase2/requirements.md +442 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/api-design.md +800 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/architecture.md +625 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/data-model.md +830 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/risks.md +957 -0
- package/development/projects/proj_mkh8zddd_dhamf/phase3/wbs.md +381 -0
- package/development/todos/.state.json +14 -1
- package/development/todos/INDEX.md +31 -73
- package/development/todos/completed/develop/local-knowledge-index.md +85 -0
- package/development/todos/{active → completed/develop}/todo-system.md +13 -3
- package/development/todos/completed/develop/web-search-integration.md +83 -0
- package/development/todos/completed/test/phase1-e2e-test.md +103 -0
- package/jest.config.js +3 -1
- package/lib/commands.js +1799 -992
- package/lib/marketplace.js +1 -0
- package/package.json +3 -2
- package/project-paradigm.md +313 -0
- package/prompts/how-to-find.md +163 -0
- package/tests/commands.test.js +940 -17
- package/tests/config-manager.test.js +677 -0
- package/tests/config-schema.test.js +425 -0
- package/tests/config-validator.test.js +436 -0
- package/tests/errors.test.js +477 -0
- package/tests/manual/phase1-e2e.sh +389 -0
- package/tests/manual/phase2-test-cases.md +311 -0
- package/tests/manual/phase3-test-cases.md +309 -0
- package/tests/manual/phase4-test-cases.md +414 -0
- package/tests/manual/test-cases.md +417 -0
- package/tests/marketplace.test.js +330 -214
- package/tests/quality-gate.test.js +679 -0
- package/tests/quality-rules.test.js +619 -0
- package/tests/sync-external.test.js +214 -0
- package/tests/update-registry.test.js +251 -0
- package/tests/utils.test.js +12 -8
- package/tests/version-check.test.js +75 -0
- package/tests/web-search.test.js +392 -0
- package/thinkinglens-silent.md +138 -0
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* TODO Manager - AI 自动任务管理系统
|
|
3
|
+
* TODO Manager - AI 自动任务管理系统
|
|
4
4
|
*
|
|
5
5
|
* 功能:
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* - 智能任务创建建议
|
|
6
|
+
* - 自动追踪项目任务
|
|
7
|
+
* - 生成可点击的任务索引
|
|
9
8
|
* - 维护任务状态流转
|
|
9
|
+
* - 静默运行,不打扰工作流
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* 目录结构:
|
|
12
|
+
* development/todos/
|
|
13
|
+
* ├── INDEX.md # 任务总览
|
|
14
|
+
* ├── active/ # 进行中的任务
|
|
15
|
+
* ├── completed/ # 已完成的任务
|
|
16
|
+
* ├── backlog/ # 待办任务
|
|
17
|
+
* └── archived/ # 已归档任务
|
|
13
18
|
*/
|
|
14
19
|
|
|
15
20
|
const fs = require('fs');
|
|
@@ -20,81 +25,55 @@ const TODOS_DIR = path.join(PROJECT_DIR, 'development', 'todos');
|
|
|
20
25
|
const INDEX_FILE = path.join(TODOS_DIR, 'INDEX.md');
|
|
21
26
|
const STATE_FILE = path.join(TODOS_DIR, '.state.json');
|
|
22
27
|
|
|
23
|
-
//
|
|
24
|
-
const
|
|
25
|
-
RESEARCH: 'research',
|
|
26
|
-
DEVELOP: 'develop',
|
|
27
|
-
TEST: 'test'
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const TASK_STAGES = {
|
|
28
|
+
// 任务状态
|
|
29
|
+
const STATUS = {
|
|
31
30
|
ACTIVE: 'active',
|
|
32
31
|
COMPLETED: 'completed',
|
|
33
32
|
BACKLOG: 'backlog',
|
|
34
33
|
ARCHIVED: 'archived'
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
// 图标映射
|
|
38
|
-
const ICONS = {
|
|
39
|
-
research: '📊',
|
|
40
|
-
develop: '💻',
|
|
41
|
-
test: '🧪'
|
|
42
|
-
};
|
|
43
|
-
|
|
44
36
|
// 确保目录存在
|
|
45
37
|
function ensureDirectories() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
for (const stage of Object.values(TASK_STAGES)) {
|
|
50
|
-
dirs.push(path.join(TODOS_DIR, stage));
|
|
51
|
-
for (const type of Object.values(TASK_TYPES)) {
|
|
52
|
-
dirs.push(path.join(TODOS_DIR, stage, type));
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
dirs.forEach(dir => {
|
|
57
|
-
try { fs.mkdirSync(dir, { recursive: true }); } catch (e) {}
|
|
38
|
+
[TODOS_DIR, STATUS.ACTIVE, STATUS.COMPLETED, STATUS.BACKLOG, STATUS.ARCHIVED].forEach(dir => {
|
|
39
|
+
const fullPath = dir.startsWith('/') ? dir : path.join(TODOS_DIR, dir);
|
|
40
|
+
try { fs.mkdirSync(fullPath, { recursive: true }); } catch (e) {}
|
|
58
41
|
});
|
|
59
42
|
}
|
|
60
43
|
|
|
61
44
|
// 扫描任务文件
|
|
62
45
|
function scanTasks() {
|
|
63
46
|
const tasks = {
|
|
64
|
-
active:
|
|
65
|
-
completed:
|
|
66
|
-
backlog:
|
|
67
|
-
archived:
|
|
47
|
+
active: [],
|
|
48
|
+
completed: [],
|
|
49
|
+
backlog: [],
|
|
50
|
+
archived: []
|
|
68
51
|
};
|
|
69
52
|
|
|
70
|
-
for (const [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
stage: stage
|
|
95
|
-
};
|
|
96
|
-
});
|
|
97
|
-
}
|
|
53
|
+
for (const [key, dirName] of Object.entries(STATUS)) {
|
|
54
|
+
const dir = path.join(TODOS_DIR, dirName);
|
|
55
|
+
if (!fs.existsSync(dir)) continue;
|
|
56
|
+
|
|
57
|
+
const files = fs.readdirSync(dir)
|
|
58
|
+
.filter(f => f.endsWith('.md') && f !== '_README.md');
|
|
59
|
+
|
|
60
|
+
tasks[dirName] = files.map(f => {
|
|
61
|
+
const filePath = path.join(dir, f);
|
|
62
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
63
|
+
const titleMatch = content.match(/^#\s+(.+)$/m);
|
|
64
|
+
const statusMatch = content.match(/\*\*状态\*\*:\s*([\u{1F300}-\u{1F9FF}\s]+)/u);
|
|
65
|
+
const priorityMatch = content.match(/\*\*优先级\*\*:\s*(P[0-3])/);
|
|
66
|
+
const branchMatch = content.match(/\*\*分支\*\*:\s*`([^`]+)`/);
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
file: f,
|
|
70
|
+
title: titleMatch ? titleMatch[1] : path.basename(f, '.md'),
|
|
71
|
+
status: statusMatch ? statusMatch[1].trim() : '🚧 进行中',
|
|
72
|
+
priority: priorityMatch ? priorityMatch[1] : 'P2',
|
|
73
|
+
branch: branchMatch ? branchMatch[1] : null,
|
|
74
|
+
path: `${dirName}/${f}`
|
|
75
|
+
};
|
|
76
|
+
});
|
|
98
77
|
}
|
|
99
78
|
|
|
100
79
|
return tasks;
|
|
@@ -104,211 +83,138 @@ function scanTasks() {
|
|
|
104
83
|
function generateIndex(tasks) {
|
|
105
84
|
const now = new Date().toISOString().split('T')[0];
|
|
106
85
|
|
|
107
|
-
// 计算总数
|
|
108
|
-
const activeCount = tasks.active.research.length + tasks.active.develop.length + tasks.active.test.length;
|
|
109
|
-
const completedCount = tasks.completed.research.length + tasks.completed.develop.length + tasks.completed.test.length;
|
|
110
|
-
const backlogCount = tasks.backlog.research.length + tasks.backlog.develop.length + tasks.backlog.test.length;
|
|
111
|
-
|
|
112
86
|
let md = `# 项目任务追踪系统
|
|
113
87
|
|
|
114
|
-
>
|
|
115
|
-
> **最后更新**: ${now}
|
|
116
|
-
|
|
117
|
-
@version: 2.0.0
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## 📊 项目进度
|
|
122
|
-
|
|
123
|
-
| 阶段 | 进度 | 状态 |
|
|
124
|
-
|------|------|------|
|
|
125
|
-
| Phase 1: MVP 智能监控 | 80% | 🚧 进行中 |
|
|
126
|
-
| Phase 2: V1.5 动态调整 | 0% | 📋 待规划 |
|
|
127
|
-
| Phase 3: V2.0 AI 教练 | 0% | 📋 待规划 |
|
|
128
|
-
|
|
129
|
-
---
|
|
88
|
+
> 本目录由 AI 自动维护,记录项目开发任务和进度
|
|
130
89
|
|
|
131
|
-
|
|
90
|
+
**最后更新**: ${now}
|
|
132
91
|
|
|
133
|
-
|
|
134
|
-
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
135
|
-
│ RESEARCH │ → │ DEVELOP │ → │ TEST │
|
|
136
|
-
│ 📊 研究 │ │ 💻 开发 │ │ 🧪 测试 │
|
|
137
|
-
└─────────────┘ └─────────────┘ └─────────────┘
|
|
138
|
-
\`\`\`
|
|
92
|
+
@version: 1.0.0
|
|
139
93
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
## 📁 目录结构
|
|
94
|
+
## 目录结构
|
|
143
95
|
|
|
144
96
|
\`\`\`
|
|
145
97
|
development/todos/
|
|
146
98
|
├── INDEX.md # 本文件 - 任务总览
|
|
147
|
-
├──
|
|
148
|
-
├──
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
│ └── test/ # 🧪 测试中 (${tasks.active.test.length})
|
|
152
|
-
├── completed/ # 已完成的任务 (${completedCount})
|
|
153
|
-
│ ├── research/
|
|
154
|
-
│ ├── develop/
|
|
155
|
-
│ └── test/
|
|
156
|
-
├── backlog/ # 待规划的任务 (${backlogCount})
|
|
157
|
-
└── archived/ # 已归档的任务
|
|
99
|
+
├── active/ # 进行中的任务 (${tasks.active.length})
|
|
100
|
+
├── completed/ # 已完成的任务 (${tasks.completed.length})
|
|
101
|
+
├── backlog/ # 待规划的任务 (${tasks.backlog.length})
|
|
102
|
+
└── archived/ # 已归档的任务 (${tasks.archived.length})
|
|
158
103
|
\`\`\`
|
|
159
104
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
## 🚧 当前进行中的任务
|
|
105
|
+
## 快速跳转
|
|
163
106
|
|
|
164
|
-
### 📊 研究任务
|
|
165
107
|
`;
|
|
166
108
|
|
|
167
|
-
//
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
} else {
|
|
173
|
-
md += `暂无\n`;
|
|
174
|
-
}
|
|
175
|
-
md += `\n### 💻 开发任务\n`;
|
|
176
|
-
|
|
177
|
-
// 开发任务
|
|
178
|
-
if (tasks.active.develop.length > 0) {
|
|
179
|
-
tasks.active.develop.forEach(t => {
|
|
180
|
-
md += `- [${t.priority}] [${t.title}](./${t.path}) - ${t.status}\n`;
|
|
109
|
+
// 进行中的任务
|
|
110
|
+
md += `## 🚧 进行中的任务 (${tasks.active.length})\n\n`;
|
|
111
|
+
if (tasks.active.length > 0) {
|
|
112
|
+
tasks.active.forEach(t => {
|
|
113
|
+
md += `- [${t.priority}] [${t.title}](./${t.path}) - ${t.status}${t.branch ? ` \`branch: ${t.branch}\`` : ''}\n`;
|
|
181
114
|
});
|
|
182
115
|
} else {
|
|
183
|
-
md +=
|
|
116
|
+
md += `*暂无进行中的任务*\n`;
|
|
184
117
|
}
|
|
185
|
-
md += `\n
|
|
186
|
-
|
|
187
|
-
//
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
md += `暂无\n`;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
md += `\n---\n\n## ✅ 最近完成的任务\n\n### 💻 开发任务\n`;
|
|
197
|
-
|
|
198
|
-
// 最近完成的开发任务
|
|
199
|
-
if (tasks.completed.develop.length > 0) {
|
|
200
|
-
tasks.completed.develop.slice(0, 5).forEach(t => {
|
|
201
|
-
md += `- [${t.title}](./${t.path}) ${t.status}\n`;
|
|
118
|
+
md += `\n`;
|
|
119
|
+
|
|
120
|
+
// 最近完成的任务(最多5个)
|
|
121
|
+
md += `## ✅ 最近完成的任务\n\n`;
|
|
122
|
+
const recentCompleted = tasks.completed.slice(0, 5);
|
|
123
|
+
if (recentCompleted.length > 0) {
|
|
124
|
+
recentCompleted.forEach(t => {
|
|
125
|
+
md += `- [${t.title}](./${t.path})\n`;
|
|
202
126
|
});
|
|
127
|
+
if (tasks.completed.length > 5) {
|
|
128
|
+
md += `- ...还有 ${tasks.completed.length - 5} 个已完成任务\n`;
|
|
129
|
+
}
|
|
203
130
|
} else {
|
|
204
|
-
md +=
|
|
131
|
+
md += `*暂无已完成的任务*\n`;
|
|
205
132
|
}
|
|
133
|
+
md += `\n`;
|
|
206
134
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
md += `- [${t.title}](./${t.path}) ${t.status}\n`;
|
|
135
|
+
// 待办任务
|
|
136
|
+
md += `## 📋 待办任务 (${tasks.backlog.length})\n\n`;
|
|
137
|
+
if (tasks.backlog.length > 0) {
|
|
138
|
+
tasks.backlog.slice(0, 10).forEach(t => {
|
|
139
|
+
md += `- [${t.priority}] [${t.title}](./${t.path})\n`;
|
|
213
140
|
});
|
|
141
|
+
if (tasks.backlog.length > 10) {
|
|
142
|
+
md += `- ...还有 ${tasks.backlog.length - 10} 个待办任务\n`;
|
|
143
|
+
}
|
|
214
144
|
} else {
|
|
215
|
-
md +=
|
|
145
|
+
md += `*暂无待办任务*\n`;
|
|
216
146
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
md +=
|
|
222
|
-
md +=
|
|
223
|
-
md +=
|
|
224
|
-
md +=
|
|
225
|
-
md +=
|
|
226
|
-
|
|
147
|
+
md += `\n`;
|
|
148
|
+
|
|
149
|
+
// 全部目录链接
|
|
150
|
+
md += `## 全部目录\n\n`;
|
|
151
|
+
md += `- [🚧 所有进行中的任务](./active/) - 当前开发重点\n`;
|
|
152
|
+
md += `- [✅ 所有已完成的任务](./completed/) - 完整历史\n`;
|
|
153
|
+
md += `- [📋 所有待办任务](./backlog/) - 待规划\n`;
|
|
154
|
+
md += `- [📦 所有已归档任务](./archived/) - 历史记录\n`;
|
|
155
|
+
md += `\n`;
|
|
156
|
+
|
|
157
|
+
// 使用说明
|
|
158
|
+
md += `## 使用方式\n\n`;
|
|
159
|
+
md += `### 查看任务\n`;
|
|
160
|
+
md += `点击上方链接跳转到对应目录,或使用:\n`;
|
|
161
|
+
md += `\`\`\`bash\n`;
|
|
162
|
+
md += `# 查看进行中的任务\n`;
|
|
163
|
+
md += `cat development/todos/active/*.md\n\n`;
|
|
164
|
+
md += `# 查看特定任务\n`;
|
|
165
|
+
md += `cat development/todos/active/feature-name.md\n`;
|
|
227
166
|
md += `\`\`\`\n\n`;
|
|
228
|
-
|
|
229
167
|
md += `### 创建新任务\n`;
|
|
230
|
-
md += `在 Claude Code 中:\n
|
|
231
|
-
md +=
|
|
232
|
-
md +=
|
|
233
|
-
md +=
|
|
234
|
-
|
|
235
|
-
md += `### 更新任务状态\n
|
|
236
|
-
md +=
|
|
168
|
+
md += `在 Claude Code 中:\n`;
|
|
169
|
+
md += `\`\`\`\n`;
|
|
170
|
+
md += `创建一个新任务:实现用户登录功能\n`;
|
|
171
|
+
md += `\`\`\`\n\n`;
|
|
172
|
+
md += `AI 会自动在 \`active/\` 目录创建对应的任务文件。\n\n`;
|
|
173
|
+
md += `### 更新任务状态\n`;
|
|
174
|
+
md += `\`\`\`\n`;
|
|
175
|
+
md += `将 [任务名] 标记为完成\n`;
|
|
176
|
+
md += `\`\`\`\n\n`;
|
|
177
|
+
md += `AI 会自动将任务移动到 \`completed/\` 目录。\n\n`;
|
|
237
178
|
|
|
238
|
-
md += `---\n\n
|
|
179
|
+
md += `---\n\n`;
|
|
180
|
+
md += `> **维护说明**: 本系统由 AI 自动维护,请勿手动编辑(除非你知道自己在做什么)\n`;
|
|
239
181
|
|
|
240
182
|
return md;
|
|
241
183
|
}
|
|
242
184
|
|
|
243
|
-
// 加载和保存状态
|
|
244
|
-
function loadState() {
|
|
245
|
-
if (fs.existsSync(STATE_FILE)) {
|
|
246
|
-
try {
|
|
247
|
-
return JSON.parse(fs.readFileSync(STATE_FILE, 'utf-8'));
|
|
248
|
-
} catch (e) {
|
|
249
|
-
return { tasks: {}, transitions: [] };
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return { tasks: {}, transitions: [] };
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
function saveState(state) {
|
|
256
|
-
fs.writeFileSync(STATE_FILE, JSON.stringify(state, null, 2));
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
// 检查是否需要自动流转
|
|
260
|
-
function checkAutoTransition(tasks, state) {
|
|
261
|
-
const suggestions = [];
|
|
262
|
-
|
|
263
|
-
// 检查刚完成的开发任务,建议创建测试任务
|
|
264
|
-
const completedDevelop = tasks.completed.develop.filter(t => {
|
|
265
|
-
const key = `completed_develop_${t.file}`;
|
|
266
|
-
return !state.tasks[key]; // 首次完成
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
completedDevelop.forEach(t => {
|
|
270
|
-
const testTaskName = t.file.replace('.md', '-test.md');
|
|
271
|
-
const testPath = path.join(TODOS_DIR, 'active', 'test', testTaskName);
|
|
272
|
-
|
|
273
|
-
if (!fs.existsSync(testPath)) {
|
|
274
|
-
suggestions.push({
|
|
275
|
-
type: 'create_test',
|
|
276
|
-
message: `💡 建议为 "${t.title}" 创建测试任务`,
|
|
277
|
-
developTask: t,
|
|
278
|
-
testTask: testTaskName,
|
|
279
|
-
template: `_templates/test.md`
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
// 标记已处理
|
|
284
|
-
const key = `completed_develop_${t.file}`;
|
|
285
|
-
state.tasks[key] = { completed: true, notified: true };
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
return { suggestions, state };
|
|
289
|
-
}
|
|
290
|
-
|
|
291
185
|
// 更新索引
|
|
292
186
|
function updateIndex() {
|
|
293
187
|
try {
|
|
294
188
|
ensureDirectories();
|
|
295
189
|
const tasks = scanTasks();
|
|
296
|
-
const state = loadState();
|
|
297
|
-
|
|
298
|
-
// 检查自动流转
|
|
299
|
-
const { suggestions, state: newState } = checkAutoTransition(tasks, state);
|
|
300
|
-
|
|
301
|
-
// 生成索引
|
|
302
190
|
const index = generateIndex(tasks);
|
|
303
|
-
fs.writeFileSync(INDEX_FILE, index);
|
|
304
191
|
|
|
305
|
-
//
|
|
306
|
-
|
|
192
|
+
// 检查是否需要更新 - 比较任务总数
|
|
193
|
+
let needsUpdate = true;
|
|
194
|
+
if (fs.existsSync(INDEX_FILE)) {
|
|
195
|
+
const existing = fs.readFileSync(INDEX_FILE, 'utf-8');
|
|
196
|
+
// 从现有索引中提取任务数量
|
|
197
|
+
const activeMatch = existing.match(/## 🚧 进行中的任务 \((\d+)\)/);
|
|
198
|
+
const completedMatch = existing.match(/## ✅ 最近完成的任务/);
|
|
199
|
+
const existingActive = activeMatch ? parseInt(activeMatch[1], 10) : 0;
|
|
200
|
+
const newActive = tasks.active.length;
|
|
201
|
+
|
|
202
|
+
// 如果活跃任务数量相同且没有完成任务内容变化,则不更新
|
|
203
|
+
if (existingActive === newActive && tasks.completed.length === 0) {
|
|
204
|
+
// 检查现有索引是否已有完成任务
|
|
205
|
+
const hasCompletedInExisting = existing.includes('[completed/') || existing.includes('./completed/');
|
|
206
|
+
const hasCompletedNow = tasks.completed.length > 0;
|
|
207
|
+
needsUpdate = hasCompletedInExisting !== hasCompletedNow;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (needsUpdate) {
|
|
212
|
+
fs.writeFileSync(INDEX_FILE, index);
|
|
213
|
+
}
|
|
307
214
|
|
|
308
|
-
return { tasks,
|
|
215
|
+
return { tasks, updated: needsUpdate };
|
|
309
216
|
} catch (e) {
|
|
310
|
-
|
|
311
|
-
return { tasks: { active: { research: [], develop: [], test: [] }, completed: { research: [], develop: [], test: [] } }, suggestions: [], updated: false };
|
|
217
|
+
return { tasks: { active: [], completed: [], backlog: [], archived: [] }, updated: false };
|
|
312
218
|
}
|
|
313
219
|
}
|
|
314
220
|
|
|
@@ -316,28 +222,13 @@ function updateIndex() {
|
|
|
316
222
|
function main() {
|
|
317
223
|
const result = updateIndex();
|
|
318
224
|
|
|
319
|
-
//
|
|
320
|
-
if (result.suggestions && result.suggestions.length > 0) {
|
|
321
|
-
console.log('\n📋 [任务流转] 检测到 ' + result.suggestions.length + ' 个自动流转建议:\n');
|
|
322
|
-
result.suggestions.forEach((s, i) => {
|
|
323
|
-
console.log(` ${i + 1}. ${s.message}`);
|
|
324
|
-
});
|
|
325
|
-
console.log('');
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
// 在 AgentStop 时输出摘要
|
|
225
|
+
// 在 AgentStop 或特定事件时输出摘要
|
|
329
226
|
const eventType = process.env.CLAUDE_EVENT_TYPE || '';
|
|
330
227
|
if (eventType === 'AgentStop') {
|
|
331
|
-
const active = result.tasks
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
if (activeTotal > 0 || completedTotal > 0) {
|
|
337
|
-
console.log(`\n📋 [任务追踪]`);
|
|
338
|
-
console.log(` 进行中: ${activeTotal} 个 (📊 ${active.research.length} | 💻 ${active.develop.length} | 🧪 ${active.test.length})`);
|
|
339
|
-
console.log(` 已完成: ${completedTotal} 个`);
|
|
340
|
-
console.log(` 查看: ${path.relative(PROJECT_DIR, INDEX_FILE)}\n`);
|
|
228
|
+
const { active, completed } = result.tasks;
|
|
229
|
+
if (active.length > 0) {
|
|
230
|
+
console.log(`\n📋 [任务追踪] ${active.length} 个进行中, ${completed.length} 个已完成`);
|
|
231
|
+
console.log(` 查看: development/todos/INDEX.md\n`);
|
|
341
232
|
}
|
|
342
233
|
}
|
|
343
234
|
|
|
@@ -349,18 +240,6 @@ if (require.main === module) {
|
|
|
349
240
|
if (process.argv[2] === '--force') {
|
|
350
241
|
updateIndex();
|
|
351
242
|
console.log('✅ Task index updated');
|
|
352
|
-
} else if (process.argv[2] === '--suggest') {
|
|
353
|
-
const result = updateIndex();
|
|
354
|
-
if (result.suggestions.length > 0) {
|
|
355
|
-
console.log('\n💡 自动流转建议:\n');
|
|
356
|
-
result.suggestions.forEach((s, i) => {
|
|
357
|
-
console.log(`${i + 1}. ${s.message}`);
|
|
358
|
-
console.log(` 开发任务: ${s.developTask.file}`);
|
|
359
|
-
console.log(` 测试任务: ${s.testTask}`);
|
|
360
|
-
});
|
|
361
|
-
} else {
|
|
362
|
-
console.log('✅ 无待处理的流转建议');
|
|
363
|
-
}
|
|
364
243
|
} else {
|
|
365
244
|
main();
|
|
366
245
|
}
|
|
File without changes
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"enabled": true,
|
|
3
|
-
"severity": "
|
|
3
|
+
"severity": "error",
|
|
4
4
|
"rules": [
|
|
5
5
|
{
|
|
6
6
|
"id": "line-count-limit",
|
|
7
7
|
"enabled": true,
|
|
8
|
-
"severity": "
|
|
8
|
+
"severity": "warn",
|
|
9
9
|
"config": {
|
|
10
|
-
"maxLines":
|
|
10
|
+
"maxLines": 3000,
|
|
11
|
+
"exclude": [
|
|
12
|
+
"node_modules/**",
|
|
13
|
+
"package-lock.json",
|
|
14
|
+
".claude/skills/**",
|
|
15
|
+
"lib/commands.js"
|
|
16
|
+
]
|
|
11
17
|
}
|
|
12
18
|
},
|
|
13
19
|
{
|
|
@@ -1,15 +1,135 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"last_updated": "2026-01-11",
|
|
2
4
|
"skills": [
|
|
3
5
|
{
|
|
4
|
-
"name": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
"name": "frontend-design",
|
|
7
|
+
"keywords": ["frontend", "ui", "react", "vue", "svelte", "design", "interface", "component", "web", "styling", "tailwind", "css"],
|
|
8
|
+
"description": "Create distinctive, production-grade frontend interfaces with high design quality",
|
|
9
|
+
"trigger": "when user asks to build web components, pages, artifacts, posters, or applications"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "docx",
|
|
13
|
+
"keywords": ["docx", "word", "document", "office", "microsoft", "doc", "editing", "tracked changes", "comments"],
|
|
14
|
+
"description": "Comprehensive document creation, editing, and analysis with support for tracked changes and comments",
|
|
15
|
+
"trigger": "when working with .docx files for creating, editing, or analyzing documents"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "pdf",
|
|
19
|
+
"keywords": ["pdf", "form", "fill", "extract", "merge", "split", "acrobat", "fillable"],
|
|
20
|
+
"description": "Comprehensive PDF manipulation toolkit for extracting text, creating new PDFs, and handling forms",
|
|
21
|
+
"trigger": "when working with PDF forms, extraction, or programmatic processing"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "pptx",
|
|
25
|
+
"keywords": ["pptx", "powerpoint", "slide", "presentation", "deck", "microsoft", "office"],
|
|
26
|
+
"description": "Presentation creation, editing, and analysis with layout support",
|
|
27
|
+
"trigger": "when working with presentations (.pptx files)"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "xlsx",
|
|
31
|
+
"keywords": ["xlsx", "excel", "spreadsheet", "csv", "tsv", "formula", "chart", "data analysis"],
|
|
32
|
+
"description": "Comprehensive spreadsheet creation, editing, and analysis with formula support",
|
|
33
|
+
"trigger": "when working with spreadsheets for reading, analyzing, or creating data"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "canvas-design",
|
|
37
|
+
"keywords": ["art", "design", "canvas", "poster", "visual", "creative", "generative", "algorithmic"],
|
|
38
|
+
"description": "Create beautiful visual art in .png and .pdf documents using design philosophy",
|
|
39
|
+
"trigger": "when user asks to create a poster, piece of art, design, or other static visual piece"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "mcp-builder",
|
|
43
|
+
"keywords": ["mcp", "api", "server", "integration", "tool", "model context protocol", "external service"],
|
|
44
|
+
"description": "Guide for creating high-quality MCP servers that enable LLMs to interact with external services",
|
|
45
|
+
"trigger": "when building MCP servers to integrate external APIs or services"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "webapp-testing",
|
|
49
|
+
"keywords": ["test", "testing", "playwright", "browser", "automation", "e2e", "screenshot"],
|
|
50
|
+
"description": "Toolkit for interacting with and testing local web applications using Playwright",
|
|
51
|
+
"trigger": "when testing frontend functionality, debugging UI behavior, or capturing browser screenshots"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "orchestration",
|
|
55
|
+
"keywords": ["agent", "multi-agent", "workflow", "coordination", "parallel", "distributed"],
|
|
56
|
+
"description": "Multi-agent orchestration with cc-mirror tasks and domain-specific workflows",
|
|
57
|
+
"trigger": "when coordinating multiple agents or workflows for complex tasks"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "algorithmic-art",
|
|
61
|
+
"keywords": ["p5.js", "generative", "algorithmic", "art", "creative", "random", "flow field", "particle"],
|
|
62
|
+
"description": "Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration",
|
|
63
|
+
"trigger": "when user requests creating art using code, generative art, or algorithmic art"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "slack-gif-creator",
|
|
67
|
+
"keywords": ["gif", "slack", "animated", "animation", "meme", "visual"],
|
|
68
|
+
"description": "Knowledge and utilities for creating animated GIFs optimized for Slack",
|
|
69
|
+
"trigger": "when user requests animated GIFs for Slack"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "theme-factory",
|
|
73
|
+
"keywords": ["theme", "style", "color", "typography", "branding", "design system"],
|
|
74
|
+
"description": "Toolkit for styling artifacts with a theme - 10 pre-set themes with colors/fonts",
|
|
75
|
+
"trigger": "when applying consistent theming to documents, slides, or web pages"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "skill-creator",
|
|
79
|
+
"keywords": ["skill", "create skill", "custom skill", "extend", "workflow"],
|
|
80
|
+
"description": "Guide for creating effective skills that extend Claude's capabilities",
|
|
81
|
+
"trigger": "when user wants to create a new skill or update an existing skill"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "doc-coauthoring",
|
|
85
|
+
"keywords": ["documentation", "doc", "proposal", "spec", "technical spec", "decision doc", "writing"],
|
|
86
|
+
"description": "Guide users through structured workflow for co-authoring documentation",
|
|
87
|
+
"trigger": "when user wants to write documentation, proposals, technical specs, or decision docs"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "brand-guidelines",
|
|
91
|
+
"keywords": ["brand", "anthropic", "color", "typography", "style", "guidelines"],
|
|
92
|
+
"description": "Applies Anthropic's official brand colors and typography to artifacts",
|
|
93
|
+
"trigger": "when brand colors or style guidelines apply to the artifact"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "internal-comms",
|
|
97
|
+
"keywords": ["internal", "communication", "status report", "newsletter", "faq", "company", "update"],
|
|
98
|
+
"description": "Resources for writing internal communications in company-preferred formats",
|
|
99
|
+
"trigger": "when asked to write internal communications like status reports or newsletters"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "web-artifacts-builder",
|
|
103
|
+
"keywords": ["artifact", "html", "react", "complex", "state", "routing", "shadcn"],
|
|
104
|
+
"description": "Tools for creating elaborate, multi-component HTML artifacts using modern frontend web technologies",
|
|
105
|
+
"trigger": "for complex artifacts requiring state management, routing, or shadcn/ui components"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "dev-browser",
|
|
109
|
+
"keywords": ["browser", "scraping", "automation", "puppet", "playwright", "web"],
|
|
110
|
+
"description": "Browser automation with persistent state for testing and scraping",
|
|
111
|
+
"trigger": "when needing browser automation or web scraping capabilities"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "zai-cli",
|
|
115
|
+
"keywords": ["z.ai", "vision", "search", "github", "exploration", "analysis"],
|
|
116
|
+
"description": "Z.AI vision, search, and GitHub exploration CLI tools",
|
|
117
|
+
"trigger": "when needing vision analysis, web search, or GitHub repository exploration"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "gastown",
|
|
121
|
+
"keywords": ["gastown", "multi-agent", "orchestrator", "coordination"],
|
|
122
|
+
"description": "Multi-agent orchestrator for complex task coordination",
|
|
123
|
+
"trigger": "when orchestrating multiple agents for complex workflows"
|
|
10
124
|
}
|
|
11
125
|
],
|
|
12
126
|
"auto_load": {
|
|
13
|
-
"enabled": true
|
|
127
|
+
"enabled": true,
|
|
128
|
+
"confidence_threshold": 0.7,
|
|
129
|
+
"max_skills_per_task": 3
|
|
130
|
+
},
|
|
131
|
+
"fallback": {
|
|
132
|
+
"enabled": true,
|
|
133
|
+
"skill": "frontend-design"
|
|
14
134
|
}
|
|
15
|
-
}
|
|
135
|
+
}
|