Skip to content
Agentmart
Submit a tool

mstar-conventions

harness 路径约定:`{HARNESS_DIR}`/`{PLAN_DIR}`/`{SDD_DIR}`/`{ITERATION_DIR}`/`{KNOWLEDGE_DIR}`/`{SPECS_DIR}`/`{REVIEW_DIR}` 等符号的发现与初始化、docs 与 harness 子树边界、Spec…

Skill by btspoony

IndexedMIT★ 64
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/btspoony-mstar-conventions

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

harness 路径约定:`{HARNESS_DIR}`/`{PLAN_DIR}`/`{SDD_DIR}`/`{ITERATION_DIR}`/`{KNOWLEDGE_DIR}`/`{SPECS_DIR}`/`{REVIEW_DIR}` 等符号的发现与初始化、docs 与 harness 子树边界、Spec 分支模型。读写 `.mstar/` 或开 plan 前必读。

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/mstar-conventions

What's inside

Skill name
mstar-conventions
Description
harness 路径约定:`{HARNESS_DIR}`/`{PLAN_DIR}`/`{SDD_DIR}`/`{ITERATION_DIR}`/`{KNOWLEDGE_DIR}`/`{SPECS_DIR}`/`{REVIEW_DIR}` 等符号的发现与初始化、docs 与 harness 子树边界、Spec 分支模型。读写 `.mstar/` 或开 plan 前必读。
License
MIT
Instructions
260 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • files: referenced but missing: references/migration-source-shapes.md

Files (4)

  • SKILL.md
  • artifact-storage-paths.md · references/
  • effort-estimation.md · references/
  • harness-bootstrap-and-agents-layering.md · references/

SKILL.md (first lines)

## Load order(必读顺序)

**首次 Read 本 skill 前:必须先 Read `mstar-harness-core`(SKILL.md)。** 本 skill 只约定 **目录与路径**;不突破状态机与门禁。冲突时 **以 `mstar-harness-core` 为准**。

| 你还可能要 Read | 何时 |
|-----------------|------|
| `mstar-artifacts` | Main plans, review summaries, current execution/issue fields, InReview/QC waves and knowledge |
| `mstar-project-governance` | 项目 roadmap 内容权威与读写/导入/导出规则;legacy `roadmap.md` 仅 transport/history;residual register 迁移边界与 `_default` |
| `mstar-branch-worktree` | Assignment 写分支 / worktree / QC 检出 |
| `mstar-review-qc` | 派 QC(PM 同轮必读;SDD 强制 tri) |
| `mstar-sdd` | PM 执行 `Execution mode: sdd` 的 implement 波次 |

## Workflow

主链:按「路径符号」+「`{HARNESS_DIR}` 解析顺序」确定目录(默认 `.mstar/`,兼容 `.agents/`)→ 按「初始化 Plan 目录」以 **`mstar harness scaffold` + `mstar store init`** 建立 authored 目录与 ACTIVE store(唯一 bootstrap 路径),并追加 gitignore 进程产物集(未声明 harness 根规则时;进程本地、结果共享)→ 多 Plan · 同一 Spec 时登记 iteration base / spec 集成分支 / 各 Plan 实现分支 / PR target → 主 plan 写入 `{PLAN_DIR}`(**Plan-Writing Path Gate**)。未启用 plan 或无 ACTIVE store 时 → 对话追踪(no-plan mode),门禁(QC/QA)照常。

## 路径符号(SSOT)

