project-tiny-context-harness 0.2.55 → 0.2.57

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/assets/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # Project Tiny Context Harness
2
-
1
+ # Project Tiny Context Harness
2
+
3
3
  [![npm version](https://img.shields.io/npm/v/project-tiny-context-harness.svg)](https://www.npmjs.com/package/project-tiny-context-harness)
4
4
  [![Package CI](https://github.com/Seven128/project-tiny-context-harness/actions/workflows/package.yml/badge.svg)](https://github.com/Seven128/project-tiny-context-harness/actions/workflows/package.yml)
5
5
  [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Seven128/project-tiny-context-harness/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Seven128/project-tiny-context-harness)
@@ -11,7 +11,7 @@ Translations: [Chinese (Simplified)](README.zh-CN.md)
11
11
  Project Tiny Context Harness is repo-native project memory for AI coding agents.
12
12
 
13
13
  `project-tiny-context-harness` ships Project Tiny Context Harness through the `ty-context` CLI. It installs **Minimal Context Harness**: a compact `project_context/**` fact source, a short `AGENTS.md` startup router, role Skills and a `validate-context` gate so fresh agents can recover project intent, boundaries, verification entry points and next safe actions quickly.
14
-
14
+
15
15
  It is not another full Tiny Context ceremony. The Harness maintains context quality; project tests, reviews, CI and human acceptance still own product quality.
16
16
 
17
17
  Think of it as durable project memory behind `AGENTS.md`, not another agent, process framework or task manager.
@@ -94,7 +94,7 @@ That smoke packs the local workspace, installs it into a disposable repo, runs `
94
94
  ```sh
95
95
  npm run preview:pack
96
96
  cd /path/to/your/test-repo
97
- npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.2.55.tgz
97
+ npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.2.57.tgz
98
98
  npx --no-install ty-context init --adopt
99
99
  make validate-context
100
100
  ```
@@ -104,9 +104,9 @@ If the source preview path fails, open a [Source preview report](https://github.
104
104
  Use it when coding agents repeatedly lose project intent across new chats, handoffs, RFC/debug turns or tool changes. The intended tradeoff is: keep durable intent and recovery paths; leave execution evidence to code, tests and review.
105
105
 
106
106
  ## Why It Exists
107
-
108
- Coding agents can move quickly inside one thread and still drift when a new chat, model, tool, reviewer or debugging session loses the project-specific facts that were never encoded anywhere stable.
109
-
107
+
108
+ Coding agents can move quickly inside one thread and still drift when a new chat, model, tool, reviewer or debugging session loses the project-specific facts that were never encoded anywhere stable.
109
+
110
110
  Most repositories already have README files, specs, tests and issue history, but fresh agents need a small, explicit recovery path: what the project is trying to do, what it must not do, where architecture boundaries live, how to validate changes and what durable facts changed after the last task. Minimal Context Harness makes that recovery path a first-class repo surface without adding a full planning ceremony.
111
111
 
112
112
  The product lesson is: **keep the memory, drop the ceremony**. Earlier stage-based workflows externalized requirements, design, implementation, review, test and release into explicit phase artifacts. Modern coding agents already internalize much of that ordinary software loop. Project Tiny Context Harness keeps the useful part: the smallest high-density repo context that survives fresh chats without forcing every task through phase transitions, work-product validation or Tiny Context-stage context splits.
@@ -114,56 +114,56 @@ The product lesson is: **keep the memory, drop the ceremony**. Earlier stage-bas
114
114
  ## Positioning
115
115
 
116
116
  | Adjacent tool type | Use it for | Harness stance |
117
- |---|---|---|
118
- | Spec-first kits | Turning a feature idea into structured specs and implementation plans. | Complementary. Keep final durable project facts in `project_context/**`; do not require spec documents for every task. |
119
- | BMAD-style workflows and full Tiny Context processes | Coordinated role/process ceremonies on high-risk work. | Lighter default. Preserve context quality without shipping phase gates or work-product trees. |
120
- | Task Master-style planners | Backlog decomposition and task execution state. | Complementary. Harness does not own task state; it owns durable project memory. |
121
- | Context7/Serena-style retrieval or code-intelligence tools | Pulling external docs, symbols or repository facts on demand. | Complementary. Harness keeps the local project truth that should travel with the repo. |
122
- | IDE or agent memory | Tool-specific continuity inside one product surface. | Portable fallback. Harness files are plain repo assets that any agent can read. |
123
-
124
- ## Try It In 60 Seconds
125
-
126
- ```sh
127
- mkdir project-tiny-context-harness-demo
128
- cd project-tiny-context-harness-demo
129
- git init
130
- npm init -y
131
- npm install -D project-tiny-context-harness@latest
132
- npx --yes --package project-tiny-context-harness@latest ty-context init
133
- make validate-context
134
- ```
135
-
136
- Then open `AGENTS.md`, `project_context/global.md` and `project_context/architecture.md`. Those files are the small recovery surface a fresh agent should read before changing the project.
137
-
138
- Expected result:
139
-
140
- ```text
141
- AGENTS.md
142
- project_context/
143
- context.toml
144
- global.md
145
- architecture.md
146
- areas/main.md
147
- areas/main/verification.md
148
- ```
149
-
150
- Fresh-agent test prompt:
151
-
152
- ```text
153
- 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.
154
- ```
155
-
117
+ |---|---|---|
118
+ | Spec-first kits | Turning a feature idea into structured specs and implementation plans. | Complementary. Keep final durable project facts in `project_context/**`; do not require spec documents for every task. |
119
+ | BMAD-style workflows and full Tiny Context processes | Coordinated role/process ceremonies on high-risk work. | Lighter default. Preserve context quality without shipping phase gates or work-product trees. |
120
+ | Task Master-style planners | Backlog decomposition and task execution state. | Complementary. Harness does not own task state; it owns durable project memory. |
121
+ | Context7/Serena-style retrieval or code-intelligence tools | Pulling external docs, symbols or repository facts on demand. | Complementary. Harness keeps the local project truth that should travel with the repo. |
122
+ | IDE or agent memory | Tool-specific continuity inside one product surface. | Portable fallback. Harness files are plain repo assets that any agent can read. |
123
+
124
+ ## Try It In 60 Seconds
125
+
126
+ ```sh
127
+ mkdir project-tiny-context-harness-demo
128
+ cd project-tiny-context-harness-demo
129
+ git init
130
+ npm init -y
131
+ npm install -D project-tiny-context-harness@latest
132
+ npx --yes --package project-tiny-context-harness@latest ty-context init
133
+ make validate-context
134
+ ```
135
+
136
+ Then open `AGENTS.md`, `project_context/global.md` and `project_context/architecture.md`. Those files are the small recovery surface a fresh agent should read before changing the project.
137
+
138
+ Expected result:
139
+
140
+ ```text
141
+ AGENTS.md
142
+ project_context/
143
+ context.toml
144
+ global.md
145
+ architecture.md
146
+ areas/main.md
147
+ areas/main/verification.md
148
+ ```
149
+
150
+ Fresh-agent test prompt:
151
+
152
+ ```text
153
+ 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.
154
+ ```
155
+
156
156
  If the agent can answer that without rediscovering the repo from scratch, the Harness is doing its job.
157
157
 
158
158
  A useful first answer should recover the project goal, non-goals, architecture boundaries, validation entry points and next safe action. It should not invent benchmark results or claim tests passed.
159
159
 
160
160
  Maintainers can verify the local package artifact with the same flow:
161
-
162
- ```sh
163
- npm run launch:check
164
- npm run smoke:quickstart
165
- ```
166
-
161
+
162
+ ```sh
163
+ npm run launch:check
164
+ npm run smoke:quickstart
165
+ ```
166
+
167
167
  Copy-ready launch materials live in [docs/launch/README.md](https://github.com/Seven128/project-tiny-context-harness/blob/main/docs/launch/README.md).
168
168
 
169
169
  For the stable product/design rationale, see [PROJECT_SPEC.md](PROJECT_SPEC.md).
@@ -194,37 +194,37 @@ For existing repositories, read the [adoption guide](docs/adopt-existing-repo.md
194
194
  For common launch and adoption questions, see the [FAQ](docs/faq.md).
195
195
 
196
196
  ## Repository Scope
197
-
198
- This repository is both the source workspace and a reference workspace for `project-tiny-context-harness`. It contains three product areas:
199
-
200
- - Harness source code: `packages/ty-context/src/**`, package assets, validators, migrations and source-sync logic.
201
- - npm package release logic: package metadata, build/test scripts and source asset drift checks for `project-tiny-context-harness`.
202
- - Delivery benchmark logic: `examples/delivery-benchmark/**`, used to compare baseline coding against Harness-assisted delivery under the same quality bar.
203
-
204
- Earlier stage-based workflow assets have been removed from the current source tree. The historical design and convergence reason are summarized in [PROJECT_SPEC.md](PROJECT_SPEC.md); new package consumers default to `project_context/**`.
205
-
206
- ## Install
207
-
208
- ```sh
209
- npm install -D project-tiny-context-harness@latest
210
- npx --yes --package project-tiny-context-harness@latest ty-context init
211
- ```
212
-
213
- For an existing project:
214
-
215
- ```sh
216
- npx --yes --package project-tiny-context-harness@latest ty-context init --adopt
217
- ```
218
-
219
- `init` creates:
220
-
221
- - `AGENTS.md`
222
- - `project_context/context.toml`
223
- - `project_context/global.md`
224
- - `project_context/architecture.md`
225
- - `project_context/areas/main.md`
226
- - `project_context/areas/main/verification.md`
227
- - `<harnessRoot>/config.yaml`
197
+
198
+ This repository is both the source workspace and a reference workspace for `project-tiny-context-harness`. It contains three product areas:
199
+
200
+ - Harness source code: `packages/ty-context/src/**`, package assets, validators, migrations and source-sync logic.
201
+ - npm package release logic: package metadata, build/test scripts and source asset drift checks for `project-tiny-context-harness`.
202
+ - Delivery benchmark logic: `examples/delivery-benchmark/**`, used to compare baseline coding against Harness-assisted delivery under the same quality bar.
203
+
204
+ Earlier stage-based workflow assets have been removed from the current source tree. The historical design and convergence reason are summarized in [PROJECT_SPEC.md](PROJECT_SPEC.md); new package consumers default to `project_context/**`.
205
+
206
+ ## Install
207
+
208
+ ```sh
209
+ npm install -D project-tiny-context-harness@latest
210
+ npx --yes --package project-tiny-context-harness@latest ty-context init
211
+ ```
212
+
213
+ For an existing project:
214
+
215
+ ```sh
216
+ npx --yes --package project-tiny-context-harness@latest ty-context init --adopt
217
+ ```
218
+
219
+ `init` creates:
220
+
221
+ - `AGENTS.md`
222
+ - `project_context/context.toml`
223
+ - `project_context/global.md`
224
+ - `project_context/architecture.md`
225
+ - `project_context/areas/main.md`
226
+ - `project_context/areas/main/verification.md`
227
+ - `<harnessRoot>/config.yaml`
228
228
  - `<harnessRoot>/skills/context_product_plan/SKILL.md`
229
229
  - `<harnessRoot>/skills/context_uiux_design/SKILL.md`
230
230
  - `<harnessRoot>/skills/context_development_engineer/SKILL.md`
@@ -233,21 +233,21 @@ npx --yes --package project-tiny-context-harness@latest ty-context init --adopt
233
233
  - `<harnessRoot>/skills/context_harness_upgrade/SKILL.md`
234
234
  - `<harnessRoot>/skills/plan_acceptance_checklist_compiler/SKILL.md`
235
235
  - `<harnessRoot>/ty-context-managed/context_templates/**`
236
- - `<harnessRoot>/ty-context-managed/make/ty-context.mk`
237
- - `tools/**`
238
- - a root `Makefile` include block
239
- - `.github/workflows/harness.yml`
240
-
236
+ - `<harnessRoot>/ty-context-managed/make/ty-context.mk`
237
+ - `tools/**`
238
+ - a root `Makefile` include block
239
+ - `.github/workflows/harness.yml`
240
+
241
241
  The generated workflow runs only the selected Harness gate: `validate-context`, `validate-code-modularity` or the composite `validate-harness`. Maintainer-only package tests and source-drift checks are intentionally kept out of consumer projects.
242
-
242
+
243
243
  `init` does not create business Product Surface Contract files, lifecycle state, plan state, stage skills or stage work-product trees by default.
244
-
245
- ## FAQ
246
-
247
- **Why not just write a better README?**
248
-
249
- README is for humans and broad orientation. Minimal Context is a smaller machine-readable recovery path for fresh agents: durable intent, non-goals, boundaries, validation commands and context drift notes.
250
-
244
+
245
+ ## FAQ
246
+
247
+ **Why not just write a better README?**
248
+
249
+ README is for humans and broad orientation. Minimal Context is a smaller machine-readable recovery path for fresh agents: durable intent, non-goals, boundaries, validation commands and context drift notes.
250
+
251
251
  **Is this only for Codex?**
252
252
 
253
253
  No. The generated files are plain repository assets. Codex, Claude Code, Cursor, Gemini CLI, Cline, Roo or a human reviewer can read the same facts.
@@ -261,15 +261,15 @@ Neither. Public docs, npm copy, launch posts, CLI help/errors, generated Skill a
261
261
  **Does `validate-context` prove the project works?**
262
262
 
263
263
  No. It checks that recovery facts exist and avoids fake test-result claims. Product quality still belongs to tests, CI, review and human acceptance.
264
-
265
- **Will this create documentation burden?**
266
-
267
- It should stay smaller than a full process. Ordinary bug fixes and local refactors do not update Context unless they produce durable product, architecture, API, state or validation facts.
268
-
269
- The default Skills are Minimal Context helpers for explicit product-planning, UI/UX-design, development-engineering, Product Surface Contract, full-project-export, Tiny Context upgrade and plan-acceptance-checklist requests. Product, screen-flow, surface responsibility and durable engineering conclusions go to `project_context/**`; visual identity and design tokens go to root `DESIGN.md`. Export artifacts are temporary files under `tmp/ty-context/context-exports/**`, not Context. Plan acceptance artifacts are temporary files under `tmp/ty-context/plan-acceptance/**`; they define completion criteria for a referenced plan but do not execute it or prove acceptance. The Harness upgrade Skill handles requests such as “upgrade Tiny Context” and “use the Tiny Context upgrade skill to upgrade this project” by running `upgrade` first, handling only migration-scoped follow-up, and avoiding standalone `sync` before the upgrade path.
264
+
265
+ **Will this create documentation burden?**
266
+
267
+ It should stay smaller than a full process. Ordinary bug fixes and local refactors do not update Context unless they produce durable product, architecture, API, state or validation facts.
268
+
269
+ The default Skills are Minimal Context helpers for explicit product-planning, UI/UX-design, development-engineering, Product Surface Contract, full-project-export, Tiny Context upgrade and plan-acceptance-checklist requests. Product, screen-flow, surface responsibility and durable engineering conclusions go to `project_context/**`; visual identity and design tokens go to root `DESIGN.md`. Export artifacts are temporary files under `tmp/ty-context/context-exports/**`, not Context. Plan acceptance artifacts are temporary files under `tmp/ty-context/plan-acceptance/**`; they define completion criteria for a referenced plan but do not execute it or prove acceptance. The Harness upgrade Skill handles requests such as “upgrade Tiny Context” and “use the Tiny Context upgrade skill to upgrade this project” by following the release update mode, using `upgrade` for migration-bearing releases, and limiting manual cleanup to migration-scoped follow-up.
270
270
 
271
271
  Multilingual trigger phrases are compatibility details. Public README, npm and launch copy stay English-first, and public/package-managed surfaces must remain English-complete; literal non-English examples are documented only where they explain generated Skill matching and must not be the sole activation path.
272
-
272
+
273
273
  For product, UI/UX and engineering tasks that touch design intent, API/Schema, state/runtime behavior, architecture boundaries or verification design, the default Skills compile a short current-task contract before implementation. The contract starts with `Context Delta: none|required`; `required` preserves context-first behavior, while `none` means the task can proceed against existing Context. For engineering, RFC and implementation work, the existing Task Contract also includes `Modularity Check: none|required|exception` so oversized touched files trigger split-or-exception reasoning. For module design work, the development engineer Skill also compiles `Applicable Module Design`: the relevant principles, minimal design logic and durable rationale that control the current implementation or verification choice. The task contract and Contract Conformance are handoff evidence, not new PRD, tech-plan, validator or gate surfaces.
274
274
 
275
275
  For long-running plans, RFCs or implementation proposals, the plan acceptance checklist compiler can turn a plan plus relevant Context into a falsifiable acceptance checklist and a paste-ready goal/target-mode prompt. This is one pre-execution acceptance pass, not a task planner: it stores temporary inputs under `tmp/ty-context/plan-acceptance/**`, asks for confirmation when durable assumptions are unclear, and leaves execution evidence to the future executor, tests, CI, review or human acceptance.
@@ -318,28 +318,28 @@ modularity:
318
318
  Omitting `policy` behaves the same as `scoped_waivers` for compatibility with existing projects. Allowed waiver categories are `generated`, `third_party_reference`, `legacy_migration`, `aggregate_styles` and `fixture_snapshot`.
319
319
 
320
320
  For complex task-contract work, agents may use `plan.md` or an equivalent temporary plan surface as scratch space for `Context Delta`, `Task Contract`, implementation steps and Conformance notes. It is execution cache only: durable facts must be extracted into `project_context/**` or `DESIGN.md`, and temporary plans are not Context, not registered in `context.toml` and not default project assets.
321
-
321
+
322
322
  For Product Surface work, frontend layout, UI/UX, product module boundaries or decisions about where information belongs, agents should run a lightweight product/page positioning check before deciding whether the change is context-first. The check asks what judgment the user needs to make on the surface, what information/actions/feedback the product must provide, what should not be persistent, what belongs on the main surface versus drilldown, operations, diagnostics, evidence or detail, and whether layout and information density match the surface task. If ownership is unclear, inspect the relevant surfaces and Context first, and use `context_surface_contract` for a focused audit. The check is input to change classification: it does not by itself require a Context update, new role, new document chain or validator gate.
323
-
323
+
324
324
  The expected Context Priority Ladder is: read Context first, run the product/page positioning or Surface Contract check when applicable, classify durable-fact impact or use `Context Delta` inside task-contract scenarios, choose context-first or code-first, then perform Contract Conformance when applicable and Context drift check before handoff. This is prompt-level guidance, not an edit-order validator.
325
-
326
- Managed `AGENTS.md` guidance is intentionally a startup router, not a full manual. It should contain fact-source entry points, hard boundaries, key triggers and shortest validation commands; package consumers default long design reasoning to Context unless they already have a local spec/design convention. In this source workspace, `PROJECT_SPEC.md` holds stable Harness workflow rationale. Role procedures belong in Skills and human usage guidance in README. The recommended 40-70 line range is a soft budget, not a validator gate.
327
-
325
+
326
+ Managed `AGENTS.md` guidance is intentionally a startup router, not a full manual. It should contain fact-source entry points, hard boundaries, key triggers and shortest validation commands; package consumers default long design reasoning to Context unless they already have a local spec/design convention. In this source workspace, `PROJECT_SPEC.md` holds stable Harness workflow rationale. Role procedures belong in Skills and human usage guidance in README. The recommended 40-70 line range is a soft budget, not a validator gate.
327
+
328
328
  The default `context_*` Skills and package-managed utility Skills are generated files. `sync` overwrites them, so project-specific product/design/development/surface-contract rules should live in separate project-local Skills such as `.codex/skills/product_plan/SKILL.md`, `.codex/skills/uiux_design/SKILL.md`, `.codex/skills/development_engineer/SKILL.md` or `.codex/skills/surface_contract/SKILL.md`. When a project-local Skill and a default Skill both apply, agents should use the more specific project-local Skill first while keeping durable conclusions in `project_context/**` and `DESIGN.md`. Keep the project-local Skill front matter `description` triggers aligned with the matching default `context_*` Skill and the project `AGENTS.md` role-trigger rule; if a project adds or narrows product/design/development/surface keywords, update both the local Skill and the agent guidance together. The Surface Contract, Harness upgrade and plan acceptance checklist Skills are also package-managed; customize project semantics in Context or separate project-local Skills, not by editing those generated Skills.
329
-
330
- ## CLI Entry Safety
331
-
332
- The canonical npm package is `project-tiny-context-harness`; `ty-context` is the bin name. Prefer package-qualified `npx` commands for ad hoc use because bare `npx ty-context` can resolve an older package name or a stale local install. After `init`, the managed Makefile wrapper uses the canonical latest CLI by default and can be overridden with `TY_CONTEXT=...` when a project intentionally pins a local package.
333
-
334
- Use `npx --no-install ty-context ...` only when you explicitly want the already installed local package, such as release smoke tests against a packed tarball.
335
-
336
- ## Core Commands
337
-
329
+
330
+ ## CLI Entry Safety
331
+
332
+ The canonical npm package is `project-tiny-context-harness`; `ty-context` is the bin name. Prefer package-qualified `npx` commands for ad hoc use because bare `npx ty-context` can resolve an older package name or a stale local install. After `init`, the managed Makefile wrapper uses the canonical latest CLI by default and can be overridden with `TY_CONTEXT=...` when a project intentionally pins a local package.
333
+
334
+ Use `npx --no-install ty-context ...` only when you explicitly want the already installed local package, such as release smoke tests against a packed tarball.
335
+
336
+ ## Core Commands
337
+
338
338
  | Command | Purpose |
339
339
  |---|---|
340
340
  | `npx --yes --package project-tiny-context-harness@latest ty-context init` | Non-destructively installs Minimal Context Harness into the current project. |
341
- | `make ty-context-sync` or `npx --yes --package project-tiny-context-harness@latest ty-context sync` | Refreshes managed guidance, default Skills, Makefile include, tools and templates. It does not run migrations or generate project semantics; when migration work is pending it refuses to write and tells you to run `upgrade`. |
342
- | `make ty-context-upgrade` or `npx --yes --package project-tiny-context-harness@latest ty-context upgrade` | Default command after updating the npm package. Builds an upgrade plan, stops before writes when `blocked` items exist, otherwise applies `safe_pending` migrations, runs `sync` and `doctor`, and exits non-zero when manual follow-up or diagnostics remain. |
341
+ | `make ty-context-sync` or `npx --yes --package project-tiny-context-harness@latest ty-context sync` | Refreshes managed guidance, default Skills, Makefile include, tools and templates. It does not run migrations or generate project semantics; it may block only direct asset-refresh safety issues such as invalid managed blocks or deprecated managed Skill overrides. |
342
+ | `make ty-context-upgrade` or `npx --yes --package project-tiny-context-harness@latest ty-context upgrade` | Use for releases marked `upgrade-required` or `manual-required`. Builds an upgrade plan, stops before writes when `blocked` items exist, otherwise applies `safe_pending` migrations, runs `sync` and `doctor`, and exits non-zero when manual follow-up or diagnostics remain. |
343
343
  | `npx --yes --package project-tiny-context-harness@latest ty-context upgrade --check [--json]` | Checks the upgrade plan without writing files. Reports `safe_pending`, `manual_required` and `blocked`; exits non-zero when any work remains. |
344
344
  | `npx --yes --package project-tiny-context-harness@latest ty-context export-context --all [--check]` | Creates both default temporary exports under `tmp/ty-context/context-exports/**`. |
345
345
  | `npx --yes --package project-tiny-context-harness@latest ty-context export-context --full [--output tmp/ty-context/context-exports/name.md] [--check]` | Creates a temporary project Context summary Markdown artifact. |
@@ -354,7 +354,7 @@ Use `npx --no-install ty-context ...` only when you explicitly want the already
354
354
 
355
355
  ## Updating Existing Projects
356
356
 
357
- After updating the package, run `ty-context upgrade`. Use `sync` only when release notes say the update is `sync-only`; sync does not run migrations.
357
+ After updating the package, run `ty-context upgrade`. It is the default update entry because it checks local migration state, applies safe migrations when needed, refreshes managed assets and runs diagnostics. For releases marked `sync-only`, direct `sync` is an allowed shortcut only when you explicitly want managed-asset refresh without the upgrade diagnostics.
358
358
 
359
359
  ```sh
360
360
  npm install -D project-tiny-context-harness@latest
@@ -362,11 +362,17 @@ npx --yes --package project-tiny-context-harness@latest ty-context upgrade --che
362
362
  npx --yes --package project-tiny-context-harness@latest ty-context upgrade
363
363
  ```
364
364
 
365
+ For `sync-only` releases where you explicitly want only managed-asset refresh, this shortcut is allowed:
366
+
367
+ ```sh
368
+ npx --yes --package project-tiny-context-harness@latest ty-context sync
369
+ ```
370
+
365
371
  Release notes and release readiness use this update mode vocabulary:
366
372
 
367
373
  | Update mode | What to run | Meaning |
368
374
  |---|---|---|
369
- | `sync-only` | `ty-context sync` | The release changes only package-managed assets. No migrations are required. |
375
+ | `sync-only` | Default: `ty-context upgrade`; shortcut: `ty-context sync` | The release changes only package-managed assets. No new migrations are expected. |
370
376
  | `upgrade-required` | `ty-context upgrade` | The release includes safe mechanical migrations and managed asset refresh. |
371
377
  | `manual-required` | `ty-context upgrade`, then manual follow-up | The release includes items that cannot be mechanically changed without user intent. |
372
378
 
@@ -392,33 +398,33 @@ Examples:
392
398
  ## Minimal Context Files
393
399
 
394
400
  `project_context/global.md` is the first file a fresh agent should read. It contains:
395
-
396
- - project goal
397
- - non-goals / boundaries
398
- - background
399
- - design rationale, including former ADR-level decisions that still matter
400
- - architecture context link
401
- - product / delivery brief for durable product goals, users, flows and acceptance signals
402
- - UX / screen brief for durable screen, interaction, responsive and accessibility facts
403
- - short verification context pointers
404
- - current state
405
- - next safe action
406
- - context index
407
-
408
- `project_context/architecture.md` is the restrained architecture document. It contains:
409
-
410
- - system boundary
411
- - component map
412
- - data / control flow
413
- - architecture-level design rationale
414
- - constraints and tradeoffs
415
- - verification implications
416
- - open risks
417
-
418
- `project_context/context.toml` is the Schema v4 Context graph manifest. `init` creates a default `main` product/domain area for ordinary projects and registers `project_context/areas/main/verification.md` as its default `verification` role Context. `upgrade` creates a conservative baseline manifest for existing projects by registering current `project_context/areas/**/*.md` files as areas, except obvious `verification.md` and `deployment.md` role files. Larger projects can add `[[areas]]` and `[[context]]` entries with role, trigger/read policy, default children and monorepo boundary metadata such as `forbidden_runtime_dependencies`.
419
-
420
- `project_context/areas/<unit>.md` contains product/domain ownership context by default. For larger projects, `areas/` may contain nested files such as `areas/<area>/README.md`, `areas/<area>/contracts/*.md`, `areas/<area>/foundation/*.md`, `areas/<area>/verification.md`, `areas/<area>/deployment.md` or other durable context nodes:
421
-
401
+
402
+ - project goal
403
+ - non-goals / boundaries
404
+ - background
405
+ - design rationale, including former ADR-level decisions that still matter
406
+ - architecture context link
407
+ - product / delivery brief for durable product goals, users, flows and acceptance signals
408
+ - UX / screen brief for durable screen, interaction, responsive and accessibility facts
409
+ - short verification context pointers
410
+ - current state
411
+ - next safe action
412
+ - context index
413
+
414
+ `project_context/architecture.md` is the restrained architecture document. It contains:
415
+
416
+ - system boundary
417
+ - component map
418
+ - data / control flow
419
+ - architecture-level design rationale
420
+ - constraints and tradeoffs
421
+ - verification implications
422
+ - open risks
423
+
424
+ `project_context/context.toml` is the Schema v4 Context graph manifest. `init` creates a default `main` product/domain area for ordinary projects and registers `project_context/areas/main/verification.md` as its default `verification` role Context. `upgrade` creates a conservative baseline manifest for existing projects by registering current `project_context/areas/**/*.md` files as areas, except obvious `verification.md` and `deployment.md` role files. Larger projects can add `[[areas]]` and `[[context]]` entries with role, trigger/read policy, default children and monorepo boundary metadata such as `forbidden_runtime_dependencies`.
425
+
426
+ `project_context/areas/<unit>.md` contains product/domain ownership context by default. For larger projects, `areas/` may contain nested files such as `areas/<area>/README.md`, `areas/<area>/contracts/*.md`, `areas/<area>/foundation/*.md`, `areas/<area>/verification.md`, `areas/<area>/deployment.md` or other durable context nodes:
427
+
422
428
  - responsibility
423
429
  - user / system contract
424
430
  - core data, API or state
@@ -429,19 +435,19 @@ Examples:
429
435
  - open risks
430
436
 
431
437
  A module design capsule should stay small and decision-shaped: `Principles` are stable execution constraints, `Design Logic` is the minimum choose/reject/degrade/compose logic, and `Design Rationale` keeps only reasons that change later implementation or verification decisions. Current thresholds, commands and probe parameters belong in the relevant contract or verification Context as execution instances, not as permanent principles.
432
-
433
- Additional Markdown context files under `project_context/**` can declare `context_role` in front matter or receive a role from `context.toml`. Roles are semantic labels that help agents choose when and how to read context; `validate-context` checks graph structure, paths and field shapes rather than enforcing a writing template for each role:
434
-
435
- - `global`: project-level fact source and reading entry point.
436
- - `architecture`: durable system boundary, component relationship and architecture constraints.
437
- - `area`: a primary product/domain ownership context; ordinary projects usually have one `main` area.
438
- - `domain`: a business-oriented area label for product-family or monorepo contexts.
439
- - `subdomain`: a smaller context unit inside an area.
440
- - `contract`: cross-area or cross-subdomain interface, event, API or schema semantics.
441
- - `foundation`: durable theory, vocabulary or conceptual source material.
442
- - `verification`: critical test, smoke, CI, probe or validation repeat-execution paths for an owning area or cross-domain project path.
443
- - `deployment`: critical deploy, CI/CD, cloud/bootstrap, runtime topology, service initialization, health-check or rollback/degradation repeat-execution paths.
444
- - `archive`: historical or external source index that should not be read by default.
438
+
439
+ Additional Markdown context files under `project_context/**` can declare `context_role` in front matter or receive a role from `context.toml`. Roles are semantic labels that help agents choose when and how to read context; `validate-context` checks graph structure, paths and field shapes rather than enforcing a writing template for each role:
440
+
441
+ - `global`: project-level fact source and reading entry point.
442
+ - `architecture`: durable system boundary, component relationship and architecture constraints.
443
+ - `area`: a primary product/domain ownership context; ordinary projects usually have one `main` area.
444
+ - `domain`: a business-oriented area label for product-family or monorepo contexts.
445
+ - `subdomain`: a smaller context unit inside an area.
446
+ - `contract`: cross-area or cross-subdomain interface, event, API or schema semantics.
447
+ - `foundation`: durable theory, vocabulary or conceptual source material.
448
+ - `verification`: critical test, smoke, CI, probe or validation repeat-execution paths for an owning area or cross-domain project path.
449
+ - `deployment`: critical deploy, CI/CD, cloud/bootstrap, runtime topology, service initialization, health-check or rollback/degradation repeat-execution paths.
450
+ - `archive`: historical or external source index that should not be read by default.
445
451
  - `implementation-index`: code navigation map for owned paths, responsibilities and tests.
446
452
  - `decision-rationale`: stable reasons behind durable design choices.
447
453
 
@@ -450,95 +456,95 @@ Product Surface Contracts use these existing roles. Use `contract` for cross-sur
450
456
  `init` gives new projects the Product Surface Contract capability, not a pre-filled business contract. The first durable contract is created when a user or agent explicitly audits/compiles a surface responsibility and writes the approved facts into `project_context/**`. Existing projects receive the same Skill and template after `upgrade`, but `upgrade` intentionally does not inspect current screens or guess their responsibilities; treat Product Surface Context backfill as an explicit follow-up task.
451
457
 
452
458
  When authoring, migrating or cleaning up `project_context/areas/**`, run a soft role placement scan before registering every Markdown file as an `[[areas]]` entry. Keep `area` / `domain` for product ownership, use `subdomain` only for a smaller owned product context, move interface semantics into `contract`, stable theory or vocabulary into `foundation`, repeatable test/deploy execution paths into `verification` / `deployment`, code maps into `implementation-index`, design reasons into `decision-rationale`, and non-default historical or external material into `archive`. This is prompt-level guidance, not a validator gate.
453
-
454
- Automatic migration moves legacy `project_context/modules/**/*.md` files into `project_context/areas/**/*.md`, creates a usable graph baseline and does not infer deep semantic roles. If an existing deep area file is really a foundation, contract, archive or implementation index, a later agent should update `context.toml` explicitly. Boundary rules are metadata only; Harness does not scan source imports or build a runtime dependency graph.
455
-
456
- ## Temporary Project Exports
457
-
458
- Use `export-context --all` when you want both one-off project exports for copying into an external tool or discussion:
459
-
460
- ```sh
461
- npx --yes --package project-tiny-context-harness@latest ty-context export-context --all
462
- npx --yes --package project-tiny-context-harness@latest ty-context export-context --all --check
463
- ```
464
-
459
+
460
+ Automatic migration moves legacy `project_context/modules/**/*.md` files into `project_context/areas/**/*.md`, creates a usable graph baseline and does not infer deep semantic roles. If an existing deep area file is really a foundation, contract, archive or implementation index, a later agent should update `context.toml` explicitly. Boundary rules are metadata only; Harness does not scan source imports or build a runtime dependency graph.
461
+
462
+ ## Temporary Project Exports
463
+
464
+ Use `export-context --all` when you want both one-off project exports for copying into an external tool or discussion:
465
+
466
+ ```sh
467
+ npx --yes --package project-tiny-context-harness@latest ty-context export-context --all
468
+ npx --yes --package project-tiny-context-harness@latest ty-context export-context --all --check
469
+ ```
470
+
465
471
  This generates both default artifacts with the same timestamp: `tmp/ty-context/context-exports/full-project-context-<timestamp>.md` and `tmp/ty-context/context-exports/code-level-implementation-<timestamp>/code-level-implementation.md`. `--all` does not accept `--output`; use the single-artifact commands below for custom names.
466
-
467
- Use `export-context --full` when you need only the project Context bundle:
468
-
469
- ```sh
470
- npx --yes --package project-tiny-context-harness@latest ty-context export-context --full
471
- npx --yes --package project-tiny-context-harness@latest ty-context export-context --full --output tmp/ty-context/context-exports/my-export.md
472
- npx --yes --package project-tiny-context-harness@latest ty-context export-context --full --check
473
- ```
474
-
472
+
473
+ Use `export-context --full` when you need only the project Context bundle:
474
+
475
+ ```sh
476
+ npx --yes --package project-tiny-context-harness@latest ty-context export-context --full
477
+ npx --yes --package project-tiny-context-harness@latest ty-context export-context --full --output tmp/ty-context/context-exports/my-export.md
478
+ npx --yes --package project-tiny-context-harness@latest ty-context export-context --full --check
479
+ ```
480
+
475
481
  The default artifact path is `tmp/ty-context/context-exports/full-project-context-<timestamp>.md`. The file title is `# Full Project Context Export`. The file header says `Export artifact. Do not reference from project_context/context.toml.` The export includes Context files, key README / AGENTS / DESIGN documents, managed Skill guidance, Makefile verification-entry summaries, a directory tree summary and Context code-entry indexes.
476
-
477
- Use `export-context --code` when an external model needs the current implementation state in one uploadable Markdown file:
478
-
479
- ```sh
480
- npx --yes --package project-tiny-context-harness@latest ty-context export-context --code
481
- npx --yes --package project-tiny-context-harness@latest ty-context export-context --code --output tmp/ty-context/context-exports/my-code-export.md
482
- npx --yes --package project-tiny-context-harness@latest ty-context export-context --code --check
483
- ```
484
-
482
+
483
+ Use `export-context --code` when an external model needs the current implementation state in one uploadable Markdown file:
484
+
485
+ ```sh
486
+ npx --yes --package project-tiny-context-harness@latest ty-context export-context --code
487
+ npx --yes --package project-tiny-context-harness@latest ty-context export-context --code --output tmp/ty-context/context-exports/my-code-export.md
488
+ npx --yes --package project-tiny-context-harness@latest ty-context export-context --code --check
489
+ ```
490
+
485
491
  The default code artifact path is `tmp/ty-context/context-exports/code-level-implementation-<timestamp>/code-level-implementation.md`. The file title is `# Code-Level Implementation Export`. It scans main source and engineering configuration files, adds each file path, type, line count, character count, SHA256, a heuristic one-sentence summary and a fenced redacted code block. It does not split output into multiple Markdown files.
486
-
487
- Both export modes exclude `.env*` except safe examples such as `.env.example`, secret/token/cookie-oriented files, raw captures, licensed payload dumps, `node_modules`, build output, caches, coverage, test reports, logs and existing export artifacts; obvious sensitive assignment values are redacted and reported as warnings.
488
-
492
+
493
+ Both export modes exclude `.env*` except safe examples such as `.env.example`, secret/token/cookie-oriented files, raw captures, licensed payload dumps, `node_modules`, build output, caches, coverage, test reports, logs and existing export artifacts; obvious sensitive assignment values are redacted and reported as warnings.
494
+
489
495
  Exports are not long-lived fact sources. The CLI refuses `project_context/**` and non-temporary output paths, and `validate-context` rejects obvious export artifact names such as `code-level-implementation`, `full-project-context`, legacy Chinese export names, `project-overview`, `context-bundle`, `context-summary` or `context-export` if someone tries to register them in `project_context/context.toml`.
490
-
491
- The Context should be short enough to read at session start and specific enough to prevent fresh-agent drift. It should not copy code, test logs, release ledgers or implementation narration that the code already makes obvious.
492
-
496
+
497
+ The Context should be short enough to read at session start and specific enough to prevent fresh-agent drift. It should not copy code, test logs, release ledgers or implementation narration that the code already makes obvious.
498
+
493
499
  Verification and deployment role Context are narrow exceptions for reusable execution knowledge. Do not record one-off test logs, full command output, temporary JSON, CI artifacts, test reports, release ledgers, secrets, tokens, cookies, device ids or raw payloads. When a test, smoke, CI, deployment, bootstrap or runtime path has durable recovery value, record only the special preparation, shortest command/path, expected stage or signal, acceptable warnings and dead ends already ruled out. Verification paths are reusable execution instances, not independent definitions of capability, metric or acceptance targets; first use the owning module's design Context to decide what claim should be proven, then choose the command or probe. These paths should live in the owning area's `verification` or `deployment` role Context; use project-level references only for truly cross-domain paths.
494
-
495
- `project_context/**` is authoritative for intended responsibility, ownership, product intent, architecture boundaries, integration direction, allowed or forbidden dependencies and verification/deployment entry paths. Source code is authoritative for current implementation state. When code shape, keyword search results or nearby implementations disagree with Context, agents should treat the difference as implementation drift, missing work or stale Context that must be called out, not as evidence that overrides Context-declared ownership or intent.
496
-
497
- Before the first code edit, agents should classify the change instead of relying on a fixed timer. Long-term fact changes include product ownership or plans, module responsibilities, information architecture, API / Schema, state-machine or scheduler semantics, cross-area boundaries and verification/deployment entry paths. If a task hits one of these categories, Context-first is the default path and the first update should be the relevant `project_context/**` entry with enough durable context to guide implementation, without a fixed line-count limit:
498
-
499
- ```text
500
- context -> implementation -> verification -> context drift check
501
- ```
502
-
503
- Code-first is a controlled exception for ordinary bug fixes, local styling changes, local implementation-drift repairs, test fixes and exploratory spikes; those should not update Context unless they produce a durable fact. Once code discovery produces one, the agent should update Context before final alignment or handoff:
504
-
505
- ```text
506
- implementation discovery -> context update if long-term fact changed -> implementation alignment -> verification
507
- ```
508
-
509
- This ordering is guidance, not a new validator gate. `validate-context` checks recoverability and fake verification claims; it does not infer whether Context or code was edited first. Automation may warn about possible context-first drift, but should not block work. Handoffs should report only a lightweight status such as `Context: updated ...` or `Context: no durable fact change`.
510
-
511
- Product, UI/UX and development engineer Skills are prompts for keeping that Context sharp. They may help draft a product plan, screen design or implementation plan, but the long-lived asset is still the compact Context.
512
-
513
- Projects customize these workflows by adding separate project-local Skills, not by editing package-managed default Skills:
514
-
515
- ```sh
516
- mkdir -p .codex/skills/uiux_design
517
- $EDITOR .codex/skills/uiux_design/SKILL.md
518
- ```
519
-
520
- The project-local Skill should mention when it supersedes the package-managed default Skill and should either reuse the default Minimal Context workflow or state the narrower project workflow directly. Its front matter `description` should preserve the same role-trigger intent as `AGENTS.md` and the matching default `context_*` Skill, with any project-specific keyword additions reflected in both places. `sync` does not merge Skill overrides and does not overwrite these separate local Skills. Existing `.codex/ty-context-managed/override_skills/*.md` files should be migrated into standalone project-local Skills before running `sync`.
521
-
522
- `init` creates root `DESIGN.md` beside Context as the design-system fact source, and `upgrade` creates it for existing Harness projects when missing. It starts as a neutral starter baseline with visual tokens, background/color logic, typography, spacing, component states and do/don't guidance; user-authored design rules take precedence once present. Use `npx @google/design.md lint DESIGN.md` to validate its structure when the file is changed.
523
-
524
- Harness installs Impeccable as a default package dependency. For design drafts, redesigns, visual polish, frontend redesign/styling or existing-UI review work, agents should run Impeccable by default when there is a scan target such as UI source, page files, build output or a local/remote URL:
525
-
526
- ```bash
527
- npx impeccable detect src/
528
- ```
529
-
530
- Impeccable is a default design-review step when a scan target exists, but it is not a `validate-context` gate. If there is no suitable target or the command cannot run, the agent should say why and continue. Its findings are design-review signals, not a replacement for screenshots, project tests or human review.
531
-
532
- ## Current Boundary
533
-
534
- The former stage-based Harness is no longer shipped as a runnable default, compatibility layer or migration command. Existing users have completed migration, so the package keeps only the current Minimal Context surface.
535
-
536
- The design reason is evidence-driven: delivery benchmark pilots showed that full Tiny Context document chains and frequent workflow gates create real time/token friction on ordinary and medium-complexity tasks, while modern agents already handle much of single-stage product/test work internally. The vNext default keeps the part with the clearest expected return: a minimal durable context for recovery, iteration, debug and requirements changes.
537
-
538
- ## Delivery Benchmark
539
-
540
- `examples/delivery-benchmark/` remains repo-local. It is used to test whether Harness changes improve same-quality lifecycle delivery efficiency. Historical stage-based result summaries were removed from the public report; future Harness prompts use Minimal Context and require fresh reruns.
541
-
500
+
501
+ `project_context/**` is authoritative for intended responsibility, ownership, product intent, architecture boundaries, integration direction, allowed or forbidden dependencies and verification/deployment entry paths. Source code is authoritative for current implementation state. When code shape, keyword search results or nearby implementations disagree with Context, agents should treat the difference as implementation drift, missing work or stale Context that must be called out, not as evidence that overrides Context-declared ownership or intent.
502
+
503
+ Before the first code edit, agents should classify the change instead of relying on a fixed timer. Long-term fact changes include product ownership or plans, module responsibilities, information architecture, API / Schema, state-machine or scheduler semantics, cross-area boundaries and verification/deployment entry paths. If a task hits one of these categories, Context-first is the default path and the first update should be the relevant `project_context/**` entry with enough durable context to guide implementation, without a fixed line-count limit:
504
+
505
+ ```text
506
+ context -> implementation -> verification -> context drift check
507
+ ```
508
+
509
+ Code-first is a controlled exception for ordinary bug fixes, local styling changes, local implementation-drift repairs, test fixes and exploratory spikes; those should not update Context unless they produce a durable fact. Once code discovery produces one, the agent should update Context before final alignment or handoff:
510
+
511
+ ```text
512
+ implementation discovery -> context update if long-term fact changed -> implementation alignment -> verification
513
+ ```
514
+
515
+ This ordering is guidance, not a new validator gate. `validate-context` checks recoverability and fake verification claims; it does not infer whether Context or code was edited first. Automation may warn about possible context-first drift, but should not block work. Handoffs should report only a lightweight status such as `Context: updated ...` or `Context: no durable fact change`.
516
+
517
+ Product, UI/UX and development engineer Skills are prompts for keeping that Context sharp. They may help draft a product plan, screen design or implementation plan, but the long-lived asset is still the compact Context.
518
+
519
+ Projects customize these workflows by adding separate project-local Skills, not by editing package-managed default Skills:
520
+
521
+ ```sh
522
+ mkdir -p .codex/skills/uiux_design
523
+ $EDITOR .codex/skills/uiux_design/SKILL.md
524
+ ```
525
+
526
+ The project-local Skill should mention when it supersedes the package-managed default Skill and should either reuse the default Minimal Context workflow or state the narrower project workflow directly. Its front matter `description` should preserve the same role-trigger intent as `AGENTS.md` and the matching default `context_*` Skill, with any project-specific keyword additions reflected in both places. `sync` does not merge Skill overrides and does not overwrite these separate local Skills. Existing `.codex/ty-context-managed/override_skills/*.md` files should be migrated into standalone project-local Skills before running `sync`.
527
+
528
+ `init` creates root `DESIGN.md` beside Context as the design-system fact source, and `upgrade` creates it for existing Harness projects when missing. It starts as a neutral starter baseline with visual tokens, background/color logic, typography, spacing, component states and do/don't guidance; user-authored design rules take precedence once present. Use `npx @google/design.md lint DESIGN.md` to validate its structure when the file is changed.
529
+
530
+ Harness installs Impeccable as a default package dependency. For design drafts, redesigns, visual polish, frontend redesign/styling or existing-UI review work, agents should run Impeccable by default when there is a scan target such as UI source, page files, build output or a local/remote URL:
531
+
532
+ ```bash
533
+ npx impeccable detect src/
534
+ ```
535
+
536
+ Impeccable is a default design-review step when a scan target exists, but it is not a `validate-context` gate. If there is no suitable target or the command cannot run, the agent should say why and continue. Its findings are design-review signals, not a replacement for screenshots, project tests or human review.
537
+
538
+ ## Current Boundary
539
+
540
+ The former stage-based Harness is no longer shipped as a runnable default, compatibility layer or migration command. Existing users have completed migration, so the package keeps only the current Minimal Context surface.
541
+
542
+ The design reason is evidence-driven: delivery benchmark pilots showed that full Tiny Context document chains and frequent workflow gates create real time/token friction on ordinary and medium-complexity tasks, while modern agents already handle much of single-stage product/test work internally. The vNext default keeps the part with the clearest expected return: a minimal durable context for recovery, iteration, debug and requirements changes.
543
+
544
+ ## Delivery Benchmark
545
+
546
+ `examples/delivery-benchmark/` remains repo-local. It is used to test whether Harness changes improve same-quality lifecycle delivery efficiency. Historical stage-based result summaries were removed from the public report; future Harness prompts use Minimal Context and require fresh reruns.
547
+
542
548
  The benchmark should not prove that Harness is always faster. It should find the break-even curve: which complexity, risk and recovery conditions make context maintenance pay back its cost.
543
549
 
544
550
  Read [Benchmarking And Evidence](docs/benchmarking.md) for the claim boundary and evidence rules. Open the static report at [examples/delivery-benchmark/results/index.html](examples/delivery-benchmark/results/index.html).