dsh-env-manager-plugin 0.1.0 → 0.1.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/LICENSE +21 -21
- package/README.md +273 -250
- package/client.js +2581 -2581
- package/cordis.patch.yml +4 -4
- package/docs/00-project/current-state.md +32 -6
- package/docs/00-project/glossary.md +215 -215
- package/docs/00-project/project-brief.md +114 -114
- package/docs/00-project/roadmap.md +89 -89
- package/docs/01-architecture/DSH_Environment_Service_Memory_Skill_Brainstorm.md +493 -493
- package/docs/01-architecture/api-verification.md +416 -416
- package/docs/01-architecture/architecture-overview.md +222 -222
- package/docs/01-architecture/data-model.md +930 -930
- package/docs/01-architecture/decisions/ADR-0001-plugin-as-bundle.md +29 -29
- package/docs/01-architecture/decisions/ADR-0002-file-based-storage.md +25 -25
- package/docs/01-architecture/decisions/ADR-0003-skill-router-over-search.md +25 -25
- package/docs/01-architecture/decisions/ADR-0004-typescript-host-js-client.md +31 -31
- package/docs/01-architecture/decisions/ADR-0005-layered-rule-resolution.md +36 -36
- package/docs/01-architecture/decisions/ADR-0006-credentials-as-references.md +30 -30
- package/docs/01-architecture/decisions/ADR-0007-session-scoped-default-environment.md +28 -28
- package/docs/01-architecture/decisions/ADR-0008-memory-bridge-not-second-store.md +31 -31
- package/docs/01-architecture/decisions/ADR-0009-client-host-http-transport.md +87 -87
- package/docs/01-architecture/decisions/ADR-0010-environment-plane-model.md +87 -87
- package/docs/01-architecture/decisions/ADR-0011-k8s-node-execution-model.md +92 -92
- package/docs/01-architecture/design.md +666 -666
- package/docs/01-architecture/detailed-design.md +961 -961
- package/docs/01-architecture/implementation-plan.md +323 -323
- package/docs/01-architecture/module-boundaries.md +306 -306
- package/docs/01-architecture/security-model.md +227 -227
- package/docs/01-architecture/storage-contract.md +224 -224
- package/docs/01-architecture/tool-contract.md +438 -438
- package/docs/01-architecture/ui-design.md +587 -587
- package/docs/02-harness/agent-behavior.md +36 -36
- package/docs/02-harness/change-snapshot-policy.md +29 -29
- package/docs/02-harness/client-ui-integration.md +110 -110
- package/docs/02-harness/context-policy.md +43 -43
- package/docs/02-harness/harness-standard.md +91 -91
- package/docs/02-harness/task-execution-policy.md +26 -26
- package/docs/02-harness/verification-policy.md +97 -97
- package/docs/03-openspec/archive-rule.md +25 -25
- package/docs/03-openspec/bugfix-rule.md +30 -30
- package/docs/03-openspec/design-rule.md +33 -33
- package/docs/03-openspec/openspec-usage-guide.md +31 -31
- package/docs/03-openspec/proposal-rule.md +70 -70
- package/docs/03-openspec/spec-rule.md +33 -33
- package/docs/03-openspec/tasks-rule.md +31 -31
- package/docs/04-development/coding-style.md +67 -67
- package/docs/04-development/dependency-policy.md +43 -43
- package/docs/04-development/development-guide.md +85 -85
- package/docs/04-development/directory-convention.md +105 -105
- package/docs/04-development/local-run-guide.md +61 -55
- package/docs/04-development/testing-guide.md +102 -102
- package/docs/05-domain/deployment-template.md +76 -76
- package/docs/05-domain/environment-template.md +165 -165
- package/docs/05-domain/operation-binding-template.md +55 -55
- package/docs/05-domain/operation-record-template.md +55 -55
- package/docs/05-domain/prompt-template.md +90 -90
- package/docs/05-domain/rule-template.md +73 -73
- package/docs/05-domain/service-template.md +39 -39
- package/docs/06-operations/deployment-guide.md +54 -54
- package/docs/06-operations/release.md +198 -188
- package/docs/06-operations/security-policy.md +53 -53
- package/docs/06-operations/troubleshooting.md +141 -91
- package/docs/07-templates/adr-template.md +21 -21
- package/docs/07-templates/bugfix-template.md +11 -11
- package/docs/07-templates/case-template.md +15 -15
- package/docs/07-templates/design-template.md +29 -29
- package/docs/07-templates/proposal-template.md +19 -19
- package/docs/07-templates/spec-template.md +15 -15
- package/docs/07-templates/tasks-template.md +12 -12
- package/docs/99-archive/README.md +13 -13
- package/docs/README.md +142 -142
- package/icon.svg +4 -4
- package/index.js +31 -8
- package/lib/skill.js +37 -37
- package/locale/en.json +6 -6
- package/locale/zh.json +6 -6
- package/package.json +101 -99
- package/scripts/repair-profile.mjs +141 -0
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
# Agent Behavior
|
|
2
|
-
|
|
3
|
-
## Required Behavior
|
|
4
|
-
|
|
5
|
-
Agents working on this project must:
|
|
6
|
-
|
|
7
|
-
- preserve the file-system-first architecture
|
|
8
|
-
- keep changes small and reviewable
|
|
9
|
-
- write tests for core logic
|
|
10
|
-
- update current-state.md after completion
|
|
11
|
-
- avoid introducing infrastructure not requested by the user
|
|
12
|
-
- keep tool functions thin
|
|
13
|
-
- keep business logic in resolver/router modules
|
|
14
|
-
- treat skill references as discovery, not execution authorization
|
|
15
|
-
|
|
16
|
-
## Forbidden Behavior
|
|
17
|
-
|
|
18
|
-
Agents must not:
|
|
19
|
-
|
|
20
|
-
- introduce plain-text credentials into registry files
|
|
21
|
-
- execute arbitrary JavaScript or shell in rule templates
|
|
22
|
-
- auto-apply rule or skill changes without review
|
|
23
|
-
- write hidden durable state outside documented directories
|
|
24
|
-
- silently discard resolver/router failures
|
|
25
|
-
- treat skill reference resolution as execution approval
|
|
26
|
-
- perform unrelated refactoring
|
|
27
|
-
- change storage contracts without documentation
|
|
28
|
-
|
|
29
|
-
## When Unclear
|
|
30
|
-
|
|
31
|
-
If the task is unclear:
|
|
32
|
-
|
|
33
|
-
1. inspect relevant docs
|
|
34
|
-
2. inspect source files
|
|
35
|
-
3. propose a small plan
|
|
36
|
-
4. avoid broad implementation
|
|
1
|
+
# Agent Behavior
|
|
2
|
+
|
|
3
|
+
## Required Behavior
|
|
4
|
+
|
|
5
|
+
Agents working on this project must:
|
|
6
|
+
|
|
7
|
+
- preserve the file-system-first architecture
|
|
8
|
+
- keep changes small and reviewable
|
|
9
|
+
- write tests for core logic
|
|
10
|
+
- update current-state.md after completion
|
|
11
|
+
- avoid introducing infrastructure not requested by the user
|
|
12
|
+
- keep tool functions thin
|
|
13
|
+
- keep business logic in resolver/router modules
|
|
14
|
+
- treat skill references as discovery, not execution authorization
|
|
15
|
+
|
|
16
|
+
## Forbidden Behavior
|
|
17
|
+
|
|
18
|
+
Agents must not:
|
|
19
|
+
|
|
20
|
+
- introduce plain-text credentials into registry files
|
|
21
|
+
- execute arbitrary JavaScript or shell in rule templates
|
|
22
|
+
- auto-apply rule or skill changes without review
|
|
23
|
+
- write hidden durable state outside documented directories
|
|
24
|
+
- silently discard resolver/router failures
|
|
25
|
+
- treat skill reference resolution as execution approval
|
|
26
|
+
- perform unrelated refactoring
|
|
27
|
+
- change storage contracts without documentation
|
|
28
|
+
|
|
29
|
+
## When Unclear
|
|
30
|
+
|
|
31
|
+
If the task is unclear:
|
|
32
|
+
|
|
33
|
+
1. inspect relevant docs
|
|
34
|
+
2. inspect source files
|
|
35
|
+
3. propose a small plan
|
|
36
|
+
4. avoid broad implementation
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# Change Snapshot Policy
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Preserve project continuity by documenting what changed and why after each meaningful change.
|
|
6
|
-
|
|
7
|
-
## When to Update
|
|
8
|
-
|
|
9
|
-
Update `docs/00-project/current-state.md` when:
|
|
10
|
-
|
|
11
|
-
- a new feature is implemented
|
|
12
|
-
- a bug is fixed
|
|
13
|
-
- a storage contract changes
|
|
14
|
-
- a module boundary changes
|
|
15
|
-
- a known gap is closed
|
|
16
|
-
|
|
17
|
-
## What to Record
|
|
18
|
-
|
|
19
|
-
- What changed (high-level)
|
|
20
|
-
- Which files were added/removed/modified
|
|
21
|
-
- Any new constraints or dependencies
|
|
22
|
-
- Remaining known gaps
|
|
23
|
-
- Recommended next work
|
|
24
|
-
|
|
25
|
-
## What Not to Record
|
|
26
|
-
|
|
27
|
-
- Every single commit detail (git history covers that)
|
|
28
|
-
- Temporary workarounds without context
|
|
29
|
-
- Opinion or speculation
|
|
1
|
+
# Change Snapshot Policy
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Preserve project continuity by documenting what changed and why after each meaningful change.
|
|
6
|
+
|
|
7
|
+
## When to Update
|
|
8
|
+
|
|
9
|
+
Update `docs/00-project/current-state.md` when:
|
|
10
|
+
|
|
11
|
+
- a new feature is implemented
|
|
12
|
+
- a bug is fixed
|
|
13
|
+
- a storage contract changes
|
|
14
|
+
- a module boundary changes
|
|
15
|
+
- a known gap is closed
|
|
16
|
+
|
|
17
|
+
## What to Record
|
|
18
|
+
|
|
19
|
+
- What changed (high-level)
|
|
20
|
+
- Which files were added/removed/modified
|
|
21
|
+
- Any new constraints or dependencies
|
|
22
|
+
- Remaining known gaps
|
|
23
|
+
- Recommended next work
|
|
24
|
+
|
|
25
|
+
## What Not to Record
|
|
26
|
+
|
|
27
|
+
- Every single commit detail (git history covers that)
|
|
28
|
+
- Temporary workarounds without context
|
|
29
|
+
- Opinion or speculation
|
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
# Client UI Integration
|
|
2
|
-
|
|
3
|
-
This note records the **host-side contract** a DSH bundle must follow when it adds a
|
|
4
|
-
sidebar entry and a main panel. It is derived from the installed
|
|
5
|
-
`@deepseek-ai/dsh-client-ui-sidebar` implementation (not from a mock), and from the
|
|
6
|
-
working `dsh-image-router` bundle.
|
|
7
|
-
|
|
8
|
-
Runtime source of truth:
|
|
9
|
-
|
|
10
|
-
- `@deepseek-ai/dsh-client-ui-sidebar/lib/client.js`, function `PanelRow`.
|
|
11
|
-
- The live slot catalog: `cordis_inspect_query` → `Slots.listSubTree` with root
|
|
12
|
-
`sidebar.panellist`, and root `main`.
|
|
13
|
-
- Skill reference: `cordis-plugin-development/references/ui-plugin.md` and
|
|
14
|
-
`references/practices.md` (plugin UI is part of the Harness UI).
|
|
15
|
-
|
|
16
|
-
## Sidebar entry
|
|
17
|
-
|
|
18
|
-
The sidebar owns the row. A plugin contributes only the row's **icon** and **label**;
|
|
19
|
-
it must not draw a button, row background, tooltip, margin, or hit area.
|
|
20
|
-
|
|
21
|
-
### Registration
|
|
22
|
-
|
|
23
|
-
```js
|
|
24
|
-
ctx.slots.inject('sidebar.panellist', () =>
|
|
25
|
-
ctx.slots.register(
|
|
26
|
-
{
|
|
27
|
-
name: 'sidebar.panellist',
|
|
28
|
-
id: 'dsh-env-manager', // row key; also the main panel key
|
|
29
|
-
order: 40,
|
|
30
|
-
label: () => t('title'), // thunk, re-read on locale projection
|
|
31
|
-
},
|
|
32
|
-
SidebarGlyph,
|
|
33
|
-
),
|
|
34
|
-
)
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Rules:
|
|
38
|
-
|
|
39
|
-
1. `sidebar.panellist` is a **list** slot. Its registration fields are `id` (required),
|
|
40
|
-
`order`, and `label`. `id` must be unique; reusing a shipped id replaces that row.
|
|
41
|
-
2. `name` is the common slots registration field. Include it; the live sidebar
|
|
42
|
-
registers only entries that carry their slot name.
|
|
43
|
-
3. `label` is the row text and tooltip. Use a thunk when the text is localized so the
|
|
44
|
-
owner can re-read it without re-registering.
|
|
45
|
-
4. The second argument is the glyph component. The owner renders it inside
|
|
46
|
-
`span.panelGlyph` and passes exactly `{ size, active }`.
|
|
47
|
-
|
|
48
|
-
### Glyph contract
|
|
49
|
-
|
|
50
|
-
The owner passes:
|
|
51
|
-
|
|
52
|
-
- `size`: `16` when the sidebar is wide (`wide ? 16 : 18`);
|
|
53
|
-
- `active`: whether this row is the selected panel.
|
|
54
|
-
|
|
55
|
-
The glyph must:
|
|
56
|
-
|
|
57
|
-
- render an inline `<svg>` with `viewBox="0 0 20 20"`,
|
|
58
|
-
`width={size}`, `height={size}`;
|
|
59
|
-
- default defensively to `20` if `size` is missing or invalid;
|
|
60
|
-
- use `fill="none"` and `stroke="currentColor"` (shipped icons are monochrome line
|
|
61
|
-
icons; they inherit light/dark theme colors);
|
|
62
|
-
- use `opacity: 0.72` when `active === false`;
|
|
63
|
-
- set `aria-hidden="true"` and omit `aria-label`/tooltip — the row button owns the
|
|
64
|
-
accessible name from `label`;
|
|
65
|
-
- avoid fixed pixel width/height, background, border, border-radius, margin, or padding.
|
|
66
|
-
|
|
67
|
-
A filled colored square at `48×48` is the common failure mode: it overflows the
|
|
68
|
-
`panelGlyph` box, ignores the `size` prop, and looks like a different navigation
|
|
69
|
-
control from the shipped rows.
|
|
70
|
-
|
|
71
|
-
## Main panel
|
|
72
|
-
|
|
73
|
-
```js
|
|
74
|
-
ctx.slots.inject('main', () =>
|
|
75
|
-
ctx.slots.register(
|
|
76
|
-
{ name: 'main', key: 'dsh-env-manager', inject: () => ({}) },
|
|
77
|
-
Panel,
|
|
78
|
-
),
|
|
79
|
-
)
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
- `main` is a **keyed** root slot. `key` must equal the sidebar `id`.
|
|
83
|
-
- A sidebar id without a matching `main` key opens an empty page; a `main` key without
|
|
84
|
-
the sidebar id is unreachable.
|
|
85
|
-
- The panel owns its own layout, header, and content. It fills the same region as
|
|
86
|
-
`conversation`.
|
|
87
|
-
|
|
88
|
-
## Styling and localization
|
|
89
|
-
|
|
90
|
-
- Use theme tokens (`--dsw-alias-*`) and `currentColor`; do not hard-code brand colors
|
|
91
|
-
in the sidebar glyph.
|
|
92
|
-
- The host row supplies `.panelRow`, `.panelActive`, hover, focus, tooltip, and
|
|
93
|
-
`aria-current`.
|
|
94
|
-
- Register the locale namespace best-effort, and make the sidebar `label` read the
|
|
95
|
-
active locale. Do not re-register the row to change language.
|
|
96
|
-
|
|
97
|
-
## Verification
|
|
98
|
-
|
|
99
|
-
After installing or changing the plugin:
|
|
100
|
-
|
|
101
|
-
1. `Slots.listSubTree('sidebar.panellist')` must list the id with `active: true` and the
|
|
102
|
-
expected order.
|
|
103
|
-
2. `Slots.listSubTree('main')` must list the same key as an occupant.
|
|
104
|
-
3. Toggle the sidebar between wide and collapsed; the glyph must render at `16` and
|
|
105
|
-
`18` pixels respectively, with no clipping or colored background.
|
|
106
|
-
4. Switch `en`/`zh`; the row label must change without a reload or duplicate row.
|
|
107
|
-
5. Select the row and confirm the panel replaces the conversation region.
|
|
108
|
-
|
|
109
|
-
Client changes are picked up by HMR while the Web client watcher is running; a newly
|
|
110
|
-
installed bundle may need one page refresh before its module is present.
|
|
1
|
+
# Client UI Integration
|
|
2
|
+
|
|
3
|
+
This note records the **host-side contract** a DSH bundle must follow when it adds a
|
|
4
|
+
sidebar entry and a main panel. It is derived from the installed
|
|
5
|
+
`@deepseek-ai/dsh-client-ui-sidebar` implementation (not from a mock), and from the
|
|
6
|
+
working `dsh-image-router` bundle.
|
|
7
|
+
|
|
8
|
+
Runtime source of truth:
|
|
9
|
+
|
|
10
|
+
- `@deepseek-ai/dsh-client-ui-sidebar/lib/client.js`, function `PanelRow`.
|
|
11
|
+
- The live slot catalog: `cordis_inspect_query` → `Slots.listSubTree` with root
|
|
12
|
+
`sidebar.panellist`, and root `main`.
|
|
13
|
+
- Skill reference: `cordis-plugin-development/references/ui-plugin.md` and
|
|
14
|
+
`references/practices.md` (plugin UI is part of the Harness UI).
|
|
15
|
+
|
|
16
|
+
## Sidebar entry
|
|
17
|
+
|
|
18
|
+
The sidebar owns the row. A plugin contributes only the row's **icon** and **label**;
|
|
19
|
+
it must not draw a button, row background, tooltip, margin, or hit area.
|
|
20
|
+
|
|
21
|
+
### Registration
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
ctx.slots.inject('sidebar.panellist', () =>
|
|
25
|
+
ctx.slots.register(
|
|
26
|
+
{
|
|
27
|
+
name: 'sidebar.panellist',
|
|
28
|
+
id: 'dsh-env-manager', // row key; also the main panel key
|
|
29
|
+
order: 40,
|
|
30
|
+
label: () => t('title'), // thunk, re-read on locale projection
|
|
31
|
+
},
|
|
32
|
+
SidebarGlyph,
|
|
33
|
+
),
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Rules:
|
|
38
|
+
|
|
39
|
+
1. `sidebar.panellist` is a **list** slot. Its registration fields are `id` (required),
|
|
40
|
+
`order`, and `label`. `id` must be unique; reusing a shipped id replaces that row.
|
|
41
|
+
2. `name` is the common slots registration field. Include it; the live sidebar
|
|
42
|
+
registers only entries that carry their slot name.
|
|
43
|
+
3. `label` is the row text and tooltip. Use a thunk when the text is localized so the
|
|
44
|
+
owner can re-read it without re-registering.
|
|
45
|
+
4. The second argument is the glyph component. The owner renders it inside
|
|
46
|
+
`span.panelGlyph` and passes exactly `{ size, active }`.
|
|
47
|
+
|
|
48
|
+
### Glyph contract
|
|
49
|
+
|
|
50
|
+
The owner passes:
|
|
51
|
+
|
|
52
|
+
- `size`: `16` when the sidebar is wide (`wide ? 16 : 18`);
|
|
53
|
+
- `active`: whether this row is the selected panel.
|
|
54
|
+
|
|
55
|
+
The glyph must:
|
|
56
|
+
|
|
57
|
+
- render an inline `<svg>` with `viewBox="0 0 20 20"`,
|
|
58
|
+
`width={size}`, `height={size}`;
|
|
59
|
+
- default defensively to `20` if `size` is missing or invalid;
|
|
60
|
+
- use `fill="none"` and `stroke="currentColor"` (shipped icons are monochrome line
|
|
61
|
+
icons; they inherit light/dark theme colors);
|
|
62
|
+
- use `opacity: 0.72` when `active === false`;
|
|
63
|
+
- set `aria-hidden="true"` and omit `aria-label`/tooltip — the row button owns the
|
|
64
|
+
accessible name from `label`;
|
|
65
|
+
- avoid fixed pixel width/height, background, border, border-radius, margin, or padding.
|
|
66
|
+
|
|
67
|
+
A filled colored square at `48×48` is the common failure mode: it overflows the
|
|
68
|
+
`panelGlyph` box, ignores the `size` prop, and looks like a different navigation
|
|
69
|
+
control from the shipped rows.
|
|
70
|
+
|
|
71
|
+
## Main panel
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
ctx.slots.inject('main', () =>
|
|
75
|
+
ctx.slots.register(
|
|
76
|
+
{ name: 'main', key: 'dsh-env-manager', inject: () => ({}) },
|
|
77
|
+
Panel,
|
|
78
|
+
),
|
|
79
|
+
)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
- `main` is a **keyed** root slot. `key` must equal the sidebar `id`.
|
|
83
|
+
- A sidebar id without a matching `main` key opens an empty page; a `main` key without
|
|
84
|
+
the sidebar id is unreachable.
|
|
85
|
+
- The panel owns its own layout, header, and content. It fills the same region as
|
|
86
|
+
`conversation`.
|
|
87
|
+
|
|
88
|
+
## Styling and localization
|
|
89
|
+
|
|
90
|
+
- Use theme tokens (`--dsw-alias-*`) and `currentColor`; do not hard-code brand colors
|
|
91
|
+
in the sidebar glyph.
|
|
92
|
+
- The host row supplies `.panelRow`, `.panelActive`, hover, focus, tooltip, and
|
|
93
|
+
`aria-current`.
|
|
94
|
+
- Register the locale namespace best-effort, and make the sidebar `label` read the
|
|
95
|
+
active locale. Do not re-register the row to change language.
|
|
96
|
+
|
|
97
|
+
## Verification
|
|
98
|
+
|
|
99
|
+
After installing or changing the plugin:
|
|
100
|
+
|
|
101
|
+
1. `Slots.listSubTree('sidebar.panellist')` must list the id with `active: true` and the
|
|
102
|
+
expected order.
|
|
103
|
+
2. `Slots.listSubTree('main')` must list the same key as an occupant.
|
|
104
|
+
3. Toggle the sidebar between wide and collapsed; the glyph must render at `16` and
|
|
105
|
+
`18` pixels respectively, with no clipping or colored background.
|
|
106
|
+
4. Switch `en`/`zh`; the row label must change without a reload or duplicate row.
|
|
107
|
+
5. Select the row and confirm the panel replaces the conversation region.
|
|
108
|
+
|
|
109
|
+
Client changes are picked up by HMR while the Web client watcher is running; a newly
|
|
110
|
+
installed bundle may need one page refresh before its module is present.
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
# Context Policy
|
|
2
|
-
|
|
3
|
-
## What to Load Automatically
|
|
4
|
-
|
|
5
|
-
For any non-trivial change, load:
|
|
6
|
-
|
|
7
|
-
- `docs/00-project/project-brief.md`
|
|
8
|
-
- `docs/00-project/current-state.md`
|
|
9
|
-
- `docs/01-architecture/design.md`
|
|
10
|
-
- `docs/01-architecture/detailed-design.md`
|
|
11
|
-
- `docs/01-architecture/module-boundaries.md`
|
|
12
|
-
- `docs/02-harness/harness-standard.md`
|
|
13
|
-
|
|
14
|
-
## What to Load by Task Type
|
|
15
|
-
|
|
16
|
-
### Adding or changing a tool
|
|
17
|
-
|
|
18
|
-
- `docs/01-architecture/tool-contract.md`
|
|
19
|
-
- `docs/01-architecture/detailed-design.md` §11
|
|
20
|
-
- `docs/04-development/coding-style.md`
|
|
21
|
-
- `docs/05-domain/operation-binding-template.md` (if routing related)
|
|
22
|
-
|
|
23
|
-
### Changing rule resolution
|
|
24
|
-
|
|
25
|
-
- `docs/01-architecture/design.md` §6
|
|
26
|
-
- `docs/01-architecture/module-boundaries.md`
|
|
27
|
-
- `docs/05-domain/rule-template.md`
|
|
28
|
-
|
|
29
|
-
### Changing the HTTP transport or the UI
|
|
30
|
-
|
|
31
|
-
- `docs/01-architecture/ui-design.md`
|
|
32
|
-
- `docs/01-architecture/decisions/ADR-0009-client-host-http-transport.md`
|
|
33
|
-
- `docs/01-architecture/security-model.md` §2, §4, §6
|
|
34
|
-
- `docs/04-development/coding-style.md`
|
|
35
|
-
|
|
36
|
-
### Checking a DSH runtime assumption
|
|
37
|
-
|
|
38
|
-
- `docs/01-architecture/api-verification.md`
|
|
39
|
-
|
|
40
|
-
### Deployment changes
|
|
41
|
-
|
|
42
|
-
- `docs/06-operations/deployment-guide.md`
|
|
43
|
-
- `docs/06-operations/security-policy.md`
|
|
1
|
+
# Context Policy
|
|
2
|
+
|
|
3
|
+
## What to Load Automatically
|
|
4
|
+
|
|
5
|
+
For any non-trivial change, load:
|
|
6
|
+
|
|
7
|
+
- `docs/00-project/project-brief.md`
|
|
8
|
+
- `docs/00-project/current-state.md`
|
|
9
|
+
- `docs/01-architecture/design.md`
|
|
10
|
+
- `docs/01-architecture/detailed-design.md`
|
|
11
|
+
- `docs/01-architecture/module-boundaries.md`
|
|
12
|
+
- `docs/02-harness/harness-standard.md`
|
|
13
|
+
|
|
14
|
+
## What to Load by Task Type
|
|
15
|
+
|
|
16
|
+
### Adding or changing a tool
|
|
17
|
+
|
|
18
|
+
- `docs/01-architecture/tool-contract.md`
|
|
19
|
+
- `docs/01-architecture/detailed-design.md` §11
|
|
20
|
+
- `docs/04-development/coding-style.md`
|
|
21
|
+
- `docs/05-domain/operation-binding-template.md` (if routing related)
|
|
22
|
+
|
|
23
|
+
### Changing rule resolution
|
|
24
|
+
|
|
25
|
+
- `docs/01-architecture/design.md` §6
|
|
26
|
+
- `docs/01-architecture/module-boundaries.md`
|
|
27
|
+
- `docs/05-domain/rule-template.md`
|
|
28
|
+
|
|
29
|
+
### Changing the HTTP transport or the UI
|
|
30
|
+
|
|
31
|
+
- `docs/01-architecture/ui-design.md`
|
|
32
|
+
- `docs/01-architecture/decisions/ADR-0009-client-host-http-transport.md`
|
|
33
|
+
- `docs/01-architecture/security-model.md` §2, §4, §6
|
|
34
|
+
- `docs/04-development/coding-style.md`
|
|
35
|
+
|
|
36
|
+
### Checking a DSH runtime assumption
|
|
37
|
+
|
|
38
|
+
- `docs/01-architecture/api-verification.md`
|
|
39
|
+
|
|
40
|
+
### Deployment changes
|
|
41
|
+
|
|
42
|
+
- `docs/06-operations/deployment-guide.md`
|
|
43
|
+
- `docs/06-operations/security-policy.md`
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
# Harness Standard
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
The harness ensures that AI-assisted development remains aligned with the project architecture, constraints, and verification expectations.
|
|
6
|
-
|
|
7
|
-
## Harness Layers
|
|
8
|
-
|
|
9
|
-
### 1. Context Layer
|
|
10
|
-
|
|
11
|
-
Defines what the agent must know before work.
|
|
12
|
-
|
|
13
|
-
Includes:
|
|
14
|
-
|
|
15
|
-
- project brief
|
|
16
|
-
- current state
|
|
17
|
-
- design documents
|
|
18
|
-
- module boundaries
|
|
19
|
-
- storage contract
|
|
20
|
-
|
|
21
|
-
### 2. Constraint Layer
|
|
22
|
-
|
|
23
|
-
Defines what the agent must not violate.
|
|
24
|
-
|
|
25
|
-
Includes:
|
|
26
|
-
|
|
27
|
-
- no plain-text credentials in registry files
|
|
28
|
-
- no arbitrary JavaScript/shell execution in rule templates
|
|
29
|
-
- no auto-apply of production rule or skill changes
|
|
30
|
-
- no unbounded evidence storage
|
|
31
|
-
- no hidden durable state outside documented files
|
|
32
|
-
|
|
33
|
-
### 3. Execution Layer
|
|
34
|
-
|
|
35
|
-
Defines how work should be implemented.
|
|
36
|
-
|
|
37
|
-
Includes:
|
|
38
|
-
|
|
39
|
-
- small changes
|
|
40
|
-
- testable modules
|
|
41
|
-
- tools as thin wrappers over services
|
|
42
|
-
- business logic in resolver/router modules
|
|
43
|
-
- file-based state
|
|
44
|
-
- clear output file contracts
|
|
45
|
-
|
|
46
|
-
### 4. Verification Layer
|
|
47
|
-
|
|
48
|
-
Defines how work is validated.
|
|
49
|
-
|
|
50
|
-
Includes:
|
|
51
|
-
|
|
52
|
-
- unit tests for resolvers and routers
|
|
53
|
-
- fixture-based storage tests
|
|
54
|
-
- manual Web/Desktop UI checklist
|
|
55
|
-
- output file contract validation
|
|
56
|
-
- regression tests for bugfixes
|
|
57
|
-
|
|
58
|
-
### 5. Continuity Layer
|
|
59
|
-
|
|
60
|
-
Defines how future agents resume work.
|
|
61
|
-
|
|
62
|
-
Includes:
|
|
63
|
-
|
|
64
|
-
- update `current-state.md`
|
|
65
|
-
- update relevant docs
|
|
66
|
-
- preserve ADRs
|
|
67
|
-
- archive completed OpenSpec changes
|
|
68
|
-
- avoid hidden assumptions
|
|
69
|
-
|
|
70
|
-
## Required Agent Behavior
|
|
71
|
-
|
|
72
|
-
Before implementation:
|
|
73
|
-
|
|
74
|
-
1. Read the relevant docs.
|
|
75
|
-
2. Identify affected modules.
|
|
76
|
-
3. Identify storage contract impact.
|
|
77
|
-
4. Identify tests to add.
|
|
78
|
-
5. Keep scope small.
|
|
79
|
-
|
|
80
|
-
During implementation:
|
|
81
|
-
|
|
82
|
-
1. Prefer minimal changes.
|
|
83
|
-
2. Avoid unrelated refactoring.
|
|
84
|
-
3. Keep logic testable.
|
|
85
|
-
4. Preserve file-based architecture.
|
|
86
|
-
|
|
87
|
-
After implementation:
|
|
88
|
-
|
|
89
|
-
1. Run or specify tests.
|
|
90
|
-
2. Update docs if needed.
|
|
91
|
-
3. Update `docs/00-project/current-state.md`.
|
|
1
|
+
# Harness Standard
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
The harness ensures that AI-assisted development remains aligned with the project architecture, constraints, and verification expectations.
|
|
6
|
+
|
|
7
|
+
## Harness Layers
|
|
8
|
+
|
|
9
|
+
### 1. Context Layer
|
|
10
|
+
|
|
11
|
+
Defines what the agent must know before work.
|
|
12
|
+
|
|
13
|
+
Includes:
|
|
14
|
+
|
|
15
|
+
- project brief
|
|
16
|
+
- current state
|
|
17
|
+
- design documents
|
|
18
|
+
- module boundaries
|
|
19
|
+
- storage contract
|
|
20
|
+
|
|
21
|
+
### 2. Constraint Layer
|
|
22
|
+
|
|
23
|
+
Defines what the agent must not violate.
|
|
24
|
+
|
|
25
|
+
Includes:
|
|
26
|
+
|
|
27
|
+
- no plain-text credentials in registry files
|
|
28
|
+
- no arbitrary JavaScript/shell execution in rule templates
|
|
29
|
+
- no auto-apply of production rule or skill changes
|
|
30
|
+
- no unbounded evidence storage
|
|
31
|
+
- no hidden durable state outside documented files
|
|
32
|
+
|
|
33
|
+
### 3. Execution Layer
|
|
34
|
+
|
|
35
|
+
Defines how work should be implemented.
|
|
36
|
+
|
|
37
|
+
Includes:
|
|
38
|
+
|
|
39
|
+
- small changes
|
|
40
|
+
- testable modules
|
|
41
|
+
- tools as thin wrappers over services
|
|
42
|
+
- business logic in resolver/router modules
|
|
43
|
+
- file-based state
|
|
44
|
+
- clear output file contracts
|
|
45
|
+
|
|
46
|
+
### 4. Verification Layer
|
|
47
|
+
|
|
48
|
+
Defines how work is validated.
|
|
49
|
+
|
|
50
|
+
Includes:
|
|
51
|
+
|
|
52
|
+
- unit tests for resolvers and routers
|
|
53
|
+
- fixture-based storage tests
|
|
54
|
+
- manual Web/Desktop UI checklist
|
|
55
|
+
- output file contract validation
|
|
56
|
+
- regression tests for bugfixes
|
|
57
|
+
|
|
58
|
+
### 5. Continuity Layer
|
|
59
|
+
|
|
60
|
+
Defines how future agents resume work.
|
|
61
|
+
|
|
62
|
+
Includes:
|
|
63
|
+
|
|
64
|
+
- update `current-state.md`
|
|
65
|
+
- update relevant docs
|
|
66
|
+
- preserve ADRs
|
|
67
|
+
- archive completed OpenSpec changes
|
|
68
|
+
- avoid hidden assumptions
|
|
69
|
+
|
|
70
|
+
## Required Agent Behavior
|
|
71
|
+
|
|
72
|
+
Before implementation:
|
|
73
|
+
|
|
74
|
+
1. Read the relevant docs.
|
|
75
|
+
2. Identify affected modules.
|
|
76
|
+
3. Identify storage contract impact.
|
|
77
|
+
4. Identify tests to add.
|
|
78
|
+
5. Keep scope small.
|
|
79
|
+
|
|
80
|
+
During implementation:
|
|
81
|
+
|
|
82
|
+
1. Prefer minimal changes.
|
|
83
|
+
2. Avoid unrelated refactoring.
|
|
84
|
+
3. Keep logic testable.
|
|
85
|
+
4. Preserve file-based architecture.
|
|
86
|
+
|
|
87
|
+
After implementation:
|
|
88
|
+
|
|
89
|
+
1. Run or specify tests.
|
|
90
|
+
2. Update docs if needed.
|
|
91
|
+
3. Update `docs/00-project/current-state.md`.
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# Task Execution Policy
|
|
2
|
-
|
|
3
|
-
## Scope
|
|
4
|
-
|
|
5
|
-
Each task should be small enough to implement, test and review in one focused session.
|
|
6
|
-
|
|
7
|
-
## Task Format
|
|
8
|
-
|
|
9
|
-
Use the Tasks rule in `docs/03-openspec/tasks-rule.md`.
|
|
10
|
-
|
|
11
|
-
## Execution Order
|
|
12
|
-
|
|
13
|
-
1. Read context
|
|
14
|
-
2. Propose plan
|
|
15
|
-
3. Implement
|
|
16
|
-
4. Test
|
|
17
|
-
5. Update docs and current-state.md
|
|
18
|
-
|
|
19
|
-
## Stopping Conditions
|
|
20
|
-
|
|
21
|
-
Stop and report when:
|
|
22
|
-
|
|
23
|
-
- the task scope becomes unclear
|
|
24
|
-
- a storage contract change is required but not documented
|
|
25
|
-
- a security or approval policy implication is discovered
|
|
26
|
-
- tests fail and cannot be fixed within the task scope
|
|
1
|
+
# Task Execution Policy
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Each task should be small enough to implement, test and review in one focused session.
|
|
6
|
+
|
|
7
|
+
## Task Format
|
|
8
|
+
|
|
9
|
+
Use the Tasks rule in `docs/03-openspec/tasks-rule.md`.
|
|
10
|
+
|
|
11
|
+
## Execution Order
|
|
12
|
+
|
|
13
|
+
1. Read context
|
|
14
|
+
2. Propose plan
|
|
15
|
+
3. Implement
|
|
16
|
+
4. Test
|
|
17
|
+
5. Update docs and current-state.md
|
|
18
|
+
|
|
19
|
+
## Stopping Conditions
|
|
20
|
+
|
|
21
|
+
Stop and report when:
|
|
22
|
+
|
|
23
|
+
- the task scope becomes unclear
|
|
24
|
+
- a storage contract change is required but not documented
|
|
25
|
+
- a security or approval policy implication is discovered
|
|
26
|
+
- tests fail and cannot be fixed within the task scope
|