project-tiny-context-harness 0.7.0 → 0.7.2
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 +323 -319
- package/assets/README.md +474 -472
- package/assets/README.zh-CN.md +243 -241
- 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 +76 -72
- package/assets/skills/long-task-workflow/agents/openai.yaml +4 -4
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +47 -41
- package/assets/skills/long-task-workflow/references/contract-authoring.md +58 -43
- package/assets/skills/long-task-workflow/references/evidence-design.md +47 -32
- package/assets/skills/normal-long-task/SKILL.md +12 -12
- package/assets/skills/source-plan-authoring/SKILL.md +295 -295
- package/dist/commands/long-task-revision.js +31 -4
- package/dist/commands/long-task.js +8 -1
- package/dist/lib/long-task-authority-revision-summary.js +33 -2
- package/dist/lib/long-task-authority-revision-types.d.ts +6 -0
- package/dist/lib/long-task-authority-revision.js +21 -1
- package/dist/lib/long-task-status-v2.d.ts +7 -0
- package/dist/lib/long-task-status-v2.js +15 -7
- package/migrations/README.md +8 -8
- package/package.json +1 -1
- package/source-mappings.yaml +25 -25
package/README.md
CHANGED
|
@@ -1,300 +1,304 @@
|
|
|
1
|
-
# Project Tiny Context Harness
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/project-tiny-context-harness)
|
|
4
|
-
[](https://github.com/Seven128/project-tiny-context-harness/actions/workflows/package.yml)
|
|
5
|
-
[](https://securityscorecards.dev/viewer/?uri=github.com/Seven128/project-tiny-context-harness)
|
|
6
|
-
[](https://github.com/Seven128/project-tiny-context-harness/blob/main/LICENSE)
|
|
7
|
-
[](https://codespaces.new/Seven128/project-tiny-context-harness)
|
|
8
|
-
|
|
9
|
-
Translations: [Chinese (Simplified)](https://github.com/Seven128/project-tiny-context-harness/blob/main/README.zh-CN.md)
|
|
10
|
-
|
|
11
|
-
Project Tiny Context Harness is repo-native project memory for AI coding agents, plus a narrow delivery harness for trustworthy long-task completion. The product principle is: keep the memory, drop the ceremony. It adds durable project memory behind `AGENTS.md` without becoming an agent scheduler or Git orchestrator.
|
|
12
|
-
|
|
13
|
-
Public launch surfaces are English-first; localized documents are secondary entry points.
|
|
14
|
-
|
|
15
|
-
Best for:
|
|
16
|
-
|
|
17
|
-
- repositories where coding agents repeatedly rediscover project intent;
|
|
18
|
-
- teams using multiple agents or frequent fresh chats;
|
|
19
|
-
- maintainers who want durable Context and explicit long-task evidence.
|
|
20
|
-
|
|
21
|
-
Not for:
|
|
22
|
-
|
|
23
|
-
- replacing project tests, review, CI or human acceptance;
|
|
24
|
-
- autonomous Tiny Context execution;
|
|
25
|
-
- codebase semantic indexing or external docs retrieval.
|
|
26
|
-
|
|
27
|
-
Concrete shift:
|
|
28
|
-
|
|
29
|
-
```text
|
|
30
|
-
Before: ask a fresh agent to read the repo and tell you what matters.
|
|
31
|
-
After: ask it to read AGENTS.md and project_context/** first, then summarize goal, non-goals, architecture boundaries and validation paths before proposing code.
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
What gets added:
|
|
35
|
-
|
|
36
|
-
```mermaid
|
|
37
|
-
flowchart LR
|
|
38
|
-
A["Fresh agent session"] --> B["AGENTS.md startup router"]
|
|
39
|
-
B --> C["project_context/** durable facts"]
|
|
40
|
-
C --> D["Goal, boundaries, validation paths"]
|
|
41
|
-
D --> E["Implementation and delivery work"]
|
|
42
|
-
F["Tests / CI / review"] --> G["Product quality evidence"]
|
|
43
|
-
C -. "does not own" .-> G
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-

|
|
47
|
-
|
|
48
|
-
The demo shows the core loop: initialize `AGENTS.md` and `project_context/**`, run `validate-context`, then ask a fresh agent to recover intent before proposing code. Use the npm install path below, or inspect the no-install previews first.
|
|
49
|
-
|
|
50
|
-
Install:
|
|
51
|
-
|
|
52
|
-
```sh
|
|
53
|
-
npm install -D project-tiny-context-harness@latest
|
|
54
|
-
npx --yes --package project-tiny-context-harness@latest ty-context init
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
No-install preview:
|
|
58
|
-
|
|
59
|
-
- Read the [fresh-agent recovery walkthrough](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/examples/fresh-agent-recovery.md).
|
|
60
|
-
- Inspect the [Minimal Context sample guide](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/examples/minimal-context-sample.md).
|
|
61
|
-
- Browse the tiny generated repository at [examples/minimal-context-sample/](https://github.com/Seven128/project-tiny-context-harness/tree/main/examples/minimal-context-sample).
|
|
62
|
-
|
|
63
|
-
## Why It Exists
|
|
64
|
-
|
|
65
|
-
`project_context/**` preserves small durable facts across sessions. The default workflow reads graph-relevant Context, supplements that route with one bounded Context search before `Context Delta`, and uses the platform's internal plan. For explicit long work, `long-task-delivery-v2` adds one complete Contract authority, compiled Source/REQ/CTRL/OBL/AC coverage, a one-time user model choice after Authority Lock, scoped progress and a source-recompiled Live Final Gate.
|
|
66
|
-
|
|
67
|
-
Minimal Context preserves durable facts, the Workflow Contract governs ordinary work, and the Long-Task Workflow adds explicit machine completion authority.
|
|
68
|
-
|
|
69
|
-
Tiny Context does not invoke or switch models, create agents, branches or worktrees, merge, push, create PRs, deploy, or replace project tests and human acceptance.
|
|
70
|
-
|
|
71
|
-
## Install And Initialize
|
|
72
|
-
|
|
73
|
-
```powershell
|
|
74
|
-
npx --yes project-tiny-context-harness ty-context init
|
|
75
|
-
# Existing repository:
|
|
76
|
-
npx --yes project-tiny-context-harness ty-context init --adopt
|
|
77
|
-
|
|
78
|
-
npx --yes project-tiny-context-harness ty-context validate-context
|
|
79
|
-
npx --yes project-tiny-context-harness ty-context doctor
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Default profiles are `core-portable` and `workflow-default`. Explicitly enable long-task support:
|
|
83
|
-
|
|
84
|
-
```powershell
|
|
85
|
-
ty-context enable long-task
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
This installs `/source-plan-authoring`, `/long-task-workflow` and the completion Hook. Disable only those package-owned surfaces with `ty-context disable long-task`.
|
|
89
|
-
|
|
90
|
-
## Positioning
|
|
91
|
-
|
|
92
|
-
| Adjacent tool type | Use it for | Harness stance |
|
|
93
|
-
|---|---|---|
|
|
94
|
-
| Spec-first kits | Turning a feature idea into structured specs and plans. | Complementary; Harness keeps durable repo facts beyond one feature spec. |
|
|
95
|
-
| BMAD-style workflows and full Tiny Context processes | Role/process ceremony for selected work. | Lighter default; ordinary work stays Context-first. |
|
|
96
|
-
| Task Master-style planners | Backlog decomposition and task state. | Complementary; Harness does not own backlog state. |
|
|
97
|
-
| Context7/Serena-style retrieval | External docs, symbols or repository retrieval. | Complementary; Harness owns local intended boundaries. |
|
|
98
|
-
|
|
99
|
-
## Try It In 60 Seconds
|
|
100
|
-
|
|
101
|
-
```sh
|
|
102
|
-
mkdir project-tiny-context-harness-demo
|
|
103
|
-
cd project-tiny-context-harness-demo
|
|
104
|
-
git init
|
|
105
|
-
npm init -y
|
|
106
|
-
npm install -D project-tiny-context-harness@latest
|
|
107
|
-
npx --yes --package project-tiny-context-harness@latest ty-context init
|
|
108
|
-
make validate-context
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Expected result:
|
|
112
|
-
|
|
113
|
-
```text
|
|
114
|
-
AGENTS.md
|
|
115
|
-
project_context/
|
|
116
|
-
context.toml
|
|
117
|
-
global.md
|
|
118
|
-
architecture.md
|
|
119
|
-
areas/main.md
|
|
120
|
-
areas/main/verification.md
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Fresh-agent test prompt:
|
|
124
|
-
|
|
125
|
-
```text
|
|
126
|
-
Read AGENTS.md and project_context/** first. Summarize the project goal, non-goals, architecture boundaries, validation entry points and next safe action before proposing code changes.
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Source checkout preview:
|
|
130
|
-
|
|
131
|
-
Open <https://codespaces.new/Seven128/project-tiny-context-harness>, or run locally:
|
|
132
|
-
|
|
133
|
-
```sh
|
|
134
|
-
git clone https://github.com/Seven128/project-tiny-context-harness.git
|
|
135
|
-
cd project-tiny-context-harness
|
|
136
|
-
npm ci
|
|
137
|
-
npm run smoke:quickstart
|
|
138
|
-
npm run preview:pack
|
|
139
|
-
cd /path/to/your/test-repo
|
|
140
|
-
npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.7.
|
|
141
|
-
npx --no-install ty-context init --adopt
|
|
142
|
-
make validate-context
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Use this tarball path for source-preview testing, private review or package development. For normal installs, use `project-tiny-context-harness@latest` from npm. If it fails, open a [Source preview report](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=source_preview_report.yml).
|
|
146
|
-
|
|
147
|
-
## Minimal Context And Default Workflow
|
|
148
|
-
|
|
149
|
-
The default read path is `project_context/global.md`, `project_context/architecture.md`, `project_context/context.toml`, the default area root, then minimum graph-relevant role Context.
|
|
150
|
-
|
|
151
|
-
Only near-universal recovery facts should use `read_policy = "default"`; specialized detail should be task-triggered `on-demand`. `ty-context doctor` reports the deterministic default Context footprint, soft-budget overages and byte-identical default files as advisory maintenance signals, not a new gate.
|
|
152
|
-
|
|
153
|
-
### Bounded Context discovery
|
|
154
|
-
|
|
155
|
-
Before deciding `Context Delta`, the Agent combines two low-state routes:
|
|
156
|
-
|
|
157
|
-
1. collect area, role, trigger and graph candidates from `context.toml`;
|
|
158
|
-
2. run one bounded text search over `project_context/**` with a small set of high-signal task terms, including explicit area/module names and relevant API/schema/state/security/verification/deployment language;
|
|
159
|
-
3. merge the candidates and read only semantically relevant files.
|
|
160
|
-
|
|
161
|
-
The bounded search supplements rather than replaces Agent semantic judgment. It creates no vector or persistent index, cache, registry, search state or second authority. It can still miss unrelated synonyms or indirect dependencies, so high-risk work retains Architecture Context Hit and final Contract Conformance.
|
|
162
|
-
|
|
163
|
-
Ordinary tasks:
|
|
164
|
-
|
|
165
|
-
1. resolve minimum relevant Context through manifest routing plus bounded Context search;
|
|
166
|
-
2. decide `Context Delta: none|required`;
|
|
167
|
-
3. update durable facts before code when required;
|
|
168
|
-
4. use the platform's internal plan;
|
|
169
|
-
5. implement and run project-owned verification;
|
|
170
|
-
6. perform Contract Conformance and Context drift checks.
|
|
171
|
-
|
|
172
|
-
The default workflow has no required plan artifact, matrix, verdict, evidence ledger, persistent retrieval index or second plan. Duration, file count and complexity never auto-enable long-task state.
|
|
173
|
-
|
|
174
|
-
Plan Validator commands no longer exist; existing plan, matrix or verdict files remain ordinary user files.
|
|
175
|
-
|
|
176
|
-
### Architecture And Modularity Guidance
|
|
177
|
-
|
|
178
|
-
Technical architecture support is a Minimal Context capability. For high-risk work, `Architecture Context Hit`, `Decision Rationale Hit: existing|required|none` and `Modularity Check: none|required|exception` are internal routing questions inside the platform's internal plan. No Task Contract or fixed `plan.md` is required. The risk-triggered gate covers durable module/capability boundaries, public API/schema/data or persistence, source-of-truth/state ownership, dependency direction, cross-area work, migration/security/recovery and reusable abstractions; it resolves owner, unique source of truth, lifecycle/failure/compatibility, forbidden shortcuts and a project-owned executable architecture check. Small fixes do not pay this ceremony.
|
|
179
|
-
|
|
180
|
-
Do not invent rationale: store stable reasons, rejected alternatives or tradeoffs only in the smallest durable Context surface, and remember that architecture Context does not prove product quality. Harness routes repository-native checks rather than becoming a language-generic architecture analyzer. Modularity diagnostics identify the highest-risk function and line.
|
|
181
|
-
|
|
182
|
-
`ty-context check-modularity` audits selected handwritten source. `validate-code-modularity` and `validate-harness` enforce it separately from `validate-context`.
|
|
183
|
-
|
|
184
|
-
#### Modularity Policy
|
|
185
|
-
|
|
186
|
-
Newly generated Harness configs default to `strict_except_generated`. Generated/build files remain excluded; `strict_except_generated` rejects configured `modularity.waivers`. Projects with bounded legacy exceptions may opt into `scoped_waivers`, whose entries require `path`, `category`, `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
|
|
187
|
-
|
|
188
|
-
### Product Surface Contract
|
|
189
|
-
|
|
190
|
-
`context_surface_contract` compiles durable screen/page/CLI responsibility using the existing `contract`, area/subdomain and verification roles; `product-surface-contract.md` is the package template. Product Surface Contract authoring uses Source-to-Context judgment and Contract Conformance; it must not add a new product-surface Context role or claim product-quality proof.
|
|
191
|
-
|
|
192
|
-
### Visual Delivery Guidance
|
|
193
|
-
|
|
194
|
-
For material design-system, redesign, high-fidelity or visual-polish work, `context_uiux_design` keeps a task-local risk-proportional Visual Coverage Set across production surfaces/components, viewports, themes/modes, states, content stress and accessibility/motion conditions. It is internal planning, not a required matrix or authority. Durable surface/interaction facts remain in `project_context/**`; durable visual-system semantics and rationale remain in `DESIGN.md`; the project names one authored exact token source and generation direction. `context_development_engineer` binds that intent to production components/routes and reports only combinations actually rendered and checked.
|
|
195
|
-
|
|
196
|
-
An explicit Long-Task uses its existing Requirement, Control, Assertion, `ui_browser`, verification-input and `external_confirmation` mechanisms for material visual expectations. Acceptance-affecting screenshot baselines are frozen verifier inputs, generated screenshots/diffs remain review artifacts, and subjective design or new-baseline approval remains external. No visual Schema, risk level, lifecycle state, Gate or required artifact is added.
|
|
197
|
-
|
|
198
|
-
### Optional Source Plan Authoring
|
|
199
|
-
|
|
200
|
-
Use `/source-plan-authoring` for an explicitly requested initial plan, Source Plan, source draft, or synthesis/refinement/audit of later implementation or Contract-authoring Source. It accepts either one substantially complete plan or a sparse goal plus mixed notes, product/technical documents, screenshots, diagrams and other attachments; a short instruction identifying their roles, the goal, reference authority and desired elaboration is sufficient.
|
|
201
|
-
|
|
202
|
-
It produces one self-contained Markdown document with a complete input inventory, preserved direct requirements and traceable necessary derivations. Before comparative research or a material product, technical, architecture or provider selection, it asks a concise targeted question when an unknown user priority such as quality versus cost, speed, reliability, privacy, lock-in or operational burden could change the research scope, candidate set or recommendation; there is no fixed questionnaire and known preferences are not re-asked. Once that preference envelope is clear, it decides what research is needed and uses current authoritative or primary sources for external capability, price, quota, license, compatibility, region, security or support claims. A request to synthesize, refine, complete or use judgment then delegates plan-level authoring: each supported recommendation is recorded as `delegated` with its instruction, preference/evidence basis and exact meaning instead of triggering approval, including high-impact plan semantics. Real payment, contracting, production release, destructive production mutation, permission grants, sensitive-data transmission and required legal/security/human approval remain `EXT`; only conflicts, user-reserved choices, missing material preferences or cases with no defensible recommendation remain `DEC`/`decision_required`. Interactive products are expanded through every in-scope surface to material control level, including placement, behavior, validation, navigation, loading/empty/success/failure/recovery/permission feedback and accessibility. The plan retains semantic Outcome boundaries, stable keys/anchors, Runtime-exact Fact/Affected-Outcome `RISK` items, distinct `OBL`/`HINT` items and one observable scenario per `AC` with explicit accepted `REQ`/`CTRL`/`OBL`/`NCOMP` keys. Risk names are the ten Contract facts: use `data_migration`, split critical-path weak observability into `critical_user_path` plus `weak_observability`, and preserve `multi_repository_change` for Compiler rejection.
|
|
203
|
-
|
|
204
|
-
It does not update Context, bind a repository, generate Delivery Contract YAML, execute implementation, create workflow state or claim completion. `HINT` is not a Material Source Item, and the Skill emits no `ty-source-item` markers. A Source Plan is Source, not a Contract Draft. The structure is optional; ordinary prose remains valid Long-Task Source.
|
|
205
|
-
|
|
206
|
-
## Single-Goal Rolling Delivery
|
|
207
|
-
|
|
208
|
-
The explicit Long-Task Workflow uses one platform-native Goal, one user-selected repository/workspace, one complete `long-task-delivery-v2` Contract and one Final Gate. Outcomes are independently decidable acceptance units; Delivery Set orchestration and top-level Contract splitting inside one selected delivery are retired.
|
|
209
|
-
|
|
210
|
-
Contract authoring preserves stable Source keys/anchors where practical. If an unknown preference could materially change comparative research or selection, it asks before proceeding. Once the decision criteria are clear, a defensible recommended plan choice is recorded in real Source with its delegation, preference/evidence basis and exact meaning before Contract mapping; it is never added only in YAML. Plan delegation does not authorize a real high-risk external action, which remains an explicit external confirmation. Meaning-preserving structural decomposition and evidence-backed repository binding may continue, while conflicting, user-reserved, missing-preference or unsupported new product semantics require `decision_required`. Missing recommended Source Plan structure alone never blocks authoring.
|
|
211
|
-
|
|
212
|
-
Before the first successful formal Compile, `delivery-contract.yaml` is one non-authoritative Contract Draft. `/long-task-workflow` revises the same Draft across repository/Context reads and Preflight repairs; a complete Contract need not fit one response. Integrated authoring keeps repository evidence and findings attached to the same object and avoids a second handoff, plan, authority or Receipt. There is no standalone Contract Draft Skill or Authoring State.
|
|
213
|
-
|
|
214
|
-
The Long-Task Skill keeps objective/boundary/phase routing in its main file and loads one-level Contract-authoring, evidence-design and authority-lifecycle references only when that phase applies. This is instruction packaging only, not a second authority. Declared architecture invariants use existing obligations/constraints/forbidden shortcuts, owner/path/Binding boundaries and project-owned executable Checks; a functional AC cannot substitute for an independently failing architecture claim.
|
|
215
|
-
|
|
216
|
-
A Draft Outcome is simply an Outcome before Authority Lock. Outcomes decompose independently observable, decidable and target-verifiable results to improve dependency-ready implementation, targeted verification, failure localization, resume and stale-result invalidation. `depends_on` means acceptance readiness and the Rolling Frontier is temporary; an Outcome is not a Worker, scheduler task, queue or parallel unit. Outcome decomposes execution and diagnosis, not completion authority, so one complete current-snapshot Final Gate remains mandatory.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
"
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
1
|
+
# Project Tiny Context Harness
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/project-tiny-context-harness)
|
|
4
|
+
[](https://github.com/Seven128/project-tiny-context-harness/actions/workflows/package.yml)
|
|
5
|
+
[](https://securityscorecards.dev/viewer/?uri=github.com/Seven128/project-tiny-context-harness)
|
|
6
|
+
[](https://github.com/Seven128/project-tiny-context-harness/blob/main/LICENSE)
|
|
7
|
+
[](https://codespaces.new/Seven128/project-tiny-context-harness)
|
|
8
|
+
|
|
9
|
+
Translations: [Chinese (Simplified)](https://github.com/Seven128/project-tiny-context-harness/blob/main/README.zh-CN.md)
|
|
10
|
+
|
|
11
|
+
Project Tiny Context Harness is repo-native project memory for AI coding agents, plus a narrow delivery harness for trustworthy long-task completion. The product principle is: keep the memory, drop the ceremony. It adds durable project memory behind `AGENTS.md` without becoming an agent scheduler or Git orchestrator.
|
|
12
|
+
|
|
13
|
+
Public launch surfaces are English-first; localized documents are secondary entry points.
|
|
14
|
+
|
|
15
|
+
Best for:
|
|
16
|
+
|
|
17
|
+
- repositories where coding agents repeatedly rediscover project intent;
|
|
18
|
+
- teams using multiple agents or frequent fresh chats;
|
|
19
|
+
- maintainers who want durable Context and explicit long-task evidence.
|
|
20
|
+
|
|
21
|
+
Not for:
|
|
22
|
+
|
|
23
|
+
- replacing project tests, review, CI or human acceptance;
|
|
24
|
+
- autonomous Tiny Context execution;
|
|
25
|
+
- codebase semantic indexing or external docs retrieval.
|
|
26
|
+
|
|
27
|
+
Concrete shift:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
Before: ask a fresh agent to read the repo and tell you what matters.
|
|
31
|
+
After: ask it to read AGENTS.md and project_context/** first, then summarize goal, non-goals, architecture boundaries and validation paths before proposing code.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
What gets added:
|
|
35
|
+
|
|
36
|
+
```mermaid
|
|
37
|
+
flowchart LR
|
|
38
|
+
A["Fresh agent session"] --> B["AGENTS.md startup router"]
|
|
39
|
+
B --> C["project_context/** durable facts"]
|
|
40
|
+
C --> D["Goal, boundaries, validation paths"]
|
|
41
|
+
D --> E["Implementation and delivery work"]
|
|
42
|
+
F["Tests / CI / review"] --> G["Product quality evidence"]
|
|
43
|
+
C -. "does not own" .-> G
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
The demo shows the core loop: initialize `AGENTS.md` and `project_context/**`, run `validate-context`, then ask a fresh agent to recover intent before proposing code. Use the npm install path below, or inspect the no-install previews first.
|
|
49
|
+
|
|
50
|
+
Install:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
npm install -D project-tiny-context-harness@latest
|
|
54
|
+
npx --yes --package project-tiny-context-harness@latest ty-context init
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
No-install preview:
|
|
58
|
+
|
|
59
|
+
- Read the [fresh-agent recovery walkthrough](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/examples/fresh-agent-recovery.md).
|
|
60
|
+
- Inspect the [Minimal Context sample guide](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/examples/minimal-context-sample.md).
|
|
61
|
+
- Browse the tiny generated repository at [examples/minimal-context-sample/](https://github.com/Seven128/project-tiny-context-harness/tree/main/examples/minimal-context-sample).
|
|
62
|
+
|
|
63
|
+
## Why It Exists
|
|
64
|
+
|
|
65
|
+
`project_context/**` preserves small durable facts across sessions. The default workflow reads graph-relevant Context, supplements that route with one bounded Context search before `Context Delta`, and uses the platform's internal plan. For explicit long work, `long-task-delivery-v2` adds one complete Contract authority, compiled Source/REQ/CTRL/OBL/AC coverage, a one-time user model choice after Authority Lock, scoped progress and a source-recompiled Live Final Gate.
|
|
66
|
+
|
|
67
|
+
Minimal Context preserves durable facts, the Workflow Contract governs ordinary work, and the Long-Task Workflow adds explicit machine completion authority.
|
|
68
|
+
|
|
69
|
+
Tiny Context does not invoke or switch models, create agents, branches or worktrees, merge, push, create PRs, deploy, or replace project tests and human acceptance.
|
|
70
|
+
|
|
71
|
+
## Install And Initialize
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
npx --yes project-tiny-context-harness ty-context init
|
|
75
|
+
# Existing repository:
|
|
76
|
+
npx --yes project-tiny-context-harness ty-context init --adopt
|
|
77
|
+
|
|
78
|
+
npx --yes project-tiny-context-harness ty-context validate-context
|
|
79
|
+
npx --yes project-tiny-context-harness ty-context doctor
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Default profiles are `core-portable` and `workflow-default`. Explicitly enable long-task support:
|
|
83
|
+
|
|
84
|
+
```powershell
|
|
85
|
+
ty-context enable long-task
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This installs `/source-plan-authoring`, `/long-task-workflow` and the completion Hook. Disable only those package-owned surfaces with `ty-context disable long-task`.
|
|
89
|
+
|
|
90
|
+
## Positioning
|
|
91
|
+
|
|
92
|
+
| Adjacent tool type | Use it for | Harness stance |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| Spec-first kits | Turning a feature idea into structured specs and plans. | Complementary; Harness keeps durable repo facts beyond one feature spec. |
|
|
95
|
+
| BMAD-style workflows and full Tiny Context processes | Role/process ceremony for selected work. | Lighter default; ordinary work stays Context-first. |
|
|
96
|
+
| Task Master-style planners | Backlog decomposition and task state. | Complementary; Harness does not own backlog state. |
|
|
97
|
+
| Context7/Serena-style retrieval | External docs, symbols or repository retrieval. | Complementary; Harness owns local intended boundaries. |
|
|
98
|
+
|
|
99
|
+
## Try It In 60 Seconds
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
mkdir project-tiny-context-harness-demo
|
|
103
|
+
cd project-tiny-context-harness-demo
|
|
104
|
+
git init
|
|
105
|
+
npm init -y
|
|
106
|
+
npm install -D project-tiny-context-harness@latest
|
|
107
|
+
npx --yes --package project-tiny-context-harness@latest ty-context init
|
|
108
|
+
make validate-context
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Expected result:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
AGENTS.md
|
|
115
|
+
project_context/
|
|
116
|
+
context.toml
|
|
117
|
+
global.md
|
|
118
|
+
architecture.md
|
|
119
|
+
areas/main.md
|
|
120
|
+
areas/main/verification.md
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Fresh-agent test prompt:
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
Read AGENTS.md and project_context/** first. Summarize the project goal, non-goals, architecture boundaries, validation entry points and next safe action before proposing code changes.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Source checkout preview:
|
|
130
|
+
|
|
131
|
+
Open <https://codespaces.new/Seven128/project-tiny-context-harness>, or run locally:
|
|
132
|
+
|
|
133
|
+
```sh
|
|
134
|
+
git clone https://github.com/Seven128/project-tiny-context-harness.git
|
|
135
|
+
cd project-tiny-context-harness
|
|
136
|
+
npm ci
|
|
137
|
+
npm run smoke:quickstart
|
|
138
|
+
npm run preview:pack
|
|
139
|
+
cd /path/to/your/test-repo
|
|
140
|
+
npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.7.2.tgz
|
|
141
|
+
npx --no-install ty-context init --adopt
|
|
142
|
+
make validate-context
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Use this tarball path for source-preview testing, private review or package development. For normal installs, use `project-tiny-context-harness@latest` from npm. If it fails, open a [Source preview report](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=source_preview_report.yml).
|
|
146
|
+
|
|
147
|
+
## Minimal Context And Default Workflow
|
|
148
|
+
|
|
149
|
+
The default read path is `project_context/global.md`, `project_context/architecture.md`, `project_context/context.toml`, the default area root, then minimum graph-relevant role Context.
|
|
150
|
+
|
|
151
|
+
Only near-universal recovery facts should use `read_policy = "default"`; specialized detail should be task-triggered `on-demand`. `ty-context doctor` reports the deterministic default Context footprint, soft-budget overages and byte-identical default files as advisory maintenance signals, not a new gate.
|
|
152
|
+
|
|
153
|
+
### Bounded Context discovery
|
|
154
|
+
|
|
155
|
+
Before deciding `Context Delta`, the Agent combines two low-state routes:
|
|
156
|
+
|
|
157
|
+
1. collect area, role, trigger and graph candidates from `context.toml`;
|
|
158
|
+
2. run one bounded text search over `project_context/**` with a small set of high-signal task terms, including explicit area/module names and relevant API/schema/state/security/verification/deployment language;
|
|
159
|
+
3. merge the candidates and read only semantically relevant files.
|
|
160
|
+
|
|
161
|
+
The bounded search supplements rather than replaces Agent semantic judgment. It creates no vector or persistent index, cache, registry, search state or second authority. It can still miss unrelated synonyms or indirect dependencies, so high-risk work retains Architecture Context Hit and final Contract Conformance.
|
|
162
|
+
|
|
163
|
+
Ordinary tasks:
|
|
164
|
+
|
|
165
|
+
1. resolve minimum relevant Context through manifest routing plus bounded Context search;
|
|
166
|
+
2. decide `Context Delta: none|required`;
|
|
167
|
+
3. update durable facts before code when required;
|
|
168
|
+
4. use the platform's internal plan;
|
|
169
|
+
5. implement and run project-owned verification;
|
|
170
|
+
6. perform Contract Conformance and Context drift checks.
|
|
171
|
+
|
|
172
|
+
The default workflow has no required plan artifact, matrix, verdict, evidence ledger, persistent retrieval index or second plan. Duration, file count and complexity never auto-enable long-task state.
|
|
173
|
+
|
|
174
|
+
Plan Validator commands no longer exist; existing plan, matrix or verdict files remain ordinary user files.
|
|
175
|
+
|
|
176
|
+
### Architecture And Modularity Guidance
|
|
177
|
+
|
|
178
|
+
Technical architecture support is a Minimal Context capability. For high-risk work, `Architecture Context Hit`, `Decision Rationale Hit: existing|required|none` and `Modularity Check: none|required|exception` are internal routing questions inside the platform's internal plan. No Task Contract or fixed `plan.md` is required. The risk-triggered gate covers durable module/capability boundaries, public API/schema/data or persistence, source-of-truth/state ownership, dependency direction, cross-area work, migration/security/recovery and reusable abstractions; it resolves owner, unique source of truth, lifecycle/failure/compatibility, forbidden shortcuts and a project-owned executable architecture check. Small fixes do not pay this ceremony.
|
|
179
|
+
|
|
180
|
+
Do not invent rationale: store stable reasons, rejected alternatives or tradeoffs only in the smallest durable Context surface, and remember that architecture Context does not prove product quality. Harness routes repository-native checks rather than becoming a language-generic architecture analyzer. Modularity diagnostics identify the highest-risk function and line.
|
|
181
|
+
|
|
182
|
+
`ty-context check-modularity` audits selected handwritten source. `validate-code-modularity` and `validate-harness` enforce it separately from `validate-context`.
|
|
183
|
+
|
|
184
|
+
#### Modularity Policy
|
|
185
|
+
|
|
186
|
+
Newly generated Harness configs default to `strict_except_generated`. Generated/build files remain excluded; `strict_except_generated` rejects configured `modularity.waivers`. Projects with bounded legacy exceptions may opt into `scoped_waivers`, whose entries require `path`, `category`, `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
|
|
187
|
+
|
|
188
|
+
### Product Surface Contract
|
|
189
|
+
|
|
190
|
+
`context_surface_contract` compiles durable screen/page/CLI responsibility using the existing `contract`, area/subdomain and verification roles; `product-surface-contract.md` is the package template. Product Surface Contract authoring uses Source-to-Context judgment and Contract Conformance; it must not add a new product-surface Context role or claim product-quality proof.
|
|
191
|
+
|
|
192
|
+
### Visual Delivery Guidance
|
|
193
|
+
|
|
194
|
+
For material design-system, redesign, high-fidelity or visual-polish work, `context_uiux_design` keeps a task-local risk-proportional Visual Coverage Set across production surfaces/components, viewports, themes/modes, states, content stress and accessibility/motion conditions. It is internal planning, not a required matrix or authority. Durable surface/interaction facts remain in `project_context/**`; durable visual-system semantics and rationale remain in `DESIGN.md`; the project names one authored exact token source and generation direction. `context_development_engineer` binds that intent to production components/routes and reports only combinations actually rendered and checked.
|
|
195
|
+
|
|
196
|
+
An explicit Long-Task uses its existing Requirement, Control, Assertion, `ui_browser`, verification-input and `external_confirmation` mechanisms for material visual expectations. Acceptance-affecting screenshot baselines are frozen verifier inputs, generated screenshots/diffs remain review artifacts, and subjective design or new-baseline approval remains external. No visual Schema, risk level, lifecycle state, Gate or required artifact is added.
|
|
197
|
+
|
|
198
|
+
### Optional Source Plan Authoring
|
|
199
|
+
|
|
200
|
+
Use `/source-plan-authoring` for an explicitly requested initial plan, Source Plan, source draft, or synthesis/refinement/audit of later implementation or Contract-authoring Source. It accepts either one substantially complete plan or a sparse goal plus mixed notes, product/technical documents, screenshots, diagrams and other attachments; a short instruction identifying their roles, the goal, reference authority and desired elaboration is sufficient.
|
|
201
|
+
|
|
202
|
+
It produces one self-contained Markdown document with a complete input inventory, preserved direct requirements and traceable necessary derivations. Before comparative research or a material product, technical, architecture or provider selection, it asks a concise targeted question when an unknown user priority such as quality versus cost, speed, reliability, privacy, lock-in or operational burden could change the research scope, candidate set or recommendation; there is no fixed questionnaire and known preferences are not re-asked. Once that preference envelope is clear, it decides what research is needed and uses current authoritative or primary sources for external capability, price, quota, license, compatibility, region, security or support claims. A request to synthesize, refine, complete or use judgment then delegates plan-level authoring: each supported recommendation is recorded as `delegated` with its instruction, preference/evidence basis and exact meaning instead of triggering approval, including high-impact plan semantics. Real payment, contracting, production release, destructive production mutation, permission grants, sensitive-data transmission and required legal/security/human approval remain `EXT`; only conflicts, user-reserved choices, missing material preferences or cases with no defensible recommendation remain `DEC`/`decision_required`. Interactive products are expanded through every in-scope surface to material control level, including placement, behavior, validation, navigation, loading/empty/success/failure/recovery/permission feedback and accessibility. The plan retains semantic Outcome boundaries, stable keys/anchors, Runtime-exact Fact/Affected-Outcome `RISK` items, distinct `OBL`/`HINT` items and one observable scenario per `AC` with explicit accepted `REQ`/`CTRL`/`OBL`/`NCOMP` keys. Risk names are the ten Contract facts: use `data_migration`, split critical-path weak observability into `critical_user_path` plus `weak_observability`, and preserve `multi_repository_change` for Compiler rejection.
|
|
203
|
+
|
|
204
|
+
It does not update Context, bind a repository, generate Delivery Contract YAML, execute implementation, create workflow state or claim completion. `HINT` is not a Material Source Item, and the Skill emits no `ty-source-item` markers. A Source Plan is Source, not a Contract Draft. The structure is optional; ordinary prose remains valid Long-Task Source.
|
|
205
|
+
|
|
206
|
+
## Single-Goal Rolling Delivery
|
|
207
|
+
|
|
208
|
+
The explicit Long-Task Workflow uses one platform-native Goal, one user-selected repository/workspace, one complete `long-task-delivery-v2` Contract and one Final Gate. Outcomes are independently decidable acceptance units; Delivery Set orchestration and top-level Contract splitting inside one selected delivery are retired.
|
|
209
|
+
|
|
210
|
+
Contract authoring preserves stable Source keys/anchors where practical. If an unknown preference could materially change comparative research or selection, it asks before proceeding. Once the decision criteria are clear, a defensible recommended plan choice is recorded in real Source with its delegation, preference/evidence basis and exact meaning before Contract mapping; it is never added only in YAML. Plan delegation does not authorize a real high-risk external action, which remains an explicit external confirmation. Meaning-preserving structural decomposition and evidence-backed repository binding may continue, while conflicting, user-reserved, missing-preference or unsupported new product semantics require `decision_required`. Missing recommended Source Plan structure alone never blocks authoring.
|
|
211
|
+
|
|
212
|
+
Before the first successful formal Compile, `delivery-contract.yaml` is one non-authoritative Contract Draft. `/long-task-workflow` revises the same Draft across repository/Context reads and Preflight repairs; a complete Contract need not fit one response. Integrated authoring keeps repository evidence and findings attached to the same object and avoids a second handoff, plan, authority or Receipt. There is no standalone Contract Draft Skill or Authoring State.
|
|
213
|
+
|
|
214
|
+
The Long-Task Skill keeps objective/boundary/phase routing in its main file and loads one-level Contract-authoring, evidence-design and authority-lifecycle references only when that phase applies. This is instruction packaging only, not a second authority. Declared architecture invariants use existing obligations/constraints/forbidden shortcuts, owner/path/Binding boundaries and project-owned executable Checks; a functional AC cannot substitute for an independently failing architecture claim.
|
|
215
|
+
|
|
216
|
+
A Draft Outcome is simply an Outcome before Authority Lock. Outcomes decompose independently observable, decidable and target-verifiable results to improve dependency-ready implementation, targeted verification, failure localization, resume and stale-result invalidation. `depends_on` means acceptance readiness and the Rolling Frontier is temporary; an Outcome is not a Worker, scheduler task, queue or parallel unit. Outcome decomposes execution and diagnosis, not completion authority, so one complete current-snapshot Final Gate remains mandatory.
|
|
217
|
+
|
|
218
|
+
When a declared result can pass on a proxy surface while failing in its target runtime, the earliest owning Outcome declares a project-owned Check that exercises the target during the current Check execution. A tracked report, screenshot, binary, log or historical run cannot be the sole runtime proof. The Goal runs that Check after the first runnable slice and, after coalescing related edits, before dependent work grows when declared `input_paths` or Binding carriers make Progress stale. This reuses targeted verification and Final Gate: it adds no `platform_impact` flags or completion state, requires no full rebuild per Outcome/edit, never accepts early and is rerun by Final Gate.
|
|
219
|
+
|
|
220
|
+
### One-time execution-model choice
|
|
221
|
+
|
|
222
|
+
The first successful Compile creates Authority Lock and returns:
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"execution_model_checkpoint": {
|
|
227
|
+
"required": true,
|
|
228
|
+
"phase": "post_authority_lock_pre_implementation",
|
|
229
|
+
"options": ["continue_current_model", "switch_model_then_resume"]
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
232
234
|
Before product implementation, the Agent asks the user to continue with the current model or switch models and then resume the active Long-Task. A task-specific model choice already stated explicitly satisfies the checkpoint. Later Compile revisions return `{ "required": false }` and do not repeat it.
|
|
233
235
|
|
|
234
236
|
Harness cannot switch the host-selected model. It creates no checkpoint file, acknowledgement state, model route, model-tier scheduler or automatic model switch. The choice is a one-time execution-cost affordance enabled by locked Authority and Final Gate protection; it is not acceptance evidence.
|
|
235
237
|
|
|
236
|
-
Post-lock revisions use three fail-closed paths. Proven monotonic/mechanical strengthening auto-adopts. A candidate whose only protected reasons are owner/change/support expansion may run existing active Check identities with unchanged runner/verifier authority through stateless `diagnose-revision`; safe monotonic strengthening may coexist, but those transient results write no authority, pending decision, Progress, cache or Receipt and cannot accept. Semantic changes, proof weakening, runner or verifier-content changes, and risk increases are preview-only; risk downgrade is rejected. Related edits remain in the same `delivery-contract.yaml` until one ordinary `compile --revise` emits an exact hash-bound approval summary; `status` and `resume` project that same pending decision. Exact adoption invalidates
|
|
237
|
-
|
|
238
|
-
```text
|
|
239
|
-
ty-context long-task init <workdir>
|
|
240
|
-
ty-context long-task preflight <workdir>
|
|
238
|
+
Post-lock revisions use three fail-closed paths. Proven monotonic/mechanical strengthening auto-adopts. A candidate whose only protected reasons are owner/change/support expansion may run existing active Check identities with unchanged runner/verifier authority through stateless `diagnose-revision`; safe monotonic strengthening may coexist, but those transient results write no authority, pending decision, Progress, cache or Receipt and cannot accept. Semantic changes, proof weakening, runner or verifier-content changes, and risk increases are preview-only; risk downgrade is rejected. A rolling blocker alone cannot reclassify or remove machine-verifiable scope; a real scope change first becomes marked Source. Related edits remain in the same `delivery-contract.yaml` until one ordinary `compile --revise` emits an exact hash-bound approval summary containing changed semantic fields, Source/Product Claim reductions, proof reductions and external-confirmation keys; `status` and `resume` project that same pending decision. Exact adoption reports `delivery_completed_by_this_event: false`, invalidates affected evidence, returns to rolling implementation or repair and never replaces the complete current-snapshot Final Gate.
|
|
239
|
+
|
|
240
|
+
```text
|
|
241
|
+
ty-context long-task init <workdir>
|
|
242
|
+
ty-context long-task preflight <workdir>
|
|
241
243
|
ty-context long-task compile <workdir>
|
|
242
244
|
ty-context long-task compile <workdir> --revise
|
|
243
245
|
ty-context long-task diagnose-revision <workdir> [--outcome <key>] [--check <key>]
|
|
244
246
|
ty-context long-task approve-authority-revision <workdir> --revision <sha>
|
|
245
|
-
ty-context long-task explain <workdir>
|
|
246
|
-
ty-context long-task verify <workdir> [--outcome <key>] [--check <key>]
|
|
247
|
-
ty-context long-task status <workdir>
|
|
248
|
-
ty-context long-task resume <workdir>
|
|
249
|
-
ty-context long-task doctor <workdir>
|
|
250
|
-
ty-context long-task final-gate <workdir>
|
|
251
|
-
ty-context long-task stop-check <workdir> [--message <text>]
|
|
252
|
-
ty-context long-task close <workdir>
|
|
253
|
-
ty-context long-task abandon <workdir> [--force-corrupt-state]
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
Compact authoring omits only deterministic defaults and normalizes identically to the expanded form. `preflight` is a read-only aggregated Source/REQ/CTRL/OBL/AC and repository check that creates no authority, state, Receipt or runner execution. Compile generates Global plus Outcome Result/Requirement/Control-field/Non-completing/Technical Claims, rejects uncovered Claims and makes the first successful formal Compile the Authority Lock. The first Compile result emits `execution_model_checkpoint.required: true`; later Compile revisions emit `required: false`. Every later authority change still compares with active authority regardless of progress, Receipt/cache deletion or implementation restoration. Source/Context/Product/Acceptance/Global/verifier content, resolved runners and verification inputs are frozen in the common-dir Active Authority V3 record.
|
|
257
|
-
|
|
258
|
-
`diagnose-revision` performs a side-effect-free candidate Compile and only exercises existing active Check identities whose runner/verifier authority is unchanged. Its output explicitly denies acceptance, Progress and pending-state writes. Protected `compile --revise` emits `authority_revision_pending`, the exact decision id and a deterministic
|
|
259
|
-
|
|
260
|
-
Targeted verify rechecks active task/revision/compiled/worktree identity before writing scoped Progress. Counterfactual Findings first enter the owning Check Result, invalidate an otherwise passed Check, clear Claim Proofs and remain visible in status/resume; Global Checks reuse the same Progress type without a Global Outcome state. Final Gate repeats the identity check after all Checks; Stop/close clear only the accepted identity through CAS. Commit, migration, clear and abandon share one active-state lock. `abandon --force-corrupt-state` is reserved for corrupt continuity or stale lock cleanup and preserves Contract, Source, Context and Git content.
|
|
261
|
-
|
|
262
|
-
`status` and read-only `resume` report the current fresh Final Receipt as `final_workflow_status` (or `null` after drift) plus the active Contract's complete `external_confirmations`.
|
|
263
|
-
|
|
264
|
-
New authoring uses inline Outcomes. Existing `outcome_files` remains physical compatibility only and creates no semantic or completion boundary. A Long Task requires real Source, and every declared Source file contains at least one Material Item; background-only references remain outside Source Authority. Every Material Source Item is wrapped in the original Markdown with a non-rendering, uniquely keyed `ty-source-item:start/end` marker; `control` is a first-class kind, marker keys and `source_claim` keys are set-equal, and statements are text-exact after limited whitespace normalization. Every non-decision Source item owns one same-kind, same-text canonical target and duplicate ownership fails. Outcome Source Acceptance maps to criterion-identical `<outcome>.<check>.<assertion>` with an independently Source-backed non-Result Claim; Global Source Acceptance maps to criterion-identical `GLOBAL.<check>.<assertion>`, proves no Outcome Claim and needs an independently Source-backed Global Claim. Typed dispositions keep Requirements, Controls, Acceptance, Results, Fact/Affected-Outcome Risk, Non-goals, External Confirmations and Decisions distinct; `out_of_scope` is retired. Ordinary prose remains valid after marker-only enumeration.
|
|
265
|
-
|
|
266
|
-
After Authority Lock, semantic/Product Claim/Acceptance/verifier-content changes and proof weakening require exact user approval. Pure package root/version relocation auto-revises; schema/hook byte changes do not. Contract and Check execution field policies prevent new fields from bypassing authority or raw-execution identity. Every path-bearing field uses one canonical grammar: Windows separators and one leading `./` normalize, while internal `.`/`..`, controls, absolute/drive/UNC paths and unsupported glob syntax fail closed.
|
|
267
|
-
|
|
268
|
-
Supported runners: `package_script`, `project_binary`, `node_oracle`, `playwright_test`.
|
|
269
|
-
|
|
270
|
-
Supported proof surfaces: `ui_browser`, `runtime_behavior`, `api_contract`, `data_state`, `security_boundary`, `population_coverage`, `implementation_structure`.
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
Version 0.6.0
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
247
|
+
ty-context long-task explain <workdir>
|
|
248
|
+
ty-context long-task verify <workdir> [--outcome <key>] [--check <key>]
|
|
249
|
+
ty-context long-task status <workdir>
|
|
250
|
+
ty-context long-task resume <workdir>
|
|
251
|
+
ty-context long-task doctor <workdir>
|
|
252
|
+
ty-context long-task final-gate <workdir>
|
|
253
|
+
ty-context long-task stop-check <workdir> [--message <text>]
|
|
254
|
+
ty-context long-task close <workdir>
|
|
255
|
+
ty-context long-task abandon <workdir> [--force-corrupt-state]
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Compact authoring omits only deterministic defaults and normalizes identically to the expanded form. `preflight` is a read-only aggregated Source/REQ/CTRL/OBL/AC and repository check that creates no authority, state, Receipt or runner execution. Compile generates Global plus Outcome Result/Requirement/Control-field/Non-completing/Technical Claims, rejects uncovered Claims and makes the first successful formal Compile the Authority Lock. Every Compile result includes a lifecycle event, `delivery_completed_by_this_event: false`, `native_goal_effect: none` and a next action. The first Compile result emits `execution_model_checkpoint.required: true`; later Compile revisions emit `required: false`. Every later authority change still compares with active authority regardless of progress, Receipt/cache deletion or implementation restoration. Source/Context/Product/Acceptance/Global/verifier content, resolved runners and verification inputs are frozen in the common-dir Active Authority V3 record.
|
|
259
|
+
|
|
260
|
+
`diagnose-revision` performs a side-effect-free candidate Compile and only exercises existing active Check identities whose runner/verifier authority is unchanged. Its output explicitly denies acceptance, Progress and pending-state writes. Protected `compile --revise` emits `authority_revision_pending`, the exact decision id and a deterministic material summary before failing closed; approving a different or stale id is rejected. Adoption emits `authority_revision_adopted` and returns to rolling execution rather than completion.
|
|
261
|
+
|
|
262
|
+
Targeted verify rechecks active task/revision/compiled/worktree identity before writing scoped Progress. Counterfactual Findings first enter the owning Check Result, invalidate an otherwise passed Check, clear Claim Proofs and remain visible in status/resume; Global Checks reuse the same Progress type without a Global Outcome state. Final Gate repeats the identity check after all Checks; Stop/close clear only the accepted identity through CAS. Commit, migration, clear and abandon share one active-state lock. `abandon --force-corrupt-state` is reserved for corrupt continuity or stale lock cleanup and preserves Contract, Source, Context and Git content.
|
|
263
|
+
|
|
264
|
+
`status` and read-only `resume` report the current fresh Final Receipt as `final_workflow_status` (or `null` after drift) plus the active Contract's complete `external_confirmations`. `progress_passing` is targeted repair evidence rather than “Outcome complete”; `progress_stale` is not a current pass, and `final_workflow_status: null` means unfinished. Every accepted Stop emits one non-blocking terminal-scope `systemMessage`; external-pending results also name every confirmation. Final/Stop/close report `acceptance_scope: declared_machine_authority` and `native_goal_effect: none`; close also reports `closed_scope: machine_authority`. Before platform-native Goal completion, the Agent performs a veto-only Goal/user-to-Source conformance review that cannot create proof. `status: closed` means only that machine Authority was cleared, not that the native Goal or external delivery completed.
|
|
265
|
+
|
|
266
|
+
New authoring uses inline Outcomes. Existing `outcome_files` remains physical compatibility only and creates no semantic or completion boundary. A Long Task requires real Source, and every declared Source file contains at least one Material Item; background-only references remain outside Source Authority. Every Material Source Item is wrapped in the original Markdown with a non-rendering, uniquely keyed `ty-source-item:start/end` marker; `control` is a first-class kind, marker keys and `source_claim` keys are set-equal, and statements are text-exact after limited whitespace normalization. Every non-decision Source item owns one same-kind, same-text canonical target and duplicate ownership fails. Outcome Source Acceptance maps to criterion-identical `<outcome>.<check>.<assertion>` with an independently Source-backed non-Result Claim; Global Source Acceptance maps to criterion-identical `GLOBAL.<check>.<assertion>`, proves no Outcome Claim and needs an independently Source-backed Global Claim. Typed dispositions keep Requirements, Controls, Acceptance, Results, Fact/Affected-Outcome Risk, Non-goals, External Confirmations and Decisions distinct; `out_of_scope` is retired. Ordinary prose remains valid after marker-only enumeration.
|
|
267
|
+
|
|
268
|
+
After Authority Lock, semantic/Product Claim/Acceptance/verifier-content changes and proof weakening require exact user approval. Pure package root/version relocation auto-revises; schema/hook byte changes do not. Contract and Check execution field policies prevent new fields from bypassing authority or raw-execution identity. Every path-bearing field uses one canonical grammar: Windows separators and one leading `./` normalize, while internal `.`/`..`, controls, absolute/drive/UNC paths and unsupported glob syntax fail closed.
|
|
269
|
+
|
|
270
|
+
Supported runners: `package_script`, `project_binary`, `node_oracle`, `playwright_test`.
|
|
271
|
+
|
|
272
|
+
Supported proof surfaces: `ui_browser`, `runtime_behavior`, `api_contract`, `data_state`, `security_boundary`, `population_coverage`, `implementation_structure`.
|
|
273
|
+
|
|
274
|
+
After a blocker-driven semantic or proof revision, only affected weak-observability or high-risk behavioral Claims receive a causal-boundary review. Evidence must reach the furthest independently failing declared boundary; when carrier existence can diverge from the claimed capability, use a capability-disrupting Counterfactual. This adds no product taxonomy, universal runtime suite, mutation type or persistent review state.
|
|
275
|
+
|
|
276
|
+
## Risk And Evidence
|
|
277
|
+
|
|
278
|
+
L0 local work stays on the default workflow. L1 standard long work uses the Delivery Contract. L2 strict is the minimum for public API/schema, persistent data, migration, security/permission boundaries, irreversible effects, full-population operations, or a critical path with weak observability. Strict proof binds to the affected Outcome; multi-repository delivery is rejected.
|
|
279
|
+
|
|
280
|
+
Users may raise risk to strict. Explicit `standard` below the computed floor fails. Strict negative, counterfactual, population, security, environment and rollback/recovery proof is compiler-enforced as applicable. Scope escape returns a `scope_escape` Finding for revision and recompilation in the same Goal.
|
|
281
|
+
|
|
282
|
+
Agent prose, a command exit code, handwritten state, historical targeted passes and missing/weak proof cannot create accepted. Evidence adapters derive from runner kind: only `playwright_json_v1` from `playwright_test` may prove `ui_browser`; other runners produce `structured_json_v2`. Every Outcome has a non-Result atomic Claim and all required surfaces must be non-empty, unique and covered. Across every Check sharing one Raw Execution identity, a Claim-bearing Observation is unique to one Assertion. Playwright Claim evidence is only `playwright.case.<ac>.passed equals true`; `[ac:<key>]` binds one declared AC per Test, ordinary tags are ignored, and missing/skipped/flaky/unexpected/timed-out/interrupted/multi-AC/duplicate-per-project evidence fails closed while distinct projects aggregate all-of. Structured Counterfactuals require exit zero; weak Playwright Counterfactuals may accept exit one only when every unexpected Test Instance is exactly a designated executed AC and no root/unbound/extra/timeout/interruption/flaky or other Evidence failure exists. Ordinary Playwright Baselines still require exit zero, and report/instance diagnostic observations cannot prove Claims. Each Claim-bearing structured Check needs same-Check, Claim-related Counterfactual sensitivity; unrelated Artifacts/Checks do not count, Population exempts only its same-Check Claims except under weak observability, and Result sensitivity needs a related non-Result root. Claim/Population proofs are emitted only for a fully passed Check. Findings and Explain trace Source, canonical target, Claim, AC/criterion, required surfaces, Check, adapter, Observation and owner paths.
|
|
283
|
+
|
|
284
|
+
## Upgrade And Compatibility
|
|
285
|
+
|
|
286
|
+
```powershell
|
|
287
|
+
ty-context upgrade
|
|
288
|
+
ty-context sync
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
Version 0.6.0 retires V1 and the repo-local Hook. Development-period V2 Active Authority, Progress and Receipts are not migrated; doctor reports `manual_required`, and the operator upgrades the Contract before forming a new Authority Lock. Invalid JSON, marker/record mismatch or stale lock is never guessed from damaged record paths; doctor reports the explicit contained cleanup command `ty-context long-task abandon <workdir> --force-corrupt-state`.
|
|
292
|
+
|
|
293
|
+
Version 0.6.0 keeps the `long-task-delivery-v2` name and physical `outcome_files` parser form while defining the first public V2 semantics; development-period Drafts receive explicit migration diagnostics. Optional Source Plan authoring and the additive execution-model checkpoint add no Schema, CLI, Preflight, Validator, Receipt, Authority or persisted model-routing state. Preflight and direct Compile share one activation-safety validator, so readable `criterion` text and all other completion-safety rules remain mandatory when Preflight is skipped.
|
|
294
|
+
|
|
295
|
+
After updating the package, run `ty-context upgrade`. Use `ty-context upgrade --check` first when you need a read-only plan.
|
|
296
|
+
|
|
297
|
+
Release metadata declares one update mode: `sync-only`, `upgrade-required` or `manual-required`. Upgrade plans report steps as `safe_pending`, `manual_required` or `blocked`. A `sync-only` release may use `sync`; `sync` does not run migrations. An `upgrade-required` release must run upgrade, while `manual-required` includes an explicit operator step.
|
|
298
|
+
|
|
299
|
+
## Verification
|
|
300
|
+
|
|
301
|
+
```powershell
|
|
298
302
|
npm run format:check
|
|
299
303
|
npm run typecheck --workspace project-tiny-context-harness
|
|
300
304
|
npm run build --workspace project-tiny-context-harness
|
|
@@ -303,38 +307,38 @@ npm run test:affected
|
|
|
303
307
|
npm run test:long-task:trust
|
|
304
308
|
npm run test:long-task-performance --workspace project-tiny-context-harness
|
|
305
309
|
npm test
|
|
306
|
-
npm run smoke:quickstart
|
|
307
|
-
npm run preview:pack
|
|
308
|
-
npm run launch:check
|
|
309
|
-
node packages/ty-context/dist/cli.js package check-source
|
|
310
|
-
make validate-harness
|
|
310
|
+
npm run smoke:quickstart
|
|
311
|
+
npm run preview:pack
|
|
312
|
+
npm run launch:check
|
|
313
|
+
node packages/ty-context/dist/cli.js package check-source
|
|
314
|
+
make validate-harness
|
|
311
315
|
```
|
|
312
316
|
|
|
313
317
|
`test:affected` is the edit/fix loop. `test:long-task:trust` is the frozen-candidate high-impact boundary gate used by pull-request CI. `npm test` is the complete release regression retained on `main` and publish; do not rerun it after every small repair. Explicit delivery-contract and complete Long-Task gates remain available as package workspace scripts.
|
|
314
318
|
|
|
315
319
|
The modularity gate is `ty-context check-modularity`. Scoped waivers require `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
|
|
316
|
-
|
|
317
|
-
The synchronized local preview tarball is named `project-tiny-context-harness-0.7.
|
|
318
|
-
|
|
319
|
-
## Community And Further Reading
|
|
320
|
-
|
|
321
|
-
Feedback from real repositories is especially useful. Open an [adoption report](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=adoption_report.yml) with the recovery problem and what remained unclear.
|
|
322
|
-
|
|
323
|
-
Early feedback and starter issues:
|
|
324
|
-
|
|
325
|
-
- Report a [Context recovery gap](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=context_gap.yml) through `context_gap.yml`.
|
|
326
|
-
- Share results in the pinned [adoption reports issue](https://github.com/Seven128/project-tiny-context-harness/issues/4).
|
|
327
|
-
- Pick a starter issue: [demo](https://github.com/Seven128/project-tiny-context-harness/issues/5), [sample walkthrough](https://github.com/Seven128/project-tiny-context-harness/issues/6), [benchmark rerun](https://github.com/Seven128/project-tiny-context-harness/issues/7) or [launch FAQ](https://github.com/Seven128/project-tiny-context-harness/issues/8).
|
|
328
|
-
- Keep claims narrow: recovery evidence is useful; benchmark speedup claims need fresh Minimal Context benchmark runs.
|
|
329
|
-
|
|
330
|
-
Read the [roadmap](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/roadmap.md), [Benchmarking And Evidence](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/benchmarking.md), [comparison guide](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/comparison.md), [adoption guide](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/adopt-existing-repo.md), [agent surface recipes](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/agent-surface-recipes.md) and [FAQ](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/faq.md).
|
|
331
|
-
|
|
332
|
-
For concrete examples, see the [fresh-agent recovery walkthrough](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/examples/fresh-agent-recovery.md), [Minimal Context sample guide](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/examples/minimal-context-sample.md) and [browseable sample repository](https://github.com/Seven128/project-tiny-context-harness/tree/main/examples/minimal-context-sample). The longer argument is [Fresh coding-agent sessions need project memory, not more ceremony](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/articles/fresh-agent-project-memory.md).
|
|
333
|
-
|
|
334
|
-
## Honest Limits
|
|
335
|
-
|
|
336
|
-
Tiny Context does not create or restore a platform Goal, prove that every requirement was declared, guarantee bounded keyword search finds every synonym or indirect dependency, switch the host-selected model, provide core parallel mutation, observe platform tokens/model calls, or own Git/PR/CI/deployment/human product confirmation. The installed package verifier and Git metadata are trusted; external platforms own network isolation, and deliberate same-user/admin tampering remains outside the local threat model.
|
|
337
|
-
|
|
338
|
-
## License
|
|
339
|
-
|
|
340
|
-
MIT
|
|
320
|
+
|
|
321
|
+
The synchronized local preview tarball is named `project-tiny-context-harness-0.7.2.tgz`.
|
|
322
|
+
|
|
323
|
+
## Community And Further Reading
|
|
324
|
+
|
|
325
|
+
Feedback from real repositories is especially useful. Open an [adoption report](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=adoption_report.yml) with the recovery problem and what remained unclear.
|
|
326
|
+
|
|
327
|
+
Early feedback and starter issues:
|
|
328
|
+
|
|
329
|
+
- Report a [Context recovery gap](https://github.com/Seven128/project-tiny-context-harness/issues/new?template=context_gap.yml) through `context_gap.yml`.
|
|
330
|
+
- Share results in the pinned [adoption reports issue](https://github.com/Seven128/project-tiny-context-harness/issues/4).
|
|
331
|
+
- Pick a starter issue: [demo](https://github.com/Seven128/project-tiny-context-harness/issues/5), [sample walkthrough](https://github.com/Seven128/project-tiny-context-harness/issues/6), [benchmark rerun](https://github.com/Seven128/project-tiny-context-harness/issues/7) or [launch FAQ](https://github.com/Seven128/project-tiny-context-harness/issues/8).
|
|
332
|
+
- Keep claims narrow: recovery evidence is useful; benchmark speedup claims need fresh Minimal Context benchmark runs.
|
|
333
|
+
|
|
334
|
+
Read the [roadmap](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/roadmap.md), [Benchmarking And Evidence](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/benchmarking.md), [comparison guide](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/comparison.md), [adoption guide](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/adopt-existing-repo.md), [agent surface recipes](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/agent-surface-recipes.md) and [FAQ](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/faq.md).
|
|
335
|
+
|
|
336
|
+
For concrete examples, see the [fresh-agent recovery walkthrough](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/examples/fresh-agent-recovery.md), [Minimal Context sample guide](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/examples/minimal-context-sample.md) and [browseable sample repository](https://github.com/Seven128/project-tiny-context-harness/tree/main/examples/minimal-context-sample). The longer argument is [Fresh coding-agent sessions need project memory, not more ceremony](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/articles/fresh-agent-project-memory.md).
|
|
337
|
+
|
|
338
|
+
## Honest Limits
|
|
339
|
+
|
|
340
|
+
Tiny Context does not create or restore a platform Goal, prove that every requirement was declared, guarantee bounded keyword search finds every synonym or indirect dependency, switch the host-selected model, provide core parallel mutation, observe platform tokens/model calls, or own Git/PR/CI/deployment/human product confirmation. The installed package verifier and Git metadata are trusted; external platforms own network isolation, and deliberate same-user/admin tampering remains outside the local threat model.
|
|
341
|
+
|
|
342
|
+
## License
|
|
343
|
+
|
|
344
|
+
MIT
|