project-tiny-context-harness 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +385 -383
  3. package/assets/README.md +559 -557
  4. package/assets/README.zh-CN.md +331 -329
  5. package/assets/agents/.gitkeep +1 -1
  6. package/assets/agents/AGENTS_CORE.md +68 -64
  7. package/assets/context_templates/architecture.md +33 -33
  8. package/assets/context_templates/area.md +39 -39
  9. package/assets/context_templates/context.toml +30 -30
  10. package/assets/context_templates/deployment.md +35 -35
  11. package/assets/context_templates/global.md +51 -51
  12. package/assets/context_templates/product-surface-contract.md +70 -70
  13. package/assets/context_templates/screen-contract.md +177 -177
  14. package/assets/context_templates/verification.md +32 -32
  15. package/assets/github/.gitkeep +1 -1
  16. package/assets/github/harness.yml +41 -41
  17. package/assets/make/.gitkeep +1 -1
  18. package/assets/make/ty-context.mk +48 -48
  19. package/assets/skills/context_development_engineer/SKILL.md +137 -135
  20. package/assets/skills/context_full_project_export/SKILL.md +70 -70
  21. package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
  22. package/assets/skills/context_product_plan/SKILL.md +88 -88
  23. package/assets/skills/context_surface_contract/SKILL.md +191 -191
  24. package/assets/skills/context_uiux_design/SKILL.md +167 -153
  25. package/assets/skills/design-resource-authoring/SKILL.md +78 -78
  26. package/assets/skills/design-resource-authoring/references/downstream-handoff.md +125 -125
  27. package/assets/skills/design-resource-authoring/references/open-design-provider.md +114 -114
  28. package/assets/skills/design-resource-authoring/references/resource-selection.md +170 -170
  29. package/assets/skills/design-system-authoring/SKILL.md +57 -57
  30. package/assets/skills/design-system-authoring/agents/openai.yaml +6 -6
  31. package/assets/skills/design-system-authoring/references/authority-adoption.md +48 -48
  32. package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +110 -110
  33. package/assets/skills/long-task-workflow/SKILL.md +97 -97
  34. package/assets/skills/long-task-workflow/agents/openai.yaml +4 -4
  35. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +76 -76
  36. package/assets/skills/long-task-workflow/references/contract-authoring.md +114 -114
  37. package/assets/skills/long-task-workflow/references/evidence-design.md +76 -76
  38. package/assets/skills/long-task-workflow/references/source-authoring.md +100 -100
  39. package/assets/skills/normal-long-task/SKILL.md +12 -12
  40. package/assets/skills/source-plan-authoring/SKILL.md +14 -14
  41. package/assets/tools/validate_context.py +442 -442
  42. package/dist/lib/design-md.js +5 -4
  43. package/dist/lib/design-resource-handoff-shape-primitives.js +1 -3
  44. package/dist/lib/doctor.js +2 -2
  45. package/dist/lib/long-task-counterfactual-sandbox.js +1 -2
  46. package/migrations/README.md +7 -7
  47. package/package.json +1 -1
  48. package/source-mappings.yaml +25 -25
