@mstar-harness/opencode 0.6.22 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/harness-commands/iteration-drive.md +42 -30
- package/harness-commands/iteration-start.md +11 -7
- package/harness-commands/mstar-bootstrap.md +171 -0
- package/harness-skills/mstar-compound/SKILL.md +251 -0
- package/harness-skills/mstar-compound/assets/resolution-template.md +94 -0
- package/harness-skills/mstar-compound/references/category-mapping.md +37 -0
- package/harness-skills/mstar-compound/references/concepts-vocabulary.md +44 -0
- package/harness-skills/mstar-compound/references/schema.yaml +122 -0
- package/harness-skills/mstar-compound-refresh/SKILL.md +128 -0
- package/harness-skills/mstar-harness-core/SKILL.md +13 -7
- package/harness-skills/mstar-iteration/SKILL.md +273 -0
- package/harness-skills/mstar-iteration/references/iteration-compass-template.md +96 -0
- package/harness-skills/mstar-phase-gates/SKILL.md +15 -3
- package/harness-skills/mstar-plan-artifacts/references/knowledge-and-designs.md +1 -0
- package/harness-skills/mstar-plan-conventions/SKILL.md +1 -0
- package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +46 -0
- package/harness-skills/mstar-review-qc/SKILL.md +9 -0
- package/harness-skills/mstar-review-qc/references/deep-review-personas.md +151 -0
- package/harness-skills/mstar-roles/SKILL.md +6 -2
- package/harness-skills/mstar-strategy/SKILL.md +128 -0
- package/harness-skills/pm/SKILL.md +10 -67
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Category mapping: problem_type → directory under {KNOWLEDGE_DIR}
|
|
2
|
+
|
|
3
|
+
## Bug track
|
|
4
|
+
|
|
5
|
+
| problem_type | directory | track |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| `build_error` | `build-errors/` | bug |
|
|
8
|
+
| `test_failure` | `test-failures/` | bug |
|
|
9
|
+
| `runtime_error` | `runtime-errors/` | bug |
|
|
10
|
+
| `performance_issue` | `performance-issues/` | bug |
|
|
11
|
+
| `database_issue` | `database-issues/` | bug |
|
|
12
|
+
| `security_issue` | `security-issues/` | bug |
|
|
13
|
+
| `ui_bug` | `ui-bugs/` | bug |
|
|
14
|
+
| `integration_issue` | `integration-issues/` | bug |
|
|
15
|
+
| `logic_error` | `logic-errors/` | bug |
|
|
16
|
+
| `config_error` | `config-errors/` | bug |
|
|
17
|
+
|
|
18
|
+
## Knowledge track
|
|
19
|
+
|
|
20
|
+
| problem_type | directory | track |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `best_practice` | `best-practices/` | knowledge |
|
|
23
|
+
| `convention` | `conventions/` | knowledge |
|
|
24
|
+
| `architecture_pattern` | `architecture-patterns/` | knowledge |
|
|
25
|
+
| `design_pattern` | `design-patterns/` | knowledge |
|
|
26
|
+
| `tooling_decision` | `tooling-decisions/` | knowledge |
|
|
27
|
+
| `testing_pattern` | `testing-patterns/` | knowledge |
|
|
28
|
+
| `api_design` | `api-design/` | knowledge |
|
|
29
|
+
| `workflow_issue` | `workflow-patterns/` | knowledge |
|
|
30
|
+
| `developer_experience` | `developer-experience/` | knowledge |
|
|
31
|
+
| `documentation_gap` | `documentation/` | knowledge |
|
|
32
|
+
|
|
33
|
+
## Rules
|
|
34
|
+
|
|
35
|
+
1. The `category` field in frontmatter must match the directory name (without trailing slash).
|
|
36
|
+
2. Prefer the narrowest applicable `problem_type`. Use `best_practice` only when no narrower knowledge-track value fits.
|
|
37
|
+
3. When creating a new directory under `{KNOWLEDGE_DIR}`, add it to this mapping and create an empty directory.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# CONCEPTS.md vocabulary rules
|
|
2
|
+
|
|
3
|
+
`CONCEPTS.md` **must** live at the repository root (`<repo-root>/CONCEPTS.md`, same level as `.git/` and `AGENTS.md`), **never** inside `{HARNESS_DIR}` or any subdirectory. It defines the words that mean something specific in this codebase — substrate that `{KNOWLEDGE_DIR}` and `AGENTS.md` can cite without redefinition.
|
|
4
|
+
|
|
5
|
+
## How terms enter
|
|
6
|
+
|
|
7
|
+
Two paths:
|
|
8
|
+
|
|
9
|
+
- **Accretion** — a learning surfaces a term whose meaning wasn't obvious, so it gets defined. Catches *peripheral* terms (friction surfaces them).
|
|
10
|
+
- **Seeding** — proactively defines **core domain nouns** the area's declared domain model exposes. Catches *stable-central* terms accretion never reaches.
|
|
11
|
+
|
|
12
|
+
### What earns a slot
|
|
13
|
+
|
|
14
|
+
A term qualifies when its meaning here is precise enough that a new engineer would need it defined to follow conversations, tickets, or code. General programming vocabulary does not belong.
|
|
15
|
+
|
|
16
|
+
### Per entry
|
|
17
|
+
|
|
18
|
+
- **Definition**: one sentence — what the term means in this domain, what makes it distinct from neighbors.
|
|
19
|
+
- A term with non-obvious behavioral rules (lifecycle, cancellation semantics, ownership invariants) earns a second paragraph.
|
|
20
|
+
- When retired synonyms exist: `*Avoid:* old-name, other-name`.
|
|
21
|
+
- No implementation specifics (file paths, class names, table names), no status/date/owner fields, no version-specific claims.
|
|
22
|
+
|
|
23
|
+
### Organization
|
|
24
|
+
|
|
25
|
+
Cluster by domain relationship — entities with their states, processes with their stages. A flat list works when the file is small. Reshape as it grows.
|
|
26
|
+
|
|
27
|
+
### Flagged ambiguities (tail of file)
|
|
28
|
+
|
|
29
|
+
When two terms were used interchangeably and the team settled on a distinction, record the resolution as a one-line note.
|
|
30
|
+
|
|
31
|
+
## One illustrative entry
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
## MyDomain
|
|
35
|
+
|
|
36
|
+
### Reservation
|
|
37
|
+
A future commitment to seat a Party at a specified date and time.
|
|
38
|
+
*Avoid:* Booking, appointment
|
|
39
|
+
|
|
40
|
+
A Reservation owns its Party but does not own a Table — Tables are acquired only when the Party arrives, through a Seating. Lifecycle: Booked → Seated → Completed → No-Show.
|
|
41
|
+
|
|
42
|
+
### Party
|
|
43
|
+
The guests committed to a Reservation. Each Reservation has exactly one Party.
|
|
44
|
+
```
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Knowledge documentation schema for {KNOWLEDGE_DIR}
|
|
2
|
+
# Canonical frontmatter contract. Two tracks: bug and knowledge.
|
|
3
|
+
|
|
4
|
+
tracks:
|
|
5
|
+
bug:
|
|
6
|
+
description: "Defects, failures, and errors that were diagnosed and fixed"
|
|
7
|
+
problem_types:
|
|
8
|
+
- build_error
|
|
9
|
+
- test_failure
|
|
10
|
+
- runtime_error
|
|
11
|
+
- performance_issue
|
|
12
|
+
- database_issue
|
|
13
|
+
- security_issue
|
|
14
|
+
- ui_bug
|
|
15
|
+
- integration_issue
|
|
16
|
+
- logic_error
|
|
17
|
+
- config_error
|
|
18
|
+
knowledge:
|
|
19
|
+
description: "Practices, patterns, conventions, decisions, and workflow improvements"
|
|
20
|
+
problem_types:
|
|
21
|
+
- best_practice
|
|
22
|
+
- documentation_gap
|
|
23
|
+
- workflow_issue
|
|
24
|
+
- developer_experience
|
|
25
|
+
- architecture_pattern
|
|
26
|
+
- design_pattern
|
|
27
|
+
- tooling_decision
|
|
28
|
+
- convention
|
|
29
|
+
- api_design
|
|
30
|
+
- testing_pattern
|
|
31
|
+
|
|
32
|
+
required_fields:
|
|
33
|
+
module:
|
|
34
|
+
type: string
|
|
35
|
+
description: "Module, component, or area affected"
|
|
36
|
+
|
|
37
|
+
date:
|
|
38
|
+
type: string
|
|
39
|
+
pattern: '^\d{4}-\d{2}-\d{2}$'
|
|
40
|
+
description: "Date documented (YYYY-MM-DD)"
|
|
41
|
+
|
|
42
|
+
problem_type:
|
|
43
|
+
type: enum
|
|
44
|
+
values:
|
|
45
|
+
- build_error
|
|
46
|
+
- test_failure
|
|
47
|
+
- runtime_error
|
|
48
|
+
- performance_issue
|
|
49
|
+
- database_issue
|
|
50
|
+
- security_issue
|
|
51
|
+
- ui_bug
|
|
52
|
+
- integration_issue
|
|
53
|
+
- logic_error
|
|
54
|
+
- config_error
|
|
55
|
+
- developer_experience
|
|
56
|
+
- workflow_issue
|
|
57
|
+
- best_practice
|
|
58
|
+
- documentation_gap
|
|
59
|
+
- architecture_pattern
|
|
60
|
+
- design_pattern
|
|
61
|
+
- tooling_decision
|
|
62
|
+
- convention
|
|
63
|
+
- api_design
|
|
64
|
+
- testing_pattern
|
|
65
|
+
description: "Primary category — determines track (bug vs knowledge)"
|
|
66
|
+
|
|
67
|
+
category:
|
|
68
|
+
type: string
|
|
69
|
+
description: "Directory name under {KNOWLEDGE_DIR} (see category-mapping.md)"
|
|
70
|
+
|
|
71
|
+
severity:
|
|
72
|
+
type: enum
|
|
73
|
+
values:
|
|
74
|
+
- critical
|
|
75
|
+
- high
|
|
76
|
+
- medium
|
|
77
|
+
- low
|
|
78
|
+
description: "Impact severity"
|
|
79
|
+
|
|
80
|
+
track_rules:
|
|
81
|
+
bug:
|
|
82
|
+
required:
|
|
83
|
+
symptoms:
|
|
84
|
+
type: array
|
|
85
|
+
description: "Observable symptoms (errors, broken behavior)"
|
|
86
|
+
root_cause:
|
|
87
|
+
type: string
|
|
88
|
+
description: "Fundamental technical cause"
|
|
89
|
+
resolution_type:
|
|
90
|
+
type: enum
|
|
91
|
+
values:
|
|
92
|
+
- code_fix
|
|
93
|
+
- migration
|
|
94
|
+
- config_change
|
|
95
|
+
- test_fix
|
|
96
|
+
- dependency_update
|
|
97
|
+
- environment_setup
|
|
98
|
+
- workflow_improvement
|
|
99
|
+
- documentation_update
|
|
100
|
+
- tooling_addition
|
|
101
|
+
description: "Type of fix applied"
|
|
102
|
+
knowledge:
|
|
103
|
+
optional:
|
|
104
|
+
applies_when:
|
|
105
|
+
type: array
|
|
106
|
+
description: "Conditions or situations where this guidance applies"
|
|
107
|
+
|
|
108
|
+
optional_fields:
|
|
109
|
+
plan_id:
|
|
110
|
+
type: string
|
|
111
|
+
description: "Link to status.json plans[].id"
|
|
112
|
+
tags:
|
|
113
|
+
type: array
|
|
114
|
+
max_items: 8
|
|
115
|
+
description: "Search keywords, lowercase, hyphen-separated"
|
|
116
|
+
last_updated:
|
|
117
|
+
type: string
|
|
118
|
+
pattern: '^\d{4}-\d{2}-\d{2}$'
|
|
119
|
+
description: "Date of last substantive update (added when updating an existing doc)"
|
|
120
|
+
related_components:
|
|
121
|
+
type: array
|
|
122
|
+
description: "Other components involved"
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mstar-compound-refresh
|
|
3
|
+
description: Morning Star 知识维护 —— 审查 `{KNOWLEDGE_DIR}` 中文档是否仍准确、去重叠合并、清理过期知识。触发:`mstar-compound` 发现可合并文档、定期维护、或显式调用。产出:更新/合并/删除/标记为 stale 的文档 + 维护报告。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mstar-compound-refresh(知识维护)
|
|
7
|
+
|
|
8
|
+
## Load order
|
|
9
|
+
|
|
10
|
+
**Read `mstar-harness-core` first.** Path symbols → **`mstar-plan-conventions`**. On conflict, **`mstar-harness-core` wins**.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Knowledge documents in `{KNOWLEDGE_DIR}` age. Code changes, conventions evolve, patterns become obsolete. `mstar-compound-refresh` audits the knowledge store against the current codebase and makes it trustworthy again.
|
|
15
|
+
|
|
16
|
+
## 产物与操作路径
|
|
17
|
+
|
|
18
|
+
**SSOT**: `mstar-plan-conventions/references/artifact-storage-paths.md`。本 skill 仅操作 `{HARNESS_DIR}/knowledge/**/*.md` + `{HARNESS_DIR}/knowledge/README.md` + `<repo-root>/CONCEPTS.md` + `{HARNESS_DIR}/status.json`(引用更新)。**禁止**操作 `docs/`、`{PLAN_DIR}/`、`{ITERATION_DIR}/`、`{SPECS_DIR}/`。
|
|
19
|
+
|
|
20
|
+
## When to use
|
|
21
|
+
|
|
22
|
+
| Trigger | Example |
|
|
23
|
+
|---------|---------|
|
|
24
|
+
| `mstar-compound` detected overlapping docs | "Two docs cover N+1 queries — consider refresh" |
|
|
25
|
+
| Scheduled maintenance | "It's been a quarter, let's audit knowledge" |
|
|
26
|
+
| Domain refactored | After a major module rewrite |
|
|
27
|
+
| Explicit user request | `/pm compound-refresh performance-issues` |
|
|
28
|
+
|
|
29
|
+
## Maintenance outcomes
|
|
30
|
+
|
|
31
|
+
For each candidate document, classify into one of five outcomes:
|
|
32
|
+
|
|
33
|
+
| Outcome | Meaning | Default action |
|
|
34
|
+
|---------|---------|----------------|
|
|
35
|
+
| **Keep** | Still accurate and useful | No edit; report reviewed |
|
|
36
|
+
| **Update** | Core solution correct, references drifted | In-place edits (paths, module names, code snippets) |
|
|
37
|
+
| **Consolidate** | Two+ docs overlap heavily, both correct | Merge unique content into canonical doc, delete subsumed |
|
|
38
|
+
| **Replace** | Old doc is misleading; known better replacement exists | Create trustworthy successor, then delete old |
|
|
39
|
+
| **Delete** | No longer useful, applicable, or distinct | Delete — git history preserves it |
|
|
40
|
+
|
|
41
|
+
## Core rules
|
|
42
|
+
|
|
43
|
+
1. **Evidence over opinion.** Signals are inputs, not a scorecard. Use engineering judgment.
|
|
44
|
+
2. **Prefer no-write Keep.** Do not update a doc just to leave a review breadcrumb.
|
|
45
|
+
3. **Match docs to reality.** When code differs from doc, update the doc — not ask whether the code change was "intentional."
|
|
46
|
+
4. **Be decisive.** When evidence is clear (file renamed, class moved), apply. Only ask PM when genuinely ambiguous.
|
|
47
|
+
5. **Avoid low-value churn.** Don't edit for typos, polish, or cosmetic changes that don't improve accuracy.
|
|
48
|
+
6. **Delete, don't archive.** No `_archived/` directory. Git history is the archive. `git log --diff-filter=D -- <path>` finds deleted docs.
|
|
49
|
+
7. **Evaluate document-set design.** Check whether two+ docs overlap and should be consolidated. Redundant docs silently drift apart.
|
|
50
|
+
|
|
51
|
+
## Scope selection
|
|
52
|
+
|
|
53
|
+
### Default: user-guided
|
|
54
|
+
|
|
55
|
+
1. Ask PM for scope: "All knowledge docs, a specific category, or a keyword?"
|
|
56
|
+
2. If category: narrow to `{KNOWLEDGE_DIR}/<category>/`.
|
|
57
|
+
3. If keyword: search frontmatter (`module:`, `tags:`, `problem_type:`) and filenames.
|
|
58
|
+
|
|
59
|
+
### PM-directed: specific scope
|
|
60
|
+
|
|
61
|
+
PM provides a scope hint (directory name, filename, module name, or keyword). Match in this order:
|
|
62
|
+
1. Directory match under `{KNOWLEDGE_DIR}/`
|
|
63
|
+
2. Frontmatter field match
|
|
64
|
+
3. Filename match
|
|
65
|
+
4. Content search
|
|
66
|
+
|
|
67
|
+
## Process
|
|
68
|
+
|
|
69
|
+
### Phase 1: Inventory
|
|
70
|
+
|
|
71
|
+
1. List all `.md` files under `{KNOWLEDGE_DIR}/` (excluding `README.md` and index files).
|
|
72
|
+
2. Read frontmatter of each candidate.
|
|
73
|
+
3. Group by `category` / `module` for impact clustering.
|
|
74
|
+
|
|
75
|
+
### Phase 2: Assess per doc
|
|
76
|
+
|
|
77
|
+
For each doc, check:
|
|
78
|
+
|
|
79
|
+
1. **Referenced code still exists?** — grep for file paths, class names, function names mentioned.
|
|
80
|
+
2. **Referenced conventions still match?** — check against current `AGENTS.md`, `CONCEPTS.md`, lint configs.
|
|
81
|
+
3. **Solution still the recommended approach?** — has a newer pattern superseded it?
|
|
82
|
+
4. **Overlap with other docs?** — search for same module/tags to find duplicates.
|
|
83
|
+
|
|
84
|
+
### Phase 3: Classify and act
|
|
85
|
+
|
|
86
|
+
Classify each doc → Keep / Update / Consolidate / Replace / Delete. Apply changes.
|
|
87
|
+
|
|
88
|
+
### Phase 4: Update indexes
|
|
89
|
+
|
|
90
|
+
1. Update `{KNOWLEDGE_DIR}/README.md` index table — update Status column, add/remove rows.
|
|
91
|
+
2. If doc was linked from `status.json` metadata, update references.
|
|
92
|
+
|
|
93
|
+
### Phase 5: Report
|
|
94
|
+
|
|
95
|
+
Produce a maintenance report:
|
|
96
|
+
- Docs reviewed (count)
|
|
97
|
+
- Docs kept (count)
|
|
98
|
+
- Docs updated (list with what changed)
|
|
99
|
+
- Docs consolidated (list with which canonical doc merged into)
|
|
100
|
+
- Docs replaced (list with successor path)
|
|
101
|
+
- Docs deleted (list with reason)
|
|
102
|
+
- Docs flagged for PM review (ambiguous cases)
|
|
103
|
+
|
|
104
|
+
### Phase 6: CONCEPTS.md reconciliation
|
|
105
|
+
|
|
106
|
+
If `CONCEPTS.md` exists, reconcile it with the refreshed knowledge:
|
|
107
|
+
- Terms mentioned in updated/replaced docs may need updating in CONCEPTS.md
|
|
108
|
+
- Terms no longer referenced may be candidates for removal
|
|
109
|
+
|
|
110
|
+
If `CONCEPTS.md` doesn't exist but knowledge docs contain qualifying domain terms, propose bootstrapping it (full repo-wide seed). Use `references/concepts-vocabulary.md` from `mstar-compound` for rules (read on demand — cross-skill path resolution via skill directory).
|
|
111
|
+
|
|
112
|
+
## Cross-skill coordination
|
|
113
|
+
|
|
114
|
+
`mstar-compound-refresh` reads vocabulary rules from `mstar-compound`'s references. At runtime, resolve the path from the loaded skill directory:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
The CONCEPTS.md vocabulary rules are in the mstar-compound skill at:
|
|
118
|
+
references/concepts-vocabulary.md
|
|
119
|
+
Read that file from the mstar-compound skill directory before Phase 6.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## NOT to do
|
|
123
|
+
|
|
124
|
+
- Do not delete docs without checking for inbound links
|
|
125
|
+
- Do not "archive" — delete instead
|
|
126
|
+
- Do not ask PM about mechanical updates (path fixes, renamed modules)
|
|
127
|
+
- Do not change code to match outdated docs — update docs to match code
|
|
128
|
+
- Do not run without PM approval for destructive actions (Delete, Replace)
|
|
@@ -24,15 +24,17 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
|
|
|
24
24
|
|
|
25
25
|
## 最小交付循环
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
**per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement` → QC 三审 + QA → Done。阶段细则 → **`mstar-phase-gates`**。
|
|
28
|
+
|
|
29
|
+
**迭代级**:`iteration-start → [per-plan cycle × N] → iteration-close(含知识结晶 `mstar-compound`)`。细则 → **`mstar-iteration`**。
|
|
28
30
|
|
|
29
31
|
## 加载约定(强制)
|
|
30
32
|
|
|
31
33
|
| 角色 | 始终 | 按任务追加(典型) |
|
|
32
34
|
|------|------|-------------------|
|
|
33
35
|
| **全部** | 本 skill | — |
|
|
34
|
-
| **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-superpowers-align`、`mstar-roles`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/reports `mstar-plan-artifacts`;UI 类 plan Prepare 阶段 `mstar-design-md`(DESIGN.md
|
|
35
|
-
| **实现/审查/QA/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-plan-conventions`(路径符号节);QC/QA:`mstar-review-qc`;改 status/residual:`mstar-plan-artifacts`;UI 任务:`mstar-design-md`(读取 DESIGN.md tokens
|
|
36
|
+
| **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-superpowers-align`、`mstar-roles`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/reports `mstar-plan-artifacts`;UI 类 plan Prepare 阶段 `mstar-design-md`(DESIGN.md 门禁);迭代管理 `mstar-iteration`(iteration-start/drive/close 含 compound);战略性工作 `mstar-strategy`。**不**读 `mstar-coding-behavior` |
|
|
37
|
+
| **实现/审查/QA/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-plan-conventions`(路径符号节);QC/QA:`mstar-review-qc`;改 status/residual:`mstar-plan-artifacts`;UI 任务:`mstar-design-md`(读取 DESIGN.md tokens);写入知识库 `{KNOWLEDGE_DIR}`:`mstar-compound`(PM 触发) |
|
|
36
38
|
| **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
|
|
37
39
|
|
|
38
40
|
Routing eval(Cursor 维护)→ `.cursor/skills/mstar-routing-eval/`,**非**运行时必读。
|
|
@@ -77,15 +79,19 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
|
|
|
77
79
|
|
|
78
80
|
| Skill | 职责 |
|
|
79
81
|
|-------|------|
|
|
80
|
-
|
|
|
81
|
-
| `mstar-phase-gates` | Prepare/Execute、意图门禁、hotfix、可验证编辑 |
|
|
82
|
+
| `mstar-harness-core` | 本文件:入口、状态机、Task category、explore、索引、护栏 |
|
|
83
|
+
| `mstar-phase-gates` | per-plan 双阶段门禁:Prepare/Execute、意图门禁、hotfix、可验证编辑 |
|
|
84
|
+
| `mstar-iteration` | 迭代管理:iteration-start(锁定范围/Roadmap)、Phase 2 Autonomous Execute(per-plan 派发循环:分支→实现→QC→QA→Done→合并)、iteration-close(收口 compound、更新 roadmap) |
|
|
82
85
|
| `mstar-dispatch-gates` | 派发、Delegation、反递归、并行 invoke、QC 同消息三审 |
|
|
83
86
|
| `mstar-branch-worktree` | 功能分支、worktree、QC/QA 检出对齐 |
|
|
84
|
-
| `mstar-plan-conventions` | `{HARNESS_DIR}` 发现、初始化、Spec
|
|
87
|
+
| `mstar-plan-conventions` | `{HARNESS_DIR}` 发现、初始化、Spec 分支模型摘要、产物路径 SSOT |
|
|
85
88
|
| `mstar-plan-artifacts` | 主 plan、reports、`status.json`、residual、knowledge、Done 归档 |
|
|
86
89
|
| `mstar-design-md` | DESIGN.md 设计系统规范 —— 创建/审计/维护 design tokens,三级检查清单,light/dark 双主题 |
|
|
87
|
-
| `mstar-review-qc` | QC 工作流、模板、verdict、residual
|
|
90
|
+
| `mstar-review-qc` | QC 工作流、模板、verdict、residual 留档、deep review 透镜 |
|
|
88
91
|
| `mstar-coding-behavior` | Think / Simplicity / Surgical / Debugging / Goal-Driven / Communication |
|
|
92
|
+
| `mstar-compound` | 知识结晶 —— 已解决问题→结构化知识文档,双轨(Bug/Knowledge),「是否值得结晶」自检清单,重叠检测,可发现性检查,CONCEPTS.md 协同 |
|
|
93
|
+
| `mstar-compound-refresh` | 知识维护 —— 审查/更新/合并/删除 `{KNOWLEDGE_DIR}` 文档 |
|
|
94
|
+
| `mstar-strategy` | `STRATEGY.md` 全局战略方向 —— 产品愿景、技术方向、决策原则 |
|
|
89
95
|
| `mstar-superpowers-align` | Superpowers × harness 优先级与短语 |
|
|
90
96
|
| `mstar-roles` | 角色正文 hub |
|
|
91
97
|
| `mstar-host` | 宿主适配(自动识别;`references/opencode.md` / `cursor.md` / `codex.md` / `parallel-dispatch.md`) |
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mstar-iteration
|
|
3
|
+
description: Morning Star 迭代管理 —— iteration-start(锁定迭代范围与 roadmap)、Autonomous Execute(per-plan 派发循环:分支→实现→QC→QA→Done→合并,含跨 plan 进度追踪与 push 纪律)、iteration-close(收口知识结晶 `mstar-compound`、更新 roadmap、标记迭代完成)。触发:PM 启动新迭代、跨 plan 编排时、或迭代内所有 plan Done 后。迭代 compass 落盘 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md`;per-plan 状态 SSOT 仍为 `{HARNESS_DIR}/status.json`。适用于一次迭代锁定几个 spec 点(specify+clarify)、多个 plan、每个 plan 多个 tasks 的实践模式。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mstar-iteration(迭代管理)
|
|
7
|
+
|
|
8
|
+
## Load order
|
|
9
|
+
|
|
10
|
+
**Read `mstar-harness-core` first.** Path symbols → **`mstar-plan-conventions`**. Per-plan gates → **`mstar-phase-gates`**. Knowledge crystallization → **`mstar-compound`**. On conflict, **`mstar-harness-core` wins**.
|
|
11
|
+
|
|
12
|
+
## 设计思路
|
|
13
|
+
|
|
14
|
+
mstar 实践模式通常是:一次迭代锁定几个 spec 点(`specify + clarify`),产生多个 `plan`,每个 plan 含多个 tasks。**per-plan 生命周期有完整的闭环**(Prepare → Execute → QC → Done)。Compound 不是 per-plan 活动——它是**迭代级收口**,在迭代内所有 plan Done 后,沉淀一轮知识。
|
|
15
|
+
|
|
16
|
+
本 skill 管理三个迭代节点:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
iteration-start → [per-plan lifecycle × N] → iteration-close → PR → merge
|
|
20
|
+
│ │
|
|
21
|
+
│ 锁定范围、创建 compass │ compound、更新 roadmap
|
|
22
|
+
│ 登记 plans 到 compass │ 标记迭代完成
|
|
23
|
+
│ 创建 integration 分支 │ commit 到 integration 分支
|
|
24
|
+
│ │
|
|
25
|
+
└──────── iteration-drive(跨 plan 追踪)────────┘
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**关键定位**:iteration-close 是 iteration-drive 命令的**最后一个 Phase**,在 integration 分支上执行,**完成后再创建 PR**。所有 compound 产物(knowledge docs、compass 更新、CONCEPTS.md)作为迭代交付的一部分随 PR 合入 main。一次迭代 = 一个 PR。
|
|
29
|
+
|
|
30
|
+
**per-plan 状态 SSOT**:`{HARNESS_DIR}/status.json`(per-plan Todo/InProgress/InReview/Done)。
|
|
31
|
+
**迭代状态 SSOT**:`{ITERATION_DIR}/<id>-delivery-compass.md` frontmatter `status` + `{ITERATION_DIR}/README.md` 索引。
|
|
32
|
+
|
|
33
|
+
## 产物存储位置
|
|
34
|
+
|
|
35
|
+
**SSOT**: `mstar-plan-conventions/references/artifact-storage-paths.md`。迭代 compass → `{ITERATION_DIR}/<iteration-id>-delivery-compass.md`;迭代索引 → `{ITERATION_DIR}/README.md`。
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Phase 1: iteration-start(启动迭代)
|
|
40
|
+
|
|
41
|
+
PM 在新迭代启动时执行。
|
|
42
|
+
|
|
43
|
+
### 1.1 收集上下文
|
|
44
|
+
|
|
45
|
+
1. 读 `{ITERATION_DIR}/README.md`(若存在),了解历史迭代
|
|
46
|
+
2. 读 `STRATEGY.md`(若存在),对齐战略方向(见 `mstar-strategy`)
|
|
47
|
+
3. 如果有未完成的 roadmap 残余(上一迭代标记为 `next` 的 plan),纳入本次迭代范围候选
|
|
48
|
+
|
|
49
|
+
### 1.2 定义迭代范围
|
|
50
|
+
|
|
51
|
+
与用户/产品对齐后,确定:
|
|
52
|
+
|
|
53
|
+
| 字段 | 说明 |
|
|
54
|
+
|------|------|
|
|
55
|
+
| **Iteration ID** | 唯一标识,推荐 `v<major>.<minor>` 或 `iter-<YYYY-QN>` |
|
|
56
|
+
| **范围** | 本迭代要锁定的 spec 点(问题陈述清单) |
|
|
57
|
+
| **Plans** | 预期在本迭代中完成的 plan 列表(允许中途增减) |
|
|
58
|
+
| **里程碑** | 关键节点与日期 |
|
|
59
|
+
| **验收标准** | 迭代级别的 Done 定义 |
|
|
60
|
+
| **非目标** | 明确排除在本次迭代外的事项 |
|
|
61
|
+
| **Roadmap 上下文** | 本迭代在整体 roadmap 中的位置(本批做什么 / 下批做什么) |
|
|
62
|
+
|
|
63
|
+
### 1.3 创建迭代 compass
|
|
64
|
+
|
|
65
|
+
写入 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md`:
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
---
|
|
69
|
+
iteration_id: <id>
|
|
70
|
+
start_date: YYYY-MM-DD
|
|
71
|
+
status: active
|
|
72
|
+
plans: []
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
# <iteration-id> Delivery Compass
|
|
76
|
+
|
|
77
|
+
## Scope
|
|
78
|
+
<本迭代要锁定的 spec 点>
|
|
79
|
+
|
|
80
|
+
## Plans
|
|
81
|
+
|
|
82
|
+
| plan_id | Name | Status | Notes |
|
|
83
|
+
|---------|------|--------|-------|
|
|
84
|
+
| <id> | <name> | Todo | |
|
|
85
|
+
| ... | ... | ... | |
|
|
86
|
+
|
|
87
|
+
## Milestones
|
|
88
|
+
| Milestone | Target date | Status |
|
|
89
|
+
|-----------|-------------|--------|
|
|
90
|
+
|
|
91
|
+
## Acceptance Criteria
|
|
92
|
+
- <迭代级验收项>
|
|
93
|
+
|
|
94
|
+
## Non-Goals
|
|
95
|
+
- <明确排除的事项>
|
|
96
|
+
|
|
97
|
+
## Roadmap Position
|
|
98
|
+
- 本批:<what this iteration delivers>
|
|
99
|
+
- 下批:<what comes next, owner, trigger>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 1.4 更新索引
|
|
103
|
+
|
|
104
|
+
在 `{ITERATION_DIR}/README.md` 中添加一行(首次创建时建立表头):
|
|
105
|
+
|
|
106
|
+
| Document | Iteration | Description | Status |
|
|
107
|
+
|----------|-----------|-------------|--------|
|
|
108
|
+
| `<iteration-id>-delivery-compass.md` | `<iteration-id>` | `<简短描述>` | `active` |
|
|
109
|
+
|
|
110
|
+
### 1.5 登记到 status.json(可选)
|
|
111
|
+
|
|
112
|
+
若使用 `status.json`,在 `plans[].metadata` 中为受影响的 plan 设置 `iteration_refs`。
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Phase 2: Autonomous Execute(per-plan 派发驱动)
|
|
117
|
+
|
|
118
|
+
**本 Phase 是本 skill 的核心**——定义 per-plan 派发循环的完整流程:前置条件检查、session todos、backlog 读取、integration 分支管理、per-plan dispatch 循环(分支→实现→QC→QA→Done→合并)、dispatch-first 约束、push 纪律。PM 读取本 Phase 即可执行迭代。
|
|
119
|
+
|
|
120
|
+
### 2.0 前置条件(三道闸)
|
|
121
|
+
|
|
122
|
+
进入 Autonomous Execute 前必须满足:
|
|
123
|
+
|
|
124
|
+
1. `{HARNESS_DIR}/status.json` 中至少一条 plan `status` ≠ `Done`
|
|
125
|
+
2. **Pre-implement gate = GO**:plan 已 locked、tasks ready(见 `mstar-phase-gates`)
|
|
126
|
+
3. 用户意图为 **continue Execute**(`/pm`、"推进 iteration"、"继续 plans" 等)
|
|
127
|
+
|
|
128
|
+
任一 false → **stop**。Prepare 未完成 → 引导先跑 `/iteration-start`。
|
|
129
|
+
|
|
130
|
+
### 2.1 Session todos(派发前设护栏)
|
|
131
|
+
|
|
132
|
+
每个 plan wave 启动前设定 host todos,防止范围漂移:
|
|
133
|
+
|
|
134
|
+
| Host | 工具 | 最小集合 |
|
|
135
|
+
|------|------|---------|
|
|
136
|
+
| **Cursor** | `TodoWrite` / CreatePlan todos | 当前 `plan_id`;下一批 gates(implement/QC/QA);分支 checkpoint |
|
|
137
|
+
| **Codex** | `update_plan` / Goal UI | 同上 |
|
|
138
|
+
| **OpenCode** | host todo/plan UI(如有) | 同上 |
|
|
139
|
+
|
|
140
|
+
SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一步。
|
|
141
|
+
|
|
142
|
+
### 2.2 Read backlog
|
|
143
|
+
|
|
144
|
+
1. 读 `mstar-plan-artifacts` + `{HARNESS_DIR}/status.json`
|
|
145
|
+
2. 列出 `status` ∈ `{Todo, InProgress, InReview, Blocked}` 的 plan(优先级:`InProgress` → `InReview` → `Todo` → unblock `Blocked`)
|
|
146
|
+
3. 读 `metadata.spec_integration_branch` / `merge_target` / `primary_spec` 链接
|
|
147
|
+
|
|
148
|
+
### 2.3 Integration branch
|
|
149
|
+
|
|
150
|
+
1. 从 `status.json` 解析 `spec_integration_branch`
|
|
151
|
+
2. **checkout 或创建**该分支;`git branch --show-current` 确认
|
|
152
|
+
3. 若 metadata 缺失 → **stop**,读 `mstar-plan-conventions` + 用户确认(`mstar-branch-worktree`);同轮写入 plan + status
|
|
153
|
+
|
|
154
|
+
此分支是本迭代内所有 plan feature branch 的 merge target。
|
|
155
|
+
|
|
156
|
+
### 2.4 Per-plan loop(直到全部 Done)
|
|
157
|
+
|
|
158
|
+
对每个 active `plan_id`:
|
|
159
|
+
|
|
160
|
+
1. **Plan start — feature branch**:Assignment 用 `Working branch: create <plan-feature-branch> from <spec_integration_branch>`。一个 plan 一条专用实现分支;内部并行 → topic branches + worktrees(`mstar-branch-worktree`)
|
|
161
|
+
2. **Implement → InReview**:dispatch-only 循环(`§ 2.5`);每次 Completion Report v2 后更新 `status.json` + 主 plan
|
|
162
|
+
3. **QC → QA → Done**:三审 + QA(`mstar-review-qc`);gate 全部通过后 PM 标记 `Done`
|
|
163
|
+
4. **Plan complete — merge back**:合并 plan feature branch → `spec_integration_branch`;在下一 plan 或 QC 前解决冲突
|
|
164
|
+
5. **Cross-plan 进度同步**:更新 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` 的 `## Plans` 表状态列
|
|
165
|
+
6. **Next plan** 从步骤 1 继续
|
|
166
|
+
|
|
167
|
+
全部 plan `Done` → 停止循环,进入 **Phase 3: iteration-close**。
|
|
168
|
+
|
|
169
|
+
### 2.5 Dispatch-first(implement 派发约束)
|
|
170
|
+
|
|
171
|
+
| Do | Don't |
|
|
172
|
+
|----|------|
|
|
173
|
+
| **Loop:** `## Assignment` → invoke → Completion Report v2 → 更新 status → next | PM 亲自 Write/Edit/Shell 产品代码 |
|
|
174
|
+
| 1 Assignment ⇒ 1 invoke | Assignment 只写 markdown 不 invoke |
|
|
175
|
+
| merge/branch/handoff 写入 Assignment | 因"上下文已有"而跳过 subagent |
|
|
176
|
+
|
|
177
|
+
- **NEVER** implement while staying PM — 实现一律 delegate dev 角色
|
|
178
|
+
- Delegate scope:`mstar-roles` → PM Execution Boundary
|
|
179
|
+
- 例外:用户显式要求 PM thread 实现;hotfix(`mstar-phase-gates`)
|
|
180
|
+
|
|
181
|
+
### 2.6 Push 纪律
|
|
182
|
+
|
|
183
|
+
- 不因 harness 基础问题常问"是否继续"—— 决策、记录、**dispatch**
|
|
184
|
+
- 未知 → 读 `mstar-*`;**`Blocked`** 或仅对 stop/secrets/不可逆范围缺口/冲突后升级
|
|
185
|
+
- 实际 Git ≠ `working_branch` → **同轮**更新 plan + status
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Phase 3: iteration-close(收口迭代)
|
|
190
|
+
|
|
191
|
+
PM 在迭代内全部 plan Done 后执行。**本 Phase 在 integration 分支上运行**,产出物 commit 到 integration 分支,随迭代 PR 合入 main。触发方:`commands/iteration-drive.md`(在 Autonomous Execute loop 全部 Done 后自动进入)。
|
|
192
|
+
|
|
193
|
+
### 3.1 前置检查
|
|
194
|
+
|
|
195
|
+
确认以下条件全部满足后,方可进入 iteration-close:
|
|
196
|
+
|
|
197
|
+
- [ ] 所有 compass 中登记的 plan 状态均为 `Done`
|
|
198
|
+
- [ ] 所有 plan 的 residual findings 已收口(closed 或 accepted)
|
|
199
|
+
- [ ] `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` 各 plan 状态已同步到最新
|
|
200
|
+
- [ ] 迭代验收标准已达成或显式豁免
|
|
201
|
+
|
|
202
|
+
### 3.2 知识结晶(Compound)—— 迭代级核心收口
|
|
203
|
+
|
|
204
|
+
**Compound 在此执行,不在 per-plan Done 后独立执行。**
|
|
205
|
+
|
|
206
|
+
PM 触发 `mstar-compound`(可批量):
|
|
207
|
+
|
|
208
|
+
1. **收集素材**:回顾本迭代所有 plan 的实现、debug、review 过程,识别以下类型的可结晶知识:
|
|
209
|
+
- 非平凡 bug 修复及其诊断过程
|
|
210
|
+
- 新引入的架构模式或约定
|
|
211
|
+
- 工具链决策及其理由
|
|
212
|
+
- 跨 plan 重复出现的模式
|
|
213
|
+
- 有价值的排错经验
|
|
214
|
+
|
|
215
|
+
2. **逐条结晶**:对每条识别出的知识,调用 `mstar-compound` 写入 `{KNOWLEDGE_DIR}/<category>/<slug>.md`
|
|
216
|
+
|
|
217
|
+
3. **是否值得结晶**:PM 使用 `mstar-compound` 中的「是否值得结晶」自检清单逐条评估(见 `mstar-compound` § 是否值得结晶)。
|
|
218
|
+
|
|
219
|
+
4. **CONCEPTS.md 协同**:若迭代中引入了新的领域词汇,更新 `<repo-root>/CONCEPTS.md`
|
|
220
|
+
|
|
221
|
+
### 3.3 更新 roadmap
|
|
222
|
+
|
|
223
|
+
1. 更新 compass 中的 `## Roadmap Position`:
|
|
224
|
+
- 本批状态标记为 `delivered`
|
|
225
|
+
- 下批更新为即将开始的内容
|
|
226
|
+
2. 若 `status.json` 中有 `plans[].metadata.roadmap` 字段,同步更新
|
|
227
|
+
3. 若 `STRATEGY.md` 存在,可建议更新 `## Decision Log`(若有重大架构决策)
|
|
228
|
+
|
|
229
|
+
### 3.4 标记迭代完成 + Commit
|
|
230
|
+
|
|
231
|
+
1. 将 compass frontmatter `status` 更新为 `completed`,添加 `end_date`
|
|
232
|
+
2. 更新 `{ITERATION_DIR}/README.md` 索引中该迭代行的 Status 为 `completed`
|
|
233
|
+
3. compass 正文末尾追加 Compound Round Summary 和 Retrospective(见 compass 模板)
|
|
234
|
+
|
|
235
|
+
**Commit 到 integration 分支**:iteration-close 产出的所有 harness 制品必须 commit 到当前 integration 分支,随迭代 PR 合入 main:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
git add {ITERATION_DIR}/<id>-delivery-compass.md {ITERATION_DIR}/README.md {KNOWLEDGE_DIR}/ CONCEPTS.md
|
|
239
|
+
git commit -m "chore(iteration): close <iteration-id> — compound round, roadmap update"
|
|
240
|
+
git push origin <spec_integration_branch>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### 3.5 可选:触发 compound-refresh
|
|
244
|
+
|
|
245
|
+
若本轮 compound 新增了较多知识文档,或 compass 标记了可能过时的旧知识,触发 `mstar-compound-refresh` 对有重叠的知识文档做维护。
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## 迭代 compass 模板
|
|
250
|
+
|
|
251
|
+
完整模板见 `references/iteration-compass-template.md`。
|
|
252
|
+
|
|
253
|
+
## 与其它技能的关系
|
|
254
|
+
|
|
255
|
+
| 技能 | 关系 |
|
|
256
|
+
|------|------|
|
|
257
|
+
| `mstar-dispatch-gates` | Dispatch rules — per-plan loop 引用 |
|
|
258
|
+
| `mstar-phase-gates` | per-plan gate 判定 |
|
|
259
|
+
| `mstar-plan-conventions` | 路径符号(`{ITERATION_DIR}`、`{HARNESS_DIR}`) |
|
|
260
|
+
| `mstar-plan-artifacts` | `status.json` SSOT、`{ITERATION_DIR}` 索引维护 |
|
|
261
|
+
| `mstar-review-qc` | QC 三审 — per-plan loop 引用 |
|
|
262
|
+
| `mstar-branch-worktree` | 分支/merge/worktree 隔离 |
|
|
263
|
+
| `mstar-compound` | iteration-close 中触发知识结晶 |
|
|
264
|
+
| `mstar-compound-refresh` | iteration-close 后可触发知识维护 |
|
|
265
|
+
| `mstar-strategy` | iteration-start 时读 `STRATEGY.md` 对齐方向 |
|
|
266
|
+
|
|
267
|
+
## NOT to do
|
|
268
|
+
|
|
269
|
+
- 不要在 per-plan Done 后立即单独 compound——等 iteration-close 统一做
|
|
270
|
+
- 不要在 iteration-drive 中修改 per-plan gate 判定
|
|
271
|
+
- 不要用 compass 替代 `status.json` 作为 plan 状态 SSOT
|
|
272
|
+
- 不要在没有完成 per-plan 前置检查的情况下进入 iteration-close
|
|
273
|
+
- 不要跳过 compound——如果本迭代确实没有可结晶的知识,在 compass 中写 `Compound Round Summary: 无可结晶知识(原因:<简述>)`
|