monoco-toolkit 0.3.6__py3-none-any.whl → 0.3.10__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.
Files changed (113) hide show
  1. monoco/cli/workspace.py +1 -1
  2. monoco/core/config.py +58 -0
  3. monoco/core/hooks/__init__.py +19 -0
  4. monoco/core/hooks/base.py +104 -0
  5. monoco/core/hooks/builtin/__init__.py +11 -0
  6. monoco/core/hooks/builtin/git_cleanup.py +266 -0
  7. monoco/core/hooks/builtin/logging_hook.py +78 -0
  8. monoco/core/hooks/context.py +131 -0
  9. monoco/core/hooks/registry.py +222 -0
  10. monoco/core/injection.py +63 -29
  11. monoco/core/integrations.py +8 -2
  12. monoco/core/output.py +5 -5
  13. monoco/core/registry.py +9 -1
  14. monoco/core/resource/__init__.py +5 -0
  15. monoco/core/resource/finder.py +98 -0
  16. monoco/core/resource/manager.py +91 -0
  17. monoco/core/resource/models.py +35 -0
  18. monoco/core/resources/en/{SKILL.md → skills/monoco_core/SKILL.md} +2 -0
  19. monoco/core/resources/zh/{SKILL.md → skills/monoco_core/SKILL.md} +2 -0
  20. monoco/core/setup.py +1 -1
  21. monoco/core/skill_framework.py +292 -0
  22. monoco/core/skills.py +538 -254
  23. monoco/core/sync.py +73 -1
  24. monoco/core/workflow_converter.py +420 -0
  25. monoco/features/{scheduler → agent}/__init__.py +5 -3
  26. monoco/features/agent/adapter.py +31 -0
  27. monoco/features/agent/apoptosis.py +44 -0
  28. monoco/features/agent/cli.py +296 -0
  29. monoco/features/agent/config.py +96 -0
  30. monoco/features/agent/defaults.py +12 -0
  31. monoco/features/{scheduler → agent}/engines.py +32 -6
  32. monoco/features/agent/flow_skills.py +281 -0
  33. monoco/features/agent/manager.py +91 -0
  34. monoco/features/{scheduler → agent}/models.py +6 -3
  35. monoco/features/agent/resources/atoms/atom-code-dev.yaml +61 -0
  36. monoco/features/agent/resources/atoms/atom-issue-lifecycle.yaml +73 -0
  37. monoco/features/agent/resources/atoms/atom-knowledge.yaml +55 -0
  38. monoco/features/agent/resources/atoms/atom-review.yaml +60 -0
  39. monoco/features/agent/resources/en/skills/flow_engineer/SKILL.md +94 -0
  40. monoco/features/agent/resources/en/skills/flow_manager/SKILL.md +93 -0
  41. monoco/features/agent/resources/en/skills/flow_planner/SKILL.md +85 -0
  42. monoco/features/agent/resources/en/skills/flow_reviewer/SKILL.md +114 -0
  43. monoco/features/agent/resources/roles/role-engineer.yaml +49 -0
  44. monoco/features/agent/resources/roles/role-manager.yaml +46 -0
  45. monoco/features/agent/resources/roles/role-planner.yaml +46 -0
  46. monoco/features/agent/resources/roles/role-reviewer.yaml +47 -0
  47. monoco/features/agent/resources/workflows/workflow-dev.yaml +83 -0
  48. monoco/features/agent/resources/workflows/workflow-issue-create.yaml +72 -0
  49. monoco/features/agent/resources/workflows/workflow-review.yaml +94 -0
  50. monoco/features/agent/resources/zh/skills/flow_engineer/SKILL.md +94 -0
  51. monoco/features/agent/resources/zh/skills/flow_manager/SKILL.md +88 -0
  52. monoco/features/agent/resources/zh/skills/flow_planner/SKILL.md +259 -0
  53. monoco/features/agent/resources/zh/skills/flow_reviewer/SKILL.md +137 -0
  54. monoco/features/{scheduler → agent}/session.py +36 -1
  55. monoco/features/{scheduler → agent}/worker.py +40 -4
  56. monoco/features/glossary/adapter.py +31 -0
  57. monoco/features/glossary/config.py +5 -0
  58. monoco/features/glossary/resources/en/AGENTS.md +29 -0
  59. monoco/features/glossary/resources/en/skills/monoco_glossary/SKILL.md +35 -0
  60. monoco/features/glossary/resources/zh/AGENTS.md +29 -0
  61. monoco/features/glossary/resources/zh/skills/monoco_glossary/SKILL.md +35 -0
  62. monoco/features/i18n/resources/en/skills/i18n_scan_workflow/SKILL.md +105 -0
  63. monoco/features/i18n/resources/en/{SKILL.md → skills/monoco_i18n/SKILL.md} +2 -0
  64. monoco/features/i18n/resources/zh/skills/i18n_scan_workflow/SKILL.md +105 -0
  65. monoco/features/i18n/resources/zh/{SKILL.md → skills/monoco_i18n/SKILL.md} +2 -0
  66. monoco/features/issue/commands.py +427 -21
  67. monoco/features/issue/core.py +140 -1
  68. monoco/features/issue/criticality.py +553 -0
  69. monoco/features/issue/domain/models.py +28 -2
  70. monoco/features/issue/engine/machine.py +75 -15
  71. monoco/features/issue/git_service.py +185 -0
  72. monoco/features/issue/linter.py +291 -62
  73. monoco/features/issue/models.py +50 -2
  74. monoco/features/issue/resources/en/skills/issue_create_workflow/SKILL.md +167 -0
  75. monoco/features/issue/resources/en/skills/issue_develop_workflow/SKILL.md +224 -0
  76. monoco/features/issue/resources/en/skills/issue_lifecycle_workflow/SKILL.md +159 -0
  77. monoco/features/issue/resources/en/skills/issue_refine_workflow/SKILL.md +203 -0
  78. monoco/features/issue/resources/en/{SKILL.md → skills/monoco_issue/SKILL.md} +50 -0
  79. monoco/features/issue/resources/zh/skills/issue_create_workflow/SKILL.md +167 -0
  80. monoco/features/issue/resources/zh/skills/issue_develop_workflow/SKILL.md +224 -0
  81. monoco/features/issue/resources/zh/skills/issue_lifecycle_workflow/SKILL.md +159 -0
  82. monoco/features/issue/resources/zh/skills/issue_refine_workflow/SKILL.md +203 -0
  83. monoco/features/issue/resources/zh/{SKILL.md → skills/monoco_issue/SKILL.md} +52 -0
  84. monoco/features/issue/validator.py +185 -65
  85. monoco/features/memo/__init__.py +2 -1
  86. monoco/features/memo/adapter.py +32 -0
  87. monoco/features/memo/cli.py +36 -14
  88. monoco/features/memo/core.py +59 -0
  89. monoco/features/memo/resources/en/skills/monoco_memo/SKILL.md +77 -0
  90. monoco/features/memo/resources/en/skills/note_processing_workflow/SKILL.md +140 -0
  91. monoco/features/memo/resources/zh/AGENTS.md +8 -0
  92. monoco/features/memo/resources/zh/skills/monoco_memo/SKILL.md +77 -0
  93. monoco/features/memo/resources/zh/skills/note_processing_workflow/SKILL.md +140 -0
  94. monoco/features/spike/resources/en/{SKILL.md → skills/monoco_spike/SKILL.md} +2 -0
  95. monoco/features/spike/resources/en/skills/research_workflow/SKILL.md +121 -0
  96. monoco/features/spike/resources/zh/{SKILL.md → skills/monoco_spike/SKILL.md} +2 -0
  97. monoco/features/spike/resources/zh/skills/research_workflow/SKILL.md +121 -0
  98. monoco/main.py +2 -3
  99. monoco_toolkit-0.3.10.dist-info/METADATA +124 -0
  100. monoco_toolkit-0.3.10.dist-info/RECORD +156 -0
  101. monoco/features/scheduler/cli.py +0 -285
  102. monoco/features/scheduler/config.py +0 -68
  103. monoco/features/scheduler/defaults.py +0 -54
  104. monoco/features/scheduler/manager.py +0 -49
  105. monoco/features/scheduler/reliability.py +0 -106
  106. monoco/features/skills/core.py +0 -102
  107. monoco_toolkit-0.3.6.dist-info/METADATA +0 -127
  108. monoco_toolkit-0.3.6.dist-info/RECORD +0 -97
  109. /monoco/core/{hooks.py → githooks.py} +0 -0
  110. /monoco/features/{skills → glossary}/__init__.py +0 -0
  111. {monoco_toolkit-0.3.6.dist-info → monoco_toolkit-0.3.10.dist-info}/WHEEL +0 -0
  112. {monoco_toolkit-0.3.6.dist-info → monoco_toolkit-0.3.10.dist-info}/entry_points.txt +0 -0
  113. {monoco_toolkit-0.3.6.dist-info → monoco_toolkit-0.3.10.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: note-processing-workflow
3
+ description: Memo Note Processing Workflow (Flow Skill). Defines the standard operational process from capturing fleeting notes to organizing and archiving, ensuring effective management of ideas.
4
+ type: flow
5
+ domain: memo
6
+ version: 1.0.0
7
+ ---
8
+
9
+ # Note Processing Workflow
10
+
11
+ Standardized workflow for Memo note processing, ensuring the "Capture → Process → Organize → Archive/Convert" process.
12
+
13
+ ## Workflow State Machine
14
+
15
+ ```mermaid
16
+ stateDiagram-v2
17
+ [*] --> Capture: Idea flashes
18
+
19
+ Capture --> Process: Regular organization
20
+ Capture --> Capture: Continue recording
21
+
22
+ Process --> Organize: Classification completed
23
+ Process --> Archive: No value<br/>(archive directly)
24
+
25
+ Organize --> Convert: Actionable
26
+ Organize --> Organize: Needs supplement<br/>(complete information)
27
+ Organize --> Archive: Pure reference<br/>(archive for storage)
28
+
29
+ Convert --> [*]: Converted to Issue
30
+
31
+ Archive --> [*]: Archiving completed
32
+ ```
33
+
34
+ ## Execution Steps
35
+
36
+ ### 1. Capture (Capture)
37
+
38
+ - **Goal**: Quickly record fleeting ideas without interrupting current work
39
+ - **Input**: Ideas, inspirations, code snippets, links
40
+ - **Output**: Memo record
41
+ - **Checkpoints**:
42
+ - [ ] Use `monoco memo add "content"`
43
+ - [ ] Keep it concise, no detailed description needed
44
+ - [ ] Add context (`-c file:line` if applicable)
45
+ - [ ] Do not interrupt current task flow
46
+
47
+ ### 2. Process (Processing)
48
+
49
+ - **Goal**: Regularly review and classify Memos
50
+ - **Strategy**: Regular organization (daily/weekly)
51
+ - **Checkpoints**:
52
+ - [ ] Run `monoco memo list` to view all Memos
53
+ - [ ] Evaluate value of each Memo
54
+ - [ ] Classify: Actionable / Pure reference / No value
55
+ - [ ] Supplement missing information
56
+
57
+ ### 3. Organize (Organization)
58
+
59
+ - **Goal**: Structured organization of valuable Memos
60
+ - **Strategy**: Choose processing method based on type
61
+ - **Checkpoints**:
62
+ - [ ] Add tags or categories to related Memos
63
+ - [ ] Merge similar Memos
64
+ - [ ] Complete vague records
65
+ - [ ] Set priority (if applicable)
66
+
67
+ ### 4. Archive/Convert (Archive or Convert)
68
+
69
+ - **Goal**: Archive processed Memos or convert to Issue
70
+ - **Checkpoints**:
71
+ - [ ] **Convert**: Convert actionable ideas to Issue
72
+ - Use `monoco issue create feature/chore/fix -t "title"`
73
+ - Reference original Memo in the Issue
74
+ - [ ] **Archive**: Archive pure reference content
75
+ - Move to knowledge base or documentation
76
+ - Remove from Memo list
77
+ - [ ] **Delete**: Delete Memos with no value directly
78
+
79
+ ## Decision Branches
80
+
81
+ | Condition | Action |
82
+ |-----------|--------|
83
+ | Idea is actionable | Convert, create Issue |
84
+ | Pure reference material | Archive, save to knowledge base |
85
+ | No value/outdated | Delete, remove directly |
86
+ | Information incomplete | Return to Organize, supplement information |
87
+
88
+ ## Compliance Requirements
89
+
90
+ - **Required**: Memos are temporary, should not accumulate indefinitely
91
+ - **Required**: Actionable ideas must be converted to Issue for tracking
92
+ - **Recommended**: Process regularly (recommended weekly)
93
+ - **Recommended**: Keep Memos concise, avoid lengthy discussions
94
+
95
+ ## Related Commands
96
+
97
+ ```bash
98
+ # Add Memo
99
+ monoco memo add "Consider using Redis cache for user sessions"
100
+
101
+ # Memo with context
102
+ monoco memo add "Recursion may cause stack overflow" -c "src/utils.py:42"
103
+
104
+ # View all Memos
105
+ monoco memo list
106
+
107
+ # Edit Memo
108
+ monoco memo open
109
+
110
+ # Create Issue (convert Memo)
111
+ monoco issue create feature -t "Implement Redis cache"
112
+ ```
113
+
114
+ ## Usage Scenarios
115
+
116
+ | Scenario | Use Memo | Follow-up Processing |
117
+ |----------|----------|---------------------|
118
+ | Improvement suggestion during code review | `memo add "Refactoring suggestion: ..."` | Process → Convert to Issue |
119
+ | Temporary idea during meeting | `memo add "Idea: ..."` | Process → Organize → Convert |
120
+ | Useful code snippet | `memo add "Snippet: ..."` | Process → Archive to knowledge base |
121
+ | Technical article link | `memo add "Read: https://..."` | Process → Archive |
122
+ | Bug clue | `memo add "Possible Bug: ..."` | Process → Convert to Fix Issue |
123
+
124
+ ## Difference from Issue
125
+
126
+ | Dimension | Memo | Issue |
127
+ |-----------|------|-------|
128
+ | Purpose | Record ideas | Track tasks |
129
+ | Lifecycle | Temporary, needs regular cleanup | Formal, complete lifecycle |
130
+ | Completion Criteria | Archived or converted | Acceptance criteria passed |
131
+ | Complexity | Simple, one sentence | Detailed, with AC and Tasks |
132
+ | Tracking | None | Complete tracking |
133
+
134
+ ## Best Practices
135
+
136
+ 1. **Record promptly**: Record immediately when ideas flash, avoid forgetting
137
+ 2. **Organize regularly**: Process Memo list at least once a week
138
+ 3. **Convert quickly**: Convert valuable ideas to Issue as soon as possible
139
+ 4. **Delete decisively**: Delete outdated or valueless Memos decisively
140
+ 5. **Keep concise**: Memos are quick notes, no detailed description needed
@@ -0,0 +1,8 @@
1
+ ### Memo (Fleeting Notes)
2
+
3
+ Lightweight note-taking for ideas and quick thoughts.
4
+
5
+ - **Add**: `monoco memo add "Content" [-c context]`
6
+ - **List**: `monoco memo list`
7
+ - **Open**: `monoco memo open` (Edit in default editor)
8
+ - **Guideline**: Use Memos for ideas; use Issues for actionable tasks.
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: monoco-memo
3
+ description: 轻量级备忘录系统,用于快速记录想法、灵感和临时笔记。与正式的 Issue 系统区分开来。
4
+ type: standard
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Monoco Memo (备忘录)
9
+
10
+ 使用此技能快速捕捉 fleeting notes( fleeting 想法),无需创建正式的 Issue。
11
+
12
+ ## 何时使用 Memo vs Issue
13
+
14
+ | 场景 | 使用 | 原因 |
15
+ |------|------|------|
16
+ | 临时想法、灵感 | **Memo** | 不需要追踪、不需要完成状态 |
17
+ | 代码片段、链接收藏 | **Memo** | 快速记录,后续整理 |
18
+ | 会议速记 | **Memo** | 先记录,再提炼成任务 |
19
+ | 可执行的工作单元 | **Issue** | 需要追踪、验收标准、生命周期 |
20
+ | Bug 修复 | **Issue** | 需要记录复现步骤、验证结果 |
21
+ | 功能开发 | **Issue** | 需要设计、分解、交付 |
22
+
23
+ > **核心原则**: Memos 记录**想法**;Issues 处理**可执行任务**。
24
+
25
+ ## 命令
26
+
27
+ ### 添加备忘录
28
+
29
+ ```bash
30
+ monoco memo add "你的备忘录内容"
31
+ ```
32
+
33
+ 可选参数:
34
+ - `-c, --context`: 添加上下文引用(如 `file:line`)
35
+
36
+ 示例:
37
+ ```bash
38
+ # 简单记录
39
+ monoco memo add "考虑使用 Redis 缓存用户会话"
40
+
41
+ # 带上下文的记录
42
+ monoco memo add "这里的递归可能导致栈溢出" -c "src/utils.py:42"
43
+ ```
44
+
45
+ ### 查看备忘录列表
46
+
47
+ ```bash
48
+ monoco memo list
49
+ ```
50
+
51
+ 显示所有未归档的备忘录。
52
+
53
+ ### 打开备忘录文件
54
+
55
+ ```bash
56
+ monoco memo open
57
+ ```
58
+
59
+ 在默认编辑器中打开备忘录文件,用于整理或批量编辑。
60
+
61
+ ## 工作流程
62
+
63
+ ```
64
+ 想法闪现 → monoco memo add "..." → 定期整理 → 提炼成 Issue 或归档
65
+ ```
66
+
67
+ 1. **捕捉**: 有想法时立即使用 `monoco memo add` 记录
68
+ 2. **整理**: 定期(如每日/每周)运行 `monoco memo list` 回顾
69
+ 3. **转化**: 将有价值的备忘录转化为正式的 Issue
70
+ 4. **归档**: 处理完毕后从备忘录中移除
71
+
72
+ ## 最佳实践
73
+
74
+ 1. **保持简洁**: Memo 是速记,不需要详细描述
75
+ 2. **及时转化**: 有价值的想法应尽快转为 Issue,避免遗忘
76
+ 3. **定期清理**: Memos 是临时的,不要让它们无限堆积
77
+ 4. **使用上下文**: 记录代码相关想法时,使用 `-c` 参数标注位置
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: note-processing-workflow
3
+ description: Memo 笔记处理工作流 (Flow Skill)。定义从捕获 fleeting notes 到组织归档的标准操作流程,确保想法有效管理。
4
+ type: flow
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,6 +1,8 @@
1
1
  ---
2
2
  name: monoco-spike
3
3
  description: Manage external reference repositories for research and learning. Provides read-only access to curated codebases.
4
+ type: standard
5
+ version: 1.0.0
4
6
  ---
5
7
 
6
8
  # Spike (Research)
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: research-workflow
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: flow
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,6 +1,8 @@
1
1
  ---
2
2
  name: monoco-spike
3
3
  description: 管理用于研究和学习的外部参考仓库。提供对精选代码库的只读访问。
4
+ type: standard
5
+ version: 1.0.0
4
6
  ---
5
7
 
6
8
  # Spike (研究)
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: research-workflow
3
+ description: Spike 研究工作流 (Flow Skill)。定义从添加外部仓库到知识提取和归档的标准操作流程,确保外部知识有效管理。
4
+ type: flow
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. **知识转化**: 将学到的模式转化为项目的实际改进
monoco/main.py CHANGED
@@ -166,10 +166,9 @@ app.add_typer(config_cmd.app, name="config", help="Manage configuration")
166
166
  app.add_typer(project_cmd.app, name="project", help="Manage projects")
167
167
  app.add_typer(workspace_cmd.app, name="workspace", help="Manage workspace")
168
168
 
169
- from monoco.features.scheduler import cli as scheduler_cmd
169
+ from monoco.features.agent import cli as scheduler_cmd
170
170
 
171
- app.add_typer(scheduler_cmd.app, name="agent", help="Manage agent sessions")
172
- app.add_typer(scheduler_cmd.role_app, name="role", help="Manage agent roles")
171
+ app.add_typer(scheduler_cmd.app, name="agent", help="Manage agent sessions and roles")
173
172
 
174
173
  from monoco.features.memo import app as memo_app
175
174