ai-dev-requirements 0.3.0 → 0.3.1
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/README.md +13 -10
- package/README.zh-CN.md +12 -9
- package/dist/index.cjs +6 -6
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/dev-workflow/SKILL.md +146 -184
- package/skills/dev-workflow/references/requirement-validation.md +127 -87
- package/skills/dev-workflow/references/service-transform.md +11 -7
- package/skills/dev-workflow/references/task-types.md +27 -1
- package/skills/dev-workflow/references/templates/code-dev-task.md +4 -0
- package/skills/dev-workflow/references/templates/code-fix-task.md +6 -2
- package/skills/dev-workflow/references/templates/code-refactor-task.md +4 -0
- package/skills/dev-workflow/references/templates/doc-write-task.md +5 -1
- package/skills/dev-workflow/references/templates/research-task.md +4 -0
- package/skills/dev-workflow/references/templates/test-task.md +4 -0
- package/skills/dev-workflow/references/workflow.md +247 -216
- package/skills/grill-me/SKILL.md +22 -5
- package/skills/grilling/SKILL.md +9 -5
package/README.md
CHANGED
|
@@ -10,9 +10,9 @@ An agent harness workflow for AI coding tools, enabling controlled requirement i
|
|
|
10
10
|
|
|
11
11
|
| Deliverable | Description |
|
|
12
12
|
|-------------|-------------|
|
|
13
|
-
| **Requirements MCP Server** (`src/`) | MCP server for ONES work items. Routes
|
|
13
|
+
| **Requirements MCP Server** (`src/`) | MCP server for ONES work items. Routes requirements, tasks, and defects by `issueType.detailType`. |
|
|
14
14
|
| **Agent Harness Workflow Skill** (`skills/dev-workflow/`) | Self-contained agent harness skill. Install it to run requirement intake, planning, gated execution, verification, review, and handoff. |
|
|
15
|
-
| **Grill-me Skills** (`skills/grill-me/`, `skills/grilling/`) |
|
|
15
|
+
| **Grill-me Skills** (`skills/grill-me/`, `skills/grilling/`) | Fact-first interview entry and decision-tree primitive for ambiguous development requests. ONES sources use one `get_grilling_brief` call. |
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -36,11 +36,11 @@ Once installed, AI coding tools will automatically use the dev-workflow harness
|
|
|
36
36
|
|
|
37
37
|
Codex loads skills from `$CODEX_HOME/skills`. If `CODEX_HOME` is not set, the default is `~/.codex`.
|
|
38
38
|
|
|
39
|
-
From this repository:
|
|
39
|
+
From this repository, install all three cooperating skills:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills
|
|
43
|
-
cp -R skills/dev-workflow
|
|
42
|
+
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
|
|
43
|
+
cp -R skills/dev-workflow skills/grill-me skills/grilling "${CODEX_HOME:-$HOME/.codex}/skills/"
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
For local development, use a symlink instead so Codex picks up edits from this checkout after restart:
|
|
@@ -48,6 +48,8 @@ For local development, use a symlink instead so Codex picks up edits from this c
|
|
|
48
48
|
```bash
|
|
49
49
|
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
|
|
50
50
|
ln -s "$(pwd)/skills/dev-workflow" "${CODEX_HOME:-$HOME/.codex}/skills/dev-workflow"
|
|
51
|
+
ln -s "$(pwd)/skills/grill-me" "${CODEX_HOME:-$HOME/.codex}/skills/grill-me"
|
|
52
|
+
ln -s "$(pwd)/skills/grilling" "${CODEX_HOME:-$HOME/.codex}/skills/grilling"
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
Restart Codex after installing or updating the skill.
|
|
@@ -76,12 +78,12 @@ When the harness is active, the agent should announce:
|
|
|
76
78
|
I'm using the dev-workflow harness to drive this development task.
|
|
77
79
|
```
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
Requirement-driven work has two non-bypassable approval gates: approve the current user stories before planning, then approve the current implementation plan after coverage validation passes. Mechanical tasks with an obvious bounded result do not need to trigger the full harness.
|
|
80
82
|
|
|
81
83
|
Expected flow:
|
|
82
84
|
|
|
83
85
|
```text
|
|
84
|
-
|
|
86
|
+
Context -> Grill -> User Stories -> Stories Approval -> Plan -> Coverage Validation -> Plan Approval -> Execution -> Verification -> Review -> Handoff
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
### 4. Install MCP Server (Optional)
|
|
@@ -174,7 +176,7 @@ Requirements are not limited to ONES. Pair with official MCP servers for GitHub
|
|
|
174
176
|
A self-contained AI-assisted agent harness skill that governs the full development lifecycle:
|
|
175
177
|
|
|
176
178
|
```
|
|
177
|
-
|
|
179
|
+
Context -> Grill -> User Stories -> Stories Approval -> Plan -> Coverage Validation -> Plan Approval -> Execution -> Verification -> Review -> Handoff
|
|
178
180
|
```
|
|
179
181
|
|
|
180
182
|
The harness follows a feedforward + feedback model: it guides the agent with plans, artifacts, and task boundaries, then uses deterministic gates such as lint, typecheck, build, tests, and review as backpressure before handoff.
|
|
@@ -186,6 +188,7 @@ skills/dev-workflow/
|
|
|
186
188
|
├── SKILL.md # Skill entry (YAML frontmatter + harness definition)
|
|
187
189
|
└── references/
|
|
188
190
|
├── workflow.md # Agent harness lifecycle
|
|
191
|
+
├── requirement-validation.md # Coverage validation gate contract
|
|
189
192
|
├── task-types.md # Harness task types, scheduler modes, declaration syntax
|
|
190
193
|
├── service-transform.md # Service-layer transform pattern for Mock/API adaptation
|
|
191
194
|
└── templates/ # Task declaration templates
|
|
@@ -204,7 +207,7 @@ skills/dev-workflow/
|
|
|
204
207
|
```
|
|
205
208
|
ai-dev-workflow/
|
|
206
209
|
├── skills/
|
|
207
|
-
│ ├── grill-me/ #
|
|
210
|
+
│ ├── grill-me/ # Ambiguity-resolution entry
|
|
208
211
|
│ ├── grilling/ # Interview primitive
|
|
209
212
|
│ └── dev-workflow/ # Agent Harness Workflow Skill
|
|
210
213
|
│
|
|
@@ -274,7 +277,7 @@ pnpm build
|
|
|
274
277
|
pnpm test
|
|
275
278
|
|
|
276
279
|
# Type check
|
|
277
|
-
pnpm
|
|
280
|
+
pnpm typecheck
|
|
278
281
|
```
|
|
279
282
|
|
|
280
283
|
|
package/README.zh-CN.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|-------|------|
|
|
13
13
|
| **Requirements MCP Server** (`src/`) | 需求获取 MCP 服务。按 `issueType.detailType` 区分需求 / 任务 / 缺陷。 |
|
|
14
14
|
| **Agent Harness Workflow Skill** (`skills/dev-workflow/`) | 自包含的 AI agent harness 工作流 Skill,安装后即可跑通需求接入、计划、门禁执行、验证、审查和交付。 |
|
|
15
|
-
| **Grill-me Skills** (`skills/grill-me/`, `skills/grilling/`) |
|
|
15
|
+
| **Grill-me Skills** (`skills/grill-me/`, `skills/grilling/`) | 面向模糊开发需求的事实优先访谈入口和决策树原语;ONES 来源只调用一次 `get_grilling_brief`。 |
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -36,11 +36,11 @@ npx skills add daguanren21/ai-dev-workflow -a claude-code
|
|
|
36
36
|
|
|
37
37
|
Codex 从 `$CODEX_HOME/skills` 加载 skills。未设置 `CODEX_HOME` 时,默认目录是 `~/.codex`。
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
从当前仓库安装三个配套 skill:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills
|
|
43
|
-
cp -R skills/dev-workflow
|
|
42
|
+
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
|
|
43
|
+
cp -R skills/dev-workflow skills/grill-me skills/grilling "${CODEX_HOME:-$HOME/.codex}/skills/"
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
如果是在本地开发这个 skill,建议使用软链接,这样更新当前仓库后重启 Codex 即可生效:
|
|
@@ -48,6 +48,8 @@ cp -R skills/dev-workflow/* "${CODEX_HOME:-$HOME/.codex}/skills/dev-workflow/"
|
|
|
48
48
|
```bash
|
|
49
49
|
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
|
|
50
50
|
ln -s "$(pwd)/skills/dev-workflow" "${CODEX_HOME:-$HOME/.codex}/skills/dev-workflow"
|
|
51
|
+
ln -s "$(pwd)/skills/grill-me" "${CODEX_HOME:-$HOME/.codex}/skills/grill-me"
|
|
52
|
+
ln -s "$(pwd)/skills/grilling" "${CODEX_HOME:-$HOME/.codex}/skills/grilling"
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
安装或更新后需要重启 Codex。
|
|
@@ -76,12 +78,12 @@ Harness 生效时,agent 应该先声明:
|
|
|
76
78
|
I'm using the dev-workflow harness to drive this development task.
|
|
77
79
|
```
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
需求驱动开发包含两个不可跳过的确认门禁:先确认当前 user stories,再生成 implementation plan;覆盖校验通过后,再确认当前 plan 才能开始实现。结果明确且范围很小的机械任务不需要触发完整 harness。
|
|
80
82
|
|
|
81
83
|
预期流程:
|
|
82
84
|
|
|
83
85
|
```text
|
|
84
|
-
|
|
86
|
+
上下文 → Grill → User Stories → Stories 确认 → Plan → 覆盖校验 → Plan 确认 → 实现 → 验证 → 审查 → 交付
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
### 4. 安装 MCP Server(可选)
|
|
@@ -174,7 +176,7 @@ npm install -g ai-dev-requirements
|
|
|
174
176
|
自包含的 AI 辅助 agent harness 工作流 Skill,安装后自动管控完整开发生命周期:
|
|
175
177
|
|
|
176
178
|
```
|
|
177
|
-
|
|
179
|
+
上下文 → Grill → User Stories → Stories 确认 → Plan → 覆盖校验 → Plan 确认 → 实现 → 验证 → 审查 → 交付
|
|
178
180
|
```
|
|
179
181
|
|
|
180
182
|
这个 harness 遵循“前馈 + 反馈”模型:先用计划、产物和任务边界引导 agent,再用 lint、typecheck、build、tests、review 等确定性门禁形成反压,合格后再交付。
|
|
@@ -186,6 +188,7 @@ skills/dev-workflow/
|
|
|
186
188
|
├── SKILL.md # Skill 入口(YAML frontmatter + harness 定义)
|
|
187
189
|
└── references/
|
|
188
190
|
├── workflow.md # Agent harness 生命周期
|
|
191
|
+
├── requirement-validation.md # 覆盖校验门禁规范
|
|
189
192
|
├── task-types.md # Harness 任务类型、调度模式、声明语法
|
|
190
193
|
├── service-transform.md # Service 层 Transform 适配模式
|
|
191
194
|
└── templates/ # 任务声明模板
|
|
@@ -204,7 +207,7 @@ skills/dev-workflow/
|
|
|
204
207
|
```
|
|
205
208
|
ai-dev-workflow/
|
|
206
209
|
├── skills/
|
|
207
|
-
│ ├── grill-me/ #
|
|
210
|
+
│ ├── grill-me/ # 模糊需求处理入口
|
|
208
211
|
│ ├── grilling/ # 访谈原语
|
|
209
212
|
│ └── dev-workflow/ # Agent Harness Workflow Skill
|
|
210
213
|
├── src/ # Requirements MCP Server 源码
|
|
@@ -273,7 +276,7 @@ pnpm build
|
|
|
273
276
|
pnpm test
|
|
274
277
|
|
|
275
278
|
# 类型检查
|
|
276
|
-
pnpm
|
|
279
|
+
pnpm typecheck
|
|
277
280
|
```
|
|
278
281
|
|
|
279
282
|
|
package/dist/index.cjs
CHANGED
|
@@ -188,7 +188,7 @@ function loadConfig(startDir) {
|
|
|
188
188
|
}
|
|
189
189
|
//#endregion
|
|
190
190
|
//#region package.json
|
|
191
|
-
var version = "0.3.
|
|
191
|
+
var version = "0.3.1";
|
|
192
192
|
//#endregion
|
|
193
193
|
//#region ../../src/utils/map-status.ts
|
|
194
194
|
const ONES_STATUS_MAP = {
|
|
@@ -229,7 +229,7 @@ function mapOnesType(type) {
|
|
|
229
229
|
//#region ../../src/utils/ones-issue-kind.ts
|
|
230
230
|
/**
|
|
231
231
|
* ONES issueType.detailType / subIssueType.detailType:
|
|
232
|
-
* 1 = 需求, 2 = 任务, 3 =
|
|
232
|
+
* 1 = 需求, 2 = 任务, 3 = 缺陷, 5 = 子需求.
|
|
233
233
|
*
|
|
234
234
|
* A concrete sub-type is more specific than its parent issue type. Some ONES
|
|
235
235
|
* teams model defects as a task parent type with a defect sub-type, so the
|
|
@@ -238,11 +238,11 @@ function mapOnesType(type) {
|
|
|
238
238
|
function classifyOnesWorkItem(issueType, subIssueType) {
|
|
239
239
|
for (const candidate of [subIssueType, issueType]) {
|
|
240
240
|
const detailType = candidate?.detailType;
|
|
241
|
-
if (detailType === 1) return "requirement";
|
|
241
|
+
if (detailType === 1 || detailType === 5) return "requirement";
|
|
242
242
|
if (detailType === 2) return "task";
|
|
243
243
|
if (detailType === 3) return "defect";
|
|
244
244
|
const name = (candidate?.name ?? "").trim().toLowerCase();
|
|
245
|
-
if (name === "需求" || name === "demand" || name === "story" || name === "feature") return "requirement";
|
|
245
|
+
if (name === "需求" || name === "子需求" || name === "demand" || name === "story" || name === "feature") return "requirement";
|
|
246
246
|
if (name === "缺陷" || name === "bug" || name === "defect") return "defect";
|
|
247
247
|
if (name === "任务" || name === "task" || name === "子任务" || name === "工单" || name === "测试任务") return "task";
|
|
248
248
|
}
|
|
@@ -1633,8 +1633,8 @@ var OnesAdapter = class extends BaseAdapter {
|
|
|
1633
1633
|
}
|
|
1634
1634
|
/**
|
|
1635
1635
|
* Fetch a work item by UUID, number, display id, or wiki URL.
|
|
1636
|
-
* Routes by issueType.detailType:
|
|
1637
|
-
*
|
|
1636
|
+
* Routes by issueType.detailType: requirements (1 and 5) load wiki docs;
|
|
1637
|
+
* tasks (2) and defects (3) return the item itself without wiki expansion.
|
|
1638
1638
|
*/
|
|
1639
1639
|
async getRequirement(params) {
|
|
1640
1640
|
const wikiRoute = parseOnesWikiPageRoute(params.id);
|
package/dist/index.mjs
CHANGED
|
@@ -165,7 +165,7 @@ function loadConfig(startDir) {
|
|
|
165
165
|
}
|
|
166
166
|
//#endregion
|
|
167
167
|
//#region package.json
|
|
168
|
-
var version = "0.3.
|
|
168
|
+
var version = "0.3.1";
|
|
169
169
|
//#endregion
|
|
170
170
|
//#region ../../src/utils/map-status.ts
|
|
171
171
|
const ONES_STATUS_MAP = {
|
|
@@ -206,7 +206,7 @@ function mapOnesType(type) {
|
|
|
206
206
|
//#region ../../src/utils/ones-issue-kind.ts
|
|
207
207
|
/**
|
|
208
208
|
* ONES issueType.detailType / subIssueType.detailType:
|
|
209
|
-
* 1 = 需求, 2 = 任务, 3 =
|
|
209
|
+
* 1 = 需求, 2 = 任务, 3 = 缺陷, 5 = 子需求.
|
|
210
210
|
*
|
|
211
211
|
* A concrete sub-type is more specific than its parent issue type. Some ONES
|
|
212
212
|
* teams model defects as a task parent type with a defect sub-type, so the
|
|
@@ -215,11 +215,11 @@ function mapOnesType(type) {
|
|
|
215
215
|
function classifyOnesWorkItem(issueType, subIssueType) {
|
|
216
216
|
for (const candidate of [subIssueType, issueType]) {
|
|
217
217
|
const detailType = candidate?.detailType;
|
|
218
|
-
if (detailType === 1) return "requirement";
|
|
218
|
+
if (detailType === 1 || detailType === 5) return "requirement";
|
|
219
219
|
if (detailType === 2) return "task";
|
|
220
220
|
if (detailType === 3) return "defect";
|
|
221
221
|
const name = (candidate?.name ?? "").trim().toLowerCase();
|
|
222
|
-
if (name === "需求" || name === "demand" || name === "story" || name === "feature") return "requirement";
|
|
222
|
+
if (name === "需求" || name === "子需求" || name === "demand" || name === "story" || name === "feature") return "requirement";
|
|
223
223
|
if (name === "缺陷" || name === "bug" || name === "defect") return "defect";
|
|
224
224
|
if (name === "任务" || name === "task" || name === "子任务" || name === "工单" || name === "测试任务") return "task";
|
|
225
225
|
}
|
|
@@ -1610,8 +1610,8 @@ var OnesAdapter = class extends BaseAdapter {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
/**
|
|
1612
1612
|
* Fetch a work item by UUID, number, display id, or wiki URL.
|
|
1613
|
-
* Routes by issueType.detailType:
|
|
1614
|
-
*
|
|
1613
|
+
* Routes by issueType.detailType: requirements (1 and 5) load wiki docs;
|
|
1614
|
+
* tasks (2) and defects (3) return the item itself without wiki expansion.
|
|
1615
1615
|
*/
|
|
1616
1616
|
async getRequirement(params) {
|
|
1617
1617
|
const wikiRoute = parseOnesWikiPageRoute(params.id);
|