project-tiny-context-harness 0.7.0 → 0.7.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 +317 -315
- package/assets/README.md +471 -469
- package/assets/README.zh-CN.md +240 -238
- package/assets/agents/.gitkeep +1 -1
- package/assets/agents/AGENTS_CORE.md +56 -56
- 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 +55 -55
- package/assets/context_templates/product-surface-contract.md +63 -63
- 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 +90 -90
- 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 +77 -77
- package/assets/skills/context_surface_contract/SKILL.md +171 -171
- package/assets/skills/context_uiux_design/SKILL.md +99 -99
- package/assets/skills/long-task-workflow/SKILL.md +72 -70
- package/assets/skills/long-task-workflow/agents/openai.yaml +4 -4
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +44 -40
- package/assets/skills/long-task-workflow/references/contract-authoring.md +57 -43
- package/assets/skills/long-task-workflow/references/evidence-design.md +40 -32
- package/assets/skills/normal-long-task/SKILL.md +12 -12
- package/assets/skills/source-plan-authoring/SKILL.md +295 -295
- package/migrations/README.md +8 -8
- package/package.json +1 -1
- package/source-mappings.yaml +25 -25
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
# Minimal Context Harness Protocol
|
|
2
|
-
|
|
3
|
-
This project uses Tiny Context. The Harness maintains durable Context and workflow authority; project tests, CI, runtime evidence and human acceptance prove product quality.
|
|
4
|
-
|
|
5
|
-
Tiny Context has three capabilities: Minimal Context, the default Workflow Contract, and the explicitly enabled Single-Goal Long-Task Workflow.
|
|
6
|
-
|
|
7
|
-
## Default Workflow Contract
|
|
8
|
-
|
|
9
|
-
Unless an active Long-Task binding exists:
|
|
10
|
-
|
|
11
|
-
1. Read `project_context/global.md`, `project_context/architecture.md`, `project_context/context.toml` and the default area root, then collect graph/trigger candidates.
|
|
12
|
-
2. Before deciding `Context Delta`, run one bounded text search over `project_context/**` using a small set of high-signal task terms such as explicit area/module names and API/schema/state/security/verification/deployment terms. Merge matching Context with manifest candidates and read only relevant files; search supplements rather than replaces semantic judgment.
|
|
13
|
-
3. For UI/product-surface work, confirm information/action/feedback ownership and use `context_surface_contract` when durable responsibility is unclear or changes; contract owns interfaces and existing area/subdomain/verification roles own the project facts.
|
|
14
|
-
4. Decide exactly one `Context Delta: none|required`. Update owning Context before code when durable product ownership, architecture, API/schema/data, state/recovery, dependency, security, product-surface responsibility or repeatable verification/deployment changes. Local fixes preserving durable semantics are `none`.
|
|
15
|
-
5. Use the agent/platform internal plan. For high-risk work keep `Architecture Context Hit`, `Decision Rationale Hit: existing|required|none` and `Modularity Check: none|required|exception` as internal routing and maintenance questions, not artifacts or extra deltas.
|
|
16
|
-
6. Implement precisely, run project-owned verification, perform Contract Conformance and a Context drift check, then report implementation, verification, Context status and blockers.
|
|
17
|
-
|
|
18
|
-
The default workflow never requires a plan artifact, matrix, verdict, evidence ledger or result document. Optional scratch is not Context or completion proof. The bounded Context search creates no index, cache, state or second authority.
|
|
19
|
-
|
|
20
|
-
For external product, architecture, technical or acceptance sources, internally classify every material constraint as covered by Context, requiring a Context update, task-local, explicitly out of scope or requiring a genuine user decision. Conformance must confirm controlling Context reached the correct modules, surfaces, APIs, state machines and verification paths without forbidden shortcuts or duplicate authority.
|
|
21
|
-
|
|
22
|
-
## Long-Task Routing
|
|
23
|
-
|
|
24
|
-
Do not infer long-task mode from duration, complexity, file count or agent preference.
|
|
25
|
-
|
|
26
|
-
1. A valid Git common-dir active record plus matching worktree Git-config marker resumes through `ty-context long-task resume <workdir>` and `/long-task-workflow` in the current native Goal.
|
|
27
|
-
2. Explicit `/long-task-workflow` authors or resumes exactly one complete `long-task-delivery-v2` Contract for the selected delivery.
|
|
28
|
-
3. `/normal-long-task` is a retirement pointer. Otherwise remain on the default Workflow Contract, even when work is long.
|
|
29
|
-
|
|
30
|
-
Contract Draft authoring belongs inside `long-task-workflow`: continuously revise the same non-authoritative `delivery-contract.yaml` until the first successful formal Compile creates Authority Lock. An optional Source Plan is ordinary upstream Source guidance, not a Contract Draft or required input protocol.
|
|
31
|
-
|
|
32
|
-
The workflow uses one native Goal, one selected workspace, one Contract and one Final Gate. New authoring uses inline Outcomes; existing `outcome_files` are physical compatibility only. Outcomes decompose dependency-ready execution, targeted repair and diagnosis, not completion authority, workers, branches or model sessions.
|
|
33
|
-
|
|
34
|
-
After the first Authority Lock, stop once before implementation and ask the user to continue with the current model or switch models and then resume the active Long-Task. A model choice already stated explicitly for this task satisfies the checkpoint; later revisions do not repeat it. Harness records no model route or checkpoint state.
|
|
35
|
-
|
|
36
|
-
Before authoring, proof design or authority lifecycle work, read the phase-specific references in the package-managed `long-task-workflow` Skill. Use `ty-context long-task help` for CLI syntax instead of treating this startup router as a command reference.
|
|
37
|
-
|
|
38
|
-
Final Gate, Stop and close recompile the source Contract and rerun every declared Check on one clean current snapshot. Targeted verify is repair evidence only. Status, progress, receipts and compiled cache are audit/recovery surfaces only; prose, historical tests or Agent judgment never create acceptance. External confirmations remain explicit and machine acceptance never implies CI, deployment or human acceptance.
|
|
39
|
-
|
|
40
|
-
Tiny Context does not create or restore platform Goals, invoke models, spawn agents, call an App Server, create branches/worktrees, merge, push, open PRs, deploy or manage process trees. `ty-context enable long-task` installs the Source Plan Authoring Skill, Long-Task Workflow Skill and package-owned completion Hook.
|
|
41
|
-
|
|
42
|
-
## Durable Facts And Generated Surfaces
|
|
43
|
-
|
|
44
|
-
- Context is intended ownership/boundary/contract truth; code is current implementation truth. Treat disagreement as drift, missing work or stale Context.
|
|
45
|
-
- Long-term facts live only in `project_context/**` or `DESIGN.md`; logs, raw evidence, secrets, runtime state and receipts do not.
|
|
46
|
-
- Managed `AGENTS.md` blocks, `<harnessRoot>/ty-context-managed/**` and package-managed Skills are generated and sync-overwritten.
|
|
47
|
-
- Explicit upgrades use `context_harness_upgrade`; package sync never imports retired Campaign or development-period authority state.
|
|
48
|
-
|
|
49
|
-
## Verification
|
|
50
|
-
|
|
51
|
-
- `make validate-context`: Context recoverability.
|
|
52
|
-
- `make validate-harness`: Context plus touched-source modularity.
|
|
53
|
-
- `ty-context doctor`: installation health plus advisory default Context footprint.
|
|
54
|
-
- `node packages/ty-context/dist/cli.js package check-source`: managed-source/package parity in this source workspace.
|
|
55
|
-
|
|
56
|
-
Every handoff reports exactly one of `Context: updated ...` or `Context: no durable fact change`. Never claim tests, deployment or acceptance from Context alone.
|
|
1
|
+
# Minimal Context Harness Protocol
|
|
2
|
+
|
|
3
|
+
This project uses Tiny Context. The Harness maintains durable Context and workflow authority; project tests, CI, runtime evidence and human acceptance prove product quality.
|
|
4
|
+
|
|
5
|
+
Tiny Context has three capabilities: Minimal Context, the default Workflow Contract, and the explicitly enabled Single-Goal Long-Task Workflow.
|
|
6
|
+
|
|
7
|
+
## Default Workflow Contract
|
|
8
|
+
|
|
9
|
+
Unless an active Long-Task binding exists:
|
|
10
|
+
|
|
11
|
+
1. Read `project_context/global.md`, `project_context/architecture.md`, `project_context/context.toml` and the default area root, then collect graph/trigger candidates.
|
|
12
|
+
2. Before deciding `Context Delta`, run one bounded text search over `project_context/**` using a small set of high-signal task terms such as explicit area/module names and API/schema/state/security/verification/deployment terms. Merge matching Context with manifest candidates and read only relevant files; search supplements rather than replaces semantic judgment.
|
|
13
|
+
3. For UI/product-surface work, confirm information/action/feedback ownership and use `context_surface_contract` when durable responsibility is unclear or changes; contract owns interfaces and existing area/subdomain/verification roles own the project facts.
|
|
14
|
+
4. Decide exactly one `Context Delta: none|required`. Update owning Context before code when durable product ownership, architecture, API/schema/data, state/recovery, dependency, security, product-surface responsibility or repeatable verification/deployment changes. Local fixes preserving durable semantics are `none`.
|
|
15
|
+
5. Use the agent/platform internal plan. For high-risk work keep `Architecture Context Hit`, `Decision Rationale Hit: existing|required|none` and `Modularity Check: none|required|exception` as internal routing and maintenance questions, not artifacts or extra deltas.
|
|
16
|
+
6. Implement precisely, run project-owned verification, perform Contract Conformance and a Context drift check, then report implementation, verification, Context status and blockers.
|
|
17
|
+
|
|
18
|
+
The default workflow never requires a plan artifact, matrix, verdict, evidence ledger or result document. Optional scratch is not Context or completion proof. The bounded Context search creates no index, cache, state or second authority.
|
|
19
|
+
|
|
20
|
+
For external product, architecture, technical or acceptance sources, internally classify every material constraint as covered by Context, requiring a Context update, task-local, explicitly out of scope or requiring a genuine user decision. Conformance must confirm controlling Context reached the correct modules, surfaces, APIs, state machines and verification paths without forbidden shortcuts or duplicate authority.
|
|
21
|
+
|
|
22
|
+
## Long-Task Routing
|
|
23
|
+
|
|
24
|
+
Do not infer long-task mode from duration, complexity, file count or agent preference.
|
|
25
|
+
|
|
26
|
+
1. A valid Git common-dir active record plus matching worktree Git-config marker resumes through `ty-context long-task resume <workdir>` and `/long-task-workflow` in the current native Goal.
|
|
27
|
+
2. Explicit `/long-task-workflow` authors or resumes exactly one complete `long-task-delivery-v2` Contract for the selected delivery.
|
|
28
|
+
3. `/normal-long-task` is a retirement pointer. Otherwise remain on the default Workflow Contract, even when work is long.
|
|
29
|
+
|
|
30
|
+
Contract Draft authoring belongs inside `long-task-workflow`: continuously revise the same non-authoritative `delivery-contract.yaml` until the first successful formal Compile creates Authority Lock. An optional Source Plan is ordinary upstream Source guidance, not a Contract Draft or required input protocol.
|
|
31
|
+
|
|
32
|
+
The workflow uses one native Goal, one selected workspace, one Contract and one Final Gate. New authoring uses inline Outcomes; existing `outcome_files` are physical compatibility only. Outcomes decompose dependency-ready execution, targeted repair and diagnosis, not completion authority, workers, branches or model sessions.
|
|
33
|
+
|
|
34
|
+
After the first Authority Lock, stop once before implementation and ask the user to continue with the current model or switch models and then resume the active Long-Task. A model choice already stated explicitly for this task satisfies the checkpoint; later revisions do not repeat it. Harness records no model route or checkpoint state.
|
|
35
|
+
|
|
36
|
+
Before authoring, proof design or authority lifecycle work, read the phase-specific references in the package-managed `long-task-workflow` Skill. Use `ty-context long-task help` for CLI syntax instead of treating this startup router as a command reference.
|
|
37
|
+
|
|
38
|
+
Final Gate, Stop and close recompile the source Contract and rerun every declared Check on one clean current snapshot. Targeted verify is repair evidence only. Status, progress, receipts and compiled cache are audit/recovery surfaces only; prose, historical tests or Agent judgment never create acceptance. External confirmations remain explicit and machine acceptance never implies CI, deployment or human acceptance.
|
|
39
|
+
|
|
40
|
+
Tiny Context does not create or restore platform Goals, invoke models, spawn agents, call an App Server, create branches/worktrees, merge, push, open PRs, deploy or manage process trees. `ty-context enable long-task` installs the Source Plan Authoring Skill, Long-Task Workflow Skill and package-owned completion Hook.
|
|
41
|
+
|
|
42
|
+
## Durable Facts And Generated Surfaces
|
|
43
|
+
|
|
44
|
+
- Context is intended ownership/boundary/contract truth; code is current implementation truth. Treat disagreement as drift, missing work or stale Context.
|
|
45
|
+
- Long-term facts live only in `project_context/**` or `DESIGN.md`; logs, raw evidence, secrets, runtime state and receipts do not.
|
|
46
|
+
- Managed `AGENTS.md` blocks, `<harnessRoot>/ty-context-managed/**` and package-managed Skills are generated and sync-overwritten.
|
|
47
|
+
- Explicit upgrades use `context_harness_upgrade`; package sync never imports retired Campaign or development-period authority state.
|
|
48
|
+
|
|
49
|
+
## Verification
|
|
50
|
+
|
|
51
|
+
- `make validate-context`: Context recoverability.
|
|
52
|
+
- `make validate-harness`: Context plus touched-source modularity.
|
|
53
|
+
- `ty-context doctor`: installation health plus advisory default Context footprint.
|
|
54
|
+
- `node packages/ty-context/dist/cli.js package check-source`: managed-source/package parity in this source workspace.
|
|
55
|
+
|
|
56
|
+
Every handoff reports exactly one of `Context: updated ...` or `Context: no durable fact change`. Never claim tests, deployment or acceptance from Context alone.
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
# Architecture Context
|
|
2
|
-
|
|
3
|
-
This is the restrained architecture context. Keep only facts that help a fresh agent recover system shape, boundaries and durable constraints quickly.
|
|
4
|
-
|
|
5
|
-
## System Boundary
|
|
6
|
-
|
|
7
|
-
- Describe what is inside this project and what external systems, providers or runtime assumptions sit outside it.
|
|
8
|
-
|
|
9
|
-
## Component Map
|
|
10
|
-
|
|
11
|
-
- List the smallest useful set of components, areas or context units and how they relate.
|
|
12
|
-
|
|
13
|
-
## Data / Control Flow
|
|
14
|
-
|
|
15
|
-
- Summarize only the durable request, event, state or data flow that is hard to infer from code alone.
|
|
16
|
-
|
|
17
|
-
## Design Rationale
|
|
18
|
-
|
|
19
|
-
- Record architecture-level choices, rejected alternatives and tradeoffs that still constrain future work; leave this empty when no stable architecture reason exists.
|
|
20
|
-
- Do not invent rationale or store implementation summaries, PR notes, command output, test result claims, debug history, agent reasoning or reasons inferred only from current code shape.
|
|
21
|
-
- Architecture boundary changes should be captured here before implementation alignment.
|
|
22
|
-
|
|
23
|
-
## Constraints And Tradeoffs
|
|
24
|
-
|
|
25
|
-
- Capture performance, safety, integration, deployment or maintainability constraints that matter for future changes.
|
|
26
|
-
|
|
27
|
-
## Verification Implications
|
|
28
|
-
|
|
29
|
-
- List project-specific verification entry points affected by architectural changes; do not claim tests already passed.
|
|
30
|
-
|
|
31
|
-
## Open Risks
|
|
32
|
-
|
|
33
|
-
- List unresolved architectural risks or unknowns.
|
|
1
|
+
# Architecture Context
|
|
2
|
+
|
|
3
|
+
This is the restrained architecture context. Keep only facts that help a fresh agent recover system shape, boundaries and durable constraints quickly.
|
|
4
|
+
|
|
5
|
+
## System Boundary
|
|
6
|
+
|
|
7
|
+
- Describe what is inside this project and what external systems, providers or runtime assumptions sit outside it.
|
|
8
|
+
|
|
9
|
+
## Component Map
|
|
10
|
+
|
|
11
|
+
- List the smallest useful set of components, areas or context units and how they relate.
|
|
12
|
+
|
|
13
|
+
## Data / Control Flow
|
|
14
|
+
|
|
15
|
+
- Summarize only the durable request, event, state or data flow that is hard to infer from code alone.
|
|
16
|
+
|
|
17
|
+
## Design Rationale
|
|
18
|
+
|
|
19
|
+
- Record architecture-level choices, rejected alternatives and tradeoffs that still constrain future work; leave this empty when no stable architecture reason exists.
|
|
20
|
+
- Do not invent rationale or store implementation summaries, PR notes, command output, test result claims, debug history, agent reasoning or reasons inferred only from current code shape.
|
|
21
|
+
- Architecture boundary changes should be captured here before implementation alignment.
|
|
22
|
+
|
|
23
|
+
## Constraints And Tradeoffs
|
|
24
|
+
|
|
25
|
+
- Capture performance, safety, integration, deployment or maintainability constraints that matter for future changes.
|
|
26
|
+
|
|
27
|
+
## Verification Implications
|
|
28
|
+
|
|
29
|
+
- List project-specific verification entry points affected by architectural changes; do not claim tests already passed.
|
|
30
|
+
|
|
31
|
+
## Open Risks
|
|
32
|
+
|
|
33
|
+
- List unresolved architectural risks or unknowns.
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
# Area Context: main
|
|
2
|
-
|
|
3
|
-
## Responsibility
|
|
4
|
-
|
|
5
|
-
- Describe this product/domain area or context unit's responsibility.
|
|
6
|
-
|
|
7
|
-
## User / System Contract
|
|
8
|
-
|
|
9
|
-
- Describe the external behavior, API, CLI, UI, screen state, interaction or data contract. Contract changes should be captured here before implementation alignment.
|
|
10
|
-
- For UI/page areas, name the page responsibility, core user judgment, persistent information/actions/feedback, non-persistent information, and what belongs in downstream consumption, ops, detail or other surfaces when those facts are durable.
|
|
11
|
-
|
|
12
|
-
## Core Data / API / State
|
|
13
|
-
|
|
14
|
-
- Summarize important data structures, APIs, state transitions or rules.
|
|
15
|
-
|
|
16
|
-
## Module Design Capsule
|
|
17
|
-
|
|
18
|
-
- Principles: stable execution constraints that should affect future module work.
|
|
19
|
-
- Design Logic: the minimum logic for choosing, rejecting, degrading or composing module behavior.
|
|
20
|
-
- Design Rationale: only durable reasons, rejected alternatives and tradeoffs that change later implementation or verification decisions; leave it empty when no stable reason exists.
|
|
21
|
-
- Do not invent rationale or store implementation summaries, PR notes, command output, test result claims, screenshot review notes, debug history, agent reasoning or reasons inferred only from current code shape.
|
|
22
|
-
- Current standards, thresholds and commands belong in the relevant contract or verification Context, not as permanent principles.
|
|
23
|
-
|
|
24
|
-
## Key Constraints
|
|
25
|
-
|
|
26
|
-
- List constraints that are not obvious from code alone, including product rules, responsive/a11y needs or visual boundaries.
|
|
27
|
-
|
|
28
|
-
## Code Entry Points
|
|
29
|
-
|
|
30
|
-
- `src/` or the concrete file/function entry points.
|
|
31
|
-
|
|
32
|
-
## Related Role Context
|
|
33
|
-
|
|
34
|
-
- Verification paths live in this area's `verification` role Context, such as `project_context/areas/main/verification.md`.
|
|
35
|
-
- Deployment/runtime/bootstrap paths live in this area's optional `deployment` role Context when those facts exist.
|
|
36
|
-
|
|
37
|
-
## Open Risks
|
|
38
|
-
|
|
39
|
-
- List unresolved risks or blockers.
|
|
1
|
+
# Area Context: main
|
|
2
|
+
|
|
3
|
+
## Responsibility
|
|
4
|
+
|
|
5
|
+
- Describe this product/domain area or context unit's responsibility.
|
|
6
|
+
|
|
7
|
+
## User / System Contract
|
|
8
|
+
|
|
9
|
+
- Describe the external behavior, API, CLI, UI, screen state, interaction or data contract. Contract changes should be captured here before implementation alignment.
|
|
10
|
+
- For UI/page areas, name the page responsibility, core user judgment, persistent information/actions/feedback, non-persistent information, and what belongs in downstream consumption, ops, detail or other surfaces when those facts are durable.
|
|
11
|
+
|
|
12
|
+
## Core Data / API / State
|
|
13
|
+
|
|
14
|
+
- Summarize important data structures, APIs, state transitions or rules.
|
|
15
|
+
|
|
16
|
+
## Module Design Capsule
|
|
17
|
+
|
|
18
|
+
- Principles: stable execution constraints that should affect future module work.
|
|
19
|
+
- Design Logic: the minimum logic for choosing, rejecting, degrading or composing module behavior.
|
|
20
|
+
- Design Rationale: only durable reasons, rejected alternatives and tradeoffs that change later implementation or verification decisions; leave it empty when no stable reason exists.
|
|
21
|
+
- Do not invent rationale or store implementation summaries, PR notes, command output, test result claims, screenshot review notes, debug history, agent reasoning or reasons inferred only from current code shape.
|
|
22
|
+
- Current standards, thresholds and commands belong in the relevant contract or verification Context, not as permanent principles.
|
|
23
|
+
|
|
24
|
+
## Key Constraints
|
|
25
|
+
|
|
26
|
+
- List constraints that are not obvious from code alone, including product rules, responsive/a11y needs or visual boundaries.
|
|
27
|
+
|
|
28
|
+
## Code Entry Points
|
|
29
|
+
|
|
30
|
+
- `src/` or the concrete file/function entry points.
|
|
31
|
+
|
|
32
|
+
## Related Role Context
|
|
33
|
+
|
|
34
|
+
- Verification paths live in this area's `verification` role Context, such as `project_context/areas/main/verification.md`.
|
|
35
|
+
- Deployment/runtime/bootstrap paths live in this area's optional `deployment` role Context when those facts exist.
|
|
36
|
+
|
|
37
|
+
## Open Risks
|
|
38
|
+
|
|
39
|
+
- List unresolved risks or blockers.
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# Schema v4 Minimal Context graph manifest.
|
|
2
|
-
# Keep the default product/domain area for ordinary projects. Role context nodes
|
|
3
|
-
# are read-purpose slices owned by an area or, only when cross-domain, by the project root.
|
|
4
|
-
# Use read_policy = "default" only for near-universal recovery facts; prefer
|
|
5
|
-
# "on-demand" for specialized architecture, contract, deployment or history detail.
|
|
6
|
-
# `ty-context doctor` reports the deterministic default read footprint and exact duplicates.
|
|
7
|
-
# When migrating deep files under project_context/areas/**, refine obvious
|
|
8
|
-
# contract/foundation/subdomain/verification/deployment/implementation-index/
|
|
9
|
-
# decision-rationale/archive files into [[context]] entries instead of keeping
|
|
10
|
-
# every Markdown file as an [[areas]] product owner.
|
|
11
|
-
|
|
12
|
-
[[areas]]
|
|
13
|
-
id = "main"
|
|
14
|
-
root = "."
|
|
15
|
-
context = "project_context/areas/main.md"
|
|
16
|
-
kind = "app"
|
|
17
|
-
default = true
|
|
18
|
-
|
|
19
|
-
[[context]]
|
|
20
|
-
path = "project_context/areas/main/verification.md"
|
|
21
|
-
role = "verification"
|
|
22
|
-
read_policy = "default"
|
|
23
|
-
triggers = ["test", "verify", "verification", "smoke", "ci"]
|
|
24
|
-
|
|
25
|
-
# Example optional node:
|
|
26
|
-
# [[context]]
|
|
27
|
-
# path = "project_context/areas/main/deployment.md"
|
|
28
|
-
# role = "deployment"
|
|
29
|
-
# read_policy = "on-demand"
|
|
30
|
-
# triggers = ["deploy", "deployment", "runtime", "cloud", "docker"]
|
|
1
|
+
# Schema v4 Minimal Context graph manifest.
|
|
2
|
+
# Keep the default product/domain area for ordinary projects. Role context nodes
|
|
3
|
+
# are read-purpose slices owned by an area or, only when cross-domain, by the project root.
|
|
4
|
+
# Use read_policy = "default" only for near-universal recovery facts; prefer
|
|
5
|
+
# "on-demand" for specialized architecture, contract, deployment or history detail.
|
|
6
|
+
# `ty-context doctor` reports the deterministic default read footprint and exact duplicates.
|
|
7
|
+
# When migrating deep files under project_context/areas/**, refine obvious
|
|
8
|
+
# contract/foundation/subdomain/verification/deployment/implementation-index/
|
|
9
|
+
# decision-rationale/archive files into [[context]] entries instead of keeping
|
|
10
|
+
# every Markdown file as an [[areas]] product owner.
|
|
11
|
+
|
|
12
|
+
[[areas]]
|
|
13
|
+
id = "main"
|
|
14
|
+
root = "."
|
|
15
|
+
context = "project_context/areas/main.md"
|
|
16
|
+
kind = "app"
|
|
17
|
+
default = true
|
|
18
|
+
|
|
19
|
+
[[context]]
|
|
20
|
+
path = "project_context/areas/main/verification.md"
|
|
21
|
+
role = "verification"
|
|
22
|
+
read_policy = "default"
|
|
23
|
+
triggers = ["test", "verify", "verification", "smoke", "ci"]
|
|
24
|
+
|
|
25
|
+
# Example optional node:
|
|
26
|
+
# [[context]]
|
|
27
|
+
# path = "project_context/areas/main/deployment.md"
|
|
28
|
+
# role = "deployment"
|
|
29
|
+
# read_policy = "on-demand"
|
|
30
|
+
# triggers = ["deploy", "deployment", "runtime", "cloud", "docker"]
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# Deployment Context: main
|
|
2
|
-
|
|
3
|
-
This optional role Context records critical repeat-execution paths for deploy, runtime bootstrap, cloud initialization and operational recovery. Keep it minimal and durable.
|
|
4
|
-
|
|
5
|
-
## Owner
|
|
6
|
-
|
|
7
|
-
- Owning area: `main`.
|
|
8
|
-
|
|
9
|
-
## Runtime Topology
|
|
10
|
-
|
|
11
|
-
- List durable service distribution only when it matters for rerunning deploy or bootstrap, such as Web/API/worker/Redis/DB/Docker/cloud instance boundaries.
|
|
12
|
-
|
|
13
|
-
## Deployment Paths
|
|
14
|
-
|
|
15
|
-
- List the shortest deploy, CI/CD, bootstrap, migration, health-check or rollback/degradation command/path.
|
|
16
|
-
|
|
17
|
-
## Required Preparation
|
|
18
|
-
|
|
19
|
-
- List only durable setup such as cloud resources, env files, compose profiles, secret mounting names or database initialization steps. Do not store secret values.
|
|
20
|
-
|
|
21
|
-
## Expected Signals
|
|
22
|
-
|
|
23
|
-
- Name health checks, status transitions, URLs, queues, containers or logs-at-a-glance that show the path reached the intended stage.
|
|
24
|
-
|
|
25
|
-
## Acceptable Warnings
|
|
26
|
-
|
|
27
|
-
- List known benign warnings or slow-start states.
|
|
28
|
-
|
|
29
|
-
## Excluded Dead Ends
|
|
30
|
-
|
|
31
|
-
- List previously ruled-out deploy/bootstrap paths only when remembering them prevents repeated wasted work.
|
|
32
|
-
|
|
33
|
-
## Forbidden Content
|
|
34
|
-
|
|
35
|
-
- Do not record one-off logs, full command output, CI artifacts, release ledgers, secrets, tokens, cookies, device ids, raw payloads or claims that deployment already succeeded.
|
|
1
|
+
# Deployment Context: main
|
|
2
|
+
|
|
3
|
+
This optional role Context records critical repeat-execution paths for deploy, runtime bootstrap, cloud initialization and operational recovery. Keep it minimal and durable.
|
|
4
|
+
|
|
5
|
+
## Owner
|
|
6
|
+
|
|
7
|
+
- Owning area: `main`.
|
|
8
|
+
|
|
9
|
+
## Runtime Topology
|
|
10
|
+
|
|
11
|
+
- List durable service distribution only when it matters for rerunning deploy or bootstrap, such as Web/API/worker/Redis/DB/Docker/cloud instance boundaries.
|
|
12
|
+
|
|
13
|
+
## Deployment Paths
|
|
14
|
+
|
|
15
|
+
- List the shortest deploy, CI/CD, bootstrap, migration, health-check or rollback/degradation command/path.
|
|
16
|
+
|
|
17
|
+
## Required Preparation
|
|
18
|
+
|
|
19
|
+
- List only durable setup such as cloud resources, env files, compose profiles, secret mounting names or database initialization steps. Do not store secret values.
|
|
20
|
+
|
|
21
|
+
## Expected Signals
|
|
22
|
+
|
|
23
|
+
- Name health checks, status transitions, URLs, queues, containers or logs-at-a-glance that show the path reached the intended stage.
|
|
24
|
+
|
|
25
|
+
## Acceptable Warnings
|
|
26
|
+
|
|
27
|
+
- List known benign warnings or slow-start states.
|
|
28
|
+
|
|
29
|
+
## Excluded Dead Ends
|
|
30
|
+
|
|
31
|
+
- List previously ruled-out deploy/bootstrap paths only when remembering them prevents repeated wasted work.
|
|
32
|
+
|
|
33
|
+
## Forbidden Content
|
|
34
|
+
|
|
35
|
+
- Do not record one-off logs, full command output, CI artifacts, release ledgers, secrets, tokens, cookies, device ids, raw payloads or claims that deployment already succeeded.
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
# Project / Delivery Context
|
|
2
|
-
|
|
3
|
-
## Project Goal
|
|
4
|
-
|
|
5
|
-
- Describe the user-visible goal this project is trying to achieve.
|
|
6
|
-
|
|
7
|
-
## Non-goals / Boundaries
|
|
8
|
-
|
|
9
|
-
- List what this project intentionally does not do.
|
|
10
|
-
|
|
11
|
-
## Background
|
|
12
|
-
|
|
13
|
-
- Capture only near-universal background a fresh agent needs before changing code. Route specialized facts through on-demand role Context instead of copying them here.
|
|
14
|
-
|
|
15
|
-
## Design Rationale
|
|
16
|
-
|
|
17
|
-
- Record only project-wide durable choices, rejected alternatives and tradeoffs that are hard to infer from code or tests and likely to affect future work. Leave this sparse when no stable reason exists.
|
|
18
|
-
- Do not invent rationale or store implementation summaries, PR notes, command output, test result claims, screenshot review notes, debug history, agent reasoning or reasons inferred only from current code shape.
|
|
19
|
-
- Classify changes before implementation; if a change alters product ownership/plans, module responsibilities, information architecture, API/Schema, state/scheduler semantics, cross-area boundaries, verification role paths or deployment role paths, update Context before code with enough durable context to guide implementation.
|
|
20
|
-
|
|
21
|
-
## Architecture Context
|
|
22
|
-
|
|
23
|
-
- Link to `project_context/architecture.md`; keep architecture notes minimal and focused on boundaries, components and constraints that are not obvious from code.
|
|
24
|
-
|
|
25
|
-
## Context Graph
|
|
26
|
-
|
|
27
|
-
- Link to `project_context/context.toml` and keep its default area, role, trigger, read policy and boundary metadata aligned with this Context.
|
|
28
|
-
- When adding or reorganizing files under `project_context/areas/**`, run a soft role placement scan before registering every Markdown file as an area: product ownership stays in `area` / `domain` / `subdomain`; contracts, foundations, verification, deployment, implementation indexes, decision rationale and archives should use role Context when that better fits the reading purpose.
|
|
29
|
-
|
|
30
|
-
## Product / Delivery Brief
|
|
31
|
-
|
|
32
|
-
- Capture durable product goals, users, core flows, acceptance signals and non-goals.
|
|
33
|
-
|
|
34
|
-
## UX / Screen Brief
|
|
35
|
-
|
|
36
|
-
- Capture durable screen, flow, interaction, responsive and accessibility facts. Use `DESIGN.md` for visual identity and design tokens when needed.
|
|
37
|
-
- For web/front-end surfaces, record durable page responsibilities, core user judgments, persistent information boundaries and cross-page or cross-layer ownership when they guide future changes.
|
|
38
|
-
|
|
39
|
-
## Verification Entry Points
|
|
40
|
-
|
|
41
|
-
- Point to the default verification context for repeatable test, smoke, CI or validation paths.
|
|
42
|
-
- Project-level cross-domain verification may live here only as a short index; execution details belong in `verification` role Context.
|
|
43
|
-
|
|
44
|
-
## Current State
|
|
45
|
-
|
|
46
|
-
- Summarize what is implemented, blocked or risky right now.
|
|
47
|
-
|
|
48
|
-
## Next Safe Action
|
|
49
|
-
|
|
50
|
-
- State the safest next step for a fresh agent, including whether the next change should update Context before code.
|
|
51
|
-
|
|
52
|
-
## Context Index
|
|
53
|
-
|
|
54
|
-
- [main](areas/main.md)
|
|
55
|
-
- [main verification](areas/main/verification.md)
|
|
1
|
+
# Project / Delivery Context
|
|
2
|
+
|
|
3
|
+
## Project Goal
|
|
4
|
+
|
|
5
|
+
- Describe the user-visible goal this project is trying to achieve.
|
|
6
|
+
|
|
7
|
+
## Non-goals / Boundaries
|
|
8
|
+
|
|
9
|
+
- List what this project intentionally does not do.
|
|
10
|
+
|
|
11
|
+
## Background
|
|
12
|
+
|
|
13
|
+
- Capture only near-universal background a fresh agent needs before changing code. Route specialized facts through on-demand role Context instead of copying them here.
|
|
14
|
+
|
|
15
|
+
## Design Rationale
|
|
16
|
+
|
|
17
|
+
- Record only project-wide durable choices, rejected alternatives and tradeoffs that are hard to infer from code or tests and likely to affect future work. Leave this sparse when no stable reason exists.
|
|
18
|
+
- Do not invent rationale or store implementation summaries, PR notes, command output, test result claims, screenshot review notes, debug history, agent reasoning or reasons inferred only from current code shape.
|
|
19
|
+
- Classify changes before implementation; if a change alters product ownership/plans, module responsibilities, information architecture, API/Schema, state/scheduler semantics, cross-area boundaries, verification role paths or deployment role paths, update Context before code with enough durable context to guide implementation.
|
|
20
|
+
|
|
21
|
+
## Architecture Context
|
|
22
|
+
|
|
23
|
+
- Link to `project_context/architecture.md`; keep architecture notes minimal and focused on boundaries, components and constraints that are not obvious from code.
|
|
24
|
+
|
|
25
|
+
## Context Graph
|
|
26
|
+
|
|
27
|
+
- Link to `project_context/context.toml` and keep its default area, role, trigger, read policy and boundary metadata aligned with this Context.
|
|
28
|
+
- When adding or reorganizing files under `project_context/areas/**`, run a soft role placement scan before registering every Markdown file as an area: product ownership stays in `area` / `domain` / `subdomain`; contracts, foundations, verification, deployment, implementation indexes, decision rationale and archives should use role Context when that better fits the reading purpose.
|
|
29
|
+
|
|
30
|
+
## Product / Delivery Brief
|
|
31
|
+
|
|
32
|
+
- Capture durable product goals, users, core flows, acceptance signals and non-goals.
|
|
33
|
+
|
|
34
|
+
## UX / Screen Brief
|
|
35
|
+
|
|
36
|
+
- Capture durable screen, flow, interaction, responsive and accessibility facts. Use `DESIGN.md` for visual identity and design tokens when needed.
|
|
37
|
+
- For web/front-end surfaces, record durable page responsibilities, core user judgments, persistent information boundaries and cross-page or cross-layer ownership when they guide future changes.
|
|
38
|
+
|
|
39
|
+
## Verification Entry Points
|
|
40
|
+
|
|
41
|
+
- Point to the default verification context for repeatable test, smoke, CI or validation paths.
|
|
42
|
+
- Project-level cross-domain verification may live here only as a short index; execution details belong in `verification` role Context.
|
|
43
|
+
|
|
44
|
+
## Current State
|
|
45
|
+
|
|
46
|
+
- Summarize what is implemented, blocked or risky right now.
|
|
47
|
+
|
|
48
|
+
## Next Safe Action
|
|
49
|
+
|
|
50
|
+
- State the safest next step for a fresh agent, including whether the next change should update Context before code.
|
|
51
|
+
|
|
52
|
+
## Context Index
|
|
53
|
+
|
|
54
|
+
- [main](areas/main.md)
|
|
55
|
+
- [main verification](areas/main/verification.md)
|
|
@@ -1,63 +1,63 @@
|
|
|
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
|
-
## Cross-Surface Rules
|
|
28
|
-
|
|
29
|
-
- `<durable project-specific rule>`
|
|
30
|
-
|
|
31
|
-
## Registration Example
|
|
32
|
-
|
|
33
|
-
Use the existing `contract` role for cross-surface or cross-area contracts:
|
|
34
|
-
|
|
35
|
-
```toml
|
|
36
|
-
[[context]]
|
|
37
|
-
path = "project_context/areas/product-surface-contracts.md"
|
|
38
|
-
role = "contract"
|
|
39
|
-
triggers = ["surface", "screen", "ui", "ux", "web", "app", "mobile", "desktop", "game", "cli", "tui", "页面", "界面", "屏幕", "产品接触面", "信息架构", "页面职责", "界面职责", "product surface"]
|
|
40
|
-
read_policy = "on-demand"
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
If using front matter in a Context Markdown file, use `context_role: contract`; do not use `role = "contract"` in Markdown front matter.
|
|
44
|
-
|
|
45
|
-
## Maintenance Rules
|
|
46
|
-
|
|
47
|
-
Update this Context when:
|
|
48
|
-
|
|
49
|
-
- A surface responsibility changes.
|
|
50
|
-
- Main/drilldown ownership changes.
|
|
51
|
-
- A durable long-task state contract is introduced.
|
|
52
|
-
- A durable main/drilldown/diagnostic ownership rationale, rejected alternative or tradeoff will guide future changes.
|
|
53
|
-
- A repeated UI/product rule becomes reusable.
|
|
54
|
-
- A platform-specific interaction rule becomes stable.
|
|
55
|
-
|
|
56
|
-
Do not update this Context for:
|
|
57
|
-
|
|
58
|
-
- CSS-only fixes.
|
|
59
|
-
- One-off screenshot observations.
|
|
60
|
-
- Temporary audit notes.
|
|
61
|
-
- Test logs.
|
|
62
|
-
- Local implementation summaries.
|
|
63
|
-
- PR notes, command output, screenshot review notes, debug history, agent reasoning or rationale inferred only from current code shape.
|
|
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
|
+
## Cross-Surface Rules
|
|
28
|
+
|
|
29
|
+
- `<durable project-specific rule>`
|
|
30
|
+
|
|
31
|
+
## Registration Example
|
|
32
|
+
|
|
33
|
+
Use the existing `contract` role for cross-surface or cross-area contracts:
|
|
34
|
+
|
|
35
|
+
```toml
|
|
36
|
+
[[context]]
|
|
37
|
+
path = "project_context/areas/product-surface-contracts.md"
|
|
38
|
+
role = "contract"
|
|
39
|
+
triggers = ["surface", "screen", "ui", "ux", "web", "app", "mobile", "desktop", "game", "cli", "tui", "页面", "界面", "屏幕", "产品接触面", "信息架构", "页面职责", "界面职责", "product surface"]
|
|
40
|
+
read_policy = "on-demand"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If using front matter in a Context Markdown file, use `context_role: contract`; do not use `role = "contract"` in Markdown front matter.
|
|
44
|
+
|
|
45
|
+
## Maintenance Rules
|
|
46
|
+
|
|
47
|
+
Update this Context when:
|
|
48
|
+
|
|
49
|
+
- A surface responsibility changes.
|
|
50
|
+
- Main/drilldown ownership changes.
|
|
51
|
+
- A durable long-task state contract is introduced.
|
|
52
|
+
- A durable main/drilldown/diagnostic ownership rationale, rejected alternative or tradeoff will guide future changes.
|
|
53
|
+
- A repeated UI/product rule becomes reusable.
|
|
54
|
+
- A platform-specific interaction rule becomes stable.
|
|
55
|
+
|
|
56
|
+
Do not update this Context for:
|
|
57
|
+
|
|
58
|
+
- CSS-only fixes.
|
|
59
|
+
- One-off screenshot observations.
|
|
60
|
+
- Temporary audit notes.
|
|
61
|
+
- Test logs.
|
|
62
|
+
- Local implementation summaries.
|
|
63
|
+
- PR notes, command output, screenshot review notes, debug history, agent reasoning or rationale inferred only from current code shape.
|