project-tiny-context-harness 0.7.5 → 0.7.7
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 +353 -345
- package/assets/README.md +537 -529
- package/assets/README.zh-CN.md +301 -293
- package/assets/agents/.gitkeep +1 -1
- package/assets/agents/AGENTS_CORE.md +52 -52
- package/assets/context_templates/architecture.md +33 -33
- package/assets/context_templates/area.md +39 -39
- package/assets/context_templates/context.toml +30 -30
- package/assets/context_templates/deployment.md +35 -35
- package/assets/context_templates/global.md +51 -51
- package/assets/context_templates/product-surface-contract.md +58 -58
- package/assets/context_templates/verification.md +32 -32
- package/assets/github/.gitkeep +1 -1
- package/assets/github/harness.yml +41 -41
- package/assets/make/.gitkeep +1 -1
- package/assets/make/ty-context.mk +48 -48
- package/assets/skills/context_development_engineer/SKILL.md +89 -89
- package/assets/skills/context_full_project_export/SKILL.md +70 -70
- package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
- package/assets/skills/context_product_plan/SKILL.md +74 -74
- package/assets/skills/context_surface_contract/SKILL.md +165 -165
- package/assets/skills/context_uiux_design/SKILL.md +92 -92
- package/assets/skills/design-resource-authoring/SKILL.md +68 -0
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +138 -0
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +112 -0
- package/assets/skills/design-resource-authoring/references/resource-selection.md +166 -0
- package/assets/skills/long-task-workflow/SKILL.md +82 -81
- package/assets/skills/long-task-workflow/agents/openai.yaml +4 -4
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +56 -56
- package/assets/skills/long-task-workflow/references/contract-authoring.md +88 -88
- package/assets/skills/long-task-workflow/references/evidence-design.md +69 -69
- package/assets/skills/normal-long-task/SKILL.md +12 -12
- package/assets/skills/source-plan-authoring/SKILL.md +291 -291
- package/dist/lib/profiles.js +1 -0
- package/migrations/README.md +15 -15
- package/package.json +1 -1
- package/source-mappings.yaml +25 -25
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# Product Surface Contract
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
This Context records durable responsibilities for user-facing Product Surfaces in this project or product domain.
|
|
6
|
-
|
|
7
|
-
Write only project-specific facts that should guide future implementation. Do not copy generic platform rules, one-off audit notes, screenshots, test logs, implementation summaries, visual tokens or secrets into this file.
|
|
8
|
-
|
|
9
|
-
## Surfaces
|
|
10
|
-
|
|
11
|
-
### `<surface name>`
|
|
12
|
-
|
|
13
|
-
- Surface:
|
|
14
|
-
- Surface Platform:
|
|
15
|
-
- Owning Product Domain:
|
|
16
|
-
- Primary User Question:
|
|
17
|
-
- Surface Type:
|
|
18
|
-
- Main Surface Allows:
|
|
19
|
-
- Main Surface Forbids:
|
|
20
|
-
- Drilldown Ownership:
|
|
21
|
-
- Long Task State Requirement:
|
|
22
|
-
- Design Rationale:
|
|
23
|
-
- Empty / Loading / Stale / Unavailable:
|
|
24
|
-
- Security / Redaction:
|
|
25
|
-
- Verification:
|
|
26
|
-
|
|
1
|
+
# Product Surface Contract
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This Context records durable responsibilities for user-facing Product Surfaces in this project or product domain.
|
|
6
|
+
|
|
7
|
+
Write only project-specific facts that should guide future implementation. Do not copy generic platform rules, one-off audit notes, screenshots, test logs, implementation summaries, visual tokens or secrets into this file.
|
|
8
|
+
|
|
9
|
+
## Surfaces
|
|
10
|
+
|
|
11
|
+
### `<surface name>`
|
|
12
|
+
|
|
13
|
+
- Surface:
|
|
14
|
+
- Surface Platform:
|
|
15
|
+
- Owning Product Domain:
|
|
16
|
+
- Primary User Question:
|
|
17
|
+
- Surface Type:
|
|
18
|
+
- Main Surface Allows:
|
|
19
|
+
- Main Surface Forbids:
|
|
20
|
+
- Drilldown Ownership:
|
|
21
|
+
- Long Task State Requirement:
|
|
22
|
+
- Design Rationale:
|
|
23
|
+
- Empty / Loading / Stale / Unavailable:
|
|
24
|
+
- Security / Redaction:
|
|
25
|
+
- Verification:
|
|
26
|
+
|
|
27
27
|
## Cross-Surface Rules
|
|
28
28
|
|
|
29
29
|
- `<durable project-specific rule>`
|
|
@@ -33,38 +33,38 @@ Write only project-specific facts that should guide future implementation. Do no
|
|
|
33
33
|
Keep this file at cross-surface responsibility depth. When one material screen needs durable entry/exit/shared-state, information hierarchy, semantic region order, fixed/scroll/overlay ownership, navigation, variants, material controls or design-target references, create an on-demand Screen Contract from `screen-contract.md` using an existing area/subdomain role (or `contract` only for a true cross-area interface).
|
|
34
34
|
|
|
35
35
|
Link by stable surface/control/target keys. Do not duplicate the Screen Contract here, copy exact visual tokens from `DESIGN.md`, or embed authored target binaries and test evidence.
|
|
36
|
-
|
|
37
|
-
## Registration Example
|
|
38
|
-
|
|
39
|
-
Use the existing `contract` role for cross-surface or cross-area contracts:
|
|
40
|
-
|
|
41
|
-
```toml
|
|
42
|
-
[[context]]
|
|
43
|
-
path = "project_context/areas/product-surface-contracts.md"
|
|
44
|
-
role = "contract"
|
|
45
|
-
triggers = ["surface", "screen", "ui", "ux", "web", "app", "mobile", "desktop", "game", "cli", "tui", "页面", "界面", "屏幕", "产品接触面", "信息架构", "页面职责", "界面职责", "product surface"]
|
|
46
|
-
read_policy = "on-demand"
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
If using front matter in a Context Markdown file, use `context_role: contract`; do not use `role = "contract"` in Markdown front matter.
|
|
50
|
-
|
|
51
|
-
## Maintenance Rules
|
|
52
|
-
|
|
53
|
-
Update this Context when:
|
|
54
|
-
|
|
55
|
-
- A surface responsibility changes.
|
|
56
|
-
- Main/drilldown ownership changes.
|
|
57
|
-
- A durable long-task state contract is introduced.
|
|
58
|
-
- A durable main/drilldown/diagnostic ownership rationale, rejected alternative or tradeoff will guide future changes.
|
|
36
|
+
|
|
37
|
+
## Registration Example
|
|
38
|
+
|
|
39
|
+
Use the existing `contract` role for cross-surface or cross-area contracts:
|
|
40
|
+
|
|
41
|
+
```toml
|
|
42
|
+
[[context]]
|
|
43
|
+
path = "project_context/areas/product-surface-contracts.md"
|
|
44
|
+
role = "contract"
|
|
45
|
+
triggers = ["surface", "screen", "ui", "ux", "web", "app", "mobile", "desktop", "game", "cli", "tui", "页面", "界面", "屏幕", "产品接触面", "信息架构", "页面职责", "界面职责", "product surface"]
|
|
46
|
+
read_policy = "on-demand"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If using front matter in a Context Markdown file, use `context_role: contract`; do not use `role = "contract"` in Markdown front matter.
|
|
50
|
+
|
|
51
|
+
## Maintenance Rules
|
|
52
|
+
|
|
53
|
+
Update this Context when:
|
|
54
|
+
|
|
55
|
+
- A surface responsibility changes.
|
|
56
|
+
- Main/drilldown ownership changes.
|
|
57
|
+
- A durable long-task state contract is introduced.
|
|
58
|
+
- A durable main/drilldown/diagnostic ownership rationale, rejected alternative or tradeoff will guide future changes.
|
|
59
59
|
- A repeated UI/product rule becomes reusable.
|
|
60
60
|
- A platform-specific interaction rule becomes stable.
|
|
61
61
|
- Cross-surface ownership changes which Screen Contract owns a detail.
|
|
62
|
-
|
|
63
|
-
Do not update this Context for:
|
|
64
|
-
|
|
65
|
-
- CSS-only fixes.
|
|
66
|
-
- One-off screenshot observations.
|
|
67
|
-
- Temporary audit notes.
|
|
68
|
-
- Test logs.
|
|
69
|
-
- Local implementation summaries.
|
|
70
|
-
- PR notes, command output, screenshot review notes, debug history, agent reasoning or rationale inferred only from current code shape.
|
|
62
|
+
|
|
63
|
+
Do not update this Context for:
|
|
64
|
+
|
|
65
|
+
- CSS-only fixes.
|
|
66
|
+
- One-off screenshot observations.
|
|
67
|
+
- Temporary audit notes.
|
|
68
|
+
- Test logs.
|
|
69
|
+
- Local implementation summaries.
|
|
70
|
+
- PR notes, command output, screenshot review notes, debug history, agent reasoning or rationale inferred only from current code shape.
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
# Verification Context: main
|
|
2
|
-
|
|
3
|
-
This role Context records critical repeat-execution paths for the owning area. Keep it minimal: enough for a future agent to rerun verification without rediscovering setup, not a test report.
|
|
4
|
-
|
|
5
|
-
## Owner
|
|
6
|
-
|
|
7
|
-
- Owning area: `main`.
|
|
8
|
-
|
|
9
|
-
## Verification Paths
|
|
10
|
-
|
|
11
|
-
- `npm test` or the shortest project-specific test, smoke, CI, probe or validation command.
|
|
12
|
-
- Verification paths are reusable execution instances, not independent definitions of the verification target. For capability, metric or acceptance claims, first use the owning module's design Context to decide what claim should be proven, then choose the command or probe.
|
|
13
|
-
|
|
14
|
-
## Required Preparation
|
|
15
|
-
|
|
16
|
-
- List only durable setup such as services, env files, fixtures, local runtimes or external dependencies needed before rerun.
|
|
17
|
-
|
|
18
|
-
## Expected Signals
|
|
19
|
-
|
|
20
|
-
- Name the stage, health check, status, artifact shape or observable signal that means the path reached the intended point.
|
|
21
|
-
|
|
22
|
-
## Acceptable Warnings
|
|
23
|
-
|
|
24
|
-
- List warnings that are expected and should not trigger repeated investigation.
|
|
25
|
-
|
|
26
|
-
## Excluded Dead Ends
|
|
27
|
-
|
|
28
|
-
- List previously ruled-out commands, providers, endpoints or setup paths only when remembering them prevents repeated wasted work.
|
|
29
|
-
|
|
30
|
-
## Forbidden Content
|
|
31
|
-
|
|
32
|
-
- Do not record one-off logs, full command output, temporary JSON, CI artifacts, test reports, secrets, tokens, cookies, device ids, raw payloads or pass/fail claims.
|
|
1
|
+
# Verification Context: main
|
|
2
|
+
|
|
3
|
+
This role Context records critical repeat-execution paths for the owning area. Keep it minimal: enough for a future agent to rerun verification without rediscovering setup, not a test report.
|
|
4
|
+
|
|
5
|
+
## Owner
|
|
6
|
+
|
|
7
|
+
- Owning area: `main`.
|
|
8
|
+
|
|
9
|
+
## Verification Paths
|
|
10
|
+
|
|
11
|
+
- `npm test` or the shortest project-specific test, smoke, CI, probe or validation command.
|
|
12
|
+
- Verification paths are reusable execution instances, not independent definitions of the verification target. For capability, metric or acceptance claims, first use the owning module's design Context to decide what claim should be proven, then choose the command or probe.
|
|
13
|
+
|
|
14
|
+
## Required Preparation
|
|
15
|
+
|
|
16
|
+
- List only durable setup such as services, env files, fixtures, local runtimes or external dependencies needed before rerun.
|
|
17
|
+
|
|
18
|
+
## Expected Signals
|
|
19
|
+
|
|
20
|
+
- Name the stage, health check, status, artifact shape or observable signal that means the path reached the intended point.
|
|
21
|
+
|
|
22
|
+
## Acceptable Warnings
|
|
23
|
+
|
|
24
|
+
- List warnings that are expected and should not trigger repeated investigation.
|
|
25
|
+
|
|
26
|
+
## Excluded Dead Ends
|
|
27
|
+
|
|
28
|
+
- List previously ruled-out commands, providers, endpoints or setup paths only when remembering them prevents repeated wasted work.
|
|
29
|
+
|
|
30
|
+
## Forbidden Content
|
|
31
|
+
|
|
32
|
+
- Do not record one-off logs, full command output, temporary JSON, CI artifacts, test reports, secrets, tokens, cookies, device ids, raw payloads or pass/fail claims.
|
package/assets/github/.gitkeep
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
# ty-context:github-workflow:begin
|
|
2
|
-
name: Harness Gates
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
pull_request:
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
workflow_dispatch:
|
|
10
|
-
inputs:
|
|
11
|
-
gate:
|
|
12
|
-
description: "Make target to run"
|
|
13
|
-
required: true
|
|
14
|
-
default: "validate-context"
|
|
15
|
-
type: choice
|
|
16
|
-
options:
|
|
17
|
-
- validate-context
|
|
18
|
-
- validate-code-modularity
|
|
19
|
-
- validate-harness
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
harness:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
26
|
-
with:
|
|
27
|
-
fetch-depth: 0
|
|
28
|
-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
29
|
-
with:
|
|
30
|
-
node-version: "24"
|
|
31
|
-
- name: Prepare source workspace CLI
|
|
32
|
-
if: ${{ hashFiles('packages/ty-context/package.json') != '' }}
|
|
33
|
-
run: |
|
|
34
|
-
npm ci
|
|
35
|
-
npm run build --workspace project-tiny-context-harness
|
|
36
|
-
- name: Run harness gate
|
|
37
|
-
run: make "${HARNESS_GATE}"
|
|
38
|
-
env:
|
|
39
|
-
HARNESS_GATE: ${{ github.event.inputs.gate || 'validate-harness' }}
|
|
40
|
-
TY_CONTEXT_MODULARITY_BASE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before || '' }}
|
|
41
|
-
# ty-context:github-workflow:end
|
|
1
|
+
# ty-context:github-workflow:begin
|
|
2
|
+
name: Harness Gates
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
gate:
|
|
12
|
+
description: "Make target to run"
|
|
13
|
+
required: true
|
|
14
|
+
default: "validate-context"
|
|
15
|
+
type: choice
|
|
16
|
+
options:
|
|
17
|
+
- validate-context
|
|
18
|
+
- validate-code-modularity
|
|
19
|
+
- validate-harness
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
harness:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0
|
|
28
|
+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
29
|
+
with:
|
|
30
|
+
node-version: "24"
|
|
31
|
+
- name: Prepare source workspace CLI
|
|
32
|
+
if: ${{ hashFiles('packages/ty-context/package.json') != '' }}
|
|
33
|
+
run: |
|
|
34
|
+
npm ci
|
|
35
|
+
npm run build --workspace project-tiny-context-harness
|
|
36
|
+
- name: Run harness gate
|
|
37
|
+
run: make "${HARNESS_GATE}"
|
|
38
|
+
env:
|
|
39
|
+
HARNESS_GATE: ${{ github.event.inputs.gate || 'validate-harness' }}
|
|
40
|
+
TY_CONTEXT_MODULARITY_BASE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before || '' }}
|
|
41
|
+
# ty-context:github-workflow:end
|
package/assets/make/.gitkeep
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
PYTHON ?= python3
|
|
2
|
-
TY_CONTEXT ?= $(if $(wildcard packages/ty-context/dist/cli.js),node packages/ty-context/dist/cli.js,npx --yes --package project-tiny-context-harness@latest ty-context)
|
|
3
|
-
TY_CONTEXT_MODULARITY_SCOPE = $(if $(TY_CONTEXT_MODULARITY_BASE),--base $(TY_CONTEXT_MODULARITY_BASE),--touched)
|
|
4
|
-
|
|
5
|
-
.PHONY: help ty-context-doctor ty-context-sync ty-context-upgrade ty-context-check-modularity validate-context validate-code-modularity validate-harness lint test-current-domain test-all build
|
|
6
|
-
|
|
7
|
-
help:
|
|
8
|
-
@echo "Minimal Context Harness commands"
|
|
9
|
-
@echo " make ty-context-doctor Diagnose Harness root, core package and schema version"
|
|
10
|
-
@echo " make ty-context-sync Refresh managed assets; does not run migrations"
|
|
11
|
-
@echo " make ty-context-upgrade Run safe upgrade migrations, sync managed assets and doctor"
|
|
12
|
-
@echo " make ty-context-check-modularity Warn on oversized touched handwritten source files"
|
|
13
|
-
@echo " make validate-context Check whether project_context/** supports context recovery"
|
|
14
|
-
@echo " make validate-code-modularity Fail on oversized touched handwritten source files"
|
|
15
|
-
@echo " make validate-harness Run validate-context and validate-code-modularity"
|
|
16
|
-
@echo " make test-all Run the project regression suite after replacing this placeholder"
|
|
17
|
-
|
|
18
|
-
ty-context-doctor:
|
|
19
|
-
$(TY_CONTEXT) doctor
|
|
20
|
-
|
|
21
|
-
ty-context-sync:
|
|
22
|
-
$(TY_CONTEXT) sync
|
|
23
|
-
|
|
24
|
-
ty-context-upgrade:
|
|
25
|
-
$(TY_CONTEXT) upgrade
|
|
26
|
-
|
|
27
|
-
ty-context-check-modularity:
|
|
28
|
-
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE)
|
|
29
|
-
|
|
30
|
-
validate-context:
|
|
31
|
-
$(TY_CONTEXT) validate-context
|
|
32
|
-
|
|
33
|
-
validate-code-modularity:
|
|
34
|
-
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE) --fail-on-warning
|
|
35
|
-
|
|
36
|
-
validate-harness: validate-context validate-code-modularity
|
|
37
|
-
|
|
38
|
-
lint:
|
|
39
|
-
@echo "No project lint command configured yet. Replace this target with your stack-specific lint command."
|
|
40
|
-
|
|
41
|
-
test-current-domain:
|
|
42
|
-
@echo "No domain test command configured yet. Replace this target with focused tests for the current change."
|
|
43
|
-
|
|
44
|
-
test-all:
|
|
45
|
-
@echo "No full test command configured yet. Replace this target with the project regression suite."
|
|
46
|
-
|
|
47
|
-
build:
|
|
48
|
-
@echo "No build command configured yet. Replace this target with the project build/package command."
|
|
1
|
+
PYTHON ?= python3
|
|
2
|
+
TY_CONTEXT ?= $(if $(wildcard packages/ty-context/dist/cli.js),node packages/ty-context/dist/cli.js,npx --yes --package project-tiny-context-harness@latest ty-context)
|
|
3
|
+
TY_CONTEXT_MODULARITY_SCOPE = $(if $(TY_CONTEXT_MODULARITY_BASE),--base $(TY_CONTEXT_MODULARITY_BASE),--touched)
|
|
4
|
+
|
|
5
|
+
.PHONY: help ty-context-doctor ty-context-sync ty-context-upgrade ty-context-check-modularity validate-context validate-code-modularity validate-harness lint test-current-domain test-all build
|
|
6
|
+
|
|
7
|
+
help:
|
|
8
|
+
@echo "Minimal Context Harness commands"
|
|
9
|
+
@echo " make ty-context-doctor Diagnose Harness root, core package and schema version"
|
|
10
|
+
@echo " make ty-context-sync Refresh managed assets; does not run migrations"
|
|
11
|
+
@echo " make ty-context-upgrade Run safe upgrade migrations, sync managed assets and doctor"
|
|
12
|
+
@echo " make ty-context-check-modularity Warn on oversized touched handwritten source files"
|
|
13
|
+
@echo " make validate-context Check whether project_context/** supports context recovery"
|
|
14
|
+
@echo " make validate-code-modularity Fail on oversized touched handwritten source files"
|
|
15
|
+
@echo " make validate-harness Run validate-context and validate-code-modularity"
|
|
16
|
+
@echo " make test-all Run the project regression suite after replacing this placeholder"
|
|
17
|
+
|
|
18
|
+
ty-context-doctor:
|
|
19
|
+
$(TY_CONTEXT) doctor
|
|
20
|
+
|
|
21
|
+
ty-context-sync:
|
|
22
|
+
$(TY_CONTEXT) sync
|
|
23
|
+
|
|
24
|
+
ty-context-upgrade:
|
|
25
|
+
$(TY_CONTEXT) upgrade
|
|
26
|
+
|
|
27
|
+
ty-context-check-modularity:
|
|
28
|
+
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE)
|
|
29
|
+
|
|
30
|
+
validate-context:
|
|
31
|
+
$(TY_CONTEXT) validate-context
|
|
32
|
+
|
|
33
|
+
validate-code-modularity:
|
|
34
|
+
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE) --fail-on-warning
|
|
35
|
+
|
|
36
|
+
validate-harness: validate-context validate-code-modularity
|
|
37
|
+
|
|
38
|
+
lint:
|
|
39
|
+
@echo "No project lint command configured yet. Replace this target with your stack-specific lint command."
|
|
40
|
+
|
|
41
|
+
test-current-domain:
|
|
42
|
+
@echo "No domain test command configured yet. Replace this target with focused tests for the current change."
|
|
43
|
+
|
|
44
|
+
test-all:
|
|
45
|
+
@echo "No full test command configured yet. Replace this target with the project regression suite."
|
|
46
|
+
|
|
47
|
+
build:
|
|
48
|
+
@echo "No build command configured yet. Replace this target with the project build/package command."
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: context_development_engineer
|
|
3
|
-
description: Use when the user explicitly asks for 开发工程师, 软件工程师, 研发工程师, 开发专家, 工程专家, 技术专家, 开发方案, 研发方案, 工程方案, 技术方案, 实现, 实现方案, 实施计划, 多开agent, subagent, software engineer, senior engineer, engineering expert, development plan, engineering plan, or technical implementation plan in a Minimal Context Harness project. Do not trigger for routine coding, bug fixes, small refactors, package/release work, or generic mentions of code, development, or engineering.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Context Development Engineer
|
|
7
|
-
|
|
8
|
-
## Package-Managed Boundary
|
|
9
|
-
|
|
10
|
-
This generated Skill provides portable engineering judgment. Project-specific rules belong in `<harnessRoot>/skills/development_engineer/SKILL.md`; the repo-local Skill is more specific while durable conclusions still belong in `project_context/**`.
|
|
11
|
-
|
|
12
|
-
When an active `/long-task-workflow` binding exists, that Skill owns lifecycle, one-workspace, no-proactive-subagent and Final Gate boundaries. This Skill contributes architecture and implementation judgment only; it must not create a second plan, agent scheduler or acceptance path.
|
|
13
|
-
|
|
14
|
-
## 目标
|
|
15
|
-
|
|
16
|
-
以开发工程师 / 技术专家视角完成实现判断,保护可维护架构,并把真正长期的工程事实压缩进可恢复的 Minimal Context,而不是增加流程文档。
|
|
17
|
-
|
|
18
|
-
## 默认工作方式
|
|
19
|
-
|
|
20
|
-
1. 读取 `project_context/global.md`、`project_context/architecture.md`、`project_context/context.toml`、default area root,并按 triggers/read policy 收集相关 on-demand Context 候选。
|
|
21
|
-
2. 在判断 `Context Delta` 前,用任务中明确的 area/module/API/Schema/state/security/verification/deployment 等少量高信号词,对 `project_context/**` 做一次 bounded text search;把命中的 Context 与 manifest 候选合并,只读取真正相关文件。搜索只补充语义判断,不创建索引、缓存或第二权威。
|
|
22
|
-
3. 确认目标、约束、成功标准、影响域、验证/部署路径和风险。能从代码或 Context 得到的事实不要重复询问。
|
|
23
|
-
4. Context 决定“应该是什么”;代码说明“现在是什么”;测试和运行证据证明行为。冲突是实现漂移、缺失工作或 stale Context,不能由代码静默重定义归属。
|
|
24
|
-
5. 第一处编辑前决定唯一 `Context Delta: none|required`。影响 durable architecture boundary、module ownership、API / Schema / data contract、state / runtime semantics、dependency direction、verification / deployment semantics 或 durable rationale / tradeoff 时为 `required`,先更新 owning Context。不要创建 `plan.md`、Task Contract 文件或 Markdown 映射表。
|
|
25
|
-
6. 用 Agent 内部计划保持 goal、non-goals、owner、boundaries、implementation surfaces、risk 和 verification 清晰。默认流程不要求或验证固定 `plan.md`、matrix、verdict 或 evidence ledger。
|
|
26
|
-
7. 普通 bug fix、局部样式/实现漂移、小重构、package/release、测试修复或探索性 spike 不支付架构仪式成本;它们是 small code task,除非过程中形成了新的长期工程事实。
|
|
27
|
-
8. 实现后运行 project-owned verification,做 `Contract Conformance` 和 Context drift check,只报告 `Context: 已更新 ...` 或 `Context: 本次无长期事实变化`。
|
|
28
|
-
|
|
29
|
-
## 风险触发 Architecture Gate
|
|
30
|
-
|
|
31
|
-
仅在下列任一情况触发;这是内部判断,不是新 artifact、validator 或 delta:
|
|
32
|
-
|
|
33
|
-
- 新长期模块/能力/公共抽象;
|
|
34
|
-
- 公共 API、Schema、data contract、持久化或迁移;
|
|
35
|
-
- source of truth、state ownership、runtime lifecycle 或 recovery 改变;
|
|
36
|
-
- 跨 area/domain 修改或新的 dependency direction;
|
|
37
|
-
- security/permission、兼容性、降级、重试、并发或不可逆边界;
|
|
38
|
-
- 一个变化异常扩散到多个不相关模块,或现有扩展点无法承载。
|
|
39
|
-
|
|
40
|
-
内部保持:
|
|
41
|
-
|
|
42
|
-
- `Architecture Context Hit`:哪个现有 Context 控制本次架构判断;
|
|
43
|
-
- `Decision Rationale Hit: existing|required|none`:是否存在会改变未来选择的稳定原因;
|
|
44
|
-
- owner 和唯一 source of truth;
|
|
45
|
-
- 正确 dependency direction 与禁止 bypass;
|
|
46
|
-
- interface、input/output、state、persistence 和 lifecycle;
|
|
47
|
-
- failure/retry/timeout/degraded/recovery、compatibility/migration;
|
|
48
|
-
- 应复用的 extension point,或新抽象为何确有净收益;
|
|
49
|
-
- 哪个 project-owned lint/AST/dependency/contract test 能证明边界。
|
|
50
|
-
|
|
51
|
-
持久结论进入最小 owning Context;实现细节留在代码。不要把“代码更优雅”当作架构要求,也不要让 Harness 变成跨语言通用 dependency analyzer。
|
|
52
|
-
|
|
53
|
-
## Capability-First Delivery Boundary
|
|
54
|
-
|
|
55
|
-
对外部来源中的产品/架构/实现/验收约束做内部分类:Context 已覆盖、需要更新、task-local、显式 out-of-scope 或需要真实用户决策。对 delivery / acceptance scope 使用 capability-first delivery boundary,区分:
|
|
56
|
-
|
|
57
|
-
- `system_capability_build`:形成可复用系统能力;
|
|
58
|
-
- `representative_sample_validation`:仅验证代表性样本;
|
|
59
|
-
- `full_population_operation`:权威范围内全量对象完成;
|
|
60
|
-
- `full_population_not_required`:AC 明确不要求全量。
|
|
61
|
-
|
|
62
|
-
sample provider / interface / page 证据不能替代 all-provider / all-interface / all-platform 或全量完成。来源要求全量而当前只能交付框架/样本时标记 `scope_conflict_requires_decision`;权威范围未收窄前不得声称完成。
|
|
63
|
-
|
|
1
|
+
---
|
|
2
|
+
name: context_development_engineer
|
|
3
|
+
description: Use when the user explicitly asks for 开发工程师, 软件工程师, 研发工程师, 开发专家, 工程专家, 技术专家, 开发方案, 研发方案, 工程方案, 技术方案, 实现, 实现方案, 实施计划, 多开agent, subagent, software engineer, senior engineer, engineering expert, development plan, engineering plan, or technical implementation plan in a Minimal Context Harness project. Do not trigger for routine coding, bug fixes, small refactors, package/release work, or generic mentions of code, development, or engineering.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Context Development Engineer
|
|
7
|
+
|
|
8
|
+
## Package-Managed Boundary
|
|
9
|
+
|
|
10
|
+
This generated Skill provides portable engineering judgment. Project-specific rules belong in `<harnessRoot>/skills/development_engineer/SKILL.md`; the repo-local Skill is more specific while durable conclusions still belong in `project_context/**`.
|
|
11
|
+
|
|
12
|
+
When an active `/long-task-workflow` binding exists, that Skill owns lifecycle, one-workspace, no-proactive-subagent and Final Gate boundaries. This Skill contributes architecture and implementation judgment only; it must not create a second plan, agent scheduler or acceptance path.
|
|
13
|
+
|
|
14
|
+
## 目标
|
|
15
|
+
|
|
16
|
+
以开发工程师 / 技术专家视角完成实现判断,保护可维护架构,并把真正长期的工程事实压缩进可恢复的 Minimal Context,而不是增加流程文档。
|
|
17
|
+
|
|
18
|
+
## 默认工作方式
|
|
19
|
+
|
|
20
|
+
1. 读取 `project_context/global.md`、`project_context/architecture.md`、`project_context/context.toml`、default area root,并按 triggers/read policy 收集相关 on-demand Context 候选。
|
|
21
|
+
2. 在判断 `Context Delta` 前,用任务中明确的 area/module/API/Schema/state/security/verification/deployment 等少量高信号词,对 `project_context/**` 做一次 bounded text search;把命中的 Context 与 manifest 候选合并,只读取真正相关文件。搜索只补充语义判断,不创建索引、缓存或第二权威。
|
|
22
|
+
3. 确认目标、约束、成功标准、影响域、验证/部署路径和风险。能从代码或 Context 得到的事实不要重复询问。
|
|
23
|
+
4. Context 决定“应该是什么”;代码说明“现在是什么”;测试和运行证据证明行为。冲突是实现漂移、缺失工作或 stale Context,不能由代码静默重定义归属。
|
|
24
|
+
5. 第一处编辑前决定唯一 `Context Delta: none|required`。影响 durable architecture boundary、module ownership、API / Schema / data contract、state / runtime semantics、dependency direction、verification / deployment semantics 或 durable rationale / tradeoff 时为 `required`,先更新 owning Context。不要创建 `plan.md`、Task Contract 文件或 Markdown 映射表。
|
|
25
|
+
6. 用 Agent 内部计划保持 goal、non-goals、owner、boundaries、implementation surfaces、risk 和 verification 清晰。默认流程不要求或验证固定 `plan.md`、matrix、verdict 或 evidence ledger。
|
|
26
|
+
7. 普通 bug fix、局部样式/实现漂移、小重构、package/release、测试修复或探索性 spike 不支付架构仪式成本;它们是 small code task,除非过程中形成了新的长期工程事实。
|
|
27
|
+
8. 实现后运行 project-owned verification,做 `Contract Conformance` 和 Context drift check,只报告 `Context: 已更新 ...` 或 `Context: 本次无长期事实变化`。
|
|
28
|
+
|
|
29
|
+
## 风险触发 Architecture Gate
|
|
30
|
+
|
|
31
|
+
仅在下列任一情况触发;这是内部判断,不是新 artifact、validator 或 delta:
|
|
32
|
+
|
|
33
|
+
- 新长期模块/能力/公共抽象;
|
|
34
|
+
- 公共 API、Schema、data contract、持久化或迁移;
|
|
35
|
+
- source of truth、state ownership、runtime lifecycle 或 recovery 改变;
|
|
36
|
+
- 跨 area/domain 修改或新的 dependency direction;
|
|
37
|
+
- security/permission、兼容性、降级、重试、并发或不可逆边界;
|
|
38
|
+
- 一个变化异常扩散到多个不相关模块,或现有扩展点无法承载。
|
|
39
|
+
|
|
40
|
+
内部保持:
|
|
41
|
+
|
|
42
|
+
- `Architecture Context Hit`:哪个现有 Context 控制本次架构判断;
|
|
43
|
+
- `Decision Rationale Hit: existing|required|none`:是否存在会改变未来选择的稳定原因;
|
|
44
|
+
- owner 和唯一 source of truth;
|
|
45
|
+
- 正确 dependency direction 与禁止 bypass;
|
|
46
|
+
- interface、input/output、state、persistence 和 lifecycle;
|
|
47
|
+
- failure/retry/timeout/degraded/recovery、compatibility/migration;
|
|
48
|
+
- 应复用的 extension point,或新抽象为何确有净收益;
|
|
49
|
+
- 哪个 project-owned lint/AST/dependency/contract test 能证明边界。
|
|
50
|
+
|
|
51
|
+
持久结论进入最小 owning Context;实现细节留在代码。不要把“代码更优雅”当作架构要求,也不要让 Harness 变成跨语言通用 dependency analyzer。
|
|
52
|
+
|
|
53
|
+
## Capability-First Delivery Boundary
|
|
54
|
+
|
|
55
|
+
对外部来源中的产品/架构/实现/验收约束做内部分类:Context 已覆盖、需要更新、task-local、显式 out-of-scope 或需要真实用户决策。对 delivery / acceptance scope 使用 capability-first delivery boundary,区分:
|
|
56
|
+
|
|
57
|
+
- `system_capability_build`:形成可复用系统能力;
|
|
58
|
+
- `representative_sample_validation`:仅验证代表性样本;
|
|
59
|
+
- `full_population_operation`:权威范围内全量对象完成;
|
|
60
|
+
- `full_population_not_required`:AC 明确不要求全量。
|
|
61
|
+
|
|
62
|
+
sample provider / interface / page 证据不能替代 all-provider / all-interface / all-platform 或全量完成。来源要求全量而当前只能交付框架/样本时标记 `scope_conflict_requires_decision`;权威范围未收窄前不得声称完成。
|
|
63
|
+
|
|
64
64
|
## Product Surface
|
|
65
|
-
|
|
66
|
-
涉及 Web/移动/桌面/游戏 UI、CLI/TUI、表单、配置、输入、选择、搜索、筛选、调度、预算/配额/限流或状态反馈时:
|
|
67
|
-
|
|
65
|
+
|
|
66
|
+
涉及 Web/移动/桌面/游戏 UI、CLI/TUI、表单、配置、输入、选择、搜索、筛选、调度、预算/配额/限流或状态反馈时:
|
|
67
|
+
|
|
68
68
|
- 对照已有 Product Surface / Surface Contract、页面职责和控件任务,而不是只确认字段已暴露;
|
|
69
69
|
- 对 material screen 同时读取 owning Screen/interaction Context(若存在),并用稳定 surface/control/target key 绑定真实 route/component、设计 target 和测试;产品方案只有粗粒度时,把缺失字段路由到 Context update、task-local Source 或 genuine decision,不能在代码里形成唯一隐藏事实源;
|
|
70
|
-
- 内部保持 Surface Contract Hit、main allows/forbids、drilldown ownership、long-task state requirement、implementation drift 和 verification;
|
|
70
|
+
- 内部保持 Surface Contract Hit、main allows/forbids、drilldown ownership、long-task state requirement、implementation drift 和 verification;
|
|
71
71
|
- 缺失 durable surface responsibility 时设置 `Context Delta: required`,先用 `context_surface_contract` 或 owning Context 建立职责;
|
|
72
72
|
- 收尾用简短 `Contract Conformance` 说明命中的 Context、实现满足方式、未满足项和验证入口。
|
|
73
73
|
|
|
@@ -88,25 +88,25 @@ For material production UI, first confirm Design Authority readiness; then carry
|
|
|
88
88
|
If an active Long-Task applies, express material visual expectations through its existing Requirement, full Control projection, Assertion, Check, Stage, Binding and external-confirmation mechanisms. A design candidate or planned target cannot unlock fidelity implementation: selection must become real Source/registry authority and an adopted protected revision first. Do not introduce a second visual plan, acceptance document or lifecycle.
|
|
89
89
|
|
|
90
90
|
## Modularity Check
|
|
91
|
-
|
|
92
|
-
新实现、重构、重复逻辑、模块边界或影响面控制需要内部记录 `Modularity Check: none|required|exception`。
|
|
93
|
-
|
|
94
|
-
- 可用 `ty-context check-modularity --file <path> --limit 300` 做计划编辑审计,用 `make validate-code-modularity` 或 `ty-context check-modularity --touched --limit 300 --fail-on-warning` 做交付前硬审计;项目本地 Skill 的 limit 优先。
|
|
95
|
-
- 同时检查物理行数、单函数语句数、分支复杂度、导出数、状态转换和职责;压成一行不能规避。
|
|
96
|
-
- 风险点按 product surface、hook、model、adapter、component、service / facade 或 verification helper 等稳定边界判断,优先复用现有 extension point。
|
|
97
|
-
- 只实施高收益、低风险、语义稳定的抽象;不为一次性代码、不稳定语义或视觉整洁做抽象。
|
|
98
|
-
- `exception` 必须由 `<harnessRoot>/config.yaml` 中 lifecycle-complete waiver 授权,至少包含收窄的 `path`/`category`、`owner`、`introduced_at`、`reason`、`tracking_issue`、`expiry_condition`。交付说明不是机器豁免,已有债务不得继续接收新职责。
|
|
99
|
-
|
|
100
|
-
## 自动化机会
|
|
101
|
-
|
|
102
|
-
人工流程重复、确定、易漏步骤或顺序影响正确性时,评估 repo-local tool/script。脚本放在 owning module 的工具目录并有测试;可恢复入口、参数约束和适用边界写入 verification/deployment Context。不要把模块命令、provider id、artifact 路径或一次性结果写进本 Skill。
|
|
103
|
-
|
|
104
|
-
## Context 写入边界
|
|
105
|
-
|
|
106
|
-
- area/domain/subdomain:产品或包责任;contract:API/schema/event/workflow/interface;foundation:稳定概念;verification/deployment:可重复路径;implementation-index:导航;decision-rationale:会影响未来选择的稳定原因。
|
|
107
|
-
- 模块 Context 只保留 principles、design logic、rejected alternative/tradeoff 和长期约束;不编造 rationale,不复制实现摘要、命令输出、debug 过程、截图、日志、临时 JSON、raw payload、测试报告或 secrets。
|
|
108
|
-
- `Context Delta: none|required` 是唯一长期事实结果;`Architecture Context Hit`、`Decision Rationale Hit` 与 `Modularity Check` 仍只是内部路由问题。
|
|
109
|
-
|
|
110
|
-
## 输出边界
|
|
111
|
-
|
|
112
|
-
不默认创建 `.work_products/**`、tech plan、ADR、implementation doc、review/test/release 文档或 lifecycle phases。用户明确要求独立开发/技术方案时可以临时生成;稳定结论仍提炼回 `project_context/**`。
|
|
91
|
+
|
|
92
|
+
新实现、重构、重复逻辑、模块边界或影响面控制需要内部记录 `Modularity Check: none|required|exception`。
|
|
93
|
+
|
|
94
|
+
- 可用 `ty-context check-modularity --file <path> --limit 300` 做计划编辑审计,用 `make validate-code-modularity` 或 `ty-context check-modularity --touched --limit 300 --fail-on-warning` 做交付前硬审计;项目本地 Skill 的 limit 优先。
|
|
95
|
+
- 同时检查物理行数、单函数语句数、分支复杂度、导出数、状态转换和职责;压成一行不能规避。
|
|
96
|
+
- 风险点按 product surface、hook、model、adapter、component、service / facade 或 verification helper 等稳定边界判断,优先复用现有 extension point。
|
|
97
|
+
- 只实施高收益、低风险、语义稳定的抽象;不为一次性代码、不稳定语义或视觉整洁做抽象。
|
|
98
|
+
- `exception` 必须由 `<harnessRoot>/config.yaml` 中 lifecycle-complete waiver 授权,至少包含收窄的 `path`/`category`、`owner`、`introduced_at`、`reason`、`tracking_issue`、`expiry_condition`。交付说明不是机器豁免,已有债务不得继续接收新职责。
|
|
99
|
+
|
|
100
|
+
## 自动化机会
|
|
101
|
+
|
|
102
|
+
人工流程重复、确定、易漏步骤或顺序影响正确性时,评估 repo-local tool/script。脚本放在 owning module 的工具目录并有测试;可恢复入口、参数约束和适用边界写入 verification/deployment Context。不要把模块命令、provider id、artifact 路径或一次性结果写进本 Skill。
|
|
103
|
+
|
|
104
|
+
## Context 写入边界
|
|
105
|
+
|
|
106
|
+
- area/domain/subdomain:产品或包责任;contract:API/schema/event/workflow/interface;foundation:稳定概念;verification/deployment:可重复路径;implementation-index:导航;decision-rationale:会影响未来选择的稳定原因。
|
|
107
|
+
- 模块 Context 只保留 principles、design logic、rejected alternative/tradeoff 和长期约束;不编造 rationale,不复制实现摘要、命令输出、debug 过程、截图、日志、临时 JSON、raw payload、测试报告或 secrets。
|
|
108
|
+
- `Context Delta: none|required` 是唯一长期事实结果;`Architecture Context Hit`、`Decision Rationale Hit` 与 `Modularity Check` 仍只是内部路由问题。
|
|
109
|
+
|
|
110
|
+
## 输出边界
|
|
111
|
+
|
|
112
|
+
不默认创建 `.work_products/**`、tech plan、ADR、implementation doc、review/test/release 文档或 lifecycle phases。用户明确要求独立开发/技术方案时可以临时生成;稳定结论仍提炼回 `project_context/**`。
|