monoco-toolkit 0.3.11__py3-none-any.whl → 0.4.0__py3-none-any.whl
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.
- monoco/core/automation/__init__.py +40 -0
- monoco/core/automation/field_watcher.py +296 -0
- monoco/core/automation/handlers.py +805 -0
- monoco/core/config.py +29 -11
- monoco/core/daemon/__init__.py +5 -0
- monoco/core/daemon/pid.py +290 -0
- monoco/core/git.py +15 -0
- monoco/core/hooks/context.py +74 -13
- monoco/core/injection.py +86 -8
- monoco/core/integrations.py +0 -24
- monoco/core/router/__init__.py +17 -0
- monoco/core/router/action.py +202 -0
- monoco/core/scheduler/__init__.py +63 -0
- monoco/core/scheduler/base.py +152 -0
- monoco/core/scheduler/engines.py +175 -0
- monoco/core/scheduler/events.py +197 -0
- monoco/core/scheduler/local.py +377 -0
- monoco/core/setup.py +9 -0
- monoco/core/sync.py +199 -4
- monoco/core/watcher/__init__.py +63 -0
- monoco/core/watcher/base.py +382 -0
- monoco/core/watcher/dropzone.py +152 -0
- monoco/core/watcher/im.py +460 -0
- monoco/core/watcher/issue.py +303 -0
- monoco/core/watcher/memo.py +192 -0
- monoco/core/watcher/task.py +238 -0
- monoco/daemon/app.py +3 -60
- monoco/daemon/commands.py +459 -25
- monoco/daemon/events.py +34 -0
- monoco/daemon/scheduler.py +157 -201
- monoco/daemon/services.py +42 -243
- monoco/features/agent/__init__.py +25 -7
- monoco/features/agent/cli.py +91 -57
- monoco/features/agent/engines.py +31 -170
- monoco/features/agent/resources/en/AGENTS.md +14 -14
- monoco/features/agent/resources/en/skills/monoco_role_engineer/SKILL.md +101 -0
- monoco/features/agent/resources/en/skills/monoco_role_manager/SKILL.md +95 -0
- monoco/features/agent/resources/en/skills/monoco_role_planner/SKILL.md +177 -0
- monoco/features/agent/resources/en/skills/monoco_role_reviewer/SKILL.md +139 -0
- monoco/features/agent/resources/zh/skills/monoco_role_engineer/SKILL.md +101 -0
- monoco/features/agent/resources/zh/skills/monoco_role_manager/SKILL.md +95 -0
- monoco/features/agent/resources/zh/skills/monoco_role_planner/SKILL.md +177 -0
- monoco/features/agent/resources/zh/skills/monoco_role_reviewer/SKILL.md +139 -0
- monoco/features/agent/worker.py +1 -1
- monoco/features/hooks/__init__.py +61 -6
- monoco/features/hooks/commands.py +281 -271
- monoco/features/hooks/dispatchers/__init__.py +23 -0
- monoco/features/hooks/dispatchers/agent_dispatcher.py +486 -0
- monoco/features/hooks/dispatchers/git_dispatcher.py +478 -0
- monoco/features/hooks/manager.py +357 -0
- monoco/features/hooks/models.py +262 -0
- monoco/features/hooks/parser.py +322 -0
- monoco/features/hooks/universal_interceptor.py +503 -0
- monoco/features/im/__init__.py +67 -0
- monoco/features/im/core.py +782 -0
- monoco/features/im/models.py +311 -0
- monoco/features/issue/commands.py +133 -60
- monoco/features/issue/core.py +385 -40
- monoco/features/issue/domain_commands.py +0 -19
- monoco/features/issue/resources/en/AGENTS.md +17 -122
- monoco/features/issue/resources/hooks/agent/before-tool.sh +102 -0
- monoco/features/issue/resources/hooks/agent/session-start.sh +88 -0
- monoco/features/issue/resources/hooks/{post-checkout.sh → git/git-post-checkout.sh} +10 -9
- monoco/features/issue/resources/hooks/git/git-pre-commit.sh +31 -0
- monoco/features/issue/resources/hooks/{pre-push.sh → git/git-pre-push.sh} +7 -13
- monoco/features/issue/resources/zh/AGENTS.md +18 -123
- monoco/features/memo/cli.py +15 -64
- monoco/features/memo/core.py +6 -34
- monoco/features/memo/models.py +24 -15
- monoco/features/memo/resources/en/AGENTS.md +31 -0
- monoco/features/memo/resources/zh/AGENTS.md +28 -5
- monoco/features/spike/commands.py +5 -3
- monoco/main.py +5 -3
- {monoco_toolkit-0.3.11.dist-info → monoco_toolkit-0.4.0.dist-info}/METADATA +1 -1
- monoco_toolkit-0.4.0.dist-info/RECORD +170 -0
- monoco/core/execution.py +0 -67
- monoco/features/agent/apoptosis.py +0 -44
- monoco/features/agent/manager.py +0 -127
- monoco/features/agent/resources/atoms/atom-code-dev.yaml +0 -61
- monoco/features/agent/resources/atoms/atom-issue-lifecycle.yaml +0 -73
- monoco/features/agent/resources/atoms/atom-knowledge.yaml +0 -55
- monoco/features/agent/resources/atoms/atom-review.yaml +0 -60
- monoco/features/agent/resources/en/skills/monoco_atom_core/SKILL.md +0 -99
- monoco/features/agent/resources/en/skills/monoco_workflow_agent_engineer/SKILL.md +0 -94
- monoco/features/agent/resources/en/skills/monoco_workflow_agent_manager/SKILL.md +0 -93
- monoco/features/agent/resources/en/skills/monoco_workflow_agent_planner/SKILL.md +0 -85
- monoco/features/agent/resources/en/skills/monoco_workflow_agent_reviewer/SKILL.md +0 -114
- monoco/features/agent/resources/workflows/workflow-dev.yaml +0 -83
- monoco/features/agent/resources/workflows/workflow-issue-create.yaml +0 -72
- monoco/features/agent/resources/workflows/workflow-review.yaml +0 -94
- monoco/features/agent/resources/zh/roles/monoco_role_engineer.yaml +0 -49
- monoco/features/agent/resources/zh/roles/monoco_role_manager.yaml +0 -46
- monoco/features/agent/resources/zh/roles/monoco_role_planner.yaml +0 -46
- monoco/features/agent/resources/zh/roles/monoco_role_reviewer.yaml +0 -47
- monoco/features/agent/resources/zh/skills/monoco_atom_core/SKILL.md +0 -99
- monoco/features/agent/resources/zh/skills/monoco_workflow_agent_engineer/SKILL.md +0 -94
- monoco/features/agent/resources/zh/skills/monoco_workflow_agent_manager/SKILL.md +0 -88
- monoco/features/agent/resources/zh/skills/monoco_workflow_agent_planner/SKILL.md +0 -259
- monoco/features/agent/resources/zh/skills/monoco_workflow_agent_reviewer/SKILL.md +0 -137
- monoco/features/agent/session.py +0 -169
- monoco/features/artifact/resources/zh/skills/monoco_atom_artifact/SKILL.md +0 -278
- monoco/features/glossary/resources/en/skills/monoco_atom_glossary/SKILL.md +0 -35
- monoco/features/glossary/resources/zh/skills/monoco_atom_glossary/SKILL.md +0 -35
- monoco/features/hooks/adapter.py +0 -67
- monoco/features/hooks/core.py +0 -441
- monoco/features/i18n/resources/en/skills/monoco_atom_i18n/SKILL.md +0 -96
- monoco/features/i18n/resources/en/skills/monoco_workflow_i18n_scan/SKILL.md +0 -105
- monoco/features/i18n/resources/zh/skills/monoco_atom_i18n/SKILL.md +0 -96
- monoco/features/i18n/resources/zh/skills/monoco_workflow_i18n_scan/SKILL.md +0 -105
- monoco/features/issue/resources/en/skills/monoco_atom_issue/SKILL.md +0 -165
- monoco/features/issue/resources/en/skills/monoco_workflow_issue_creation/SKILL.md +0 -167
- monoco/features/issue/resources/en/skills/monoco_workflow_issue_development/SKILL.md +0 -224
- monoco/features/issue/resources/en/skills/monoco_workflow_issue_management/SKILL.md +0 -159
- monoco/features/issue/resources/en/skills/monoco_workflow_issue_refinement/SKILL.md +0 -203
- monoco/features/issue/resources/hooks/pre-commit.sh +0 -41
- monoco/features/issue/resources/zh/skills/monoco_atom_issue_lifecycle/SKILL.md +0 -190
- monoco/features/issue/resources/zh/skills/monoco_workflow_issue_creation/SKILL.md +0 -167
- monoco/features/issue/resources/zh/skills/monoco_workflow_issue_development/SKILL.md +0 -224
- monoco/features/issue/resources/zh/skills/monoco_workflow_issue_management/SKILL.md +0 -159
- monoco/features/issue/resources/zh/skills/monoco_workflow_issue_refinement/SKILL.md +0 -203
- monoco/features/memo/resources/en/skills/monoco_atom_memo/SKILL.md +0 -77
- monoco/features/memo/resources/en/skills/monoco_workflow_note_processing/SKILL.md +0 -140
- monoco/features/memo/resources/zh/skills/monoco_atom_memo/SKILL.md +0 -77
- monoco/features/memo/resources/zh/skills/monoco_workflow_note_processing/SKILL.md +0 -140
- monoco/features/spike/resources/en/skills/monoco_atom_spike/SKILL.md +0 -76
- monoco/features/spike/resources/en/skills/monoco_workflow_research/SKILL.md +0 -121
- monoco/features/spike/resources/zh/skills/monoco_atom_spike/SKILL.md +0 -76
- monoco/features/spike/resources/zh/skills/monoco_workflow_research/SKILL.md +0 -121
- monoco_toolkit-0.3.11.dist-info/RECORD +0 -181
- {monoco_toolkit-0.3.11.dist-info → monoco_toolkit-0.4.0.dist-info}/WHEEL +0 -0
- {monoco_toolkit-0.3.11.dist-info → monoco_toolkit-0.4.0.dist-info}/entry_points.txt +0 -0
- {monoco_toolkit-0.3.11.dist-info → monoco_toolkit-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: monoco_workflow_note_processing
|
|
3
|
-
description: Memo 笔记处理工作流 (Flow Skill)。定义从捕获 fleeting notes 到组织归档的标准操作流程,确保想法有效管理。
|
|
4
|
-
type: workflow
|
|
5
|
-
domain: memo
|
|
6
|
-
version: 1.0.0
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Note Processing Workflow
|
|
10
|
-
|
|
11
|
-
Memo 笔记处理的标准化工作流,确保 "Capture → Process → Organize → Archive/Convert" 流程。
|
|
12
|
-
|
|
13
|
-
## 工作流状态机
|
|
14
|
-
|
|
15
|
-
```mermaid
|
|
16
|
-
stateDiagram-v2
|
|
17
|
-
[*] --> Capture: 想法闪现
|
|
18
|
-
|
|
19
|
-
Capture --> Process: 定期整理
|
|
20
|
-
Capture --> Capture: 继续记录
|
|
21
|
-
|
|
22
|
-
Process --> Organize: 分类完成
|
|
23
|
-
Process --> Archive: 无价值<br/>(直接归档)
|
|
24
|
-
|
|
25
|
-
Organize --> Convert: 可执行
|
|
26
|
-
Organize --> Organize: 需补充<br/>(完善信息)
|
|
27
|
-
Organize --> Archive: 纯参考<br/>(归档保存)
|
|
28
|
-
|
|
29
|
-
Convert --> [*]: 转为 Issue
|
|
30
|
-
|
|
31
|
-
Archive --> [*]: 归档完成
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## 执行步骤
|
|
35
|
-
|
|
36
|
-
### 1. Capture (捕获)
|
|
37
|
-
|
|
38
|
-
- **目标**: 快速记录 fleeting ideas,不中断当前工作
|
|
39
|
-
- **输入**: 想法、灵感、代码片段、链接
|
|
40
|
-
- **输出**: Memo 记录
|
|
41
|
-
- **检查点**:
|
|
42
|
-
- [ ] 使用 `monoco memo add "内容"`
|
|
43
|
-
- [ ] 保持简洁,无需详细描述
|
|
44
|
-
- [ ] 添加上下文(`-c file:line` 如适用)
|
|
45
|
-
- [ ] 不中断当前任务流
|
|
46
|
-
|
|
47
|
-
### 2. Process (处理)
|
|
48
|
-
|
|
49
|
-
- **目标**: 定期回顾和分类 Memo
|
|
50
|
-
- **策略**: 定期整理(每日/每周)
|
|
51
|
-
- **检查点**:
|
|
52
|
-
- [ ] 运行 `monoco memo list` 查看所有 Memo
|
|
53
|
-
- [ ] 评估每个 Memo 的价值
|
|
54
|
-
- [ ] 分类:可执行 / 纯参考 / 无价值
|
|
55
|
-
- [ ] 补充缺失信息
|
|
56
|
-
|
|
57
|
-
### 3. Organize (组织)
|
|
58
|
-
|
|
59
|
-
- **目标**: 对有价值的 Memo 进行结构化整理
|
|
60
|
-
- **策略**: 根据类型选择处理方式
|
|
61
|
-
- **检查点**:
|
|
62
|
-
- [ ] 为相关 Memo 添加标签或分类
|
|
63
|
-
- [ ] 合并相似的 Memo
|
|
64
|
-
- [ ] 完善模糊的记录
|
|
65
|
-
- [ ] 设置优先级(如适用)
|
|
66
|
-
|
|
67
|
-
### 4. Archive/Convert (归档或转化)
|
|
68
|
-
|
|
69
|
-
- **目标**: 处理完毕的 Memo 归档或转化为 Issue
|
|
70
|
-
- **检查点**:
|
|
71
|
-
- [ ] **Convert**: 可执行的想法转为 Issue
|
|
72
|
-
- 使用 `monoco issue create feature/chore/fix -t "标题"`
|
|
73
|
-
- 在 Issue 中引用原始 Memo
|
|
74
|
-
- [ ] **Archive**: 纯参考内容归档保存
|
|
75
|
-
- 移动到知识库或文档
|
|
76
|
-
- 从 Memo 列表中移除
|
|
77
|
-
- [ ] **Delete**: 无价值的 Memo 直接删除
|
|
78
|
-
|
|
79
|
-
## 决策分支
|
|
80
|
-
|
|
81
|
-
| 条件 | 动作 |
|
|
82
|
-
|------|------|
|
|
83
|
-
| 想法可执行 | Convert,创建 Issue |
|
|
84
|
-
| 纯参考资料 | Archive,保存到知识库 |
|
|
85
|
-
| 无价值/过时 | Delete,直接删除 |
|
|
86
|
-
| 信息不完整 | 返回 Organize,补充信息 |
|
|
87
|
-
|
|
88
|
-
## 合规要求
|
|
89
|
-
|
|
90
|
-
- **必须**: Memo 是临时的,不应无限堆积
|
|
91
|
-
- **必须**: 可执行的想法必须转为 Issue 追踪
|
|
92
|
-
- **建议**: 定期处理(建议每周)
|
|
93
|
-
- **建议**: 保持 Memo 简洁,避免长篇大论
|
|
94
|
-
|
|
95
|
-
## 相关命令
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# 添加 Memo
|
|
99
|
-
monoco memo add "考虑使用 Redis 缓存用户会话"
|
|
100
|
-
|
|
101
|
-
# 带上下文的 Memo
|
|
102
|
-
monoco memo add "递归可能导致栈溢出" -c "src/utils.py:42"
|
|
103
|
-
|
|
104
|
-
# 查看所有 Memo
|
|
105
|
-
monoco memo list
|
|
106
|
-
|
|
107
|
-
# 编辑 Memo
|
|
108
|
-
monoco memo open
|
|
109
|
-
|
|
110
|
-
# 创建 Issue(转化 Memo)
|
|
111
|
-
monoco issue create feature -t "实现 Redis 缓存"
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## 使用场景
|
|
115
|
-
|
|
116
|
-
| 场景 | 使用 Memo | 后续处理 |
|
|
117
|
-
|------|-----------|----------|
|
|
118
|
-
| 代码审查时的改进建议 | `memo add "重构建议: ..."` | Process → Convert to Issue |
|
|
119
|
-
| 会议中的临时想法 | `memo add "想法: ..."` | Process → Organize → Convert |
|
|
120
|
-
| 有用的代码片段 | `memo add "Snippet: ..."` | Process → Archive to 知识库 |
|
|
121
|
-
| 技术文章链接 | `memo add "Read: https://..."` | Process → Archive |
|
|
122
|
-
| Bug 线索 | `memo add "可能的 Bug: ..."` | Process → Convert to Fix Issue |
|
|
123
|
-
|
|
124
|
-
## 与 Issue 的区别
|
|
125
|
-
|
|
126
|
-
| 维度 | Memo | Issue |
|
|
127
|
-
|------|------|-------|
|
|
128
|
-
| 目的 | 记录想法 | 追踪任务 |
|
|
129
|
-
| 生命周期 | 临时,需定期清理 | 正式,完整生命周期 |
|
|
130
|
-
| 完成标准 | 归档或转化 | 验收标准通过 |
|
|
131
|
-
| 复杂度 | 简单,一句话 | 详细,有 AC 和 Tasks |
|
|
132
|
-
| 追踪 | 无 | 完整追踪 |
|
|
133
|
-
|
|
134
|
-
## 最佳实践
|
|
135
|
-
|
|
136
|
-
1. **及时记录**: 想法闪现时立即记录,避免遗忘
|
|
137
|
-
2. **定期整理**: 每周至少处理一次 Memo 列表
|
|
138
|
-
3. **快速转化**: 有价值的想法尽快转为 Issue
|
|
139
|
-
4. **果断删除**: 过时或无价值的 Memo 果断删除
|
|
140
|
-
5. **保持简洁**: Memo 是速记,不需要详细描述
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: monoco_atom_spike
|
|
3
|
-
description: Manage external reference repositories for research and learning. Provides read-only access to curated codebases.
|
|
4
|
-
type: atom
|
|
5
|
-
version: 1.0.0
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Spike (Research)
|
|
9
|
-
|
|
10
|
-
Manage external reference repositories in Monoco projects.
|
|
11
|
-
|
|
12
|
-
## Overview
|
|
13
|
-
|
|
14
|
-
The Spike feature allows you to:
|
|
15
|
-
|
|
16
|
-
- **Add external repositories** as read-only references
|
|
17
|
-
- **Sync repository content** to local `.references/` directory
|
|
18
|
-
- **Access curated knowledge** without modifying source code
|
|
19
|
-
|
|
20
|
-
## Key Commands
|
|
21
|
-
|
|
22
|
-
### Add Repository
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
monoco spike add <url>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Adds an external repository as a reference. The repository will be cloned to `.references/<name>/` where `<name>` is derived from the repository URL.
|
|
29
|
-
|
|
30
|
-
**Example**:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
monoco spike add https://github.com/example/awesome-project
|
|
34
|
-
# Available at: .references/awesome-project/
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Sync Repositories
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
monoco spike sync
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Downloads or updates all configured spike repositories from `.monoco/config.yaml`.
|
|
44
|
-
|
|
45
|
-
### List Spikes
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
monoco spike list
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Shows all configured spike repositories and their sync status.
|
|
52
|
-
|
|
53
|
-
## Configuration
|
|
54
|
-
|
|
55
|
-
Spike repositories are configured in `.monoco/config.yaml`:
|
|
56
|
-
|
|
57
|
-
```yaml
|
|
58
|
-
project:
|
|
59
|
-
spike_repos:
|
|
60
|
-
awesome-project: https://github.com/example/awesome-project
|
|
61
|
-
another-ref: https://github.com/example/another-ref
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Best Practices
|
|
65
|
-
|
|
66
|
-
1. **Read-Only Access**: Never edit files in `.references/`. Treat them as external knowledge.
|
|
67
|
-
2. **Curated Selection**: Only add high-quality, relevant repositories.
|
|
68
|
-
3. **Regular Sync**: Run `monoco spike sync` periodically to get updates.
|
|
69
|
-
4. **Commit Configuration**: Add spike repo URLs to version control for team consistency.
|
|
70
|
-
|
|
71
|
-
## Use Cases
|
|
72
|
-
|
|
73
|
-
- **Learning from Examples**: Study well-architected codebases
|
|
74
|
-
- **API Reference**: Keep framework documentation locally
|
|
75
|
-
- **Pattern Library**: Maintain a collection of design patterns
|
|
76
|
-
- **Competitive Analysis**: Reference similar projects
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: monoco_workflow_research
|
|
3
|
-
description: Spike Research Workflow (Flow Skill). Defines the standard operational process from adding external repositories to knowledge extraction and archiving, ensuring effective management of external knowledge.
|
|
4
|
-
type: workflow
|
|
5
|
-
domain: spike
|
|
6
|
-
version: 1.0.0
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Research Workflow
|
|
10
|
-
|
|
11
|
-
Standardized workflow for Spike research, ensuring the "Add → Sync → Analyze → Extract → Archive" process.
|
|
12
|
-
|
|
13
|
-
## Workflow State Machine
|
|
14
|
-
|
|
15
|
-
```mermaid
|
|
16
|
-
stateDiagram-v2
|
|
17
|
-
[*] --> Add: Discover reference repository
|
|
18
|
-
|
|
19
|
-
Add --> Sync: Configuration added
|
|
20
|
-
Add --> Add: Invalid URL<br/>(re-enter)
|
|
21
|
-
|
|
22
|
-
Sync --> Analyze: Sync completed
|
|
23
|
-
Sync --> Sync: Sync failed<br/>(network/permission)
|
|
24
|
-
|
|
25
|
-
Analyze --> Extract: Analysis completed
|
|
26
|
-
Analyze --> Analyze: Content mismatch<br/>(re-evaluate)
|
|
27
|
-
|
|
28
|
-
Extract --> Archive: Knowledge extraction completed
|
|
29
|
-
|
|
30
|
-
Archive --> [*]: Archiving completed
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Execution Steps
|
|
34
|
-
|
|
35
|
-
### 1. Add (Add Repository)
|
|
36
|
-
|
|
37
|
-
- **Goal**: Add external repository as reference
|
|
38
|
-
- **Input**: Repository URL, reference purpose
|
|
39
|
-
- **Output**: Configuration updated
|
|
40
|
-
- **Checkpoints**:
|
|
41
|
-
- [ ] Verify repository URL is accessible
|
|
42
|
-
- [ ] Confirm repository is relevant to current project
|
|
43
|
-
- [ ] Run `monoco spike add <url>`
|
|
44
|
-
- [ ] Check `.monoco/config.yaml` is updated
|
|
45
|
-
|
|
46
|
-
### 2. Sync (Synchronize)
|
|
47
|
-
|
|
48
|
-
- **Goal**: Download or update reference repository content
|
|
49
|
-
- **Checkpoints**:
|
|
50
|
-
- [ ] Run `monoco spike sync`
|
|
51
|
-
- [ ] Verify repository is cloned to `.references/<name>/`
|
|
52
|
-
- [ ] Check sync logs for errors
|
|
53
|
-
- [ ] Verify file permissions are correct (read-only)
|
|
54
|
-
|
|
55
|
-
### 3. Analyze (Analysis)
|
|
56
|
-
|
|
57
|
-
- **Goal**: Research the structure and content of reference repository
|
|
58
|
-
- **Strategy**: Systematic browsing and marking
|
|
59
|
-
- **Checkpoints**:
|
|
60
|
-
- [ ] Browse overall repository structure
|
|
61
|
-
- [ ] Identify modules relevant to current project
|
|
62
|
-
- [ ] Mark valuable code patterns
|
|
63
|
-
- [ ] Record architectural design highlights
|
|
64
|
-
|
|
65
|
-
### 4. Extract (Knowledge Extraction)
|
|
66
|
-
|
|
67
|
-
- **Goal**: Extract usable knowledge from reference repository
|
|
68
|
-
- **Strategy**: Document valuable findings
|
|
69
|
-
- **Checkpoints**:
|
|
70
|
-
- [ ] Extract key code snippets (without modifying original files)
|
|
71
|
-
- [ ] Record design patterns and best practices
|
|
72
|
-
- [ ] Create learning notes (using Memo or Issue)
|
|
73
|
-
- [ ] Annotate knowledge source (repository URL + Commit)
|
|
74
|
-
|
|
75
|
-
### 5. Archive (Archiving)
|
|
76
|
-
|
|
77
|
-
- **Goal**: Organize and archive research results
|
|
78
|
-
- **Checkpoints**:
|
|
79
|
-
- [ ] Update project documentation, referencing the repository
|
|
80
|
-
- [ ] Create knowledge index (if needed)
|
|
81
|
-
- [ ] Run `monoco spike list` to verify status
|
|
82
|
-
- [ ] Periodically clean up references no longer needed
|
|
83
|
-
|
|
84
|
-
## Decision Branches
|
|
85
|
-
|
|
86
|
-
| Condition | Action |
|
|
87
|
-
|-----------|--------|
|
|
88
|
-
| Invalid URL | Return to Add, check URL format |
|
|
89
|
-
| Sync failed | Check network, permissions, retry or skip |
|
|
90
|
-
| Content not relevant | Remove from configuration, reselect |
|
|
91
|
-
| Important pattern discovered | Create Issue, plan to introduce to project |
|
|
92
|
-
|
|
93
|
-
## Compliance Requirements
|
|
94
|
-
|
|
95
|
-
- **Prohibited**: Editing any files in `.references/`
|
|
96
|
-
- **Required**: All external knowledge must be annotated with source
|
|
97
|
-
- **Required**: Regular synchronization to get updates
|
|
98
|
-
- **Recommended**: Only add high-quality, relevant repositories
|
|
99
|
-
|
|
100
|
-
## Related Commands
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
# Add reference repository
|
|
104
|
-
monoco spike add <url>
|
|
105
|
-
|
|
106
|
-
# Sync all repositories
|
|
107
|
-
monoco spike sync
|
|
108
|
-
|
|
109
|
-
# List configured repositories
|
|
110
|
-
monoco spike list
|
|
111
|
-
|
|
112
|
-
# Record research findings
|
|
113
|
-
monoco memo add "Discovery: {insight}" -c "spike:{repo_name}"
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Best Practices
|
|
117
|
-
|
|
118
|
-
1. **Selective Choice**: Only add repositories highly relevant to the project
|
|
119
|
-
2. **Read-only Access**: Treat `.references/` as external knowledge base, never modify
|
|
120
|
-
3. **Regular Sync**: Run `monoco spike sync` monthly to get updates
|
|
121
|
-
4. **Knowledge Transformation**: Transform learned patterns into actual project improvements
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: monoco_atom_spike
|
|
3
|
-
description: 管理用于研究和学习的外部参考仓库。提供对精选代码库的只读访问。
|
|
4
|
-
type: atom
|
|
5
|
-
version: 1.0.0
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Spike (研究)
|
|
9
|
-
|
|
10
|
-
在 Monoco 项目中管理外部参考仓库。
|
|
11
|
-
|
|
12
|
-
## 概述
|
|
13
|
-
|
|
14
|
-
Spike 功能允许你:
|
|
15
|
-
|
|
16
|
-
- **添加外部仓库**作为只读参考
|
|
17
|
-
- **同步仓库内容**到本地 `.references/` 目录
|
|
18
|
-
- **访问精选知识**而不修改源代码
|
|
19
|
-
|
|
20
|
-
## 核心命令
|
|
21
|
-
|
|
22
|
-
### 添加仓库
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
monoco spike add <url>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
将外部仓库添加为参考。仓库将被克隆到 `.references/<name>/`,其中 `<name>` 从仓库 URL 派生。
|
|
29
|
-
|
|
30
|
-
**示例**:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
monoco spike add https://github.com/example/awesome-project
|
|
34
|
-
# 可在以下位置访问: .references/awesome-project/
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 同步仓库
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
monoco spike sync
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
从 `.monoco/config.yaml` 下载或更新所有配置的 spike 仓库。
|
|
44
|
-
|
|
45
|
-
### 列出 Spikes
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
monoco spike list
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
显示所有配置的 spike 仓库及其同步状态。
|
|
52
|
-
|
|
53
|
-
## 配置
|
|
54
|
-
|
|
55
|
-
Spike 仓库在 `.monoco/config.yaml` 中配置:
|
|
56
|
-
|
|
57
|
-
```yaml
|
|
58
|
-
project:
|
|
59
|
-
spike_repos:
|
|
60
|
-
awesome-project: https://github.com/example/awesome-project
|
|
61
|
-
another-ref: https://github.com/example/another-ref
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 最佳实践
|
|
65
|
-
|
|
66
|
-
1. **只读访问**: 永远不要编辑 `.references/` 中的文件。将它们视为外部知识。
|
|
67
|
-
2. **精选选择**: 只添加高质量、相关的仓库。
|
|
68
|
-
3. **定期同步**: 定期运行 `monoco spike sync` 以获取更新。
|
|
69
|
-
4. **提交配置**: 将 spike 仓库 URL 添加到版本控制以保持团队一致性。
|
|
70
|
-
|
|
71
|
-
## 使用场景
|
|
72
|
-
|
|
73
|
-
- **从示例中学习**: 研究架构良好的代码库
|
|
74
|
-
- **API 参考**: 在本地保存框架文档
|
|
75
|
-
- **模式库**: 维护设计模式集合
|
|
76
|
-
- **竞品分析**: 参考类似项目
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: monoco_workflow_research
|
|
3
|
-
description: Spike 研究工作流 (Flow Skill)。定义从添加外部仓库到知识提取和归档的标准操作流程,确保外部知识有效管理。
|
|
4
|
-
type: workflow
|
|
5
|
-
domain: spike
|
|
6
|
-
version: 1.0.0
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Research Workflow
|
|
10
|
-
|
|
11
|
-
Spike 研究的标准化工作流,确保 "Add → Sync → Analyze → Extract → Archive" 流程。
|
|
12
|
-
|
|
13
|
-
## 工作流状态机
|
|
14
|
-
|
|
15
|
-
```mermaid
|
|
16
|
-
stateDiagram-v2
|
|
17
|
-
[*] --> Add: 发现参考仓库
|
|
18
|
-
|
|
19
|
-
Add --> Sync: 添加配置
|
|
20
|
-
Add --> Add: URL 无效<br/>(重新输入)
|
|
21
|
-
|
|
22
|
-
Sync --> Analyze: 同步完成
|
|
23
|
-
Sync --> Sync: 同步失败<br/>(网络/权限)
|
|
24
|
-
|
|
25
|
-
Analyze --> Extract: 分析完成
|
|
26
|
-
Analyze --> Analyze: 内容不符<br/>(重新评估)
|
|
27
|
-
|
|
28
|
-
Extract --> Archive: 知识提取完成
|
|
29
|
-
|
|
30
|
-
Archive --> [*]: 归档完成
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## 执行步骤
|
|
34
|
-
|
|
35
|
-
### 1. Add (添加仓库)
|
|
36
|
-
|
|
37
|
-
- **目标**: 将外部仓库添加为参考
|
|
38
|
-
- **输入**: 仓库 URL、参考目的
|
|
39
|
-
- **输出**: 配置更新
|
|
40
|
-
- **检查点**:
|
|
41
|
-
- [ ] 验证仓库 URL 可访问
|
|
42
|
-
- [ ] 确认仓库与当前项目相关
|
|
43
|
-
- [ ] 运行 `monoco spike add <url>`
|
|
44
|
-
- [ ] 检查 `.monoco/config.yaml` 已更新
|
|
45
|
-
|
|
46
|
-
### 2. Sync (同步)
|
|
47
|
-
|
|
48
|
-
- **目标**: 下载或更新参考仓库内容
|
|
49
|
-
- **检查点**:
|
|
50
|
-
- [ ] 运行 `monoco spike sync`
|
|
51
|
-
- [ ] 验证仓库克隆到 `.references/<name>/`
|
|
52
|
-
- [ ] 检查同步日志,确认无错误
|
|
53
|
-
- [ ] 验证文件权限正确(只读)
|
|
54
|
-
|
|
55
|
-
### 3. Analyze (分析)
|
|
56
|
-
|
|
57
|
-
- **目标**: 研究参考仓库的结构和内容
|
|
58
|
-
- **策略**: 系统性浏览和标记
|
|
59
|
-
- **检查点**:
|
|
60
|
-
- [ ] 浏览仓库整体结构
|
|
61
|
-
- [ ] 识别与当前项目相关的模块
|
|
62
|
-
- [ ] 标记有价值的代码模式
|
|
63
|
-
- [ ] 记录架构设计亮点
|
|
64
|
-
|
|
65
|
-
### 4. Extract (提取知识)
|
|
66
|
-
|
|
67
|
-
- **目标**: 从参考仓库提取可用知识
|
|
68
|
-
- **策略**: 文档化有价值的发现
|
|
69
|
-
- **检查点**:
|
|
70
|
-
- [ ] 提取关键代码片段(不修改原文件)
|
|
71
|
-
- [ ] 记录设计模式和最佳实践
|
|
72
|
-
- [ ] 创建学习笔记(使用 Memo 或 Issue)
|
|
73
|
-
- [ ] 标注知识来源(仓库 URL + Commit)
|
|
74
|
-
|
|
75
|
-
### 5. Archive (归档)
|
|
76
|
-
|
|
77
|
-
- **目标**: 整理和归档研究成果
|
|
78
|
-
- **检查点**:
|
|
79
|
-
- [ ] 更新项目文档,引用参考仓库
|
|
80
|
-
- [ ] 创建知识索引(如需要)
|
|
81
|
-
- [ ] 运行 `monoco spike list` 验证状态
|
|
82
|
-
- [ ] 定期清理不再需要的参考
|
|
83
|
-
|
|
84
|
-
## 决策分支
|
|
85
|
-
|
|
86
|
-
| 条件 | 动作 |
|
|
87
|
-
|------|------|
|
|
88
|
-
| URL 无效 | 返回 Add,检查 URL 格式 |
|
|
89
|
-
| 同步失败 | 检查网络、权限,重试或跳过 |
|
|
90
|
-
| 内容不相关 | 从配置中移除,重新选择 |
|
|
91
|
-
| 发现重要模式 | 创建 Issue,计划引入项目 |
|
|
92
|
-
|
|
93
|
-
## 合规要求
|
|
94
|
-
|
|
95
|
-
- **禁止**: 编辑 `.references/` 中的任何文件
|
|
96
|
-
- **必须**: 所有外部知识必须标注来源
|
|
97
|
-
- **必须**: 定期同步以获取更新
|
|
98
|
-
- **建议**: 只添加高质量、相关的仓库
|
|
99
|
-
|
|
100
|
-
## 相关命令
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
# 添加参考仓库
|
|
104
|
-
monoco spike add <url>
|
|
105
|
-
|
|
106
|
-
# 同步所有仓库
|
|
107
|
-
monoco spike sync
|
|
108
|
-
|
|
109
|
-
# 列出已配置的仓库
|
|
110
|
-
monoco spike list
|
|
111
|
-
|
|
112
|
-
# 记录研究发现
|
|
113
|
-
monoco memo add "发现: {insight}" -c "spike:{repo_name}"
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## 最佳实践
|
|
117
|
-
|
|
118
|
-
1. **精选选择**: 只添加与项目高度相关的仓库
|
|
119
|
-
2. **只读访问**: 将 `.references/` 视为外部知识库,永不修改
|
|
120
|
-
3. **定期同步**: 每月运行 `monoco spike sync` 获取更新
|
|
121
|
-
4. **知识转化**: 将学到的模式转化为项目的实际改进
|