dsh-gate-agent 0.1.2 → 0.1.4
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 +350 -315
- package/lib/index.js +478 -229
- package/locale/en.json +6 -6
- package/locale/zh.json +6 -6
- package/package.json +2 -2
- package/skills/gate-plan-review/SKILL.md +1 -2
- package/skills/gate-planning/SKILL.md +0 -2
- package/skills/gate-planning/rfc.md +0 -2
- package/skills/gate-research/SKILL.md +0 -3
- package/skills/gate-domain-modeling/CONTEXT-FORMAT.md +0 -64
- package/skills/gate-domain-modeling/GLOSSARY-FORMAT.md +0 -64
- package/skills/gate-domain-modeling/SKILL.md +0 -47
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta": {
|
|
3
|
-
"title": "Gate",
|
|
4
|
-
"description": "Phase gate and
|
|
5
|
-
}
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Gate Agent",
|
|
4
|
+
"description": "Phase/node gate for discuss, planning, implementation, review, verification, and Note lifecycle, with gate commands, tools, and skills."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/zh.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta": {
|
|
3
|
-
"title": "Gate
|
|
4
|
-
"description": "
|
|
5
|
-
}
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Gate Agent",
|
|
4
|
+
"description": "用 phase/node 门禁编排讨论、规划、实施、评审、验收与 Note 生命周期,并提供 gate 命令、工具和专项技能。"
|
|
5
|
+
}
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gate-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Phase/node workflow gate with built-in commands, tools, and skills.",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./lib/index.js",
|
|
8
8
|
"./locale/*.json": "./locale/*.json",
|
|
@@ -56,11 +56,10 @@ user-invocable: false
|
|
|
56
56
|
- 产品范围、行为与验收问题报告给工作项;
|
|
57
57
|
- 本次规划的技术设计问题报告给 Agent Note;引用输入的问题按项目配置反馈其属主;
|
|
58
58
|
- 状态、评审与批准证据报告给工作项;
|
|
59
|
-
- 领域术语问题报告给 技能`gate-domain-modeling` 的属主,技术决定报告给相关 Agent Note。
|
|
60
59
|
|
|
61
60
|
由 planning worker 决定并执行修正;本 worker 不更新工作项、Note 或就绪状态。
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
纯行为规则归产品合同;普通实现细节不因“重要”就自动生成 Note。
|
|
64
63
|
|
|
65
64
|
设计仍依赖临时产品假设时保持非权威。修订产品合同后,检查所有承接同一产品合同的设计,不只修改最先暴露问题的那一份。
|
|
66
65
|
|
|
@@ -64,8 +64,6 @@ user-invocable: false
|
|
|
64
64
|
|
|
65
65
|
设计定稿遵循 技术设计规则([rfc.md](./rfc.md) ) 的合同稳定性与评审条件。Note 的 proposed/implemented 表示交付生命周期,不代替评审和批准证据。
|
|
66
66
|
|
|
67
|
-
使用项目既有领域语言和适用架构约束。领域术语与模型变化使用 `gate-domain-modeling`;需要为架构决定单独建档时,使用 `adr` 的准入条件判断,在相关 Agent Note 中记录决定。
|
|
68
|
-
|
|
69
67
|
### 决定权限
|
|
70
68
|
|
|
71
69
|
在已同意的产品合同、既有架构和项目约束内,自主解决普通技术选择。
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# CONTEXT.md Format
|
|
2
|
-
|
|
3
|
-
## Structure
|
|
4
|
-
|
|
5
|
-
```md
|
|
6
|
-
# {Context Name}
|
|
7
|
-
|
|
8
|
-
{One or two sentence description of what this context is and why it exists.}
|
|
9
|
-
|
|
10
|
-
## Language
|
|
11
|
-
|
|
12
|
-
**Order**:
|
|
13
|
-
{A one or two sentence description of the term}
|
|
14
|
-
_Avoid_: Purchase, transaction
|
|
15
|
-
|
|
16
|
-
**Invoice**:
|
|
17
|
-
A request for payment sent to a customer after delivery.
|
|
18
|
-
_Avoid_: Bill, payment request
|
|
19
|
-
|
|
20
|
-
**Customer**:
|
|
21
|
-
A person or organization that places orders.
|
|
22
|
-
_Avoid_: Client, buyer, account
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Rules
|
|
26
|
-
|
|
27
|
-
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
|
|
28
|
-
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
|
|
29
|
-
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
|
|
30
|
-
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
31
|
-
|
|
32
|
-
## Single vs multi-context repos
|
|
33
|
-
|
|
34
|
-
**Single context (most repos):** One `CONTEXT.md` at the repo root.
|
|
35
|
-
|
|
36
|
-
**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
37
|
-
|
|
38
|
-
```md
|
|
39
|
-
# Context Map
|
|
40
|
-
|
|
41
|
-
## Contexts
|
|
42
|
-
|
|
43
|
-
- [Ordering](./src/ordering/CONTEXT.md): receives and tracks customer orders
|
|
44
|
-
- [Billing](./src/billing/CONTEXT.md): generates invoices and processes payments
|
|
45
|
-
- [Fulfillment](./src/fulfillment/CONTEXT.md): manages warehouse picking and shipping
|
|
46
|
-
|
|
47
|
-
## Relationships
|
|
48
|
-
|
|
49
|
-
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
50
|
-
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
51
|
-
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
The skill infers which structure applies:
|
|
55
|
-
|
|
56
|
-
Resolve the root from project instructions before these checks; the current working directory may be a subproject. Use the project documentation hierarchy for ownership; the context map does not create separate record categories. Paths shown in the map are Markdown links relative to the map file.
|
|
57
|
-
|
|
58
|
-
- If `CONTEXT-MAP.md` exists, read it to find contexts
|
|
59
|
-
- If only a root `CONTEXT.md` exists, single context
|
|
60
|
-
- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
|
|
61
|
-
|
|
62
|
-
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|
|
63
|
-
|
|
64
|
-
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# GLOSSARY.md Format
|
|
2
|
-
|
|
3
|
-
## Structure
|
|
4
|
-
|
|
5
|
-
```md
|
|
6
|
-
# {Context Name}
|
|
7
|
-
|
|
8
|
-
{One or two sentence description of what this context is and why it exists.}
|
|
9
|
-
|
|
10
|
-
## Language
|
|
11
|
-
|
|
12
|
-
**Order**:
|
|
13
|
-
{A one or two sentence description of the term}
|
|
14
|
-
_Avoid_: Purchase, transaction
|
|
15
|
-
|
|
16
|
-
**Invoice**:
|
|
17
|
-
A request for payment sent to a customer after delivery.
|
|
18
|
-
_Avoid_: Bill, payment request
|
|
19
|
-
|
|
20
|
-
**Customer**:
|
|
21
|
-
A person or organization that places orders.
|
|
22
|
-
_Avoid_: Client, buyer, account
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Rules
|
|
26
|
-
|
|
27
|
-
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
|
|
28
|
-
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
|
|
29
|
-
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
|
|
30
|
-
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
31
|
-
|
|
32
|
-
## Single vs multi-context repos
|
|
33
|
-
|
|
34
|
-
**Single context (most repos):** One `GLOSSARY.md` at the repo root.
|
|
35
|
-
|
|
36
|
-
**Multiple contexts:** A `GLOSSARY-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
37
|
-
|
|
38
|
-
```md
|
|
39
|
-
# Glossary Map
|
|
40
|
-
|
|
41
|
-
## Contexts
|
|
42
|
-
|
|
43
|
-
- [Ordering](./src/ordering/GLOSSARY.md): receives and tracks customer orders
|
|
44
|
-
- [Billing](./src/billing/GLOSSARY.md): generates invoices and processes payments
|
|
45
|
-
- [Fulfillment](./src/fulfillment/GLOSSARY.md): manages warehouse picking and shipping
|
|
46
|
-
|
|
47
|
-
## Relationships
|
|
48
|
-
|
|
49
|
-
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
50
|
-
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
51
|
-
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
The skill infers which structure applies:
|
|
55
|
-
|
|
56
|
-
Resolve the root from project instructions before these checks; the current working directory may be a subproject. Use the project documentation hierarchy for ownership; the context map does not create separate record categories. Paths shown in the map are Markdown links relative to the map file.
|
|
57
|
-
|
|
58
|
-
- If `GLOSSARY-MAP.md` exists, read it to find contexts
|
|
59
|
-
- If only a root `GLOSSARY.md` exists, single context
|
|
60
|
-
- If neither exists, create a root `GLOSSARY.md` lazily when the first term is resolved
|
|
61
|
-
|
|
62
|
-
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|
|
63
|
-
|
|
64
|
-
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gate-domain-modeling
|
|
3
|
-
description: Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording a durable decision in its selected owner.
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Domain Modeling
|
|
8
|
-
|
|
9
|
-
Actively build and sharpen the project's domain model as you design. This is the *active* discipline: challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely *reading* `GLOSSARY.md` for vocabulary is not this skill: that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
|
|
10
|
-
|
|
11
|
-
## File structure
|
|
12
|
-
|
|
13
|
-
Follow the document ownership entry referenced by project instructions for glossary paths and decisions applicable to the model being discussed. If a required input's owner or scope is unclear, report the configuration gap.
|
|
14
|
-
|
|
15
|
-
Resolve the repository management root from project instructions, using the Git top-level only as a fallback. Working inside a subproject does not change it. A root `GLOSSARY-MAP.md` selects domain documents when the repository has multiple contexts. Do not create a separate record system per context or derive record categories automatically from contexts.
|
|
16
|
-
|
|
17
|
-
A single-context project may use a root `GLOSSARY.md`. A root `GLOSSARY-MAP.md`, when present, points to the selected contexts' glossaries; context paths need not be under `src/`. Resolve decision paths separately from the document ownership entry and, for Agent Notes, its configured record roots. Create a glossary or decision record only when there is content for its selected owner. Use the `adr` skill when a separate architecture decision record is warranted.
|
|
18
|
-
|
|
19
|
-
## During the session
|
|
20
|
-
|
|
21
|
-
### Challenge against the glossary
|
|
22
|
-
|
|
23
|
-
When the user uses a term that conflicts with the existing language in `GLOSSARY.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y. Which is it?"
|
|
24
|
-
|
|
25
|
-
### Sharpen fuzzy language
|
|
26
|
-
|
|
27
|
-
When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account': do you mean the Customer or the User? Those are different things."
|
|
28
|
-
|
|
29
|
-
### Discuss concrete scenarios
|
|
30
|
-
|
|
31
|
-
When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
|
|
32
|
-
|
|
33
|
-
### Cross-reference with code
|
|
34
|
-
|
|
35
|
-
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible. Which is right?"
|
|
36
|
-
|
|
37
|
-
### Update GLOSSARY.md inline
|
|
38
|
-
|
|
39
|
-
When a term is resolved, update `GLOSSARY.md` right there. Don't batch these up: capture them as they happen. Use the format in [GLOSSARY-FORMAT.md](./GLOSSARY-FORMAT.md).
|
|
40
|
-
|
|
41
|
-
`GLOSSARY.md` should be totally devoid of implementation details. Do not treat `GLOSSARY.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|