@ihupoo/solmet 0.0.0-stage → 0.2.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.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +154 -2
  3. package/README.zh.md +155 -0
  4. package/bin/solmet.js +11 -0
  5. package/package.json +39 -4
  6. package/skills/archive/SKILL.md +15 -0
  7. package/skills/check/SKILL.md +20 -0
  8. package/skills/grill/SKILL.md +23 -0
  9. package/skills/grilling/SKILL.md +22 -0
  10. package/skills/implement/SKILL.md +18 -0
  11. package/skills/map/SKILL.md +42 -0
  12. package/skills/memory-recording/SKILL.md +40 -0
  13. package/skills/spec/SKILL.md +24 -0
  14. package/skills/spec-writing/SKILL.md +17 -0
  15. package/skills/start/SKILL.md +25 -0
  16. package/skills/tdd/SKILL.md +14 -0
  17. package/src/cli.js +83 -0
  18. package/src/commands/archive.js +35 -0
  19. package/src/commands/brief.js +14 -0
  20. package/src/commands/check.js +71 -0
  21. package/src/commands/common.js +65 -0
  22. package/src/commands/doctor.js +208 -0
  23. package/src/commands/gate.js +148 -0
  24. package/src/commands/init.js +87 -0
  25. package/src/commands/map.js +64 -0
  26. package/src/commands/recall.js +41 -0
  27. package/src/commands/remember.js +98 -0
  28. package/src/commands/skill.js +26 -0
  29. package/src/commands/start.js +49 -0
  30. package/src/commands/status.js +76 -0
  31. package/src/lib/agents.js +79 -0
  32. package/src/lib/brief.js +78 -0
  33. package/src/lib/catalog.js +71 -0
  34. package/src/lib/check.js +360 -0
  35. package/src/lib/config.js +55 -0
  36. package/src/lib/detect.js +58 -0
  37. package/src/lib/fsx.js +117 -0
  38. package/src/lib/labels.js +92 -0
  39. package/src/lib/map.js +261 -0
  40. package/src/lib/memory.js +273 -0
  41. package/src/lib/paths.js +10 -0
  42. package/src/lib/router.js +49 -0
  43. package/src/lib/task.js +189 -0
  44. package/src/lib/title.js +43 -0
  45. package/src/lib/version.js +7 -0
  46. package/templates/NOTES.md +17 -0
  47. package/templates/PRD.md +25 -0
  48. package/templates/PROJECT-CONTEXT.md +25 -0
  49. package/templates/TASK.md +7 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 solmet contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,155 @@
