monoco-toolkit 0.2.6__py3-none-any.whl → 0.2.7__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/config.py +14 -16
- monoco/core/resources/zh/SKILL.md +6 -7
- monoco/features/i18n/resources/zh/SKILL.md +5 -5
- monoco/features/issue/commands.py +2 -20
- monoco/features/issue/core.py +22 -10
- monoco/features/issue/engine/config.py +2 -19
- monoco/features/issue/models.py +18 -1
- monoco/features/issue/resources/zh/SKILL.md +8 -9
- monoco/features/spike/resources/zh/SKILL.md +2 -2
- monoco/main.py +2 -11
- monoco_toolkit-0.2.7.dist-info/METADATA +129 -0
- {monoco_toolkit-0.2.6.dist-info → monoco_toolkit-0.2.7.dist-info}/RECORD +15 -28
- monoco/features/agent/commands.py +0 -237
- monoco/features/agent/core.py +0 -48
- monoco/features/agent/doctor.py +0 -30
- monoco/features/agent/resources/en/critique.prompty +0 -16
- monoco/features/agent/resources/en/develop.prompty +0 -16
- monoco/features/agent/resources/en/investigate.prompty +0 -16
- monoco/features/agent/resources/en/refine.prompty +0 -14
- monoco/features/agent/resources/en/verify.prompty +0 -16
- monoco/features/agent/resources/zh/critique.prompty +0 -18
- monoco/features/agent/resources/zh/develop.prompty +0 -18
- monoco/features/agent/resources/zh/investigate.prompty +0 -18
- monoco/features/agent/resources/zh/refine.prompty +0 -16
- monoco/features/agent/resources/zh/verify.prompty +0 -18
- monoco_toolkit-0.2.6.dist-info/METADATA +0 -93
- {monoco_toolkit-0.2.6.dist-info → monoco_toolkit-0.2.7.dist-info}/WHEEL +0 -0
- {monoco_toolkit-0.2.6.dist-info → monoco_toolkit-0.2.7.dist-info}/entry_points.txt +0 -0
- {monoco_toolkit-0.2.6.dist-info → monoco_toolkit-0.2.7.dist-info}/licenses/LICENSE +0 -0
monoco/core/config.py
CHANGED
|
@@ -10,7 +10,7 @@ import asyncio
|
|
|
10
10
|
from watchdog.observers import Observer
|
|
11
11
|
from watchdog.events import FileSystemEventHandler
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
|
|
15
15
|
logger = logging.getLogger("monoco.core.config")
|
|
16
16
|
|
|
@@ -46,15 +46,7 @@ class TelemetryConfig(BaseModel):
|
|
|
46
46
|
"""Configuration for Telemetry."""
|
|
47
47
|
enabled: Optional[bool] = Field(default=None, description="Whether telemetry is enabled")
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
"""Configuration for Agent Environment Integration."""
|
|
51
|
-
targets: Optional[list[str]] = Field(default=None, description="Specific target files to inject into (e.g. .cursorrules)")
|
|
52
|
-
framework: Optional[str] = Field(default=None, description="Manually specified agent framework (cursor, windsurf, etc.)")
|
|
53
|
-
includes: Optional[list[str]] = Field(default=None, description="List of specific features to include in injection")
|
|
54
|
-
integrations: Optional[Dict[str, "AgentIntegration"]] = Field(
|
|
55
|
-
default=None,
|
|
56
|
-
description="Custom agent framework integrations (overrides defaults from monoco.core.integrations)"
|
|
57
|
-
)
|
|
49
|
+
|
|
58
50
|
|
|
59
51
|
class IssueTypeConfig(BaseModel):
|
|
60
52
|
name: str
|
|
@@ -128,7 +120,7 @@ class MonocoConfig(BaseModel):
|
|
|
128
120
|
i18n: I18nConfig = Field(default_factory=I18nConfig)
|
|
129
121
|
ui: UIConfig = Field(default_factory=UIConfig)
|
|
130
122
|
telemetry: TelemetryConfig = Field(default_factory=TelemetryConfig)
|
|
131
|
-
|
|
123
|
+
|
|
132
124
|
issue: IssueSchemaConfig = Field(default_factory=IssueSchemaConfig)
|
|
133
125
|
|
|
134
126
|
@staticmethod
|
|
@@ -241,15 +233,21 @@ def get_config_path(scope: ConfigScope, project_root: Optional[str] = None) -> P
|
|
|
241
233
|
return cwd / ".monoco" / "project.yaml"
|
|
242
234
|
|
|
243
235
|
def find_monoco_root(start_path: Optional[Path] = None) -> Path:
|
|
244
|
-
"""
|
|
236
|
+
"""
|
|
237
|
+
Find the Monoco Workspace root.
|
|
238
|
+
Strictly restricted to checking the current directory (or its parent if CWD is .monoco).
|
|
239
|
+
Recursive upward lookup is disabled per FIX-0009.
|
|
240
|
+
"""
|
|
245
241
|
current = (start_path or Path.cwd()).resolve()
|
|
246
|
-
|
|
242
|
+
|
|
243
|
+
# Check if we are inside a .monoco folder
|
|
247
244
|
if current.name == ".monoco":
|
|
248
245
|
return current.parent
|
|
249
246
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
247
|
+
# Check if current directory has .monoco
|
|
248
|
+
if (current / ".monoco").exists():
|
|
249
|
+
return current
|
|
250
|
+
|
|
253
251
|
return current
|
|
254
252
|
|
|
255
253
|
def load_raw_config(scope: ConfigScope, project_root: Optional[str] = None) -> Dict[str, Any]:
|
|
@@ -9,11 +9,11 @@ Monoco Toolkit 的核心功能和命令。
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
Monoco
|
|
12
|
+
Monoco 是一个开发者生产力工具包,提供:
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
14
|
+
- **项目初始化**: 标准化的项目结构
|
|
15
|
+
- **配置管理**: 全局和项目级别的配置
|
|
16
|
+
- **工作空间管理**: 多项目设置
|
|
17
17
|
|
|
18
18
|
## 核心命令
|
|
19
19
|
|
|
@@ -34,7 +34,6 @@ Monoco 是一个开发者生产力工具包,提供:
|
|
|
34
34
|
### Agent 集成
|
|
35
35
|
|
|
36
36
|
- **`monoco sync`**: 与 agent 环境同步
|
|
37
|
-
|
|
38
37
|
- 将系统提示注入到 agent 配置文件(GEMINI.md, CLAUDE.md 等)
|
|
39
38
|
- 分发 skills 到 agent 框架目录
|
|
40
39
|
- 遵循 `i18n.source_lang` 的语言配置
|
|
@@ -45,12 +44,12 @@ Monoco 是一个开发者生产力工具包,提供:
|
|
|
45
44
|
|
|
46
45
|
## 配置结构
|
|
47
46
|
|
|
48
|
-
配置以 YAML
|
|
47
|
+
配置以 YAML 格式存储在:
|
|
49
48
|
|
|
50
49
|
- **全局**: `~/.monoco/config.yaml`
|
|
51
50
|
- **项目**: `.monoco/config.yaml`
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
关键配置段:
|
|
54
53
|
|
|
55
54
|
- `core`: 编辑器、日志级别、作者
|
|
56
55
|
- `paths`: 目录路径(issues, spikes, specs)
|
|
@@ -9,7 +9,7 @@ description: 文档国际化质量控制。确保多语言文档保持同步。
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
I18n
|
|
12
|
+
I18n 功能提供:
|
|
13
13
|
|
|
14
14
|
- **自动扫描**缺失的翻译
|
|
15
15
|
- **标准化结构**用于多语言文档
|
|
@@ -33,7 +33,7 @@ monoco i18n scan
|
|
|
33
33
|
|
|
34
34
|
## 配置
|
|
35
35
|
|
|
36
|
-
I18n 设置在 `.monoco/config.yaml`
|
|
36
|
+
I18n 设置在 `.monoco/config.yaml` 中配置:
|
|
37
37
|
|
|
38
38
|
```yaml
|
|
39
39
|
i18n:
|
|
@@ -47,7 +47,7 @@ i18n:
|
|
|
47
47
|
|
|
48
48
|
### 根文件(后缀模式)
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
对于项目根目录中的文件:
|
|
51
51
|
|
|
52
52
|
- 源文件: `README.md`
|
|
53
53
|
- 中文: `README_ZH.md`
|
|
@@ -55,7 +55,7 @@ i18n:
|
|
|
55
55
|
|
|
56
56
|
### 子目录文件(目录模式)
|
|
57
57
|
|
|
58
|
-
对于 `docs/`
|
|
58
|
+
对于 `docs/` 或其他目录中的文件:
|
|
59
59
|
|
|
60
60
|
```
|
|
61
61
|
docs/
|
|
@@ -72,7 +72,7 @@ docs/
|
|
|
72
72
|
|
|
73
73
|
## 排除规则
|
|
74
74
|
|
|
75
|
-
以下内容会自动从 i18n
|
|
75
|
+
以下内容会自动从 i18n 扫描中排除:
|
|
76
76
|
|
|
77
77
|
- `.gitignore` 模式(自动遵循)
|
|
78
78
|
- `.references/` 目录
|
|
@@ -723,27 +723,9 @@ def _resolve_issues_root(config, cli_root: Optional[str]) -> Path:
|
|
|
723
723
|
return path
|
|
724
724
|
|
|
725
725
|
# 2. Handle Default / Contextual Execution (No --root)
|
|
726
|
-
#
|
|
726
|
+
# Strict Workspace Check: If not in a project root, we rely on the config root.
|
|
727
|
+
# (The global app callback already enforces presence of .monoco for most commands)
|
|
727
728
|
cwd = Path.cwd()
|
|
728
|
-
|
|
729
|
-
# If CWD is NOT a project root (no .monoco/), scan for subprojects
|
|
730
|
-
if not is_project_root(cwd):
|
|
731
|
-
subprojects = find_projects(cwd)
|
|
732
|
-
if len(subprojects) > 1:
|
|
733
|
-
console.print(f"[yellow]Workspace detected with {len(subprojects)} projects:[/yellow]")
|
|
734
|
-
for p in subprojects:
|
|
735
|
-
console.print(f" - [bold]{p.name}[/bold]")
|
|
736
|
-
console.print("\n[yellow]Please specify a project using --root <PATH>.[/yellow]")
|
|
737
|
-
# We don't exit here strictly, but usually this means we can't find 'Issues' in CWD anyway
|
|
738
|
-
# so the config fallbacks below will likely fail or point to non-existent CWD/Issues.
|
|
739
|
-
# But let's fail fast to be helpful.
|
|
740
|
-
raise typer.Exit(code=1)
|
|
741
|
-
elif len(subprojects) == 1:
|
|
742
|
-
# Auto-select the only child project?
|
|
743
|
-
# It's safer to require explicit intent, but let's try to be helpful if it's obvious.
|
|
744
|
-
# However, standard behavior is usually "operate on current dir".
|
|
745
|
-
# Let's stick to standard config resolution, but maybe warn.
|
|
746
|
-
pass
|
|
747
729
|
|
|
748
730
|
# 3. Config Fallback
|
|
749
731
|
config_issues_path = Path(config.paths.issues)
|
monoco/features/issue/core.py
CHANGED
|
@@ -152,7 +152,8 @@ def create_issue_file(
|
|
|
152
152
|
get_engine().enforce_policy(metadata)
|
|
153
153
|
|
|
154
154
|
# Serialize metadata
|
|
155
|
-
|
|
155
|
+
# Explicitly exclude actions and path from file persistence
|
|
156
|
+
yaml_header = yaml.dump(metadata.model_dump(exclude_none=True, mode='json', exclude={'actions', 'path'}), sort_keys=False, allow_unicode=True)
|
|
156
157
|
|
|
157
158
|
# Inject Self-Documenting Hints (Interactive Frontmatter)
|
|
158
159
|
if "parent:" not in yaml_header:
|
|
@@ -210,19 +211,13 @@ def get_available_actions(meta: IssueMetadata) -> List[Any]:
|
|
|
210
211
|
for t in transitions:
|
|
211
212
|
command = t.command_template.format(id=meta.id) if t.command_template else ""
|
|
212
213
|
|
|
213
|
-
# Determine task if it's an agent action
|
|
214
|
-
task = None
|
|
215
|
-
if t.name == "develop":
|
|
216
|
-
task = "develop"
|
|
217
|
-
|
|
218
214
|
actions.append(IssueAction(
|
|
219
215
|
label=t.label,
|
|
220
216
|
icon=t.icon,
|
|
221
217
|
target_status=t.to_status if t.to_status != meta.status or t.to_stage != meta.stage else None,
|
|
222
218
|
target_stage=t.to_stage if t.to_stage != meta.stage else None,
|
|
223
219
|
target_solution=t.required_solution,
|
|
224
|
-
command=command
|
|
225
|
-
task=task
|
|
220
|
+
command=command
|
|
226
221
|
))
|
|
227
222
|
|
|
228
223
|
return actions
|
|
@@ -446,7 +441,8 @@ def update_issue(
|
|
|
446
441
|
raise ValueError(f"Failed to validate updated metadata: {e}")
|
|
447
442
|
|
|
448
443
|
# Serialize back
|
|
449
|
-
|
|
444
|
+
# Explicitly exclude actions and path from file persistence
|
|
445
|
+
new_yaml = yaml.dump(updated_meta.model_dump(exclude_none=True, mode='json', exclude={'actions', 'path'}), sort_keys=False, allow_unicode=True)
|
|
450
446
|
|
|
451
447
|
# Reconstruct File
|
|
452
448
|
match_header = re.search(r"^---(.*?)---", content, re.DOTALL | re.MULTILINE)
|
|
@@ -679,7 +675,7 @@ description: Monoco Issue System 的官方技能定义。将 Issue 视为通用
|
|
|
679
675
|
- **Status Level (Lowercase)**: `open`, `backlog`, `closed`
|
|
680
676
|
|
|
681
677
|
### 路径流转
|
|
682
|
-
使用 `monoco issue
|
|
678
|
+
使用 `monoco issue`:
|
|
683
679
|
1. **Create**: `monoco issue create <type> --title "..."`
|
|
684
680
|
2. **Transition**: `monoco issue open/close/backlog <id>`
|
|
685
681
|
3. **View**: `monoco issue scope`
|
|
@@ -745,6 +741,22 @@ def list_issues(issues_root: Path, recursive_workspace: bool = False) -> List[Is
|
|
|
745
741
|
member_issues = list_issues(member_issues_dir, False)
|
|
746
742
|
for m in member_issues:
|
|
747
743
|
# Namespace the ID to avoid collisions and indicate origin
|
|
744
|
+
# CRITICAL: Also namespace references to keep parent-child structure intact
|
|
745
|
+
if m.parent and "::" not in m.parent:
|
|
746
|
+
m.parent = f"{name}::{m.parent}"
|
|
747
|
+
|
|
748
|
+
if m.dependencies:
|
|
749
|
+
m.dependencies = [
|
|
750
|
+
f"{name}::{d}" if d and "::" not in d else d
|
|
751
|
+
for d in m.dependencies
|
|
752
|
+
]
|
|
753
|
+
|
|
754
|
+
if m.related:
|
|
755
|
+
m.related = [
|
|
756
|
+
f"{name}::{r}" if r and "::" not in r else r
|
|
757
|
+
for r in m.related
|
|
758
|
+
]
|
|
759
|
+
|
|
748
760
|
m.id = f"{name}::{m.id}"
|
|
749
761
|
issues.append(m)
|
|
750
762
|
except Exception:
|
|
@@ -12,14 +12,7 @@ DEFAULT_ISSUE_CONFIG = IssueSchemaConfig(
|
|
|
12
12
|
solutions=["implemented", "cancelled", "wontfix", "duplicate"],
|
|
13
13
|
workflows=[
|
|
14
14
|
# --- UNIVERSAL AGENT ACTIONS ---
|
|
15
|
-
|
|
16
|
-
name="investigate",
|
|
17
|
-
label="Investigate",
|
|
18
|
-
icon="$(telescope)",
|
|
19
|
-
to_status="open", # Dummy, doesn't change status
|
|
20
|
-
command_template="monoco agent run investigate",
|
|
21
|
-
description="Run agent investigation"
|
|
22
|
-
),
|
|
15
|
+
|
|
23
16
|
|
|
24
17
|
# --- OPEN -> OPEN Transitions (Stage changes) ---
|
|
25
18
|
TransitionConfig(
|
|
@@ -34,17 +27,7 @@ DEFAULT_ISSUE_CONFIG = IssueSchemaConfig(
|
|
|
34
27
|
description="Start working on the issue"
|
|
35
28
|
),
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
name="develop",
|
|
39
|
-
label="Develop",
|
|
40
|
-
icon="$(tools)",
|
|
41
|
-
from_status="open",
|
|
42
|
-
from_stage="doing",
|
|
43
|
-
to_status="open",
|
|
44
|
-
to_stage="doing",
|
|
45
|
-
command_template="monoco agent run develop",
|
|
46
|
-
description="Run agent development"
|
|
47
|
-
),
|
|
30
|
+
|
|
48
31
|
|
|
49
32
|
TransitionConfig(
|
|
50
33
|
name="stop",
|
monoco/features/issue/models.py
CHANGED
|
@@ -120,13 +120,30 @@ class IssueMetadata(BaseModel):
|
|
|
120
120
|
path: Optional[str] = None # Absolute path to the issue file
|
|
121
121
|
|
|
122
122
|
# Proxy UI Actions (Excluded from file persistence)
|
|
123
|
-
|
|
123
|
+
# Modified: Remove exclude=True to allow API/CLI inspection. Must be manually excluded during YAML Dump.
|
|
124
|
+
actions: List[IssueAction] = Field(default=[])
|
|
124
125
|
|
|
125
126
|
|
|
126
127
|
@model_validator(mode='before')
|
|
127
128
|
@classmethod
|
|
128
129
|
def normalize_fields(cls, v: Any) -> Any:
|
|
129
130
|
if isinstance(v, dict):
|
|
131
|
+
# Handle common capitalization variations for robustness
|
|
132
|
+
field_map = {
|
|
133
|
+
"ID": "id",
|
|
134
|
+
"Type": "type",
|
|
135
|
+
"Status": "status",
|
|
136
|
+
"Stage": "stage",
|
|
137
|
+
"Title": "title",
|
|
138
|
+
"Parent": "parent",
|
|
139
|
+
"Solution": "solution",
|
|
140
|
+
"Sprint": "sprint",
|
|
141
|
+
}
|
|
142
|
+
for old_k, new_k in field_map.items():
|
|
143
|
+
if old_k in v and new_k not in v:
|
|
144
|
+
v[new_k] = v[old_k] # Don't pop yet to avoid mutation issues if used elsewhere, or pop if safe.
|
|
145
|
+
# Pydantic v2 mode='before' is usually a copy if we want to be safe, but let's just add it.
|
|
146
|
+
|
|
130
147
|
# Normalize type and status to lowercase for compatibility
|
|
131
148
|
if "type" in v and isinstance(v["type"], str):
|
|
132
149
|
v["type"] = v["type"].lower()
|
|
@@ -38,7 +38,7 @@ Monoco 不仅仅复刻 Jira,而是基于 **"思维模式 (Mindset)"** 重新
|
|
|
38
38
|
- **Focus**: "How" (为了支撑系统运转,必须做什么)。
|
|
39
39
|
- **Prefix**: `CHORE-`
|
|
40
40
|
|
|
41
|
-
>
|
|
41
|
+
> 注: 取代了传统的 Task 概念。
|
|
42
42
|
|
|
43
43
|
#### 🐞 FIX (修复)
|
|
44
44
|
|
|
@@ -47,7 +47,7 @@ Monoco 不仅仅复刻 Jira,而是基于 **"思维模式 (Mindset)"** 重新
|
|
|
47
47
|
- **Focus**: "Fix" (恢复原状)。
|
|
48
48
|
- **Prefix**: `FIX-`
|
|
49
49
|
|
|
50
|
-
>
|
|
50
|
+
> 注: 取代了传统的 Bug 概念。
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
@@ -68,10 +68,9 @@ Monoco 不仅仅复刻 Jira,而是基于 **"思维模式 (Mindset)"** 重新
|
|
|
68
68
|
|
|
69
69
|
### 路径流转
|
|
70
70
|
|
|
71
|
-
使用 `monoco issue
|
|
71
|
+
使用 `monoco issue`:
|
|
72
72
|
|
|
73
73
|
1. **Create**: `monoco issue create <type> --title "..."`
|
|
74
|
-
|
|
75
74
|
- Params: `--parent <id>`, `--dependency <id>`, `--related <id>`, `--sprint <id>`, `--tags <tag>`
|
|
76
75
|
|
|
77
76
|
2. **Transition**: `monoco issue open/close/backlog <id>`
|
|
@@ -87,13 +86,13 @@ Monoco 不仅仅复刻 Jira,而是基于 **"思维模式 (Mindset)"** 重新
|
|
|
87
86
|
|
|
88
87
|
## 合规与结构校验 (Validation Rules)
|
|
89
88
|
|
|
90
|
-
为了确保数据严谨性,所有 Issue Ticket
|
|
89
|
+
为了确保数据严谨性,所有 Issue Ticket 必须遵循以下强制规则:
|
|
91
90
|
|
|
92
91
|
### 1. 结构一致性 (Structural Consistency)
|
|
93
92
|
|
|
94
93
|
- 必须包含一个二级标题 (`##`),内容必须与 Front Matter 中的 ID 和 Title 严格匹配。
|
|
95
|
-
-
|
|
96
|
-
-
|
|
94
|
+
- 格式: `## {ID}: {Title}`
|
|
95
|
+
- 示例: `## FEAT-0082: Issue Ticket Validator`
|
|
97
96
|
|
|
98
97
|
### 2. 内容完整性 (Content Completeness)
|
|
99
98
|
|
|
@@ -103,11 +102,11 @@ Monoco 不仅仅复刻 Jira,而是基于 **"思维模式 (Mindset)"** 重新
|
|
|
103
102
|
### 3. Checkbox 语法与层级 (Checkbox Matrix)
|
|
104
103
|
|
|
105
104
|
- 仅限使用: `- [ ]`, `- [x]`, `- [-]`, `- [/]`。
|
|
106
|
-
- **层级继承**: 若存在嵌套 Checkbox
|
|
105
|
+
- **层级继承**: 若存在嵌套 Checkbox,父项状态必须正确反映子项的聚合结果(例如: 任一子项为 `[/]` 则父项必为 `[/]`;子项全选则父项为 `[x]`)。
|
|
107
106
|
|
|
108
107
|
### 4. 状态矩阵 (State Matrix)
|
|
109
108
|
|
|
110
|
-
`status` (物理存放目录) 与 `stage` (Front Matter 字段)
|
|
109
|
+
`status` (物理存放目录) 与 `stage` (Front Matter 字段) 必须兼容:
|
|
111
110
|
|
|
112
111
|
- **open**: Draft, Doing, Review, Done
|
|
113
112
|
- **backlog**: Draft, Doing, Review
|
|
@@ -9,7 +9,7 @@ description: 管理用于研究和学习的外部参考仓库。提供对精选
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
Spike
|
|
12
|
+
Spike 功能允许你:
|
|
13
13
|
|
|
14
14
|
- **添加外部仓库**作为只读参考
|
|
15
15
|
- **同步仓库内容**到本地 `.references/` 目录
|
|
@@ -50,7 +50,7 @@ monoco spike list
|
|
|
50
50
|
|
|
51
51
|
## 配置
|
|
52
52
|
|
|
53
|
-
Spike 仓库在 `.monoco/config.yaml`
|
|
53
|
+
Spike 仓库在 `.monoco/config.yaml` 中配置:
|
|
54
54
|
|
|
55
55
|
```yaml
|
|
56
56
|
project:
|
monoco/main.py
CHANGED
|
@@ -99,15 +99,7 @@ from monoco.core.sync import sync_command, uninstall_command
|
|
|
99
99
|
app.command(name="sync")(sync_command)
|
|
100
100
|
app.command(name="uninstall")(uninstall_command)
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
def doctor_cmd(
|
|
104
|
-
force: bool = typer.Option(False, "--force", "-f", help="Force refresh of agent state")
|
|
105
|
-
):
|
|
106
|
-
"""
|
|
107
|
-
Diagnose Agent Environment.
|
|
108
|
-
"""
|
|
109
|
-
from monoco.features.agent.doctor import doctor
|
|
110
|
-
doctor(force)
|
|
102
|
+
|
|
111
103
|
|
|
112
104
|
@app.command()
|
|
113
105
|
def info():
|
|
@@ -161,8 +153,7 @@ app.add_typer(config_cmd.app, name="config", help="Manage configuration")
|
|
|
161
153
|
app.add_typer(project_cmd.app, name="project", help="Manage projects")
|
|
162
154
|
app.add_typer(workspace_cmd.app, name="workspace", help="Manage workspace")
|
|
163
155
|
|
|
164
|
-
|
|
165
|
-
app.add_typer(agent_cmd.app, name="agent", help="Delegate tasks to Agent CLIs")
|
|
156
|
+
|
|
166
157
|
|
|
167
158
|
from monoco.daemon.commands import serve
|
|
168
159
|
app.command(name="serve")(serve)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: monoco-toolkit
|
|
3
|
+
Version: 0.2.7
|
|
4
|
+
Summary: Agent Native Toolkit for Monoco - Task Management & Kanban for AI Agents
|
|
5
|
+
Project-URL: Homepage, https://monoco.io
|
|
6
|
+
Project-URL: Repository, https://github.com/IndenScale/Monoco
|
|
7
|
+
Project-URL: Documentation, https://monoco.io/docs
|
|
8
|
+
Project-URL: Issues, https://github.com/IndenScale/Monoco/issues
|
|
9
|
+
Author-email: Monoco Team <dev@monoco.io>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent-native,ai-agents,cli,kanban,monoco,task-management,workflow
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Office/Business :: Groupware
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: fastapi>=0.100.0
|
|
25
|
+
Requires-Dist: httpx>=0.28.1
|
|
26
|
+
Requires-Dist: prompt-toolkit>=3.0.0
|
|
27
|
+
Requires-Dist: pydantic>=2.0.0
|
|
28
|
+
Requires-Dist: pyyaml>=6.0
|
|
29
|
+
Requires-Dist: rich>=13.0.0
|
|
30
|
+
Requires-Dist: sse-starlette>=1.6.0
|
|
31
|
+
Requires-Dist: typer[all]>=0.9.0
|
|
32
|
+
Requires-Dist: uvicorn[standard]>=0.20.0
|
|
33
|
+
Requires-Dist: watchdog>=6.0.0
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
# Monoco Toolkit
|
|
37
|
+
|
|
38
|
+
[](https://pypi.org/project/monoco-toolkit/)
|
|
39
|
+
[](LICENSE)
|
|
40
|
+
|
|
41
|
+
> **The Operating System for Agentic Engineering.**
|
|
42
|
+
>
|
|
43
|
+
> Ground your AI Agents into deterministic workflows. Turn vague "chats" into structured, validatable, and shippable engineering units.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## ⚡️ Why Monoco?
|
|
48
|
+
|
|
49
|
+
In the era of LLMs, the bottleneck isn't **intelligence**—it's **control**.
|
|
50
|
+
|
|
51
|
+
Generating code is easy. Managing the lifecycle of thousands of agent-generated tasks, validating their outputs, and maintaining a coherent project state is hard. **Monoco** is the missing control plane that bridges the gap between raw AI velocity and strict engineering rigor.
|
|
52
|
+
|
|
53
|
+
Monoco handles the **"BizOps Logic"** of your development process, allowing you to orchestrate human and AI labor within a unified, version-controlled environment.
|
|
54
|
+
|
|
55
|
+
## 🌟 Core Features
|
|
56
|
+
|
|
57
|
+
### 1. Issue as Code (IaaC)
|
|
58
|
+
|
|
59
|
+
Treat your project management like your code.
|
|
60
|
+
|
|
61
|
+
- **Markdown Native**: All tasks (Epics, Features, Chores) are stored as structured Markdown files in your repository.
|
|
62
|
+
- **Git Backed**: Version control your roadmap. Review changes to requirements via Pull Requests.
|
|
63
|
+
- **Universal Context**: Provides a standardized, hallucination-free state representation for AI Agents.
|
|
64
|
+
|
|
65
|
+
### 2. The Agent Cockpit (VS Code Extension)
|
|
66
|
+
|
|
67
|
+
Stop context switching. Manage your entire agentic workflow directly inside your editor.
|
|
68
|
+
|
|
69
|
+
- **Native Kanban Board**: Visualize and drag-and-drop tasks without leaving VS Code.
|
|
70
|
+
- **Hierarchical Tree View**: Drill down from high-level Epics to atomic Implementation Tasks.
|
|
71
|
+
- **Agent Integration**: Bind specific Agent Providers (Gemini, Claude, etc.) to specific tasks.
|
|
72
|
+
|
|
73
|
+
### 3. Traceable Execution
|
|
74
|
+
|
|
75
|
+
- **Deterministic State Machine**: Every task follows a strict lifecycle (Proposed -> Approved -> Doing -> Review -> Done).
|
|
76
|
+
- **Audit Trails**: Agents log their actions and decisions directly into the task file.
|
|
77
|
+
- **Sanity Checks**: Built-in linters ensure your task definitions are complete and valid before execution.
|
|
78
|
+
|
|
79
|
+
## 🚀 Quick Start
|
|
80
|
+
|
|
81
|
+
### Installation
|
|
82
|
+
|
|
83
|
+
Monoco is available as a Python CLI tool.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install monoco-toolkit
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Initialization
|
|
90
|
+
|
|
91
|
+
Turn any directory into a Monoco workspace.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
monoco init
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Workflow
|
|
98
|
+
|
|
99
|
+
1. **Plan**: Create a new feature request.
|
|
100
|
+
```bash
|
|
101
|
+
monoco issue create feature -t "Implement Dark Mode"
|
|
102
|
+
```
|
|
103
|
+
2. **Edit**: Refine the requirements in the generated markdown file.
|
|
104
|
+
3. **Visualize**: Open the board in VS Code or via CLI.
|
|
105
|
+
```bash
|
|
106
|
+
# Starts the local server
|
|
107
|
+
monoco serve
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## 📦 Extension for VS Code
|
|
111
|
+
|
|
112
|
+
The **Monoco VS Code Extension** is the primary visual interface for the toolkit.
|
|
113
|
+
|
|
114
|
+
- **Install from Marketplace**: Search for `Monoco`.
|
|
115
|
+
- **Keybinding**: `Cmd+Shift+P` -> `Monoco: Open Kanban Board`.
|
|
116
|
+
|
|
117
|
+
## 🛠️ Tech Stack & Architecture
|
|
118
|
+
|
|
119
|
+
- **Core**: Python (CLI & Logic Layer)
|
|
120
|
+
- **Extension**: TypeScript (VS Code Client & LSP)
|
|
121
|
+
- **Data**: Local Filesystem (Markdown/YAML)
|
|
122
|
+
|
|
123
|
+
## 🤝 Contributing
|
|
124
|
+
|
|
125
|
+
Monoco is designed for the community. We welcome contributions to both the core CLI and the VS Code extension.
|
|
126
|
+
|
|
127
|
+
## 📄 License
|
|
128
|
+
|
|
129
|
+
MIT © [IndenScale](https://github.com/IndenScale)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
monoco/main.py,sha256=
|
|
1
|
+
monoco/main.py,sha256=wWOtB54RB4_opq_DuRQyEStAYbJHgGCZfQglUup6q28,5370
|
|
2
2
|
monoco/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
monoco/cli/project.py,sha256=w4oUWzOV42qh34g4klyzZfTUg6ux0oEdSinMCzmhH3E,2786
|
|
4
4
|
monoco/cli/workspace.py,sha256=vhRsbjgO6ek6PWYdmhk9EeYW_xWRV196yl7-xPfcRAI,1305
|
|
5
5
|
monoco/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
monoco/core/config.py,sha256=
|
|
6
|
+
monoco/core/config.py,sha256=UpP6OE3wex8ZesnMZVZKPRy1peHrjq8nXv_BVtZzNIk,12105
|
|
7
7
|
monoco/core/execution.py,sha256=rySL0ueJvTEQ1JhdpumsNBQHJpj08nfaHQMlX-1uh6k,1846
|
|
8
8
|
monoco/core/feature.py,sha256=oAtQWUHMuqIFbq2gj8sPfYBlJZvMMXZqyUlCMrIVGUE,2007
|
|
9
9
|
monoco/core/git.py,sha256=i_NKT9_n57S9EKeb8kF2yTEdw70FZ88-lpMqW4lzVds,8228
|
|
@@ -26,7 +26,7 @@ monoco/core/agent/state.py,sha256=sRav6uwkXao8yPl08CEB-cqK1EfiDyMnVxoSYxvYcis,35
|
|
|
26
26
|
monoco/core/resources/en/AGENTS.md,sha256=3TpCLNC1s_lIbDfJJBRmmROMoy9sZXu8BOag8M9NXI0,327
|
|
27
27
|
monoco/core/resources/en/SKILL.md,sha256=1PrBqCgjDxT1LMSeu11BzlMhfboo_UlgZxdzBm7Tp9c,2161
|
|
28
28
|
monoco/core/resources/zh/AGENTS.md,sha256=pGQOLt8mcRygJotd5oC8l9604hikQoUiS99QsHCe-UM,298
|
|
29
|
-
monoco/core/resources/zh/SKILL.md,sha256=
|
|
29
|
+
monoco/core/resources/zh/SKILL.md,sha256=8py8tD7s23cw2srKFnTjLO_miyuGXb3NLyEbk5gchqA,1886
|
|
30
30
|
monoco/daemon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
31
|
monoco/daemon/app.py,sha256=I_BWs4WcJoTobssFKRBlAcD2CRnJtr6EPlFoGB5Hy-Y,15586
|
|
32
32
|
monoco/daemon/commands.py,sha256=dN4D8ca0vPjj0WyjCSs8senneta1afm_bnNYv_kmGlU,1125
|
|
@@ -35,19 +35,6 @@ monoco/daemon/reproduce_stats.py,sha256=Q_zAj0Yj8l-77QDdtsLz1kWr68HeO7f1T6xC6VP4
|
|
|
35
35
|
monoco/daemon/services.py,sha256=dMhy2ddzGtBBWTGtI14R-2aikENAgPsphxDkno1JAPU,5377
|
|
36
36
|
monoco/daemon/stats.py,sha256=r-L0k6CdxkAkwLZV3V-jW7PldB9S3uNklQGLCEKA3Sc,4563
|
|
37
37
|
monoco/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
-
monoco/features/agent/commands.py,sha256=31P1_vtg19YZZd7Z5uaDtwzGSpWLzI0sMfCp7Xppt-U,8572
|
|
39
|
-
monoco/features/agent/core.py,sha256=w_zZFsrZNFfV7nEP7HatvsMt_xsJlB8SCFGCCbXPUKo,1704
|
|
40
|
-
monoco/features/agent/doctor.py,sha256=qqUu_rUjVp7ur1sYpL4VSpw8vwbwbjvXAFvXQP-lbNQ,924
|
|
41
|
-
monoco/features/agent/resources/en/critique.prompty,sha256=lB1jkMsnufrelAzdo2FPD-pQ5agj6atBDnU_kvJNLK0,470
|
|
42
|
-
monoco/features/agent/resources/en/develop.prompty,sha256=T2vOYzf6xoTkImhT8ZmZSYRHev_DnG2mSF8LGji5vsU,480
|
|
43
|
-
monoco/features/agent/resources/en/investigate.prompty,sha256=l4DH4BUU-OCascYNC7rvqArA0COgAAPCLjJCPLV28Io,628
|
|
44
|
-
monoco/features/agent/resources/en/refine.prompty,sha256=PX2V1gUqs7McX_woPMlSVXKabyV0ly6ysBr35pGLa60,422
|
|
45
|
-
monoco/features/agent/resources/en/verify.prompty,sha256=-gb_HxhtdsJZ3_P3TtrhBjTRASkcKtr9v3c8jTQ4DtE,564
|
|
46
|
-
monoco/features/agent/resources/zh/critique.prompty,sha256=lNuQ_9Jl5LasJRwogh_JUM5WK0GNzJI6ZSI0Jy8HY7Y,485
|
|
47
|
-
monoco/features/agent/resources/zh/develop.prompty,sha256=-Mzqye5LZ_IMcNsDQY4xo97zncXaIe-tk9VK9fIxgME,477
|
|
48
|
-
monoco/features/agent/resources/zh/investigate.prompty,sha256=bHCVOxtL68iT8wg06sC0cTwvKCt27YF8CYu5LHMVxWY,650
|
|
49
|
-
monoco/features/agent/resources/zh/refine.prompty,sha256=YSC08M3k4KyN1KcfmSXqxjvzfC3m-GKTzO0LRBpeRFA,469
|
|
50
|
-
monoco/features/agent/resources/zh/verify.prompty,sha256=85yPcrvcaJW31-RD4G2lgXd2CJUTJFAnHlSIUpzApyg,629
|
|
51
38
|
monoco/features/config/commands.py,sha256=PQaSq81zH4h8d1bFa4B2ANSXSdyjBFqVm_nBvEq1rNE,4889
|
|
52
39
|
monoco/features/i18n/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
40
|
monoco/features/i18n/adapter.py,sha256=M9iSEKykEiUe1YobHKmvfEjv7x7KgGuh-6yhgUJuN_s,973
|
|
@@ -56,13 +43,13 @@ monoco/features/i18n/core.py,sha256=s0r-48yMxrIrpWNX7r8JhtGX4X-Kd1P1bDAgNyluQ24,
|
|
|
56
43
|
monoco/features/i18n/resources/en/AGENTS.md,sha256=zzuF7BW6x8Mj6LZZmeM6wTbG5CSCDMShf4rwtN7XITg,197
|
|
57
44
|
monoco/features/i18n/resources/en/SKILL.md,sha256=Z8fAAqeMvpLDw1D_9AzZIykS5-HLVM9nnlRZLWBTPqM,2203
|
|
58
45
|
monoco/features/i18n/resources/zh/AGENTS.md,sha256=lKkwLLCADRH7UDq9no4eQY2sRfJrb64JoZ_HNved8vA,175
|
|
59
|
-
monoco/features/i18n/resources/zh/SKILL.md,sha256=
|
|
46
|
+
monoco/features/i18n/resources/zh/SKILL.md,sha256=Wynk7zVBW7CO0_6AEQNUvlD_3eMW_7EPnzEn9QUaiDs,1884
|
|
60
47
|
monoco/features/issue/adapter.py,sha256=Y-ghwRoSEgm_A-cqY8Un-5srxydXdb9ytlKHLm89eJQ,1265
|
|
61
|
-
monoco/features/issue/commands.py,sha256=
|
|
62
|
-
monoco/features/issue/core.py,sha256=
|
|
48
|
+
monoco/features/issue/commands.py,sha256=7QMklWteteG2eO1ERe2V7oFjoSEhz3jjEvD6_4ySpug,34479
|
|
49
|
+
monoco/features/issue/core.py,sha256=s1K1FWdsOq1-pBQ8HTayg1o0dK9_JWHXIcw2wBd_WpM,47155
|
|
63
50
|
monoco/features/issue/linter.py,sha256=-S3-DK0HKP_3EhSC69za8MyB-bVU4vOkNGM_Ajmjxoo,12056
|
|
64
51
|
monoco/features/issue/migration.py,sha256=9gtgFi1V1pzwXo0-H4cIoBvSBERIWopXLCB4oSxTQLc,4715
|
|
65
|
-
monoco/features/issue/models.py,sha256=
|
|
52
|
+
monoco/features/issue/models.py,sha256=waj5JDzL3UPs2qW4lv6c7v_5aSYEDWZftLkwS2U70RA,5778
|
|
66
53
|
monoco/features/issue/monitor.py,sha256=QEN0mqZ3tKwBfMjN87-LdrVoIEe0prA-uMHOBGy1VZk,3476
|
|
67
54
|
monoco/features/issue/validator.py,sha256=6Q8LyjGpHXOf97q0-3bXvrWFqk7iO6fHhoGemkPTbps,17172
|
|
68
55
|
monoco/features/issue/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -71,7 +58,7 @@ monoco/features/issue/domain/models.py,sha256=pjeb_Lp0zykNzAfrRma26IMkdlxYDQ0Idv
|
|
|
71
58
|
monoco/features/issue/domain/parser.py,sha256=HfJh9uBN7Q7KyeXz1tk3tBjszu8ffStfZf9IS27v0K8,8770
|
|
72
59
|
monoco/features/issue/domain/workspace.py,sha256=AOv7H_he39UnYplCaEex6mdFgpAlGk6T8cDMxKwQLz0,3833
|
|
73
60
|
monoco/features/issue/engine/__init__.py,sha256=bWONZnIb0IkAhw09_pMbyqrDh-oUOLTrNvlQfypHXYw,785
|
|
74
|
-
monoco/features/issue/engine/config.py,sha256=
|
|
61
|
+
monoco/features/issue/engine/config.py,sha256=BhTw9S8Oe10P1VfdLN64Nk0Woj613dHwfHiX87_AgJo,5762
|
|
75
62
|
monoco/features/issue/engine/machine.py,sha256=8wr5txLlzv0QO2sAlPl7JSPN-VkxJUpRNK25F7L7DVI,7530
|
|
76
63
|
monoco/features/issue/engine/models.py,sha256=u8Z7ilB702Jj6Imv4_vXpP8QTSWEnQdPxv8JA_9g1GU,579
|
|
77
64
|
monoco/features/issue/lsp/__init__.py,sha256=8bl8-WzSj3C4SkPKgVGnCeyemmvHVWBsuMZsJuJggG8,77
|
|
@@ -79,7 +66,7 @@ monoco/features/issue/lsp/definition.py,sha256=Y4dX7MmrEfYbWuh85W0djwUj_qed7cDpG
|
|
|
79
66
|
monoco/features/issue/resources/en/AGENTS.md,sha256=OjEnkXCqwfMArJfJQhldrQYXqoregfGthyhJeyx7MPw,715
|
|
80
67
|
monoco/features/issue/resources/en/SKILL.md,sha256=p0vhVpe3xLKg0iXSNofoLNvsq8j2pmv5CD1B2mUeIGk,2732
|
|
81
68
|
monoco/features/issue/resources/zh/AGENTS.md,sha256=2MLIZ5-i-oBnl7_YAZBBoKkNqANpHj73iw18QQbSm5c,759
|
|
82
|
-
monoco/features/issue/resources/zh/SKILL.md,sha256=
|
|
69
|
+
monoco/features/issue/resources/zh/SKILL.md,sha256=vT1-Cp5ENLrpmCuv14D5xdRGQh3ferL6zCPLSRfsoE8,3816
|
|
83
70
|
monoco/features/skills/__init__.py,sha256=L8YNGPWyyFWq5WqNossfeB0AKHJF_omrn1VzJBrRFcM,23
|
|
84
71
|
monoco/features/skills/core.py,sha256=mpd0Cq-k2MvHRTPq9saFvZgYXUBGJ9pnK5lUmzUfZbY,3418
|
|
85
72
|
monoco/features/spike/adapter.py,sha256=npJ4J775Df0DDi-LH-3u2jCuKjTIXyZUbLD0KNvHlcc,1062
|
|
@@ -88,9 +75,9 @@ monoco/features/spike/core.py,sha256=oP1yAalOnoA5fHpf2o4gteKx73XGwZ6G0WrO86z2iWE
|
|
|
88
75
|
monoco/features/spike/resources/en/AGENTS.md,sha256=NG3CMnlDk_0J8hnRUcueAM9lgIQr_dZ42R_31-LC48E,306
|
|
89
76
|
monoco/features/spike/resources/en/SKILL.md,sha256=qKDcVh0D3pDRvfNLh1Bzo4oQU3obpl4tqdlzxeiWYMk,1911
|
|
90
77
|
monoco/features/spike/resources/zh/AGENTS.md,sha256=5RHNl7fc3RdYYTFH483ojJl_arGPKkyYziOuGgFbqqg,290
|
|
91
|
-
monoco/features/spike/resources/zh/SKILL.md,sha256=
|
|
92
|
-
monoco_toolkit-0.2.
|
|
93
|
-
monoco_toolkit-0.2.
|
|
94
|
-
monoco_toolkit-0.2.
|
|
95
|
-
monoco_toolkit-0.2.
|
|
96
|
-
monoco_toolkit-0.2.
|
|
78
|
+
monoco/features/spike/resources/zh/SKILL.md,sha256=Q82e9lCQOAYIwBs5rGnvlVUDq7bp0pz8yvO10KTWFYQ,1710
|
|
79
|
+
monoco_toolkit-0.2.7.dist-info/METADATA,sha256=25z_zO0Ycius1qg0GT66bgQRBEIUPJS4IBq6sHQ6aqU,4716
|
|
80
|
+
monoco_toolkit-0.2.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
81
|
+
monoco_toolkit-0.2.7.dist-info/entry_points.txt,sha256=iYj7FWYBdtClU15-Du1skqD0s6SFSIhJvxJ29VWp8ng,43
|
|
82
|
+
monoco_toolkit-0.2.7.dist-info/licenses/LICENSE,sha256=ACAGGjV6aod4eIlVUTx1q9PZbnZGN5bBwkSs9RHj83s,1071
|
|
83
|
+
monoco_toolkit-0.2.7.dist-info/RECORD,,
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import typer
|
|
3
|
-
from typing import Optional, Annotated
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
from monoco.core.output import print_output, print_error, AgentOutput, OutputManager
|
|
6
|
-
from monoco.core.agent.adapters import get_agent_client
|
|
7
|
-
from monoco.core.agent.state import AgentStateManager
|
|
8
|
-
from monoco.core.agent.action import ActionRegistry, ActionContext
|
|
9
|
-
from monoco.core.config import get_config
|
|
10
|
-
import asyncio
|
|
11
|
-
import re
|
|
12
|
-
import json as j
|
|
13
|
-
|
|
14
|
-
app = typer.Typer()
|
|
15
|
-
action_app = typer.Typer(name="action", help="Manage generic agent actions/prompts.")
|
|
16
|
-
app.add_typer(action_app)
|
|
17
|
-
|
|
18
|
-
@app.command(name="run")
|
|
19
|
-
def run_command(
|
|
20
|
-
prompt_or_task: str = typer.Argument(..., help="Prompt string OR execution task name (e.g. 'refine-issue')"),
|
|
21
|
-
target: Optional[str] = typer.Argument(None, help="Target file argument for the task"),
|
|
22
|
-
provider: Optional[str] = typer.Option(None, "--using", "-u", help="Override agent provider"),
|
|
23
|
-
instruction: Optional[str] = typer.Option(None, "--instruction", "-i", help="Additional instruction for the agent"),
|
|
24
|
-
json: AgentOutput = False,
|
|
25
|
-
):
|
|
26
|
-
"""
|
|
27
|
-
Execute a prompt or a named task using an Agent CLI.
|
|
28
|
-
"""
|
|
29
|
-
# 0. Setup
|
|
30
|
-
settings = get_config()
|
|
31
|
-
state_manager = AgentStateManager()
|
|
32
|
-
registry = ActionRegistry(Path(settings.paths.root))
|
|
33
|
-
|
|
34
|
-
# 1. Check if it's a named task
|
|
35
|
-
action = registry.get(prompt_or_task)
|
|
36
|
-
|
|
37
|
-
final_prompt = prompt_or_task
|
|
38
|
-
context_files = []
|
|
39
|
-
|
|
40
|
-
# Determine Provider Priority: CLI > Action Def > Config > Default
|
|
41
|
-
prov_name = provider
|
|
42
|
-
|
|
43
|
-
if action:
|
|
44
|
-
# It IS an action
|
|
45
|
-
if not OutputManager.is_agent_mode():
|
|
46
|
-
print(f"Running action: {action.name}")
|
|
47
|
-
|
|
48
|
-
# Simple template substitution
|
|
49
|
-
final_prompt = action.template
|
|
50
|
-
|
|
51
|
-
if "{{file}}" in final_prompt:
|
|
52
|
-
if not target:
|
|
53
|
-
print_error("This task requires a target file argument.")
|
|
54
|
-
raise typer.Exit(1)
|
|
55
|
-
|
|
56
|
-
target_path = Path(target).resolve()
|
|
57
|
-
if not target_path.exists():
|
|
58
|
-
print_error(f"Target file not found: {target}")
|
|
59
|
-
raise typer.Exit(1)
|
|
60
|
-
|
|
61
|
-
final_prompt = final_prompt.replace("{{file}}", target_path.read_text())
|
|
62
|
-
# Also add to context files? Ideally the prompt has it.
|
|
63
|
-
# Let's add it to context files list to be safe if prompt didn't embed it fully
|
|
64
|
-
context_files.append(target_path)
|
|
65
|
-
|
|
66
|
-
if not prov_name:
|
|
67
|
-
prov_name = action.provider
|
|
68
|
-
|
|
69
|
-
# 2. Append Instruction if provided
|
|
70
|
-
if instruction:
|
|
71
|
-
final_prompt = f"{final_prompt}\n\n[USER INSTRUCTION]\n{instruction}"
|
|
72
|
-
|
|
73
|
-
# 2. Provider Resolution Fallback
|
|
74
|
-
prov_name = prov_name or settings.agent.framework or "gemini"
|
|
75
|
-
|
|
76
|
-
# 3. State Check
|
|
77
|
-
state = state_manager.load()
|
|
78
|
-
if not state or state.is_stale:
|
|
79
|
-
if not OutputManager.is_agent_mode():
|
|
80
|
-
print("Agent state stale or missing, refreshing...")
|
|
81
|
-
state = state_manager.refresh()
|
|
82
|
-
|
|
83
|
-
if prov_name not in state.providers:
|
|
84
|
-
print_error(f"Provider '{prov_name}' unknown.")
|
|
85
|
-
raise typer.Exit(1)
|
|
86
|
-
|
|
87
|
-
if not state.providers[prov_name].available:
|
|
88
|
-
print_error(f"Provider '{prov_name}' is not available. Run 'monoco doctor' to diagnose.")
|
|
89
|
-
raise typer.Exit(1)
|
|
90
|
-
|
|
91
|
-
# 4. Execute
|
|
92
|
-
try:
|
|
93
|
-
client = get_agent_client(prov_name)
|
|
94
|
-
result = asyncio.run(client.execute(final_prompt, context_files=context_files))
|
|
95
|
-
|
|
96
|
-
if OutputManager.is_agent_mode():
|
|
97
|
-
OutputManager.print({"result": result, "provider": prov_name})
|
|
98
|
-
else:
|
|
99
|
-
print(result)
|
|
100
|
-
|
|
101
|
-
except Exception as e:
|
|
102
|
-
print_error(f"Execution failed: {e}")
|
|
103
|
-
raise typer.Exit(1)
|
|
104
|
-
|
|
105
|
-
@action_app.command(name="list")
|
|
106
|
-
def action_list(
|
|
107
|
-
json: AgentOutput = False,
|
|
108
|
-
context: Optional[str] = typer.Option(None, "--context", help="Context for filtering (JSON string)")
|
|
109
|
-
):
|
|
110
|
-
"""List available actions."""
|
|
111
|
-
settings = get_config()
|
|
112
|
-
registry = ActionRegistry(Path(settings.paths.root))
|
|
113
|
-
|
|
114
|
-
action_context = None
|
|
115
|
-
if context:
|
|
116
|
-
try:
|
|
117
|
-
ctx_data = j.loads(context)
|
|
118
|
-
action_context = ActionContext(**ctx_data)
|
|
119
|
-
except Exception as e:
|
|
120
|
-
print_error(f"Invalid context JSON: {e}")
|
|
121
|
-
|
|
122
|
-
actions = registry.list_available(action_context)
|
|
123
|
-
|
|
124
|
-
# Filter by State Machine if context implies an Issue
|
|
125
|
-
if action_context and (action_context.status or action_context.stage):
|
|
126
|
-
try:
|
|
127
|
-
from monoco.features.issue.engine.machine import StateMachine
|
|
128
|
-
from monoco.features.issue.models import IssueMetadata
|
|
129
|
-
|
|
130
|
-
cfg = settings.issue
|
|
131
|
-
sm = StateMachine(cfg)
|
|
132
|
-
|
|
133
|
-
# Create a mock metadata for state check
|
|
134
|
-
mock_meta = IssueMetadata(
|
|
135
|
-
id="mock-id",
|
|
136
|
-
title="Mock Issue",
|
|
137
|
-
type=action_context.type or "feature",
|
|
138
|
-
status=action_context.status or "open",
|
|
139
|
-
stage=action_context.stage
|
|
140
|
-
)
|
|
141
|
-
|
|
142
|
-
allowed_transitions = sm.get_available_transitions(mock_meta)
|
|
143
|
-
allowed_names = {t.name for t in allowed_transitions}
|
|
144
|
-
|
|
145
|
-
# Identify which actions are actually transitions
|
|
146
|
-
all_transition_names = {t.name for t in cfg.workflows}
|
|
147
|
-
|
|
148
|
-
filtered_actions = []
|
|
149
|
-
for action in actions:
|
|
150
|
-
# If an action is a formal transition, it must be allowed
|
|
151
|
-
if action.name in all_transition_names:
|
|
152
|
-
if action.name in allowed_names:
|
|
153
|
-
filtered_actions.append(action)
|
|
154
|
-
else:
|
|
155
|
-
# Generic actions are passed through (already filtered by 'when')
|
|
156
|
-
filtered_actions.append(action)
|
|
157
|
-
|
|
158
|
-
actions = filtered_actions
|
|
159
|
-
|
|
160
|
-
except Exception:
|
|
161
|
-
# Fallback if Issue feature is missing or context is invalid
|
|
162
|
-
pass
|
|
163
|
-
|
|
164
|
-
# OutputManager handles list of Pydantic models automatically for both JSON and Table
|
|
165
|
-
print_output(actions, title="Available Actions")
|
|
166
|
-
|
|
167
|
-
@app.command(name="list")
|
|
168
|
-
def list_providers(
|
|
169
|
-
json: AgentOutput = False,
|
|
170
|
-
force: bool = typer.Option(False, "--force", "-f", help="Force refresh of agent state")
|
|
171
|
-
):
|
|
172
|
-
"""List available agent providers and their status."""
|
|
173
|
-
# Reuse status logic
|
|
174
|
-
status(json=json, force=force)
|
|
175
|
-
|
|
176
|
-
@app.command()
|
|
177
|
-
def status(
|
|
178
|
-
json: AgentOutput = False,
|
|
179
|
-
force: bool = typer.Option(False, "--force", "-f", help="Force refresh of agent state")
|
|
180
|
-
):
|
|
181
|
-
"""View status of Agent Providers."""
|
|
182
|
-
state_manager = AgentStateManager()
|
|
183
|
-
state = state_manager.get_or_refresh(force=force)
|
|
184
|
-
|
|
185
|
-
if OutputManager.is_agent_mode():
|
|
186
|
-
# Convert datetime to ISO string for JSON serialization
|
|
187
|
-
data = state.dict()
|
|
188
|
-
data["last_checked"] = data["last_checked"].isoformat()
|
|
189
|
-
OutputManager.print(data)
|
|
190
|
-
else:
|
|
191
|
-
# Standard output using existing print_output or custom formatting
|
|
192
|
-
from monoco.core.output import Table
|
|
193
|
-
from rich import print as rprint
|
|
194
|
-
|
|
195
|
-
table = Table(title=f"Agent Status (Last Checked: {state.last_checked.strftime('%Y-%m-%d %H:%M:%S')})")
|
|
196
|
-
table.add_column("Provider")
|
|
197
|
-
table.add_column("Available")
|
|
198
|
-
table.add_column("Path")
|
|
199
|
-
table.add_column("Error")
|
|
200
|
-
|
|
201
|
-
for name, p_state in state.providers.items():
|
|
202
|
-
table.add_row(
|
|
203
|
-
name,
|
|
204
|
-
"✅" if p_state.available else "❌",
|
|
205
|
-
p_state.path or "-",
|
|
206
|
-
p_state.error or "-"
|
|
207
|
-
)
|
|
208
|
-
rprint(table)
|
|
209
|
-
|
|
210
|
-
@app.command()
|
|
211
|
-
def doctor(
|
|
212
|
-
force: bool = typer.Option(False, "--force", "-f", help="Force refresh of agent state")
|
|
213
|
-
):
|
|
214
|
-
"""
|
|
215
|
-
Diagnose Agent Environment and refresh state.
|
|
216
|
-
"""
|
|
217
|
-
from monoco.features.agent.doctor import doctor as doc_impl
|
|
218
|
-
doc_impl(force)
|
|
219
|
-
|
|
220
|
-
@app.command()
|
|
221
|
-
def init(
|
|
222
|
-
force: bool = typer.Option(False, "--force", "-f", help="Force overwrite existing resources")
|
|
223
|
-
):
|
|
224
|
-
"""
|
|
225
|
-
Initialize Agent Resources (prompts) in the current project.
|
|
226
|
-
"""
|
|
227
|
-
settings = get_config()
|
|
228
|
-
root = Path(settings.paths.root)
|
|
229
|
-
|
|
230
|
-
from monoco.features.agent.core import init_agent_resources
|
|
231
|
-
# TODO: Pass force arg when supported by core
|
|
232
|
-
init_agent_resources(root)
|
|
233
|
-
|
|
234
|
-
if OutputManager.is_agent_mode():
|
|
235
|
-
OutputManager.print({"status": "initialized"})
|
|
236
|
-
else:
|
|
237
|
-
print(f"Agent resources initialized in {root}")
|
monoco/features/agent/core.py
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import shutil
|
|
2
|
-
import os
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from typing import List
|
|
5
|
-
try:
|
|
6
|
-
from importlib.resources import files
|
|
7
|
-
except ImportError:
|
|
8
|
-
# Fallback for python < 3.9
|
|
9
|
-
from importlib_resources import files
|
|
10
|
-
|
|
11
|
-
def init_agent_resources(project_root: Path):
|
|
12
|
-
"""
|
|
13
|
-
Initialize Agent resources (prompts) in the project workspace.
|
|
14
|
-
"""
|
|
15
|
-
actions_dir = project_root / ".monoco" / "actions"
|
|
16
|
-
actions_dir.mkdir(parents=True, exist_ok=True)
|
|
17
|
-
|
|
18
|
-
# Determine language from config, default to 'en'
|
|
19
|
-
# We need to load config to know the language.
|
|
20
|
-
# But this function might be called before full config load?
|
|
21
|
-
# Helper to peek at config or default to 'en'
|
|
22
|
-
from monoco.core.config import get_config
|
|
23
|
-
try:
|
|
24
|
-
settings = get_config(str(project_root), require_project=False) # Best effort
|
|
25
|
-
lang = settings.core.language or "en"
|
|
26
|
-
except Exception:
|
|
27
|
-
lang = "en"
|
|
28
|
-
|
|
29
|
-
# Define source path relative to this module
|
|
30
|
-
try:
|
|
31
|
-
current_dir = Path(__file__).parent
|
|
32
|
-
|
|
33
|
-
# Try specific language, fallback to 'en'
|
|
34
|
-
source_dir = current_dir / "resources" / lang
|
|
35
|
-
if not source_dir.exists():
|
|
36
|
-
source_dir = current_dir / "resources" / "en"
|
|
37
|
-
|
|
38
|
-
if source_dir.exists():
|
|
39
|
-
for item in source_dir.glob("*.prompty"):
|
|
40
|
-
target = actions_dir / item.name
|
|
41
|
-
# Copy if not exists, or overwrite?
|
|
42
|
-
# Ideally init should be safe to run multiple times (idempotent)
|
|
43
|
-
# But user might have customized them.
|
|
44
|
-
if not target.exists():
|
|
45
|
-
shutil.copy2(item, target)
|
|
46
|
-
except Exception as e:
|
|
47
|
-
# Fallback or Log?
|
|
48
|
-
pass
|
monoco/features/agent/doctor.py
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import typer
|
|
2
|
-
from monoco.core.output import print_output, print_error
|
|
3
|
-
from monoco.core.agent.state import AgentStateManager
|
|
4
|
-
|
|
5
|
-
app = typer.Typer()
|
|
6
|
-
|
|
7
|
-
@app.command()
|
|
8
|
-
def doctor(
|
|
9
|
-
force: bool = typer.Option(False, "--force", "-f", help="Force refresh of agent state")
|
|
10
|
-
):
|
|
11
|
-
"""
|
|
12
|
-
Diagnose Agent Environment and refresh state.
|
|
13
|
-
"""
|
|
14
|
-
manager = AgentStateManager()
|
|
15
|
-
try:
|
|
16
|
-
if force:
|
|
17
|
-
print("Force refreshing agent state...")
|
|
18
|
-
state = manager.refresh()
|
|
19
|
-
else:
|
|
20
|
-
state = manager.get_or_refresh()
|
|
21
|
-
|
|
22
|
-
print_output(state, title="Agent Diagnosis Report")
|
|
23
|
-
|
|
24
|
-
# Simple summary
|
|
25
|
-
available = [k for k, v in state.providers.items() if v.available]
|
|
26
|
-
print(f"\n✅ Available Agents: {', '.join(available) if available else 'None'}")
|
|
27
|
-
|
|
28
|
-
except Exception as e:
|
|
29
|
-
print_error(f"Doctor failed: {e}")
|
|
30
|
-
raise typer.Exit(1)
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: critique
|
|
3
|
-
description: Critique the code or design against requirements.
|
|
4
|
-
provider: chat
|
|
5
|
-
---
|
|
6
|
-
You are a Principal Code Reviewer.
|
|
7
|
-
Your task is to critique the following implementation/design:
|
|
8
|
-
|
|
9
|
-
{{file}}
|
|
10
|
-
|
|
11
|
-
# Instructions
|
|
12
|
-
1. **Gap Analysis**: Check if all Acceptance Criteria are met.
|
|
13
|
-
2. **Code Quality**: Identify potential bugs, security issues, or performance bottlenecks.
|
|
14
|
-
3. **Design Patterns**: Suggest better patterns if applicable.
|
|
15
|
-
|
|
16
|
-
Output a structured review.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: develop
|
|
3
|
-
description: 执行核心开发任务:编码与单元测试。
|
|
4
|
-
provider: chat
|
|
5
|
-
---
|
|
6
|
-
You are a Principal Software Engineer.
|
|
7
|
-
Your task is to implement the feature described in this Issue:
|
|
8
|
-
|
|
9
|
-
{{file}}
|
|
10
|
-
|
|
11
|
-
# Instructions
|
|
12
|
-
1. **Implementation**: Write the code required to satisfy the Acceptance Criteria.
|
|
13
|
-
2. **Unit Tests**: Add or update unit tests to verify your changes.
|
|
14
|
-
3. **Linting**: Ensure code follows project style guidelines.
|
|
15
|
-
|
|
16
|
-
Please provide the code changes.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: investigate
|
|
3
|
-
description: 扫描 Codebase,识别架构设计、业务约束,丰富 Issue 引用网络。
|
|
4
|
-
provider: chat
|
|
5
|
-
---
|
|
6
|
-
You are a Senior Software Architect.
|
|
7
|
-
Your task is to investigate the feasibility and impact of the following Issue:
|
|
8
|
-
|
|
9
|
-
{{file}}
|
|
10
|
-
|
|
11
|
-
# Instructions
|
|
12
|
-
1. **Architecture Scan**: Identify which modules/files need to be modified.
|
|
13
|
-
2. **Dependency Analysis**: Suggest `parent`, `dependencies`, and `related` issues.
|
|
14
|
-
3. **Constraint Check**: Identify any business rules or technical constraints (e.g., Billing module impact).
|
|
15
|
-
|
|
16
|
-
Output your findings as a comment or update the Issue description directly.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: refine
|
|
3
|
-
description: 细化需求,将 Draft 转化为可执行的 Plan。
|
|
4
|
-
provider: chat
|
|
5
|
-
---
|
|
6
|
-
You are a Product Owner / Systems Analyst.
|
|
7
|
-
Refine the following Draft Issue into a concrete Technical Plan:
|
|
8
|
-
|
|
9
|
-
{{file}}
|
|
10
|
-
|
|
11
|
-
# Instructions
|
|
12
|
-
1. **Clarify Objective**: Ensure the goal is specific and standard.
|
|
13
|
-
2. **Expand Criteria**: Add detailed Acceptance Criteria.
|
|
14
|
-
3. **Breakdown Tasks**: List concrete Technical Tasks.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: verify
|
|
3
|
-
description: 代为检查工单完整性、代码质量与逻辑一致性。
|
|
4
|
-
provider: chat
|
|
5
|
-
---
|
|
6
|
-
You are a QA Lead / Release Manager.
|
|
7
|
-
Your task is to verify if the following Issue is ready for delivery:
|
|
8
|
-
|
|
9
|
-
{{file}}
|
|
10
|
-
|
|
11
|
-
# Instructions
|
|
12
|
-
1. **Definition of Done**: Check if all Technical Tasks are checked and Acceptance Criteria met.
|
|
13
|
-
2. **Quality Check**: Review the code changes (if provided in context) for bugs or antipatterns.
|
|
14
|
-
3. **Completeness**: Ensure documentation and tests are present.
|
|
15
|
-
|
|
16
|
-
Output "PASS" if ready, or a list of "BLOCKERS" if not.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: critique
|
|
3
|
-
description: 对当前实现或设计进行批判性审查。
|
|
4
|
-
provider: chat
|
|
5
|
-
when:
|
|
6
|
-
stageMatch: "review"
|
|
7
|
-
---
|
|
8
|
-
你是一位首席代码审查员。
|
|
9
|
-
你的任务是对以下实现/设计进行批判性审查:
|
|
10
|
-
|
|
11
|
-
{{file}}
|
|
12
|
-
|
|
13
|
-
# 指令
|
|
14
|
-
1. **差距分析**: 检查是否满足所有验收标准。
|
|
15
|
-
2. **代码质量**: 识别潜在的 Bug、安全问题或性能瓶颈。
|
|
16
|
-
3. **设计模式**: 如果适用,建议更好的设计模式。
|
|
17
|
-
|
|
18
|
-
输出结构化的审查意见。
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: develop
|
|
3
|
-
description: 执行核心开发任务:编码与单元测试。
|
|
4
|
-
provider: chat
|
|
5
|
-
when:
|
|
6
|
-
stageMatch: "doing"
|
|
7
|
-
---
|
|
8
|
-
你是一位首席软件工程师。
|
|
9
|
-
你的任务是实现此 Issue 中描述的功能:
|
|
10
|
-
|
|
11
|
-
{{file}}
|
|
12
|
-
|
|
13
|
-
# 指令
|
|
14
|
-
1. **代码实现**: 编写满足验收标准所需的代码。
|
|
15
|
-
2. **单元测试**: 添加或更新单元测试以验证你的更改。
|
|
16
|
-
3. **代码规范**: 确保代码遵循项目风格指南 (Linting)。
|
|
17
|
-
|
|
18
|
-
请提供代码变更。
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: investigate
|
|
3
|
-
description: 扫描代码库,识别架构设计、业务约束,丰富 Issue 引用网络。
|
|
4
|
-
provider: chat
|
|
5
|
-
when:
|
|
6
|
-
statusMatch: "open"
|
|
7
|
-
---
|
|
8
|
-
你是一位资深软件架构师。
|
|
9
|
-
你的任务是调查以下 Issue 的可行性和影响:
|
|
10
|
-
|
|
11
|
-
{{file}}
|
|
12
|
-
|
|
13
|
-
# 指令
|
|
14
|
-
1. **架构扫描**: 识别哪些模块/文件需要修改。
|
|
15
|
-
2. **依赖分析**: 建议 `parent` (父级), `dependencies` (依赖), 和 `related` (相关) 议题。
|
|
16
|
-
3. **约束检查**: 识别任何业务规则或技术约束(例如,即使很小的改动也可能影响计费模块)。
|
|
17
|
-
|
|
18
|
-
请以评论形式输出你的发现,或直接更新 Issue 描述。
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: refine
|
|
3
|
-
description: 细化需求,将 Draft 转化为可执行的 Plan。
|
|
4
|
-
provider: chat
|
|
5
|
-
when:
|
|
6
|
-
stageMatch: "draft"
|
|
7
|
-
---
|
|
8
|
-
你是一位产品负责人 (PO) / 系统分析师。
|
|
9
|
-
将以下草案 (Draft) Issue 细化为具体的技术计划:
|
|
10
|
-
|
|
11
|
-
{{file}}
|
|
12
|
-
|
|
13
|
-
# 指令
|
|
14
|
-
1. **阐明目标**: 确保目标具体且标准。
|
|
15
|
-
2. **扩展标准**: 添加详细的验收标准 (Acceptance Criteria)。
|
|
16
|
-
3. **任务分解**: 列出具体的技术任务 (Technical Tasks)。
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: verify
|
|
3
|
-
description: 代为检查工单完整性、代码质量与逻辑一致性。
|
|
4
|
-
provider: chat
|
|
5
|
-
when:
|
|
6
|
-
stageMatch: "review|done"
|
|
7
|
-
---
|
|
8
|
-
你是一位 QA 负责人 / 发布经理。
|
|
9
|
-
你的任务是验证以下 Issue 是否已准备好交付:
|
|
10
|
-
|
|
11
|
-
{{file}}
|
|
12
|
-
|
|
13
|
-
# 指令
|
|
14
|
-
1. **完成定义 (DoD)**: 检查是否所有技术任务 (Technical Tasks) 都已勾选,且满足验收标准。
|
|
15
|
-
2. **质量检查**: 审查代码变更(如果在上下文中提供了),查找 Bug 或反模式。
|
|
16
|
-
3. **完整性**: 确保文档和测试都已存在。
|
|
17
|
-
|
|
18
|
-
如果准备好了,输出 "PASS";否则列出 "BLOCKERS" (阻碍项)。
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: monoco-toolkit
|
|
3
|
-
Version: 0.2.6
|
|
4
|
-
Summary: Agent Native Toolkit for Monoco - Task Management & Kanban for AI Agents
|
|
5
|
-
Project-URL: Homepage, https://monoco.io
|
|
6
|
-
Project-URL: Repository, https://github.com/IndenScale/Monoco
|
|
7
|
-
Project-URL: Documentation, https://monoco.io/docs
|
|
8
|
-
Project-URL: Issues, https://github.com/IndenScale/Monoco/issues
|
|
9
|
-
Author-email: Monoco Team <dev@monoco.io>
|
|
10
|
-
License-Expression: MIT
|
|
11
|
-
License-File: LICENSE
|
|
12
|
-
Keywords: agent-native,ai-agents,cli,kanban,monoco,task-management,workflow
|
|
13
|
-
Classifier: Development Status :: 3 - Alpha
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
Classifier: Topic :: Office/Business :: Groupware
|
|
21
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
-
Requires-Python: >=3.10
|
|
24
|
-
Requires-Dist: fastapi>=0.100.0
|
|
25
|
-
Requires-Dist: httpx>=0.28.1
|
|
26
|
-
Requires-Dist: prompt-toolkit>=3.0.0
|
|
27
|
-
Requires-Dist: pydantic>=2.0.0
|
|
28
|
-
Requires-Dist: pyyaml>=6.0
|
|
29
|
-
Requires-Dist: rich>=13.0.0
|
|
30
|
-
Requires-Dist: sse-starlette>=1.6.0
|
|
31
|
-
Requires-Dist: typer[all]>=0.9.0
|
|
32
|
-
Requires-Dist: uvicorn[standard]>=0.20.0
|
|
33
|
-
Requires-Dist: watchdog>=6.0.0
|
|
34
|
-
Description-Content-Type: text/markdown
|
|
35
|
-
|
|
36
|
-
# Monoco: Harnessing AI Agents
|
|
37
|
-
|
|
38
|
-
> **The control interface between raw AI velocity and human information bandwidth.**
|
|
39
|
-
|
|
40
|
-
Production in the LLM era is exploding along a vertical curve. A single AI agent can work 24/7, generating massive amounts of intermediate data that far exceeds the biological information bandwidth of a human supervisor. When one agent becomes a hundred, the bottleneck is no longer "intelligence"—it is "command and control."
|
|
41
|
-
|
|
42
|
-
**Monoco is the Cockpit.**
|
|
43
|
-
|
|
44
|
-
It doesn't just "run" agents; it "encapsulates" them. It provides a deterministic barrier between the chaotic, raw execution power of LLMs and the rigorous, finite decision bandwidth of human engineers. It ensures that every agentic action eventually collapses into the outcome you intended.
|
|
45
|
-
|
|
46
|
-
## Workflow: Plan - Execute - Review - Archive
|
|
47
|
-
|
|
48
|
-
Monoco channels agent execution into a clear cycle:
|
|
49
|
-
|
|
50
|
-
1. **Plan**: Decompose complex missions through **Project → Epic → Feature** hierarchies into executable atomic units.
|
|
51
|
-
2. **Execute**: Agents work autonomously based on acceptance criteria defined in Issues, with all intermediate states persisted as structured files.
|
|
52
|
-
3. **Review**: Humans monitor progress through the Kanban dashboard, intervening only at critical decision points.
|
|
53
|
-
4. **Archive**: Completed tasks automatically transition to archived states, forming a traceable project history.
|
|
54
|
-
|
|
55
|
-
## The Control Matrix
|
|
56
|
-
|
|
57
|
-
- **Task Anchors (Issues)**: Define missions via structured files, setting clear boundaries and acceptance criteria for agents.
|
|
58
|
-
- **Deterministic Interface (CLI)**: Acts as a sensory extension for LLMs, providing them with structured perception of project state and eliminating hallucinated guesses.
|
|
59
|
-
- **Mission Dashboard (Kanban)**: A high-fidelity visual console that allows humans to audit tasks and transition states with minimal cognitive load.
|
|
60
|
-
|
|
61
|
-
## Quick Start
|
|
62
|
-
|
|
63
|
-
### 1. Install the Control Suite
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
pip install monoco-toolkit
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### 2. Initialize the Workflow
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
monoco init
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### 3. Take Control
|
|
76
|
-
|
|
77
|
-
Start the backend control hub:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
monoco serve
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Then, launch the visual mission dashboard from anywhere:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
npx @monoco-io/kanban
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Visit `http://localhost:3123` (or the URL displayed in your terminal) to enter your cockpit.
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
_"Cars are made to drive, not to fix."_
|
|
File without changes
|
|
File without changes
|
|
File without changes
|