@@ -124,8 +124,9 @@ function designMdTemplate() {
124
124
  "",
125
125
  "- Authored exact-value token source: not selected.",
126
126
  "- Generation direction and generated token targets: not selected.",
127
- "- Durable design references: none selected.",
128
- "- For each selected reference, record a stable id, surface/route/component, `exact-target` / `constraint` / `inspiration` interpretation, viewport/theme/state coverage, a readable immutable adopted path/URI plus digest, and the editable upstream owner/locator/update route (or an explicit manual/external-update boundary).",
127
+ "- Canonical project/system/component-family target records: none selected.",
128
+ "- Every adopted target has exactly one canonical record. Record project/system/component-family targets here; for a screen-specific target record only its stable id plus owning Screen Contract anchor.",
129
+ "- A canonical record owns interpretation, selection basis, declared condition coverage, a readable immutable adopted path/URI plus digest, and the editable upstream owner/locator/update route (or an explicit manual/external-update boundary). Do not duplicate that metadata in both `DESIGN.md` and a Screen Contract.",
129
130
  "- Relevant product/design/development work must open affected selected exact targets/constraints; an index entry alone is not resource consumption.",
130
131
  "",
131
132
  "## Colors",
@@ -141,7 +142,7 @@ function designMdTemplate() {
141
142
  "## Layout",
142
143
  "",
143
144
  "- This scaffold declares no production page composition, information hierarchy or responsive layout.",
144
- "- Put durable screen responsibility and interaction structure in `project_context/**`; reference selected visual targets in the Design Authority Index.",
145
+ "- Put durable screen responsibility, interaction structure and screen-specific canonical target records in `project_context/**`; keep project/system/component-family target records in this Design Authority Index.",
145
146
  "",
146
147
  "## Components",
147
148
  "",
@@ -161,7 +162,7 @@ function designMdTemplate() {
161
162
  "- Read this file before creating design drafts, redesigning UI, changing visual systems or implementing material production UI.",
162
163
  "- When there is a scan target such as UI source, page files, build output or a local/remote URL, run `npx impeccable detect <target>` before finalizing design changes.",
163
164
  "- Treat Impeccable findings as design-review signals: fix issues that affect clarity, consistency, accessibility or trust, and note when there is no suitable scan target.",
164
- "- After design decisions stabilize, replace the unconfigured marker, index the selected targets and authored token source/generation direction, and record durable tokens, component rules and do/don't guidance.",
165
+ "- After design decisions stabilize, replace the unconfigured marker, record the authored token source/generation direction and each selected target at its exactly-one canonical owner, and record durable tokens, component rules and do/don't guidance.",
165
166
  "- Change an adopted target through its recorded upstream route, create or approve a new immutable version/digest, and update its index entry; never overwrite the adopted baseline in place.",
166
167
  "",
167
168
  ].join("\n");
@@ -33,9 +33,7 @@ export function verificationMethods(value, label) {
33
33
  return array(value, label).map((item, index) => literal(item, DESIGN_RESOURCE_VERIFICATION_METHODS, `${label}[${index}]`));
34
34
  }
35
35
  export function positiveInteger(value, label) {
36
- if (typeof value !== "number" ||
37
- !Number.isSafeInteger(value) ||
38
- value <= 0)
36
+ if (typeof value !== "number" || !Number.isSafeInteger(value) || value <= 0)
39
37
  designResourceShapeFail(label, "must be a positive safe integer");
40
38
  return value;
41
39
  }
@@ -49,12 +49,12 @@ export async function runDoctor(projectRoot) {
49
49
  const footprint = await inspectDefaultContextFootprint(projectRoot);
50
50
  report.info.push(`default Context read path: ${footprint.files.length} file(s), ${footprint.total_bytes} bytes`);
51
51
  if (footprint.total_bytes > DEFAULT_CONTEXT_TOTAL_SOFT_BUDGET_BYTES) {
52
- report.warnings.push(`default Context read path is ${footprint.total_bytes} bytes, above the ${DEFAULT_CONTEXT_TOTAL_SOFT_BUDGET_BYTES}-byte soft budget; shorten near-universal facts or move specialized role Context to read_policy=\"on-demand\"`);
52
+ report.warnings.push(`default Context read path is ${footprint.total_bytes} bytes, above the ${DEFAULT_CONTEXT_TOTAL_SOFT_BUDGET_BYTES}-byte soft budget; review duplication or specialized placement only when complete, readable recovery semantics remain intact—required near-universal facts take precedence`);
53
53
  }
54
54
  for (const file of footprint.files) {
55
55
  if (file.bytes <= DEFAULT_CONTEXT_FILE_SOFT_BUDGET_BYTES)
56
56
  continue;
57
- report.warnings.push(`default Context file ${file.path} is ${file.bytes} bytes, above the ${DEFAULT_CONTEXT_FILE_SOFT_BUDGET_BYTES}-byte per-file soft budget`);
57
+ report.warnings.push(`default Context file ${file.path} is ${file.bytes} bytes, above the ${DEFAULT_CONTEXT_FILE_SOFT_BUDGET_BYTES}-byte per-file soft budget; this is advisory only and required readable facts take precedence`);
58
58
  }
59
59
  for (const group of footprint.duplicate_groups) {
60
60
  report.warnings.push(`default Context contains byte-identical files: ${group.join(", ")}; keep one owning fact source and replace duplicates with a short pointer`);
@@ -104,8 +104,7 @@ export async function removeCounterfactualSandboxRoot(root, removeTree = rm, wai
104
104
  const code = error && typeof error === "object" && "code" in error
105
105
  ? String(error.code)
106
106
  : "";
107
- if (!TRANSIENT_REMOVE_CODES.has(code) ||
108
- attempt >= REMOVE_RETRY_LIMIT)
107
+ if (!TRANSIENT_REMOVE_CODES.has(code) || attempt >= REMOVE_RETRY_LIMIT)
109
108
  throw error;
110
109
  await wait(REMOVE_RETRY_DELAY_MS * (attempt + 1));
111
110
  }
@@ -1,10 +1,10 @@
1
- # Migrations
2
-
3
- Schema migrations for Harness config and managed file layout belong here.
4
-
5
- Version 0.6.0 includes `long-task-v1-retirement`. It safely removes the
6
- retired repo-local Hook, reports a legacy active projection as
7
- `manual_required`, and deliberately does not import V1 progress or receipts
1
+ # Migrations
2
+
3
+ Schema migrations for Harness config and managed file layout belong here.
4
+
5
+ Version 0.6.0 includes `long-task-v1-retirement`. It safely removes the
6
+ retired repo-local Hook, reports a legacy active projection as
7
+ `manual_required`, and deliberately does not import V1 progress or receipts
8
8
  into the V2 Claim/Evidence authority.
9
9
 
10
10
  Version 0.7.2 includes `long-task-v2-semantic-drift-authority`. It reports a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-tiny-context-harness",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Minimal project memory and validation harness for AI coding agents.",
5
5
  "license": "MIT",
6
6
  "author": "Seven128",
@@ -1,25 +1,25 @@
1
- source_mappings:
2
- - source: ".codex/ty-context-managed/agents/AGENTS_CORE.md"
3
- target: "packages/ty-context/assets/agents/AGENTS_CORE.md"
4
- mode: "copy-file"
5
- - source: "README.md"
6
- target: "packages/ty-context/assets/README.md"
7
- mode: "copy-file"
8
- - source: "README.zh-CN.md"
9
- target: "packages/ty-context/assets/README.zh-CN.md"
10
- mode: "copy-file"
11
- - source: ".codex/ty-context-managed/context_templates"
12
- target: "packages/ty-context/assets/context_templates"
13
- mode: "copy-tree"
14
- - source: ".codex/ty-context-managed/skills"
15
- target: "packages/ty-context/assets/skills"
16
- mode: "copy-tree"
17
- - source: ".codex/ty-context-managed/make/ty-context.mk"
18
- target: "packages/ty-context/assets/make/ty-context.mk"
19
- mode: "copy-file"
20
- - source: ".codex/ty-context-managed/minimal_tools"
21
- target: "packages/ty-context/assets/tools"
22
- mode: "copy-tree"
23
- - source: ".github/workflows/harness.yml"
24
- target: "packages/ty-context/assets/github/harness.yml"
25
- mode: "copy-file"
1
+ source_mappings:
2
+ - source: ".codex/ty-context-managed/agents/AGENTS_CORE.md"
3
+ target: "packages/ty-context/assets/agents/AGENTS_CORE.md"
4
+ mode: "copy-file"
5
+ - source: "README.md"
6
+ target: "packages/ty-context/assets/README.md"
7
+ mode: "copy-file"
8
+ - source: "README.zh-CN.md"
9
+ target: "packages/ty-context/assets/README.zh-CN.md"
10
+ mode: "copy-file"
11
+ - source: ".codex/ty-context-managed/context_templates"
12
+ target: "packages/ty-context/assets/context_templates"
13
+ mode: "copy-tree"
14
+ - source: ".codex/ty-context-managed/skills"
15
+ target: "packages/ty-context/assets/skills"
16
+ mode: "copy-tree"
17
+ - source: ".codex/ty-context-managed/make/ty-context.mk"
18
+ target: "packages/ty-context/assets/make/ty-context.mk"
19
+ mode: "copy-file"
20
+ - source: ".codex/ty-context-managed/minimal_tools"
21
+ target: "packages/ty-context/assets/tools"
22
+ mode: "copy-tree"
23
+ - source: ".github/workflows/harness.yml"
24
+ target: "packages/ty-context/assets/github/harness.yml"
25
+ mode: "copy-file"