| 符号 | 默认 |
|------|------|
| `{HARNESS_DIR}` | `.mstar/` |
| `{PLAN_DIR}` | `{HARNESS_DIR}/plans/` |
| `{SDD_DIR}` | `{HARNESS_DIR}/sdd/<plan-id>/`(SDD 运行时 scratch + review bundle;gitignored) |
| `{ITERATION_DIR}` | `{HARNESS_DIR}/iterations/` |
| `{KNOWLEDGE_DIR}` | `{HARNESS_DIR}/knowledge/`(默认;`.mstarc` `knowledge_dir` 声明时用声明值) |
| `{SPECS_DIR}` | `{HARNESS_DIR}/specs/`(默认);解析见下文「`{SPECS_DIR}` 解析」 |
| `{WORKFLOW_DIR}` | `{HARNESS_DIR}/workflows/` (default; `.mstarc` `workflow_dir` overrides it) — retained ordinary bodies, append-only `notes.jsonl` and workflow-owned `reports/` (e.g. `<workflow-id>/reports/e2e.md`); historical snapshot shape → **`mstar-engine-legacy`** `references/migration-source-shapes.md` |
| `{PROJECT_DIR}` | `{HARNESS_DIR}/projects/`(默认;`.mstarc` `project_dir` 声明时用声明值)——project 层目录;旧 `roadmap.md` 仅作文件 transport/history |
| `{REVIEW_DIR}` | `{HARNESS_DIR}/reviews/`(默认;`.mstarc` `review_dir` 声明时用声明值)——review 运行目录树(codebase audit / PR / branch / diff review 的 report 与 evidence;`mstar audit scaffold` 写入,`mstar pr-review report-path` 解析;gitignored) |
| `{HARNESS_DIR}/store.db` | 进程/control harness 根下的 issue/catalog/roadmap/milestone 与 **execution_* 执行权威** SQLite(`resolveProcessHarnessDir` 后 `<resolved root>/store.db`;尊重 `.mstarc`)。功能/集成 worktree **不**在 cwd 建库;roadmap 规则 → `mstar-project-governance`。 |

> **Engine check (when available):** import `resolveHarnessDir` / `resolvePlanDir` / `resolveSddDir` / `resolveIterationDir` / `resolveKnowledgeDir` / `resolveSpecsDir` / `resolveWorkflowDir` / `resolveProjectDir` / `resolveReviewDir` from `@mstar-harness/engine` in a host hook — or run `mstar path resolve [path]` (`--json` for machine output) to print the resolved dirs — to confirm the resolution below. On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.

### `{HARNESS_DIR}` 解析顺序(找到即停;探测**永不越过工作区根**——CLI=start 的 git top-level(非 git→start 自身);dsh=会话工作区)

1. 显式 override:`opts.harnessDir` / `MSTAR_HARNESS_DIR`(全权优先,短路一切探测与配置文件)
2. 否则 **`.mstarc`** `[config] harness_dir=<dir>`(仓库本地声明,见下「`.mstarc` 格式」;find-first-stop 向上找最近文件,**不越过工作区根**)
3. 否则 `.mstar/` → `{HARNESS_DIR}=.mstar/`, `{PLAN_DIR}=.mstar/plans/`
4. 否则 `.agents/` → legacy `{HARNESS_DIR}=.agents/`, `{PLAN_DIR}=.agents/plans/`
5. 否则 `.plans/` 或 `plans/` → 遗留同目录 `{HARNESS_DIR}={PLAN_DIR}`
6. 皆无 → 未启用 plan;进度走对话与 Completion Report

并存时 **`.mstar/` 优先**;仅当项目已有 `.agents/` 且无 `.mstar/` 时继续沿用 `.agents/`。

#### `.mstarc` 格式(INI 子集;默认 gitignored,见下「Git 跟踪策略」)

```ini
[config]
harness_dir=.custom_dir
plan_dir=planning
sdd_dir=process/sdd
iteration_dir=process/iterations
knowledge_dir=knowledge
specs_dir=specs/custom
workflow_dir=process/workflows
project_dir=process/projects
review_dir=process/reviews
enforcement=hard
```

