ai-dev-requirements 0.3.0 → 0.4.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/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 需求/任务/缺陷 by `issueType.detailType`. |
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/`) | Interview loop for open product decisions. Uses `get_grilling_brief`; does not live in the MCP server. |
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/dev-workflow"
43
- cp -R skills/dev-workflow/* "${CODEX_HOME:-$HOME/.codex}/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
- By default, the harness generates user stories and an implementation plan before writing code, then pauses for confirmation. You do not need to repeat "write the plan first" in every prompt. Say so only when you want to bypass that gate.
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
- Intake -> Context Load -> Normalize -> Harness Plan -> Coverage Validation -> Gated Execution -> Verification -> Review -> Handoff
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)
@@ -104,6 +106,10 @@ Create `.requirements-mcp.json` in your project root:
104
106
  "type": "ones-pkce",
105
107
  "emailEnv": "ONES_ACCOUNT",
106
108
  "passwordEnv": "ONES_PASSWORD"
109
+ },
110
+ "openApiAuth": {
111
+ "type": "token",
112
+ "tokenEnv": "ONES_OPENAPI_TOKEN"
107
113
  }
108
114
  }
109
115
  },
@@ -121,13 +127,19 @@ Add to your `.mcp.json`:
121
127
  "args": ["ai-dev-requirements"],
122
128
  "env": {
123
129
  "ONES_ACCOUNT": "${ONES_ACCOUNT}",
124
- "ONES_PASSWORD": "${ONES_PASSWORD}"
130
+ "ONES_PASSWORD": "${ONES_PASSWORD}",
131
+ "ONES_OPENAPI_TOKEN": "${ONES_OPENAPI_TOKEN}"
125
132
  }
126
133
  }
127
134
  }
128
135
  }
129
136
  ```
130
137
 
138
+ `openApiAuth` is optional and independent from the internal `ones-pkce` product
139
+ session. It is used for documented Wiki metadata and search requests when
140
+ available. Wiki creates and updates always use the product session plus the live
141
+ JSONv1 collaboration protocol, so they do not require a Personal API Key.
142
+
131
143
  #### MCP security boundaries
132
144
 
133
145
  - ONES titles, descriptions, test cases, and attachment metadata are marked as untrusted data. Instructions embedded in them must never drive tool calls.
@@ -174,7 +186,7 @@ Requirements are not limited to ONES. Pair with official MCP servers for GitHub
174
186
  A self-contained AI-assisted agent harness skill that governs the full development lifecycle:
175
187
 
176
188
  ```
177
- Intake -> Context Load -> Normalize -> Harness Plan -> Coverage Validation -> Gated Execution -> Verification -> Review -> Handoff
189
+ Context -> Grill -> User Stories -> Stories Approval -> Plan -> Coverage Validation -> Plan Approval -> Execution -> Verification -> Review -> Handoff
178
190
  ```
179
191
 
180
192
  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 +198,7 @@ skills/dev-workflow/
186
198
  ├── SKILL.md # Skill entry (YAML frontmatter + harness definition)
187
199
  └── references/
188
200
  ├── workflow.md # Agent harness lifecycle
201
+ ├── requirement-validation.md # Coverage validation gate contract
189
202
  ├── task-types.md # Harness task types, scheduler modes, declaration syntax
190
203
  ├── service-transform.md # Service-layer transform pattern for Mock/API adaptation
191
204
  └── templates/ # Task declaration templates
@@ -204,7 +217,7 @@ skills/dev-workflow/
204
217
  ```
205
218
  ai-dev-workflow/
206
219
  ├── skills/
207
- │ ├── grill-me/ # User-invoked grilling entry
220
+ │ ├── grill-me/ # Ambiguity-resolution entry
208
221
  │ ├── grilling/ # Interview primitive
209
222
  │ └── dev-workflow/ # Agent Harness Workflow Skill
210
223
 
@@ -274,7 +287,7 @@ pnpm build
274
287
  pnpm test
275
288
 
276
289
  # Type check
277
- pnpm lint
290
+ pnpm typecheck
278
291
  ```
279
292
 
280
293
 
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/`) | 开工前访谈循环。先调 `get_grilling_brief`;访谈本身不进 MCP Server。 |
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/dev-workflow"
43
- cp -R skills/dev-workflow/* "${CODEX_HOME:-$HOME/.codex}/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
- 默认情况下,harness 会先生成 user stories implementation plan,然后暂停等待确认,再开始写代码。你不需要每次重复“先写计划再实现”。只有想跳过这个门禁时,才需要明确说明。
81
+ 需求驱动开发包含两个不可跳过的确认门禁:先确认当前 user stories,再生成 implementation plan;覆盖校验通过后,再确认当前 plan 才能开始实现。结果明确且范围很小的机械任务不需要触发完整 harness。
80
82
 
81
83
  预期流程:
82
84
 
83
85
  ```text
84
- 需求接入上下文加载需求规范化Harness 计划 → 覆盖校验 → 门禁执行 → 验证 → 审查 → 交付
86
+ 上下文GrillUser 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
- 需求接入上下文加载需求规范化Harness 计划 → 覆盖校验 → 门禁执行 → 验证 → 审查 → 交付
179
+ 上下文GrillUser 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 lint
279
+ pnpm typecheck
277
280
  ```
278
281
 
279
282