1
- # Temporary Holding Version
1
+ # solmet
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **English** | [简体中文](README.zh.md)
4
+
5
+ A lightweight task workflow and project memory layer for AI coding agents working in local projects. One flow, zero runtime dependencies, all state inside the project.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm i -g @ihupoo/solmet
11
+ # or install locally
12
+ npm i -g .
13
+ # development
14
+ npm link
15
+ ```
16
+
17
+ Requires Node.js >= 18.17.
18
+
19
+ ## Quick start
20
+
21
+ ```bash
22
+ cd your-project
23
+ solmet init
24
+ solmet start "add keyword filter to the list page"
25
+ ```
26
+
27
+ `init` detects the package manager, build/typecheck/lint/test commands and git/svn working copies (read-only), then generates:
28
+
29
+ ```text
30
+ .solmet/
31
+ config.json
32
+ spec/ # durable rules, one topic per file
33
+ research/ # current investigations and tradeoffs; decisions/ is created on demand and not recalled by default
34
+ journal/ # session log, by date
35
+ tasks/active/
36
+ tasks/archive/
37
+ tasks/INDEX.md # CLI-generated view, not a source of truth
38
+ AGENTS.md # managed block: next-step pointer, check commands and memory catalog
39
+ .qoder/skills/solmet/SKILL.md # Qoder router skill (generated)
40
+ ```
41
+
42
+ Qoder projects get a router skill at `init`: it only runs `solmet brief` and follows `Next skill`. Other agents use the `AGENTS.md` managed block.
43
+
44
+ Pure consultation, code explanation and read-only troubleshooting do not create a task. For a trivial 1-10 line change in one file (single behavior, reversible, no interface/data/permission/dependency change), the agent proposes doing it directly and skips the task only after you agree; behavior or decision changes made this way are recorded with `solmet remember`. All other changes go through `solmet start`. Commit `.solmet/`, `AGENTS.md` and the generated router skill to the repository: resume and handoff depend on this state. `tasks/INDEX.md` is a generated view; do not edit it.
45
+
46
+ ## Workflow
47
+
48
+ There is only one flow:
49
+
50
+ ```text
51
+ start
52
+ → grill (batched questions along the design tree)
53
+ → spec (thin contract: problem/solution/manual acceptance/out-of-scope, depth follows the change)
54
+ → gate spec (human confirmation)
55
+ → implement (run the baseline first; TDD at the seam)
56
+ → check (build/typecheck/lint/test + failure classification + evidence)
57
+ → manual acceptance (PRD checklist)
58
+ → gate verified (human confirmation)
59
+ → archive (move the task + write the journal)
60
+ ```
61
+
62
+ - Creating a task is not starting implementation: write code only after the spec and human confirmation.
63
+ - Human gates only record explicit user confirmation; `--confirmation` is required and `--by` defaults to the OS username.
64
+ - `check` records logs and failure classes: `new` blocks acceptance; `pre-existing` / `unrelated` need `--allow-pre-existing` to record an exception.
65
+ - A passing `check` writes `CHANGES.md`, ready to use as a commit message or PR description draft; solmet never commits or pushes.
66
+ - Editing the PRD invalidates the spec gate; editing the PRD/CHANGES/checks invalidates verified.
67
+
68
+ ## Commands
69
+
70
+ ```bash
71
+ solmet init [--agent qoder] [--vcs git|svn|none] [--force] [--json]
72
+ solmet start "<task>" [--title ...] [--json]
73
+ solmet status [--task <path>] [--json]
74
+ solmet brief [--task <path>] [--json]
75
+ solmet gate spec --approve [--by <person>] --confirmation "<user's exact words>"
76
+ solmet gate spec --reject [--by <person>] --reason "..."
77
+ solmet gate verified --approve [--app-url <URL>] [--by <person>] --confirmation "<user's exact words>" [--allow-pre-existing]
78
+ solmet check [--task <path>] [--json]
79
+ solmet recall "<query>" [--source memory|archive|all] [--limit N] [--max-chars N] [--json]
80
+ solmet remember --title "<topic>" --summary "<conclusion and rationale>" [--topic <research file>] [--spec <spec file>] [--json]
81
+ solmet archive [--task <path>] [--force] [--json]
82
+ solmet map [--init|--skeleton] [--json]
83
+ solmet doctor [--root <path>] [--deep] [--baseline [--only <name>|--all]] [--json]
84
+ solmet skill <name>
85
+ ```
86
+
87
+ ## Checks and baseline
88
+
89
+ Run `solmet doctor --baseline` before implementing (it runs only build by default; `--only typecheck` or `--all` is optional). It records commands, exit codes, error summaries, Node/OS, VCS revision, config hash and working-tree state.
90
+
91
+ `solmet check` classifies failures as introduced by this change (new), pre-existing, unrelated, or unknown; only new blocks acceptance. Pre-existing/unrelated failures need `solmet gate verified --allow-pre-existing`, with the signature and reason recorded under "exceptions" in `CHANGES.md`.
92
+
93
+ Check logs and baselines live in the task's `evidence/` directory.
94
+
95
+ ## Memory
96
+
97
+ - `.solmet/spec/`: durable contracts and conventions;
98
+ - `.solmet/research/project-context.md`: lazy project map, a derived cache, not a source of truth;
99
+ - `.solmet/research/`: current investigations and tradeoffs;
100
+ - `.solmet/research/decisions/`: rejected/historical options, not recalled by default;
101
+ - `.solmet/journal/`: session log that links to topics instead of copying them;
102
+ - The `AGENTS.md` "memory catalog": titles, one-line summaries and paths for the 10 most recent spec/research topics. It is a generated view capped at 1.5KB; files are the source of truth. It refreshes after `init`, `remember` and `archive`.
103
+
104
+ `solmet recall` searches locally by keyword, Chinese bigram and quoted phrase: by default it searches `spec/research` (excluding `decisions/`), `--source archive` searches TASK/PRD/CHANGES of archived tasks, and `--source all` also includes the journal. Results carry `updated_at` and a source; archived hits include status, gates and a check summary. Results are historical records: verify against the code.
105
+
106
+ `solmet remember` records discussions, debugging conclusions or architecture decisions that have no task: it writes a journal entry and optionally writes/creates a `--topic` (research) or `--spec` (spec) topic; `--summary` is capped at 600 characters and fails instead of truncating. Knowledge produced inside a task still belongs to `archive + memory-recording`.
107
+
108
+ Memory hygiene: when a fact changes, replace the old value in place; do not append or create `xxx-v2.md`. Keep hosts, IDs, dates, commands and error text verbatim. Read counts from the structured `checks` / `gates` in TASK.md. One fact, one home. See `solmet skill memory-recording`.
109
+
110
+ Task state lives only in the task's `TASK.md`; there is no global ledger, daemon or second source of state.
111
+
112
+ When archiving, if reusable knowledge was produced, load `solmet skill memory-recording` first and apply its two tests before writing spec/research; do not copy the PRD body.
113
+
114
+ ## Project map (lazy, optional)
115
+
116
+ No full project map is generated by default. Build one only when a task needs cross-module navigation:
117
+
118
+ ```bash
119
+ solmet map # show status, source commit and coverage
120
+ solmet map --init # create the template only; do not scan the repository
121
+ solmet map --skeleton # optional: generate a one-screen static structure skeleton, keep current facts
122
+ ```
123
+
124
+ The map only records current structural facts, never rework history, requirement decisions, acceptance evidence or code snippets. When it conflicts with code, code wins. It never blocks a gate.
125
+
126
+ ## VCS
127
+
128
+ solmet reads git/svn in a read-only way: working-copy root, revision, status and changed files, used for baseline provenance and the project map. It never runs `git` / `svn` write operations.
129
+
130
+ ## Other agents
131
+
132
+ `AGENTS.md` is the only universal contract; Qoder gets a router skill from `init`. Other agents add a one-line pointer to their own entry file on demand, for example writing "read AGENTS.md first, then follow `solmet brief`" in `CLAUDE.md`. solmet does not pre-build a platform matrix, hooks, upgrade or migrate commands; without a real scenario it generates no adapter files.
133
+
134
+ ## Boundaries
135
+
136
+ - Does not auto-commit, push or create PRs;
137
+ - Does not include test-case management, screenshot evidence or remote acceptance pages;
138
+ - Does not include auto-update, background services or a multi-task queue;
139
+ - `recall` only performs local term, Chinese bigram and quoted-phrase matching; it does not call embeddings, the network or an external database;
140
+ - All state lives inside the project; no external database.
141
+
142
+ ## Tests
143
+
144
+ ```bash
145
+ npm test
146
+ ```
147
+
148
+ Tests enter through the CLI and assert task state, gates, check evidence, the memory catalog, recall/remember, the lazy map, archive and doctor guards in temporary projects.
149
+
150
+ ## References
151
+
152
+ - [mini-trellis](https://github.com/Tiger-zzZ/mini-trellis): memory-semantics reference (spec / research / journal separation; recall at the start, remember at the end).
153
+ - [grill-me](https://github.com/mattpocock/skills/tree/main/skills/productivity/grill-me): design-tree questioning reference (used with `grilling` from the same repository).
154
+
155
+ This project is an original implementation. The references influenced workflow organization and memory semantics only; no code was reused.
package/README.zh.md ADDED
@@ -0,0 +1,155 @@
1
+ # solmet
2
+
3
+ [English](README.md) | **简体中文**
4
+
5
+ 轻量的任务工作流 + 项目记忆层,供 AI coding agent 在本地项目中按阶段执行任务。单流程、零运行时依赖、所有状态保存在项目内。
6
+
7
+ ## 安装
8
+
9
+ ```bash
10
+ npm i -g @ihupoo/solmet
11
+ # 或本地安装
12
+ npm i -g .
13
+ # 开发时
14
+ npm link
15
+ ```
16
+
17
+ 需要 Node.js >= 18.17。
18
+
19
+ ## 快速开始
20
+
21
+ ```bash
22
+ cd your-project
23
+ solmet init
24
+ solmet start "列表页增加关键词筛选"
25
+ ```
26
+
27
+ `init` 会识别包管理器、build/typecheck/lint/test 命令和 git/svn 工作副本(只读),并生成:
28
+
29
+ ```text
30
+ .solmet/
31
+ config.json
32
+ spec/ # 长期规则,一个主题一个文件
33
+ research/ # 当前调查与权衡;decisions/ 按需创建,默认不召回
34
+ journal/ # 会话日志,按日期
35
+ tasks/active/
36
+ tasks/archive/
37
+ tasks/INDEX.md # CLI 生成的视图,不是事实源
38
+ AGENTS.md # 托管块:下一步指针、检查命令与记忆目录
39
+ .qoder/skills/solmet/SKILL.md # Qoder 路由技能(生成物)
40
+ ```
41
+
42
+ Qoder 项目在 `init` 时生成路由技能:只负责运行 `solmet brief` 并按 `Next skill` 继续。其他 agent 使用 `AGENTS.md` 托管块。
43
+
44
+ 纯咨询、解释代码、只读排查不建任务;1–10 行的单文件可逆小改动会先提议直接改、经你同意后跳过任务(改变行为或决定时用 `solmet remember` 留痕);其余改动才 `solmet start`。把 `.solmet/`、`AGENTS.md` 和生成的路由技能提交到仓库,中断恢复与交接都依赖这份状态;`tasks/INDEX.md` 是生成视图,不要手改。
45
+
46
+ ## 工作流
47
+
48
+ 只有一条流程:
49
+
50
+ ```text
51
+ start
52
+ → grill(按设计树分批追问)
53
+ → spec(薄合同:问题/方案/人工验收/非目标,深度随改动)
54
+ → gate spec(人工确认)
55
+ → implement(先跑基线;在 seam 上 TDD)
56
+ → check(build/typecheck/lint/test + 失败分类 + 证据)
57
+ → 人工验收(按 PRD 清单)
58
+ → gate verified(人工确认)
59
+ → archive(移动任务 + 写 journal)
60
+ ```
61
+
62
+ - 建任务不等于开始实现:规格和人工确认之后才写代码。
63
+ - 人工门只记录用户明确确认;`--confirmation` 必填,`--by` 默认系统用户名。
64
+ - `check` 记录检查日志和失败分类:`new` 阻塞验收;`pre-existing` / `unrelated` 需要 `--allow-pre-existing` 记录例外。
65
+ - `check` 通过后生成 `CHANGES.md`,可直接用作 commit message 或 PR 描述草稿;solmet 不提交、不推送。
66
+ - PRD 改动会使 spec 门禁失效;PRD/CHANGES/checks 改动会使 verified 失效。
67
+
68
+ ## 命令
69
+
70
+ ```bash
71
+ solmet init [--agent qoder] [--vcs git|svn|none] [--force] [--json]
72
+ solmet start "<任务描述>" [--title ...] [--json]
73
+ solmet status [--task <path>] [--json]
74
+ solmet brief [--task <path>] [--json]
75
+ solmet gate spec --approve [--by <人>] --confirmation "<用户原话>"
76
+ solmet gate spec --reject [--by <人>] --reason "..."
77
+ solmet gate verified --approve [--app-url <URL>] [--by <人>] --confirmation "<用户原话>" [--allow-pre-existing]
78
+ solmet check [--task <path>] [--json]
79
+ solmet recall "<查询>" [--source memory|archive|all] [--limit N] [--max-chars N] [--json]
80
+ solmet remember --title "<主题>" --summary "<结论与依据>" [--topic <research文件>] [--spec <spec文件>] [--json]
81
+ solmet archive [--task <path>] [--force] [--json]
82
+ solmet map [--init|--skeleton] [--json]
83
+ solmet doctor [--root <path>] [--deep] [--baseline [--only <名称>|--all]] [--json]
84
+ solmet skill <name>
85
+ ```
86
+
87
+ ## 检查与基线
88
+
89
+ 实现前运行 `solmet doctor --baseline`(默认只跑 build,`--only typecheck` 或 `--all` 可选)。它记录命令、退出码、错误摘要、Node/OS、VCS revision、配置哈希和工作区状态。
90
+
91
+ `solmet check` 会把失败分类为本次引入(new)、既有(pre-existing)、无关(unrelated)或待确认(unknown);只有 new 阻塞验收。既有/无关失败需要 `solmet gate verified --allow-pre-existing`,并在 `CHANGES.md` 的“例外”记录签名和原因。
92
+
93
+ 检查日志与基线放在任务目录的 `evidence/`。
94
+
95
+ ## 记忆
96
+
97
+ - `.solmet/spec/`:长期契约与约定;
98
+ - `.solmet/research/project-context.md`:惰性项目地图,派生缓存,不是事实源;
99
+ - `.solmet/research/`:当前调查与权衡;
100
+ - `.solmet/research/decisions/`:被否/历史方案,默认不召回;
101
+ - `.solmet/journal/`:会话日志,只链接 topic,不复制正文;
102
+ - `AGENTS.md` 的“记忆目录”:最近 10 个 spec/research 主题的标题、一句话和路径。它是生成视图,上限 1.5KB,正文以文件为准;`init`、`remember`、`archive` 后自动刷新。
103
+
104
+ `solmet recall` 按关键词、中文二元组和引号短语在本地检索:默认搜 `spec/research`(排除 `decisions/`),`--source archive` 搜归档任务的 TASK/PRD/CHANGES,`--source all` 再带上 journal。结果标注 `updated_at`、来源;命中归档任务时附带状态、门禁和检查摘要。结果是历史记录,需核对代码。
105
+
106
+ `solmet remember` 记录没有任务的讨论、调试结论或架构决定:写一条 journal,可选把摘要写入/创建 `--topic`(research)或 `--spec`(spec)主题;`--summary` 上限 600 字符,超限直接报错,不自动截断。任务内知识仍由 `archive + memory-recording` 负责。
107
+
108
+ 记忆卫生:同一事实变了就替换旧值,不追加、不建 `xxx-v2.md`;主机、ID、日期、命令和错误原文原样保留;计数从 TASK 的结构化 `checks` / `gates` 读取;一个事实一个家。详见 `solmet skill memory-recording`。
109
+
110
+ 任务状态只在任务目录的 `TASK.md`;不建全局 ledger,不建 daemon,不建第二套状态。
111
+
112
+ archive 时如果产生了可复用知识,先加载 `solmet skill memory-recording`,按它的两个测试决定是否写入 spec/research;不要复制 PRD 正文。
113
+
114
+ ## 项目地图(惰性,可选)
115
+
116
+ 默认不预生成全量项目地图。只有任务需要跨模块导航时,才按需建立:
117
+
118
+ ```bash
119
+ solmet map # 查看状态、依据 commit、覆盖范围
120
+ solmet map --init # 只建模板,不扫描仓库
121
+ solmet map --skeleton # 可选:生成一屏静态结构骨架,保留当前事实
122
+ ```
123
+
124
+ 地图只写当前结构事实,不写返工历史、需求决策、验收证据或代码片段;与代码冲突时以代码为准;不参与门禁。
125
+
126
+ ## VCS
127
+
128
+ solmet 只读识别 git/svn:工作副本根、revision、status、改动文件,用于基线溯源和项目地图。它不执行任何 `git` / `svn` 写操作。
129
+
130
+ ## 其他 Agent
131
+
132
+ `AGENTS.md` 是唯一通用契约;Qoder 由 `init` 生成路由技能。其他 Agent 按需在自身入口文件加一行指针,例如在 `CLAUDE.md` 写“先读 AGENTS.md,按 `solmet brief` 继续”。solmet 不预建平台矩阵、hooks、升级或迁移命令;没有实际使用场景就不生成任何适配文件。
133
+
134
+ ## 边界
135
+
136
+ - 不自动提交、不推送、不创建 PR;
137
+ - 不包含测试用例管理、截图证据或远程验收页面;
138
+ - 不包含自动更新、后台服务或多任务队列;
139
+ - `recall` 只做本地词项、中文二元组和引号短语匹配,不调用 embedding、网络或外部数据库;
140
+ - 所有状态保存在项目内,不使用外部数据库。
141
+
142
+ ## 测试
143
+
144
+ ```bash
145
+ npm test
146
+ ```
147
+
148
+ 测试从 CLI 入口进入,在临时项目中断言任务状态、门禁、检查证据、记忆目录、recall/remember、惰性地图、归档和 doctor 护栏。
149
+
150
+ ## 参考项目
151
+
152
+ - [mini-trellis](https://github.com/Tiger-zzZ/mini-trellis):记忆层语义参考(spec / research / journal 分离,开始时 recall、结束时 remember)。
153
+ - [grill-me](https://github.com/mattpocock/skills/tree/main/skills/productivity/grill-me):设计树追问方式参考(与同仓库的 `grilling` 配合使用)。
154
+
155
+ 本项目为原创实现,仅在流程组织与记忆语义上参考上述项目,未复用其代码。
package/bin/solmet.js ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import { main } from "../src/cli.js";
3
+
4
+ main(process.argv.slice(2))
5
+ .then((code) => {
6
+ process.exitCode = typeof code === "number" ? code : 0;
7
+ })
8
+ .catch((error) => {
9
+ console.error(error?.message || error);
10
+ process.exitCode = 1;
11
+ });
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "@ihupoo/solmet",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "A lightweight task workflow and memory layer for AI coding agents.",
5
+ "type": "module",
6
+ "bin": {
7
+ "solmet": "./bin/solmet.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "src",
12
+ "templates",
13
+ "skills",
14
+ "README.md",
15
+ "README.zh.md",
16
+ "LICENSE"
17
+ ],
18
+ "scripts": {
19
+ "test": "node --test",
20
+ "dev": "node ./bin/solmet.js"
21
+ },
22
+ "engines": {
23
+ "node": ">=18.17.0"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/ihupoo/solmet.git"
28
+ },
29
+ "homepage": "https://github.com/ihupoo/solmet#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/ihupoo/solmet/issues"
32
+ },
33
+ "keywords": [
34
+ "ai",
35
+ "workflow",
36
+ "memory",
37
+ "solmet",
38
+ "personal"
39
+ ],
40
+ "license": "MIT"
41
+ }
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: solmet-archive
3
+ description: Archive a verified task and record the reusable decisions in project memory.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Archive
8
+
9
+ 1. Confirm the task is verified; if not, stop.
10
+ 2. Run `solmet archive`. It moves the task to `.solmet/tasks/archive/`, writes a journal entry and refreshes the AGENTS memory catalog.
11
+ 3. Confirm the archived task and journal paths.
12
+ 4. If the task produced reusable knowledge, you MUST run `solmet skill memory-recording` and follow it before touching `.solmet/spec/` or `.solmet/research/`. Do not decide from any summary of the rules.
13
+ 5. Propose candidate entries with that skill's tests and wait for the user to confirm; if nothing qualifies, say so and stop. Do not write spec just to fill the step.
14
+ 6. Do not copy the PRD into memory. Link to the archived task.
15
+ 7. Reply with the archived task path and journal path.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: solmet-check
3
+ description: Run checks, fix only failures introduced by this change, start the local app when needed, and collect the user's manual acceptance.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Check
8
+
9
+ 1. Read the brief and `PRD.md`. The acceptance source is the PRD `人工验收` section.
10
+ 2. Run `solmet check`.
11
+ - It runs build/typecheck/lint/test from `.solmet/config.json` and stops at the first failure.
12
+ - Fix only failures introduced by this change. Do not weaken assertions, delete checks, or change the PRD acceptance list to get green.
13
+ - Do not claim a check passed unless its recorded exit code is 0. Read the log path printed by the CLI.
14
+ 3. If the only failures are pre-existing/unrelated, report them with their classification and the baseline reference. The verified gate needs `--allow-pre-existing` to record the exception.
15
+ 4. If manual acceptance needs a running app, start the project's own dev command (read `package.json`; for Vite also read `server.port`/`host`/`https`/`base`). Bind the LAN only if the user needs another device: `npm run dev -- --host 0.0.0.0`. Probe the printed URL and give the user the address. If it only binds loopback, say other machines cannot open it.
16
+ 5. Ask the user to check every item in the PRD `人工验收` section. Do not claim approval on the user's behalf.
17
+ 6. Only after explicit confirmation run:
18
+ `solmet gate verified --approve [--app-url <URL>] [--by <人>] --confirmation "<用户原话>"`
19
+ `--by` defaults to the OS user; pass it only when the user names someone else. `--app-url` is optional.
20
+ 7. Stop. Do not archive automatically. Remind the user to stop any local dev server when done.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: solmet-grill
3
+ description: Clarify a task through a design-tree interview, one frontier per round, before any spec or code is written.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Grill
8
+
9
+ Read `.solmet/tasks/active/<task>/PRD.md` and the task request first.
10
+
11
+ If `.solmet/research/project-context.md` exists, read only the sections relevant to this task and verify them against current code. Do not load the whole map.
12
+
13
+ Use the `grilling` discipline skill. In short:
14
+
15
+ - Map the work as a design tree: every decision branches into decisions that depend on it.
16
+ - The frontier is the set of decisions whose prerequisites are settled.
17
+ - Ask the whole frontier in one round, numbered, with a recommended answer for each.
18
+ - Word each question so “yes” accepts the recommendation.
19
+ - Facts come from the codebase, files and tools, not from the user. Decisions come from the user.
20
+ - Recompute the frontier after each answer. Stop when the frontier is empty.
21
+ - Do not write code, do not edit PRD acceptance expectations, and do not run gates.
22
+
23
+ When the frontier is empty, summarize the agreed scope, non-goals, acceptance and risks, then hand off to `spec`.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: solmet-grilling
3
+ description: Interview the user through a design tree, one frontier per round, until no decision is silently assumed.
4
+ ---
5
+
6
+ # Grilling discipline
7
+
8
+ Map the plan as a design tree. Every decision branches into decisions that depend on it.
9
+
10
+ Work in rounds:
11
+
12
+ - The frontier is every decision whose prerequisites are settled.
13
+ - Ask the whole frontier in one round, numbered.
14
+ - Give a recommended answer for each question.
15
+ - Word the question so “yes” accepts the recommendation.
16
+ - Wait for the user's answers before the next round.
17
+
18
+ Facts are your job: inspect the codebase, files and tools. Decisions are the user's: ask and wait.
19
+
20
+ A question whose answer depends on an open question belongs to a later round.
21
+
22
+ Stop when the frontier is empty. Summarize settled decisions, open assumptions, scope and non-goals. Do not act until the user confirms shared understanding.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: solmet-implement
3
+ description: Implement the confirmed PRD at the agreed seam without changing acceptance expectations.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Implement
8
+
9
+ Read `PRD.md`, the current task brief, and `NOTES.md` if it exists.
10
+
11
+ 1. If the spec gate is not approved, stop and ask the user to confirm.
12
+ 2. Before the first code edit, run `solmet doctor --baseline` (default build; `--only typecheck` for speed). Record whether the baseline already fails. If it fails in files you are not changing, treat it as pre-existing and do not fix it inside this task.
13
+ 3. Work one vertical slice at a time at the agreed seam.
14
+ 4. Use `tdd` when the seam supports it: red → green → refactor.
15
+ 5. Do not change the PRD manual acceptance list, delete checks, or weaken assertions to make the build green.
16
+ 6. Keep the change inside the agreed scope; if it cannot, create `NOTES.md` and record the exception there.
17
+ 7. Use the fastest check as you go; when the change is complete, run `solmet check`.
18
+ 8. Stop at the verified gate; do not archive without user confirmation.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: solmet-map
3
+ description: Read, initialize, or update the lazy project context map without turning it into a second spec or a history log.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Project map
8
+
9
+ Use only when a task is cross-module, or when an exploration produced reusable project structure facts. Do not pre-generate a full map at init.
10
+
11
+ ## Read
12
+
13
+ 1. Run `solmet map` to see status and staleness hints.
14
+ 2. If the map exists, read only the sections relevant to this task. Do not load the whole file when it is large.
15
+ 3. Verify statements against current code before relying on them. Code wins.
16
+ 4. If `source_commit` is old or `scope` does not cover your paths, treat the map as stale.
17
+
18
+ ## Create
19
+
20
+ - Small or unknown project: `solmet map --init` creates an empty template; fill it only after exploration.
21
+ - Large project: `solmet map --skeleton` adds a one-screen deterministic structure index. This does not scan semantics or replace code reading.
22
+ - The map is optional and never blocks a gate.
23
+
24
+ ## Update
25
+
26
+ Write current-state facts only:
27
+
28
+ - scope/paths covered;
29
+ - entrypoints and call chains;
30
+ - reusable seams and test commands;
31
+ - conventions and invariants;
32
+ - risk zones;
33
+ - unknowns/areas not covered.
34
+
35
+ Rules:
36
+
37
+ - Delete false or stale statements; do not append a changelog, rework history or "previously we tried".
38
+ - Keep `source_commit`, `updated_at`, `scope`, `confidence` and `unknowns` current in the metadata block.
39
+ - `--skeleton` refreshes structure only and does not make old current facts fresh; after verifying/updating facts, set `source_commit` to the commit you verified against.
40
+ - Do not put task status, acceptance evidence, PRD content or code dumps in the map.
41
+ - One home per fact: confirmed durable rules go to `.solmet/spec/`; current investigations go to `.solmet/research/`; rejected/historical options go to `.solmet/research/decisions/` (not auto-recalled); session history goes to `.solmet/journal/`.
42
+ - Map is a cache, not a source of truth. When it disagrees with code, change the map.
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: solmet-memory-recording
3
+ description: Record confirmed decisions and durable conventions in one home, without turning memory into task state.
4
+ ---
5
+
6
+ # Memory recording discipline
7
+
8
+ Use memory only for reusable knowledge, not task status.
9
+
10
+ Before writing anything, apply two tests:
11
+
12
+ - Future-task test: only rules that a different future task could violate belong in `.solmet/spec/`. Descriptions of how this feature is built, laid out or ordered belong to the PRD and the code.
13
+ - Contract test: state the agreed behavior itself, concretely enough to judge without reading the implementation. If changing the fact would need product agreement (formats, interaction shape, empty/error behavior), write it in spec and keep code in sync. If changing it is pure refactoring (component names, CSS, function signatures, pixel-level choices), keep it out.
14
+
15
+ Choose one home:
16
+
17
+ - `.solmet/spec/` for durable contracts and conventions;
18
+ - `.solmet/research/project-context.md` for reusable current structure facts (a cache, not a rule);
19
+ - `.solmet/research/` for current investigations and tradeoffs;
20
+ - `.solmet/research/decisions/` for rejected or historical options; it is not auto-recalled;
21
+ - `.solmet/journal/` for the session log, linking to the topic.
22
+
23
+ Rules:
24
+
25
+ - Update the document that already owns the rule; do not duplicate it.
26
+ - Replace, do not append: when the same fact changes, update the owning document in place with the new value and date; do not keep the old value next to it or create a `xxx-v2.md` file.
27
+ - Preserve exact strings verbatim: hosts, IDs, dates, commands and error text stay as written.
28
+ - Read counts from structured task state (`TASK.md` checks and gates), not from prose such as "failed three times".
29
+ - Project context is current-state only: delete stale statements; do not append a changelog or rework history.
30
+ - Do not put requirements, acceptance evidence, task status or code dumps in the project map.
31
+ - Keep conditions with the rule: “when X, do not Y” is not “never Y”.
32
+ - Distinguish confirmed decisions, implemented capabilities and inference.
33
+ - An agreed future policy is not implemented; label it.
34
+ - Rejected approaches stay in `research/decisions/` and are labeled rejected; do not surface them in default recall.
35
+ - Journal links to the topic; it does not copy the body.
36
+ - Update affected docs in the same task when code changes behavior.
37
+ - Archive stale research; do not surface it in default recall.
38
+ - Do not write task status, checklists or acceptance evidence into memory.
39
+
40
+ Optional: a cheaper model may draft journal or `remember` summaries; implementation and checks stay on the main model.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: solmet-spec
3
+ description: Write the thin PRD contract for a task, at the depth the change needs, including manual acceptance and out-of-scope.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Spec
8
+
9
+ Read the task request, the grill conclusions and the project glossary/ADR notes.
10
+
11
+ 1. If `.solmet/research/project-context.md` exists, read only the sections relevant to this task and verify them against current code. Then explore only the code needed to understand current behavior and the best test seam.
12
+ 2. Choose the PRD depth from the change itself; do not add a mode or profile.
13
+ - Single behavior, single file, reversible, no cross-module dependency: write a five-line contract with only 问题、方案、人工验收、非目标.
14
+ - Cross-module, permission/data/public-interface change, or hard to reverse: use the full structure and add user stories, implementation decisions, test seam and risks where they carry real information.
15
+ 3. Prefer an existing seam. Use the highest seam possible. The ideal is one seam. Tell the user which seam you chose and why; wait for confirmation if it is not obvious.
16
+ 4. Write `PRD.md` with these sections, keeping each one concrete and free of padding:
17
+ - problem and user-visible solution;
18
+ - manual acceptance: 1–3 observable checks (entry, action, expected result);
19
+ - out-of-scope;
20
+ - optional sections only when they add information.
21
+ 5. Remove the `solmet:draft` marker and every `待补充` placeholder only when the PRD is complete.
22
+ 6. Do not write code yet. Show the PRD and the manual acceptance checklist; after explicit user confirmation run `solmet gate spec --approve [--by <人>] --confirmation "<用户原话>"`.
23
+
24
+ If the requirement is ambiguous, go back to `grill` instead of inventing intent in the PRD.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: solmet-spec-writing
3
+ description: Write a thin, living spec: intent, acceptance, seams, decisions and out-of-scope, not an implementation manual.
4
+ ---
5
+
6
+ # Spec writing discipline
7
+
8
+ - Write what the user should observe and why; do not write a step-by-step implementation.
9
+ - Keep the contract proportional: 问题、方案、人工验收、非目标 are always required; user stories, implementation decisions and seams only when they carry information.
10
+ - Prefer one high test seam; reuse existing seams before adding new ones.
11
+ - Include out-of-scope and rejected options; these cannot be recovered from code.
12
+ - Do not include file paths or long code snippets; decision-rich prototype fragments are the exception.
13
+ - Separate confirmed behavior, agreed-but-not-implemented policy, and inference.
14
+ - Keep one current rule in the document that already owns it; link instead of copying.
15
+ - Remove the `solmet:draft` marker only when the document is complete.
16
+ - Update affected docs in the same task when implementation changes behavior.
17
+ - The PRD is the evaluation oracle; code is the implementation, tests are the executable checks, and the manual acceptance list is the user's acceptance.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: solmet-start
3
+ description: Start a solmet task when the user asks to change code or artifacts (new feature, change, fix) and no active task exists.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Start
8
+
9
+ Use only when the user asks for a new feature, change or fix and no active task exists.
10
+
11
+ Do not start for pure questions, code explanation, log inspection or read-only investigation; answer directly and leave `.solmet` untouched. If the user then asks for the fix, start with their original wording.
12
+
13
+ If the intent is unclear or exploratory, clarify or propose first.
14
+
15
+ Trivial change (all true: one file, one behavior, reversible, no public interface/data/permission/dependency change, 1-10 lines): propose skipping the task once, e.g. "This is a small change (what); I'll do it directly without a task, OK?" Only skip when the user agrees in this turn; otherwise start the task. For any other change, start the task without asking. After a skipped change that alters behavior or decisions (not plain wording/format), record it with `solmet remember` and still run the relevant typecheck/lint.
16
+
17
+ Every task follows the same flow. If the user says this turn should skip the task flow, skip solmet for that turn only; later change requests still start.
18
+
19
+ 1. Run `solmet start "<request>"` from the project root. Do not pass `--title` unless the user explicitly asks for a title; the CLI derives a short title and keeps the full request in the task.
20
+ 2. Read the brief printed by the command. After every later status change, run `solmet brief` again and follow its 下一步技能(Next skill).
21
+ 3. If the brief says a task already exists, run `solmet status` instead of creating a duplicate.
22
+ 4. Do not write code yet. Follow `grill` → `spec` → `gate spec` before implementation.
23
+ 5. Stop after the task is created and the brief is presented.
24
+
25
+ Do not create task state in `.solmet/spec`, `.solmet/research` or `.solmet/journal`.