- `#` / `;` 注释;`[section]` 头;`key=value`(去空白)。仅读 `[config]` 段,未知键忽略(向前兼容)。
- 目录键:`harness_dir`(`{HARNESS_DIR}`)、`plan_dir`(`{PLAN_DIR}`)、`sdd_dir`(`{SDD_DIR}` 的 per-plan 基目录,`<plan-id>` 仍会追加)、`iteration_dir`(`{ITERATION_DIR}`)、`knowledge_dir`(`{KNOWLEDGE_DIR}`)、`specs_dir`(`{SPECS_DIR}`,**权威**——声明后不再走候选链)、`workflow_dir`(`{WORKFLOW_DIR}`)、`project_dir`(`{PROJECT_DIR}`)、`review_dir`(`{REVIEW_DIR}`)。全部相对 `.mstarc` 所在目录解析(绝对路径亦可);无需目录已存在(可后续 scaffold;v3 的 `workflows/` / `projects/` / `reviews/` 子目录由 engine writers 按需创建)。
- **`enforcement=hard|soft`**:仓库级硬门禁策略(`hard` 硬门禁、`soft` 本地回滚;其他值忽略)。优先级:显式 Config > Assignment `Enforcement: hard` 头标记(仅派发闸门)> `.mstarc` > 迭代 compass frontmatter > 默认 warn-only。`.mstarc` `soft` 可回滚 hard compass;`.mstarc` `hard` 硬化无标记的派发与各闸门。
- 子目录键与 `enforcement` 由 engine `resolvePlanDir` / `resolveSddDir` / `resolveIterationDir` / `resolveKnowledgeDir` / `resolveSpecsDir` / `resolveWorkflowDir` / `resolveProjectDir` / `resolveReviewDir` / `resolveRepoEnforcement` 读取:从 harness 目录与其父目录(仓库根,`.mstarc` 的文档化位置)向上找最近配置文件。
- 优先级:显式 override > `.mstarc` > 探测。非默认布局的仓库写一个 `.mstarc` 即可程序化解目录问题,无需逐宿主设置 env / config。

**无 engine 时的手工解析(runtime 缺席,技能文本为权威):**

1. 从当前目录向上找**最近**的 `.mstarc`(find-first-stop),**不越过工作区根**(CLI=git top-level,非 git=start 自身;dsh=会话工作区)。
2. 读 `[config]` 段:`key=value`(去空白),`#`/`;` 注释与空行忽略;同一键最后一次出现生效。
3. `harness_dir` 存在 → 相对该 `.mstarc` 所在目录解析(绝对路径直接用),即 `{HARNESS_DIR}`;无需目录已存在。
4. 其余键(`plan_dir` / `sdd_dir` / `iteration_dir` / `knowledge_dir` / `specs_dir` / `workflow_dir` / `project_dir` / `review_dir`)从 **`{HARNESS_DIR}` 或其父目录**(仓库根)向上找最近 `.mstarc` 读取;值同样相对配置文件目录解析;`specs_dir` 声明后直接采用(跳过「`{SPECS_DIR}` 解析」候选链与空目录规则),`sdd_dir` 只替换基目录(`<plan-id>` 仍追加),`workflow_dir` / `project_dir` / `review_dir` 直接替换默认子目录名。
5. 未声明的键回落默认组合:`{HARNESS_DIR}/plans/`、`{HARNESS_DIR}/sdd/<plan-id>/`、`{HARNESS_DIR}/iterations/`、`{HARNESS_DIR}/knowledge/`、`{HARNESS_DIR}/workflows/`、`{HARNESS_DIR}/projects/`、`{HARNESS_DIR}/reviews/`、`{SPECS_DIR}` 候选链。

### `{SPECS_DIR}` 解析(找到非空目录即停)

1. `{HARNESS_DIR}/specs/`(默认 `.mstar/specs/`)
2. `docs/specs/`
3. `specs/`(仓库根)

**空目录规则**:候选路径存在但无任何文件 → 视为不存在,继续下一候选。

**创建默认**:全部缺失或皆空 → 创建并使用 `{HARNESS_DIR}/specs/`(统一落在 `.mstar/` 下)。**禁止**在 greenfield init 时优先创建裸仓库根 `specs/`。

**Legacy 兼容读**:若以上皆无内容,但 `{HARNESS_DIR}/designs/` 或仓库根 `designs/` **非空**,可作 `{SPECS_DIR}` 使用;init 时**不**新建 `designs/`。


> **Engine check (when available):** import `resolveSpecsDir` from `@mstar-harness/engine` in a host hook — or run `mstar path resolve` (prints the resolved specs dir) — to confirm the candidate order (empty-dir-as-absent included). On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.

部分 spoke 仓库 opt-in 跟踪的 `{HARNESS_DIR}/roadmap.md` 仅是既有 Markdown 文件/可审导入候选,非项目内容权威;读写规则 → `mstar-project-governance`。

