ai-dev-requirements 0.1.13 → 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 daguanren21
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
@@ -10,8 +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 fetching requirements, with built-in ONES adapter. Installable via npm. |
13
+ | **Requirements MCP Server** (`src/`) | MCP server for ONES work items. Routes 需求/任务/缺陷 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
16
 
16
17
  ---
17
18
 
@@ -127,6 +128,14 @@ Add to your `.mcp.json`:
127
128
  }
128
129
  ```
129
130
 
131
+ #### MCP security boundaries
132
+
133
+ - ONES titles, descriptions, test cases, and attachment metadata are marked as untrusted data. Instructions embedded in them must never drive tool calls.
134
+ - Rich HTML is converted to bounded plain text. URL credentials, query strings, fragments, remote error bodies, and internal API base URLs are not returned to the model.
135
+ - Image downloads accept only configured-source URLs or URLs issued by the authenticated ONES attachment API. Redirects are revalidated; private-network targets are rejected unless they are the configured source itself.
136
+ - A tool call downloads at most 8 PNG/JPEG/GIF/WebP images, each at most 8 MiB with a 10-second timeout.
137
+ - Mutation tools remain separate calls and require explicit user confirmation in the workflow.
138
+
130
139
  ### 5. Add Companion MCP Servers (Optional)
131
140
 
132
141
  Requirements are not limited to ONES. Pair with official MCP servers for GitHub / Jira / Figma:
@@ -194,16 +203,14 @@ skills/dev-workflow/
194
203
 
195
204
  ```
196
205
  ai-dev-workflow/
197
- ├── skills/dev-workflow/ # Agent Harness Workflow Skill (self-contained)
198
- │ ├── SKILL.md
199
- └── references/
200
- ├── workflow.md # Agent harness lifecycle
201
- │ ├── task-types.md
202
- │ ├── service-transform.md
203
- │ └── templates/
206
+ ├── skills/
207
+ │ ├── grill-me/ # User-invoked grilling entry
208
+ ├── grilling/ # Interview primitive
209
+ └── dev-workflow/ # Agent Harness Workflow Skill
204
210
 
205
211
  ├── src/ # Requirements MCP Server source
206
- │ ├── index.ts # Entry & MCP Server definition
212
+ │ ├── index.ts # Stdio bootstrap
213
+ │ ├── server.ts # MCP Server factory & tool registration (SDK v2)
207
214
  │ ├── adapters/
208
215
  │ │ ├── base.ts # BaseAdapter abstract class
209
216
  │ │ ├── ones.ts # ONES adapter
@@ -211,7 +218,8 @@ ai-dev-workflow/
211
218
  │ ├── config/
212
219
  │ │ └── loader.ts # Config loading & env resolution
213
220
  │ ├── tools/
214
- │ │ ├── get-requirement.ts # get_requirement tool
221
+ │ │ ├── get-work-item.ts # get_work_item tool
222
+ │ │ ├── get-grilling-brief.ts # get_grilling_brief tool
215
223
  │ │ ├── search-requirements.ts # search_requirements tool
216
224
  │ │ └── list-sources.ts # list_sources tool
217
225
  │ ├── types/
@@ -220,13 +228,17 @@ ai-dev-workflow/
220
228
  │ │ └── requirement.ts
221
229
  │ └── utils/
222
230
  │ ├── http.ts
223
- └── map-status.ts
231
+ ├── map-status.ts
232
+ │ └── ones-issue-kind.ts
224
233
 
234
+ ├── packages/ai-dev-requirements/ # Publishable Changesets workspace package
235
+ │ ├── package.json
236
+ │ ├── tsdown.config.ts
237
+ │ └── skills/
225
238
  ├── tests/ # Tests
226
239
  ├── .requirements-mcp.json.example # MCP Server config template
227
- ├── package.json
240
+ ├── package.json # Private workspace orchestrator
228
241
  ├── tsconfig.json
229
- ├── tsdown.config.ts
230
242
  └── vitest.config.ts
231
243
  ```
232
244
 
@@ -237,11 +249,11 @@ ai-dev-workflow/
237
249
  | Technology | Purpose |
238
250
  |------------|---------|
239
251
  | TypeScript | MCP Server language |
240
- | [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) | MCP protocol SDK |
252
+ | [@modelcontextprotocol/server](https://github.com/modelcontextprotocol/typescript-sdk) | MCP protocol SDK v2 |
241
253
  | [Zod](https://zod.dev/) | Schema validation & type inference |
242
254
  | [tsdown](https://github.com/nicepkg/tsdown) | Build tool (ESM + CJS + dts) |
243
255
  | [Vitest](https://vitest.dev/) | Test framework |
244
- | [bumpp](https://github.com/antfu/bumpp) | Version management & publishing |
256
+ | [Changesets v3](https://github.com/changesets/changesets) | Version PRs, changelogs, and npm publishing |
245
257
  | Node.js >= 20 | Runtime |
246
258
 
247
259
  ---
@@ -265,14 +277,6 @@ pnpm test
265
277
  pnpm lint
266
278
  ```
267
279
 
