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,224 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: monoco_workflow_issue_development
|
|
3
|
-
description: Execute complete workflow for Issue development, testing, submission and review (Copilot Mode)
|
|
4
|
-
type: workflow
|
|
5
|
-
domain: issue
|
|
6
|
-
version: 1.0.0
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Issue Develop Workflow
|
|
10
|
-
|
|
11
|
-
Complete standardized workflow for Issue development, testing, submission, review and merge.
|
|
12
|
-
|
|
13
|
-
**Applicable Scenario**: Copilot Mode (Human-led, AI-assisted)
|
|
14
|
-
**Target Users**: Developers responsible for implementing features or fixing bugs
|
|
15
|
-
|
|
16
|
-
## Workflow State Machine
|
|
17
|
-
|
|
18
|
-
```mermaid
|
|
19
|
-
stateDiagram-v2
|
|
20
|
-
[*] --> Setup: Start Development
|
|
21
|
-
|
|
22
|
-
Setup --> Develop: Environment Ready
|
|
23
|
-
Setup --> Setup: Dependencies Not Met<br/>(Wait for Resolution)
|
|
24
|
-
|
|
25
|
-
Develop --> Test: Coding Complete
|
|
26
|
-
Develop --> Develop: Needs Iteration<br/>(Continue Development)
|
|
27
|
-
|
|
28
|
-
Test --> Submit: Tests Pass
|
|
29
|
-
Test --> Develop: Tests Fail<br/>(Fix Code)
|
|
30
|
-
|
|
31
|
-
state "Review Loop" as ReviewLoop {
|
|
32
|
-
Submit --> Review: Submit for Review
|
|
33
|
-
Review --> Fix: Changes Required
|
|
34
|
-
Fix --> Submit: Resubmit
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
Review --> Merge: Review Passed
|
|
38
|
-
|
|
39
|
-
Merge --> [*]: Merge Complete
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Execution Steps
|
|
43
|
-
|
|
44
|
-
### 1. Setup
|
|
45
|
-
|
|
46
|
-
- **Goal**: Prepare development environment, ensure ready to code
|
|
47
|
-
- **Checkpoints**:
|
|
48
|
-
- [ ] Run `monoco issue start <ID> --branch` to create feature branch
|
|
49
|
-
- [ ] Confirm branch is created and switched
|
|
50
|
-
- [ ] Verify not currently on main/master branch
|
|
51
|
-
- [ ] Check if dependency Issues are completed
|
|
52
|
-
- [ ] Confirm Issue is refined (has technical task list)
|
|
53
|
-
|
|
54
|
-
**Environment Checklist**:
|
|
55
|
-
| Check Item | Command/Method |
|
|
56
|
-
|------------|----------------|
|
|
57
|
-
| Current Branch | `git branch --show-current` |
|
|
58
|
-
| Branch Status | `git status` |
|
|
59
|
-
| Dependency Issues | `monoco issue show <ID>` |
|
|
60
|
-
| Code Standards | Check project lint configuration |
|
|
61
|
-
|
|
62
|
-
### 2. Develop
|
|
63
|
-
|
|
64
|
-
- **Goal**: Implement feature or fix bug
|
|
65
|
-
- **Strategy**: Iterative development, small commits
|
|
66
|
-
- **Checkpoints**:
|
|
67
|
-
- [ ] Follow project code standards
|
|
68
|
-
- [ ] Write/update unit tests
|
|
69
|
-
- [ ] Commit code regularly (small commits)
|
|
70
|
-
- [ ] Update file tracking (`monoco issue sync-files`)
|
|
71
|
-
- [ ] Maintain code reviewability (single commit < 400 lines)
|
|
72
|
-
|
|
73
|
-
**Development Principles**:
|
|
74
|
-
| Principle | Description |
|
|
75
|
-
|-----------|-------------|
|
|
76
|
-
| Small Commits | Each commit is a logical unit |
|
|
77
|
-
| Test First | Prioritize writing test cases |
|
|
78
|
-
| Continuous Sync | Update file tracking promptly |
|
|
79
|
-
| Stay Focused | Avoid unrelated changes |
|
|
80
|
-
|
|
81
|
-
### 3. Test
|
|
82
|
-
|
|
83
|
-
- **Goal**: Ensure code quality and functional correctness
|
|
84
|
-
- **Checkpoints**:
|
|
85
|
-
- [ ] Run unit tests, ensure they pass
|
|
86
|
-
- [ ] Run integration tests (if applicable)
|
|
87
|
-
- [ ] Run code style checks (lint)
|
|
88
|
-
- [ ] Manually verify functionality (if needed)
|
|
89
|
-
- [ ] Check test coverage
|
|
90
|
-
|
|
91
|
-
**Test Levels**:
|
|
92
|
-
```
|
|
93
|
-
Unit Test → Integration Test → E2E Test → Manual Verification
|
|
94
|
-
↑ ↑ ↑ ↑
|
|
95
|
-
Required Recommended As Needed As Needed
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### 4. Submit
|
|
99
|
-
|
|
100
|
-
- **Goal**: Prepare for code review
|
|
101
|
-
- **Checkpoints**:
|
|
102
|
-
- [ ] Run `monoco issue lint` to check compliance
|
|
103
|
-
- [ ] Fix all Lint errors
|
|
104
|
-
- [ ] Update task list status (mark completed items)
|
|
105
|
-
- [ ] Write clear commit message
|
|
106
|
-
- [ ] Run `monoco issue submit <ID>`
|
|
107
|
-
|
|
108
|
-
**Commit Message Specification**:
|
|
109
|
-
```
|
|
110
|
-
<type>(<scope>): <subject>
|
|
111
|
-
|
|
112
|
-
<body>
|
|
113
|
-
|
|
114
|
-
Refs: <ISSUE-ID>
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
| Type | Purpose |
|
|
118
|
-
|------|---------|
|
|
119
|
-
| feat | New feature |
|
|
120
|
-
| fix | Bug fix |
|
|
121
|
-
| docs | Documentation update |
|
|
122
|
-
| style | Code formatting |
|
|
123
|
-
| refactor | Refactoring |
|
|
124
|
-
| test | Test related |
|
|
125
|
-
| chore | Build/tools |
|
|
126
|
-
|
|
127
|
-
### 5. Review
|
|
128
|
-
|
|
129
|
-
- **Goal**: Code quality and process compliance check
|
|
130
|
-
- **Checkpoints**:
|
|
131
|
-
- [ ] Is functionality correctly implemented
|
|
132
|
-
- [ ] Does code meet design specifications
|
|
133
|
-
- [ ] Are tests sufficient
|
|
134
|
-
- [ ] Is documentation updated
|
|
135
|
-
- [ ] Does it follow project standards
|
|
136
|
-
|
|
137
|
-
**Review Dimensions**:
|
|
138
|
-
| Dimension | Check Content |
|
|
139
|
-
|-----------|---------------|
|
|
140
|
-
| Correctness | Does functionality work as expected |
|
|
141
|
-
| Design | Does it meet architecture design |
|
|
142
|
-
| Testing | Is test coverage sufficient |
|
|
143
|
-
| Standards | Does it follow code standards |
|
|
144
|
-
| Documentation | Is documentation updated |
|
|
145
|
-
| Performance | Are there obvious performance issues |
|
|
146
|
-
| Security | Are there security risks |
|
|
147
|
-
|
|
148
|
-
### 6. Merge
|
|
149
|
-
|
|
150
|
-
- **Goal**: Complete Issue, merge code
|
|
151
|
-
- **Checkpoints**:
|
|
152
|
-
- [ ] Code has passed review
|
|
153
|
-
- [ ] All CI checks pass
|
|
154
|
-
- [ ] Code is merged to main branch
|
|
155
|
-
- [ ] Run `monoco issue close <ID> --solution completed --prune`
|
|
156
|
-
- [ ] Verify branch is cleaned up
|
|
157
|
-
- [ ] Update Review Comments (record review feedback)
|
|
158
|
-
|
|
159
|
-
## Decision Branches
|
|
160
|
-
|
|
161
|
-
| Condition | Action |
|
|
162
|
-
|-----------|--------|
|
|
163
|
-
| Dependency Issues not completed | Return to Setup, wait for dependencies |
|
|
164
|
-
| Tests fail | Return to Develop, fix code |
|
|
165
|
-
| Lint fails | Fix compliance issues, resubmit |
|
|
166
|
-
| Review requires changes | Return to Fix, modify per feedback |
|
|
167
|
-
| Review passed | Enter Merge, merge and cleanup |
|
|
168
|
-
|
|
169
|
-
## Compliance Requirements
|
|
170
|
-
|
|
171
|
-
- **Prohibited**: Directly modify code on main/master branch
|
|
172
|
-
- **Required**: Use `monoco issue start --branch` to create feature branch
|
|
173
|
-
- **Required**: All unit tests must pass before Submit
|
|
174
|
-
- **Required**: Each Issue must have at least 2 Checkboxes
|
|
175
|
-
- **Required**: Review/Done phase must include Review Comments
|
|
176
|
-
- **Recommended**: Small commits, frequently sync file tracking
|
|
177
|
-
|
|
178
|
-
## Related Commands
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
# Start development
|
|
182
|
-
monoco issue start FEAT-0001 --branch
|
|
183
|
-
|
|
184
|
-
# Sync file tracking
|
|
185
|
-
monoco issue sync-files
|
|
186
|
-
|
|
187
|
-
# Check compliance
|
|
188
|
-
monoco issue lint
|
|
189
|
-
|
|
190
|
-
# Submit for review
|
|
191
|
-
monoco issue submit FEAT-0001
|
|
192
|
-
|
|
193
|
-
# Close Issue
|
|
194
|
-
monoco issue close FEAT-0001 --solution completed --prune
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
## Relationship with flow_engineer
|
|
198
|
-
|
|
199
|
-
The relationship between this workflow and `flow_engineer`:
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
issue-develop-workflow flow_engineer
|
|
203
|
-
│ │
|
|
204
|
-
├── Setup ─────────────────────┤
|
|
205
|
-
├── Develop ←──────────────────┤ Investigate → Code → Test
|
|
206
|
-
├── Test ──────────────────────┤
|
|
207
|
-
├── Submit ────────────────────┤ Report → Submit
|
|
208
|
-
├── Review ────────────────────┤
|
|
209
|
-
└── Merge ─────────────────────┤
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
- `issue-develop-workflow`: Focuses on Issue-level process management
|
|
213
|
-
- `flow_engineer`: Focuses on specific technical process for code implementation
|
|
214
|
-
|
|
215
|
-
During the Develop phase, developers should follow `flow_engineer`'s Investigate → Code → Test → Report → Submit process.
|
|
216
|
-
|
|
217
|
-
## Copilot Mode Tips
|
|
218
|
-
|
|
219
|
-
As an AI Copilot, you should:
|
|
220
|
-
1. **Assist coding**: Help implement features, fix bugs
|
|
221
|
-
2. **Code review**: Pre-review before submission to find potential issues
|
|
222
|
-
3. **Test assistance**: Help write test cases, ensure coverage
|
|
223
|
-
4. **Compliance check**: Remind developers to follow project standards
|
|
224
|
-
5. **Documentation sync**: Assist in updating related documentation
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: monoco_workflow_issue_management
|
|
3
|
-
description: Issue Lifecycle Workflow (Flow Skill). Defines the complete Issue management process from creation to closure, ensuring task tracking and process compliance.
|
|
4
|
-
type: workflow
|
|
5
|
-
domain: issue
|
|
6
|
-
version: 1.0.0
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Issue Lifecycle Workflow
|
|
10
|
-
|
|
11
|
-
Standardized workflow for Issue lifecycle, ensuring "Open → Start → Develop → Submit → Review → Close" process.
|
|
12
|
-
|
|
13
|
-
## Workflow State Machine
|
|
14
|
-
|
|
15
|
-
```mermaid
|
|
16
|
-
stateDiagram-v2
|
|
17
|
-
[*] --> Open: Create Issue
|
|
18
|
-
|
|
19
|
-
Open --> Start: Prepare Development
|
|
20
|
-
Open --> Open: Requirements Unclear<br/>(Wait for Clarification)
|
|
21
|
-
|
|
22
|
-
Start --> Develop: Branch Created
|
|
23
|
-
Start --> Start: Branch Conflict<br/>(Resolve Conflict)
|
|
24
|
-
|
|
25
|
-
Develop --> Submit: Development Complete
|
|
26
|
-
Develop --> Develop: Tests Fail<br/>(Fix Code)
|
|
27
|
-
|
|
28
|
-
state "Oracle Loop" as ReviewLoop {
|
|
29
|
-
Submit --> Review: Submit for Review
|
|
30
|
-
Review --> Fix: Rejected
|
|
31
|
-
Fix --> Submit: Resubmit
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
Review --> Close: Approved for Merge
|
|
35
|
-
|
|
36
|
-
Close --> [*]: Cleanup Complete
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Execution Steps
|
|
40
|
-
|
|
41
|
-
### 1. Open
|
|
42
|
-
|
|
43
|
-
- **Goal**: Create clear, actionable Issue
|
|
44
|
-
- **Input**: Requirement description, type, priority
|
|
45
|
-
- **Output**: Issue Ticket file
|
|
46
|
-
- **Checkpoints**:
|
|
47
|
-
- [ ] Use `monoco issue create <type> -t "Title"`
|
|
48
|
-
- [ ] Select appropriate type (epic/feature/chore/fix)
|
|
49
|
-
- [ ] Write clear description and acceptance criteria
|
|
50
|
-
- [ ] Set dependency relationships (if needed)
|
|
51
|
-
- [ ] Ensure at least 2 Checkboxes
|
|
52
|
-
|
|
53
|
-
### 2. Start
|
|
54
|
-
|
|
55
|
-
- **Goal**: Prepare development environment, create feature branch
|
|
56
|
-
- **Checkpoints**:
|
|
57
|
-
- [ ] Run `monoco issue start <ID> --branch`
|
|
58
|
-
- [ ] Confirm branch is created and switched
|
|
59
|
-
- [ ] Verify not currently on main/master branch
|
|
60
|
-
- [ ] Check if dependency Issues are completed
|
|
61
|
-
|
|
62
|
-
### 3. Develop
|
|
63
|
-
|
|
64
|
-
- **Goal**: Implement feature or fix bug
|
|
65
|
-
- **Strategy**: Iterative development, continuous testing
|
|
66
|
-
- **Checkpoints**:
|
|
67
|
-
- [ ] Follow project code standards
|
|
68
|
-
- [ ] Write/update unit tests
|
|
69
|
-
- [ ] Run test suite, ensure it passes
|
|
70
|
-
- [ ] Commit code regularly (small commits)
|
|
71
|
-
- [ ] Update file tracking (`monoco issue sync-files`)
|
|
72
|
-
|
|
73
|
-
### 4. Submit
|
|
74
|
-
|
|
75
|
-
- **Goal**: Prepare for code review
|
|
76
|
-
- **Checkpoints**:
|
|
77
|
-
- [ ] Run `monoco issue lint` to check compliance
|
|
78
|
-
- [ ] Fix all Lint errors
|
|
79
|
-
- [ ] Update task list status
|
|
80
|
-
- [ ] Run `monoco issue submit <ID>`
|
|
81
|
-
- [ ] Write change summary
|
|
82
|
-
|
|
83
|
-
### 5. Review
|
|
84
|
-
|
|
85
|
-
- **Goal**: Code quality and process compliance check
|
|
86
|
-
- **Checkpoints**:
|
|
87
|
-
- [ ] Is functionality correctly implemented
|
|
88
|
-
- [ ] Does code meet design specifications
|
|
89
|
-
- [ ] Are tests sufficient
|
|
90
|
-
- [ ] Is documentation updated
|
|
91
|
-
- [ ] Does it follow project standards
|
|
92
|
-
|
|
93
|
-
### 6. Close
|
|
94
|
-
|
|
95
|
-
- **Goal**: Complete Issue, cleanup environment
|
|
96
|
-
- **Checkpoints**:
|
|
97
|
-
- [ ] Code is merged to main branch
|
|
98
|
-
- [ ] Run `monoco issue close <ID> --solution completed --prune`
|
|
99
|
-
- [ ] Verify branch is cleaned up
|
|
100
|
-
- [ ] Update Review Comments (if needed)
|
|
101
|
-
|
|
102
|
-
## Decision Branches
|
|
103
|
-
|
|
104
|
-
| Condition | Action |
|
|
105
|
-
|-----------|--------|
|
|
106
|
-
| Requirements unclear | Return to Open, request clarification |
|
|
107
|
-
| Branch creation fails | Check Git status, resolve conflicts |
|
|
108
|
-
| Tests fail | Return to Develop, fix code |
|
|
109
|
-
| Lint fails | Fix compliance issues, resubmit |
|
|
110
|
-
| Review rejected | Return to Develop, modify per feedback |
|
|
111
|
-
| Review passed | Enter Close, merge and cleanup |
|
|
112
|
-
|
|
113
|
-
## Compliance Requirements
|
|
114
|
-
|
|
115
|
-
- **Prohibited**: Directly modify code on main/master branch
|
|
116
|
-
- **Required**: Use `monoco issue start --branch` to create feature branch
|
|
117
|
-
- **Required**: All unit tests must pass before Submit
|
|
118
|
-
- **Required**: Each Issue must have at least 2 Checkboxes
|
|
119
|
-
- **Required**: Review/Done phase must include Review Comments
|
|
120
|
-
- **Recommended**: Small commits, frequently sync file tracking
|
|
121
|
-
|
|
122
|
-
## Related Commands
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Create Issue
|
|
126
|
-
monoco issue create feature -t "Title"
|
|
127
|
-
|
|
128
|
-
# Start development
|
|
129
|
-
monoco issue start FEAT-0001 --branch
|
|
130
|
-
|
|
131
|
-
# Sync file tracking
|
|
132
|
-
monoco issue sync-files
|
|
133
|
-
|
|
134
|
-
# Check compliance
|
|
135
|
-
monoco issue lint
|
|
136
|
-
|
|
137
|
-
# Submit for review
|
|
138
|
-
monoco issue submit FEAT-0001
|
|
139
|
-
|
|
140
|
-
# Close Issue
|
|
141
|
-
monoco issue close FEAT-0001 --solution completed --prune
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## Issue Type Guide
|
|
145
|
-
|
|
146
|
-
| Type | Purpose | Prefix | Mindset |
|
|
147
|
-
|------|---------|--------|---------|
|
|
148
|
-
| Epic | Grand goals, vision container | EPIC- | Architect |
|
|
149
|
-
| Feature | User value increment | FEAT- | Product Owner |
|
|
150
|
-
| Chore | Engineering tasks | CHORE- | Builder |
|
|
151
|
-
| Fix | Bug fixes | FIX- | Debugger |
|
|
152
|
-
|
|
153
|
-
## Relationship with flow_engineer
|
|
154
|
-
|
|
155
|
-
This workflow complements `flow_engineer`:
|
|
156
|
-
- `issue-lifecycle-workflow`: Focuses on Issue management process
|
|
157
|
-
- `flow_engineer`: Focuses on code implementation process
|
|
158
|
-
|
|
159
|
-
Engineers should follow `flow_engineer`'s Investigate → Code → Test → Report → Submit process during the Develop phase.
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: monoco_workflow_issue_refinement
|
|
3
|
-
description: Investigate and refine Issue, supplement technical details and implementation plan (Copilot Mode)
|
|
4
|
-
type: workflow
|
|
5
|
-
domain: issue
|
|
6
|
-
version: 1.0.0
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Issue Refine Workflow
|
|
10
|
-
|
|
11
|
-
Standardized workflow for technical investigation, architecture analysis and solution design for newly created or pending refinement Issues.
|
|
12
|
-
|
|
13
|
-
**Applicable Scenario**: Copilot Mode (Human-led, AI-assisted)
|
|
14
|
-
**Target Users**: Developers who need to deeply understand problems and formulate implementation plans
|
|
15
|
-
|
|
16
|
-
## Workflow State Machine
|
|
17
|
-
|
|
18
|
-
```mermaid
|
|
19
|
-
stateDiagram-v2
|
|
20
|
-
[*] --> Investigate: Start Refinement
|
|
21
|
-
|
|
22
|
-
Investigate --> Analyze: Gather Information
|
|
23
|
-
Investigate --> Investigate: Insufficient Information<br/>(Continue Investigation)
|
|
24
|
-
|
|
25
|
-
Analyze --> Architect: Architecture Design Required
|
|
26
|
-
Analyze --> Document: Direct Documentation
|
|
27
|
-
|
|
28
|
-
Architect --> Document: Design Complete
|
|
29
|
-
|
|
30
|
-
Document --> [*]: Issue Refinement Complete
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Execution Steps
|
|
34
|
-
|
|
35
|
-
### 1. Investigate
|
|
36
|
-
|
|
37
|
-
- **Goal**: Comprehensively gather information related to the Issue
|
|
38
|
-
- **Input**: Issue Ticket, related code, documentation
|
|
39
|
-
- **Output**: Information gathering report
|
|
40
|
-
- **Checkpoints**:
|
|
41
|
-
- [ ] Read Issue description, understand core problem
|
|
42
|
-
- [ ] Identify related code modules and files
|
|
43
|
-
- [ ] Review related Issue/PR history
|
|
44
|
-
- [ ] Check external dependencies and constraints
|
|
45
|
-
- [ ] Collect similar implementation references (Spike)
|
|
46
|
-
|
|
47
|
-
**Investigation Dimensions**:
|
|
48
|
-
| Dimension | Investigation Content |
|
|
49
|
-
|-----------|----------------------|
|
|
50
|
-
| Code | Current implementation of related modules |
|
|
51
|
-
| History | Related Issues, PRs, design documents |
|
|
52
|
-
| Dependencies | External libraries, APIs, service dependencies |
|
|
53
|
-
| Constraints | Performance requirements, security requirements, compatibility |
|
|
54
|
-
| References | Best practices for similar features |
|
|
55
|
-
|
|
56
|
-
### 2. Analyze
|
|
57
|
-
|
|
58
|
-
- **Goal**: Analyze gathered information, identify key problems and solution options
|
|
59
|
-
- **Checkpoints**:
|
|
60
|
-
- [ ] Analyze architecture inheritance (how to fit into existing architecture)
|
|
61
|
-
- [ ] Assess security impact
|
|
62
|
-
- [ ] Assess performance impact
|
|
63
|
-
- [ ] Assess maintainability
|
|
64
|
-
- [ ] Identify potential risks and mitigation measures
|
|
65
|
-
|
|
66
|
-
**Analysis Framework**:
|
|
67
|
-
|
|
68
|
-
#### Architecture Inheritance
|
|
69
|
-
- Are existing architecture patterns applicable?
|
|
70
|
-
- Is a new abstraction layer needed?
|
|
71
|
-
- Impact on coupling with existing modules?
|
|
72
|
-
|
|
73
|
-
#### Security Assessment
|
|
74
|
-
- Input validation requirements
|
|
75
|
-
- Access control requirements
|
|
76
|
-
- Data protection requirements
|
|
77
|
-
- Potential attack surface analysis
|
|
78
|
-
|
|
79
|
-
#### Performance Assessment
|
|
80
|
-
- Time complexity impact
|
|
81
|
-
- Space complexity impact
|
|
82
|
-
- Concurrency/parallelism requirements
|
|
83
|
-
- Resource usage estimation
|
|
84
|
-
|
|
85
|
-
#### Maintainability Assessment
|
|
86
|
-
- Code complexity changes
|
|
87
|
-
- Test coverage requirements
|
|
88
|
-
- Documentation update requirements
|
|
89
|
-
- Future extensibility
|
|
90
|
-
|
|
91
|
-
### 3. Architect (Optional)
|
|
92
|
-
|
|
93
|
-
- **Goal**: Architecture design for complex Issues
|
|
94
|
-
- **Applicable**: Issues involving architecture changes or large features
|
|
95
|
-
- **Checkpoints**:
|
|
96
|
-
- [ ] Determine technical solution selection
|
|
97
|
-
- [ ] Design interfaces and interaction protocols
|
|
98
|
-
- [ ] Plan data model changes
|
|
99
|
-
- [ ] Define implementation milestones
|
|
100
|
-
|
|
101
|
-
**Outputs**:
|
|
102
|
-
- Architecture Decision Record (ADR)
|
|
103
|
-
- Interface design document
|
|
104
|
-
- Data model changes
|
|
105
|
-
- Milestone plan
|
|
106
|
-
|
|
107
|
-
### 4. Document
|
|
108
|
-
|
|
109
|
-
- **Goal**: Update analysis results to Issue
|
|
110
|
-
- **Checkpoints**:
|
|
111
|
-
- [ ] Update technical task list
|
|
112
|
-
- [ ] Add architecture decision explanation
|
|
113
|
-
- [ ] Supplement risks and mitigation measures
|
|
114
|
-
- [ ] Update acceptance criteria (if needed)
|
|
115
|
-
- [ ] Add reference links and dependency descriptions
|
|
116
|
-
- [ ] Run `monoco issue lint` to verify compliance
|
|
117
|
-
|
|
118
|
-
**Refined Issue Structure**:
|
|
119
|
-
|
|
120
|
-
```markdown
|
|
121
|
-
## Objective
|
|
122
|
-
[Original Content]
|
|
123
|
-
|
|
124
|
-
## Acceptance Criteria
|
|
125
|
-
- [ ] Acceptance criterion 1
|
|
126
|
-
- [ ] Acceptance criterion 2
|
|
127
|
-
|
|
128
|
-
## Technical Analysis
|
|
129
|
-
|
|
130
|
-
### Current State Analysis
|
|
131
|
-
Describe current code state and related implementation.
|
|
132
|
-
|
|
133
|
-
### Solution Selection
|
|
134
|
-
| Solution | Pros | Cons | Decision |
|
|
135
|
-
|----------|------|------|----------|
|
|
136
|
-
| A | ... | ... | Adopted/Alternative |
|
|
137
|
-
| B | ... | ... | Alternative/Abandoned |
|
|
138
|
-
|
|
139
|
-
### Risk Assessment
|
|
140
|
-
| Risk | Impact | Mitigation |
|
|
141
|
-
|------|--------|------------|
|
|
142
|
-
| Risk1 | High/Medium/Low | Measure... |
|
|
143
|
-
|
|
144
|
-
## Technical Tasks
|
|
145
|
-
- [ ] Task 1
|
|
146
|
-
- [ ] Task 2
|
|
147
|
-
|
|
148
|
-
## References
|
|
149
|
-
- Related Issue: #XXX
|
|
150
|
-
- Reference Implementation: [Link]
|
|
151
|
-
- ADR: [Link]
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## Decision Branches
|
|
155
|
-
|
|
156
|
-
| Condition | Action |
|
|
157
|
-
|-----------|--------|
|
|
158
|
-
| Insufficient information | Return to Investigate, continue gathering |
|
|
159
|
-
| Architecture design needed | Enter Architect phase |
|
|
160
|
-
| Solution is clear | Directly enter Document phase |
|
|
161
|
-
| Blocking dependency found | Create dependency Issue, mark current Issue |
|
|
162
|
-
| Problem too complex | Suggest splitting into multiple Issues |
|
|
163
|
-
|
|
164
|
-
## Refinement Level Guide
|
|
165
|
-
|
|
166
|
-
| Issue Type | Refinement Requirements |
|
|
167
|
-
|------------|------------------------|
|
|
168
|
-
| Epic | Must include architecture design, milestones, subtask decomposition |
|
|
169
|
-
| Feature | Must include technical solution, risk assessment, task decomposition |
|
|
170
|
-
| Chore | Must include implementation steps, impact scope |
|
|
171
|
-
| Fix | Must include root cause analysis, fix solution, test cases |
|
|
172
|
-
|
|
173
|
-
## Related Commands
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
# View Issue details
|
|
177
|
-
monoco issue show <ID>
|
|
178
|
-
|
|
179
|
-
# Check compliance
|
|
180
|
-
monoco issue lint
|
|
181
|
-
|
|
182
|
-
# Sync file tracking
|
|
183
|
-
monoco issue sync-files
|
|
184
|
-
|
|
185
|
-
# View related Spike
|
|
186
|
-
monoco spike list
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Relationship with flow_engineer
|
|
190
|
-
|
|
191
|
-
This workflow complements `flow_engineer`:
|
|
192
|
-
- `issue-refine-workflow`: Focuses on Issue refinement phase, completing technical investigation before development
|
|
193
|
-
- `flow_engineer`: Focuses on code implementation phase, executing Investigate → Code → Test → Report → Submit
|
|
194
|
-
|
|
195
|
-
Information gathered during refinement phase will provide important input for the Engineer phase's Investigate.
|
|
196
|
-
|
|
197
|
-
## Copilot Mode Tips
|
|
198
|
-
|
|
199
|
-
As an AI Copilot, you should:
|
|
200
|
-
1. **Explore proactively**: Help developers discover potential issues and edge cases
|
|
201
|
-
2. **Provide comparisons**: Give multiple technical solutions, analyze pros and cons
|
|
202
|
-
3. **Assist evaluation**: Help with security, performance impact assessment
|
|
203
|
-
4. **Remind omissions**: Check for missing key information or risk points
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# Issue Feature Pre-Commit Hook
|
|
3
|
-
# Runs monoco issue lint on staged Issue files
|
|
4
|
-
|
|
5
|
-
echo "[Monoco] Checking Issue integrity..."
|
|
6
|
-
|
|
7
|
-
# Get the list of staged Issue files
|
|
8
|
-
STAGED_ISSUES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '^Issues/.*\.md$' || true)
|
|
9
|
-
|
|
10
|
-
if [ -z "$STAGED_ISSUES" ]; then
|
|
11
|
-
echo "[Monoco] No Issue files staged. Skipping lint."
|
|
12
|
-
exit 0
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
# Run lint on staged Issue files
|
|
16
|
-
echo "[Monoco] Running lint on staged Issue files..."
|
|
17
|
-
|
|
18
|
-
# Build file list for monoco command
|
|
19
|
-
FILE_ARGS=""
|
|
20
|
-
for file in $STAGED_ISSUES; do
|
|
21
|
-
FILE_ARGS="$FILE_ARGS $file"
|
|
22
|
-
done
|
|
23
|
-
|
|
24
|
-
# Execute lint on each file
|
|
25
|
-
LINT_EXIT=0
|
|
26
|
-
for file in $STAGED_ISSUES; do
|
|
27
|
-
$MONOCO_CMD issue lint "$file"
|
|
28
|
-
if [ $? -ne 0 ]; then
|
|
29
|
-
LINT_EXIT=1
|
|
30
|
-
fi
|
|
31
|
-
done
|
|
32
|
-
|
|
33
|
-
if [ $LINT_EXIT -ne 0 ]; then
|
|
34
|
-
echo ""
|
|
35
|
-
echo "[Monoco] Issue lint failed. Please fix the errors above."
|
|
36
|
-
echo "[Monoco] You can run 'monoco issue lint --fix' to attempt automatic fixes."
|
|
37
|
-
exit $LINT_EXIT
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
echo "[Monoco] Issue lint passed."
|
|
41
|
-
exit 0
|