## 内容边界(摘要)

| 区域 | 内容 |
|------|------|
| `docs/` | 人类文档:安装、贡献 |
| `{SPECS_DIR}` | 冻结规格 / ADR |
| `{ITERATION_DIR}` | Iteration package: retained `prototypes/` design context first, then formal compass + guides/specs; prototype path/disposition → `mstar-iteration` Phase 1 §1.2.5 |
| `{KNOWLEDGE_DIR}` | 实现 SSOT、可复用设计 |
| `{PLAN_DIR}/` | 主 plan、durable gate summaries、可选 residual prose |
| `{REVIEW_DIR}/` | review 运行目录:codebase audit 的 `README.md` 报告 + 证据、PR/branch/diff review 的 `report.md` + `stage<N>-<slug>.md` 证据(进程产物,gitignored;不是 plan 产物,不经 plan 状态机) |

单 plan 的 QC/QA **原始过程报告**默认进入 **`{SDD_DIR}/review/`**(gitignored review bundle),非 `docs/`,也不默认进入 `{PLAN_DIR}`。主 plan 仅保留 durable gate summary;open finding 以 `{HARNESS_DIR}/store.db` 的 linked issues 为 SSOT(`mstar plan issue-add` / `mstar issue add`);project residual register 无条件退役为迁移历史。细则 → **`mstar-artifacts`**。

## Issue/catalog store 路径与权威分界

Issue/catalog/roadmap and ACTIVE execution authority live in control-root `{HARNESS_DIR}/store.db`; roadmap/milestone rules → `mstar-project-governance`. ACTIVE root register, workflow/plan rows, coordinator sessions, registered inputs and workflow merge exclusion live in `execution_*` tables. Coordinator source metadata/configuration/progress/completion and merge exclusion are domain-written; no per-row session or sealed Assignment. Historical execution files are read-only direct `mstar store upgrade` inputs, preserving original bytes; no staging writer or runtime file-state fallback remains. Shapes → **`mstar-engine-legacy`** `references/migration-source-shapes.md`. Retained ordinary artifacts stay with `ArtifactStore`; notes and docs never become transactional authority.

### Catalog 字段权威(contract §1)

| 数据 | 权威 | 读法 |
|------|------|------|
| project / iteration / plan / document 的 identity、路径、kind、description、project/iteration 归属、spec/knowledge 关系、catalog 生命周期(`active` / `archived` / `superseded`) | **DB catalog** 行 | catalog 域 API;`mstar catalog list` / `mstar catalog show` |
| 文档正文(compass 叙述、plan、spec/knowledge 内容、README 散文) | **文件** | 直接读文件 |
| Root register and workflow status/phase/anchors/configuration/completion/coordinator/merge exclusion | ACTIVE DB `execution_*` authority(唯一) | `mstar status validate` / `mstar plan show`; dashboard is projection |
| Row status/progress/task/QC/QA/done_at/source branch/worktree | Same selected execution authority (`execution_plans` when ACTIVE) | Domain calls; catalog and projections never reset runtime state |
| Registered plan id/title/file and metadata | Registered row inputs from a catalog revision (`execution_inputs` / `catalog_pin`) | Correct supported source/configuration facts through ordinary writers; catalog edits never silently relocate an active plan or rewrite its registered inputs |

Store is process-local and gitignored. Issue/catalog and execution domains retain their own authority boundaries. Missing stores refuse `store.not-initialized` rather than answering an empty catalog. Staged stores support ordinary read-only catalog list/show; catalog mutations require an active store and refuse `store.not-active` while staged. Staged catalog inspection does not activate execution authority, and ACTIVE execution reads never fall back to leftover root/snapshot/session files. Bootstrap/migration changes authority only through supported operator operations.

From btspoony/mstar-harness, MIT.

More from btspoony/mstar-harness

Signals

Stars
64
Forks
4
Open issues
6
Last commit (this folder)
Oct 21, 2026 (7 days ago)
Last release
Oct 24, 2026 (4 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from btspoony

Cite this page

mstar-conventions skill. Agent Mart. https://agentmart.dev/skills/btspoony-mstar-conventions (last updated 2026-10-24)