268
- ### Publishing
269
-
270
- This project uses [bumpp](https://github.com/antfu/bumpp) for version management:
271
-
272
- ```bash
273
- # Interactive version bump, auto commit + tag + push
274
- pnpm release
275
- ```
276
280
 
277
281
  ---
278
282
 
package/README.zh-CN.md CHANGED
@@ -10,8 +10,9 @@
10
10
 
11
11
  | 交付物 | 说明 |
12
12
  |-------|------|
13
- | **Requirements MCP Server** (`src/`) | 需求获取 MCP 服务,内置 ONES 适配器,可通过 npm 安装 |
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
16
 
16
17
  ---
17
18
 
@@ -127,6 +128,14 @@ npm install -g ai-dev-requirements
127
128
  }
128
129
  ```
129
130
 
131
+ #### MCP 安全边界
132
+
133
+ - ONES 标题、正文、测试用例和附件元数据统一标记为不可信数据;其中夹带的指令不得触发工具调用。
134
+ - 富文本会转换为有长度上限的纯文本;URL 凭据、query、fragment、远端错误正文和内部 API Base 不会返回给模型。
135
+ - 图片仅允许来自已配置的源,或由已认证 ONES 附件 API 签发的 URL。每次跳转都会重新校验;除已配置源本身外,私网目标会被拒绝。
136
+ - 单次工具调用最多下载 8 张 PNG/JPEG/GIF/WebP 图片,每张上限 8 MiB,超时 10 秒。
137
+ - 写操作保持为独立工具调用,并由工作流要求用户明确确认。
138
+
130
139
  ### 5. 搭配其他 MCP Server(可选)
131
140
 
132
141
  需求不限于 ONES,可搭配官方 MCP Server 获取 GitHub / Jira / Figma 资源:
@@ -194,16 +203,13 @@ skills/dev-workflow/
194
203
 
195
204
  ```
196
205
  ai-dev-workflow/
197
- ├── skills/dev-workflow/ # Agent Harness Workflow Skill(自包含工作流)
198
- │ ├── SKILL.md
199
- └── references/
200
- ├── workflow.md # Agent harness 生命周期
201
- │ ├── task-types.md
202
- │ ├── service-transform.md
203
- │ └── templates/
204
-
206
+ ├── skills/
207
+ │ ├── grill-me/ # 用户入口
208
+ ├── grilling/ # 访谈原语
209
+ └── dev-workflow/ # Agent Harness Workflow Skill
205
210
  ├── src/ # Requirements MCP Server 源码
206
- │ ├── index.ts # 入口 & MCP Server 定义
211
+ │ ├── index.ts # Stdio 启动入口
212
+ │ ├── server.ts # MCP Server 工厂与工具注册(SDK v2)
207
213
  │ ├── adapters/
208
214
  │ │ ├── base.ts # BaseAdapter 抽象类
209
215
  │ │ ├── ones.ts # ONES 适配器
@@ -211,7 +217,8 @@ ai-dev-workflow/
211
217
  │ ├── config/
212
218
  │ │ └── loader.ts # 配置文件加载 & 环境变量解析
213
219
  │ ├── tools/
214
- │ │ ├── get-requirement.ts # get_requirement 工具
220
+ │ │ ├── get-work-item.ts # get_work_item 工具
221
+ │ │ ├── get-grilling-brief.ts # get_grilling_brief 工具
215
222
  │ │ ├── search-requirements.ts # search_requirements 工具
216
223
  │ │ └── list-sources.ts # list_sources 工具
217
224
  │ ├── types/
@@ -220,13 +227,17 @@ ai-dev-workflow/
220
227
  │ │ └── requirement.ts
221
228
  │ └── utils/
222
229
  │ ├── http.ts
223
- └── map-status.ts
230
+ ├── map-status.ts
231
+ │ └── ones-issue-kind.ts
224
232
 
233
+ ├── packages/ai-dev-requirements/ # Changesets 管理的可发布 workspace package
234
+ │ ├── package.json
235
+ │ ├── tsdown.config.ts
236
+ │ └── skills/
225
237
  ├── tests/ # 测试
226
238
  ├── .requirements-mcp.json.example # MCP Server 配置模板
227
- ├── package.json
239
+ ├── package.json # 私有 workspace 编排
228
240
  ├── tsconfig.json
229
- ├── tsdown.config.ts
230
241
  └── vitest.config.ts
231
242
  ```
232
243
 
@@ -237,11 +248,11 @@ ai-dev-workflow/
237
248
  | 技术 | 用途 |
238
249
  |-----|------|
239
250
  | TypeScript | MCP Server 开发语言 |
240
- | [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) | MCP 协议 SDK |
251
+ | [@modelcontextprotocol/server](https://github.com/modelcontextprotocol/typescript-sdk) | MCP 协议 SDK v2 |
241
252
  | [Zod](https://zod.dev/) | 参数校验与类型推导 |
242
253
  | [tsdown](https://github.com/nicepkg/tsdown) | 构建工具(ESM + CJS + dts) |
243
254
  | [Vitest](https://vitest.dev/) | 测试框架 |
244
- | [bumpp](https://github.com/antfu/bumpp) | 版本管理与发布 |
255
+ | [Changesets v3](https://github.com/changesets/changesets) | Version PR、变更日志与 npm 发布 |
245
256
  | Node.js >= 20 | 运行时 |
246
257
 
247
258
  ---
@@ -265,14 +276,6 @@ pnpm test
265
276
  pnpm lint
266
277
  ```
267
278
 
268
- ### 发版流程
269
-
270
- 本项目使用 [bumpp](https://github.com/antfu/bumpp) 管理版本:
271
-
272
- ```bash
273
- # 交互式选择版本号,自动 commit + tag + push
274
- pnpm release
275
- ```
276
279
 
277
280
  ---
278
281