project-tiny-context-harness 0.2.56 → 0.2.58

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 (36) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +496 -496
  3. package/assets/README.md +550 -544
  4. package/assets/README.zh-CN.md +133 -133
  5. package/assets/agents/.gitkeep +1 -1
  6. package/assets/agents/AGENTS_CORE.md +59 -59
  7. package/assets/context_templates/architecture.md +31 -31
  8. package/assets/context_templates/area.md +38 -38
  9. package/assets/context_templates/context.toml +27 -27
  10. package/assets/context_templates/deployment.md +35 -35
  11. package/assets/context_templates/global.md +53 -53
  12. package/assets/context_templates/product-surface-contract.md +60 -60
  13. package/assets/context_templates/verification.md +32 -32
  14. package/assets/github/.gitkeep +1 -1
  15. package/assets/github/harness.yml +41 -41
  16. package/assets/make/.gitkeep +1 -1
  17. package/assets/make/ty-context.mk +48 -48
  18. package/assets/skills/context_development_engineer/SKILL.md +108 -108
  19. package/assets/skills/context_full_project_export/SKILL.md +55 -55
  20. package/assets/skills/context_harness_upgrade/SKILL.md +60 -57
  21. package/assets/skills/context_product_plan/SKILL.md +89 -89
  22. package/assets/skills/context_surface_contract/SKILL.md +168 -168
  23. package/assets/skills/context_uiux_design/SKILL.md +113 -113
  24. package/assets/skills/plan_acceptance_checklist_compiler/SKILL.md +442 -376
  25. package/assets/tools/validate_context.py +276 -276
  26. package/dist/commands/check-modularity.js +8 -8
  27. package/dist/commands/export-context.js +9 -9
  28. package/dist/commands/index.js +16 -16
  29. package/dist/commands/package-source.js +2 -2
  30. package/dist/commands/upgrade.js +9 -9
  31. package/dist/lib/sync-engine.d.ts +1 -4
  32. package/dist/lib/sync-engine.js +2 -10
  33. package/dist/lib/upgrade.js +1 -1
  34. package/migrations/README.md +3 -3
  35. package/package.json +68 -68
  36. package/source-mappings.yaml +25 -25
@@ -55,14 +55,14 @@ function parseArgs(args) {
55
55
  return options;
56
56
  }
57
57
  function printHelp() {
58
- console.log(`ty-context upgrade:
59
- upgrade Run safe migrations, sync managed assets and doctor
60
- upgrade --check Print the upgrade plan without writing files
61
- upgrade --check --json
62
- Print the upgrade plan as JSON
63
-
64
- Update modes:
65
- sync-only No migrations are pending
66
- upgrade-required Safe migrations are pending
58
+ console.log(`ty-context upgrade:
59
+ upgrade Run safe migrations, sync managed assets and doctor
60
+ upgrade --check Print the upgrade plan without writing files
61
+ upgrade --check --json
62
+ Print the upgrade plan as JSON
63
+
64
+ Update modes:
65
+ sync-only No migrations are pending
66
+ upgrade-required Safe migrations are pending
67
67
  manual-required Manual review or blockers are present`);
68
68
  }
@@ -3,8 +3,5 @@ export interface SyncReport {
3
3
  skipped: string[];
4
4
  blocked: string[];
5
5
  }
6
- export interface SyncOptions {
7
- allowPendingMigrations?: boolean;
8
- }
9
6
  export declare function emptySyncReport(): SyncReport;
10
- export declare function runSync(projectRoot: string, options?: SyncOptions): Promise<SyncReport>;
7
+ export declare function runSync(projectRoot: string): Promise<SyncReport>;
@@ -6,7 +6,6 @@ import { copyTree, listFiles, pathExists, readText, writeTextIfChanged } from ".
6
6
  import { AGENTS_BLOCK_MARKERS, GITHUB_WORKFLOW_BLOCK_END, GITHUB_WORKFLOW_BLOCK_MARKERS, GITHUB_WORKFLOW_BLOCK_START, MAKEFILE_BLOCK_END, MAKEFILE_BLOCK_MARKERS, MAKEFILE_BLOCK_START, MANAGED_BLOCK_END, MANAGED_BLOCK_START } from "./managed-file.js";
7
7
  import { packageAssetPath } from "./paths.js";
8
8
  import { assertSupportedSchema } from "./schema-guard.js";
9
- import { createUpgradePlan, formatUpgradePlan, hasUpgradePlanWork } from "./migrations.js";
10
9
  export function emptySyncReport() {
11
10
  return {
12
11
  changed: [],
@@ -14,18 +13,11 @@ export function emptySyncReport() {
14
13
  blocked: []
15
14
  };
16
15
  }
17
- export async function runSync(projectRoot, options = {}) {
16
+ export async function runSync(projectRoot) {
18
17
  await assertSupportedSchema(projectRoot, "sync");
19
18
  const root = await harnessRoot(projectRoot);
20
19
  const config = await readConfig(projectRoot);
21
20
  const report = emptySyncReport();
22
- if (!options.allowPendingMigrations) {
23
- const upgradePlan = await createUpgradePlan(projectRoot);
24
- if (hasUpgradePlanWork(upgradePlan)) {
25
- report.blocked.push(`upgrade required before sync: ${formatUpgradePlan(upgradePlan).join(" | ")}`);
26
- return report;
27
- }
28
- }
29
21
  await blockDeprecatedSkillOverrides(projectRoot, root, report);
30
22
  if (report.blocked.length > 0) {
31
23
  return report;
@@ -275,7 +267,7 @@ async function blockDeprecatedSkillOverrides(projectRoot, root, report) {
275
267
  if (deprecatedFiles.length === 0) {
276
268
  continue;
277
269
  }
278
- report.blocked.push(`${overrideRoot.relative}: Skill overrides are no longer supported. Move these rules into a separate project-local Skill such as ${root.replace(/\\/g, "/")}/skills/product_plan/SKILL.md, ${root.replace(/\\/g, "/")}/skills/uiux_design/SKILL.md or ${root.replace(/\\/g, "/")}/skills/development_engineer/SKILL.md. Deprecated files: ${deprecatedFiles.join(", ")}`);
270
+ report.blocked.push(`${overrideRoot.relative}: deprecated Skill overrides block sync because package-managed default Skills are overwritten during managed asset refresh. Move these rules into a separate project-local Skill such as ${root.replace(/\\/g, "/")}/skills/product_plan/SKILL.md, ${root.replace(/\\/g, "/")}/skills/uiux_design/SKILL.md or ${root.replace(/\\/g, "/")}/skills/development_engineer/SKILL.md. Deprecated files: ${deprecatedFiles.join(", ")}`);
279
271
  }
280
272
  }
281
273
  function skillOverrideRoots(projectRoot, root) {
@@ -36,7 +36,7 @@ export async function runUpgradeReport(projectRoot) {
36
36
  blocked: migrationReport.blocked
37
37
  }).slice(1));
38
38
  }
39
- const syncReport = await runSync(projectRoot, { allowPendingMigrations: true });
39
+ const syncReport = await runSync(projectRoot);
40
40
  lines.push(`sync changed=${syncReport.changed.length} skipped=${syncReport.skipped.length} blocked=${syncReport.blocked.length}`);
41
41
  for (const skipped of syncReport.skipped.filter((line) => line.includes("customized"))) {
42
42
  lines.push(`sync skipped: ${skipped}`);
@@ -1,3 +1,3 @@
1
- # Migrations
2
-
3
- Schema migrations for `.harness/config.yaml` and managed file layout belong here.
1
+ # Migrations
2
+
3
+ Schema migrations for `.harness/config.yaml` and managed file layout belong here.
package/package.json CHANGED
@@ -1,68 +1,68 @@
1
- {
2
- "name": "project-tiny-context-harness",
3
- "version": "0.2.56",
4
- "description": "Minimal project memory and validation harness for AI coding agents.",
5
- "license": "MIT",
6
- "author": "Seven128",
7
- "homepage": "https://github.com/Seven128/project-tiny-context-harness#readme",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/Seven128/project-tiny-context-harness.git",
11
- "directory": "packages/ty-context"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/Seven128/project-tiny-context-harness/issues"
15
- },
16
- "keywords": [
17
- "ai-agents",
18
- "coding-agent",
19
- "codex",
20
- "claude-code",
21
- "cursor",
22
- "gemini-cli",
23
- "opencode",
24
- "agent-context",
25
- "context-engineering",
26
- "context-management",
27
- "agents-md",
28
- "project-memory",
29
- "agent-memory",
30
- "ai-coding",
31
- "multi-agent",
32
- "llm",
33
- "developer-tools",
34
- "developer-productivity",
35
- "cli",
36
- "ty-context",
37
- "workflow"
38
- ],
39
- "type": "module",
40
- "bin": {
41
- "ty-context": "dist/cli.js"
42
- },
43
- "files": [
44
- "README.md",
45
- "dist",
46
- "assets",
47
- "migrations",
48
- "source-mappings.yaml"
49
- ],
50
- "scripts": {
51
- "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
52
- "typecheck": "tsc -p tsconfig.json --noEmit",
53
- "test": "npm run build && node --test ../../tests/ty-context/*.test.mjs",
54
- "prepack": "npm run build"
55
- },
56
- "engines": {
57
- "node": ">=20"
58
- },
59
- "dependencies": {
60
- "@google/design.md": "^0.2.0",
61
- "impeccable": "^2.3.2",
62
- "yaml": "^2.9.0"
63
- },
64
- "devDependencies": {
65
- "@types/node": "^24.0.0",
66
- "typescript": "^5.5.0"
67
- }
68
- }
1
+ {
2
+ "name": "project-tiny-context-harness",
3
+ "version": "0.2.58",
4
+ "description": "Minimal project memory and validation harness for AI coding agents.",
5
+ "license": "MIT",
6
+ "author": "Seven128",
7
+ "homepage": "https://github.com/Seven128/project-tiny-context-harness#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/Seven128/project-tiny-context-harness.git",
11
+ "directory": "packages/ty-context"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/Seven128/project-tiny-context-harness/issues"
15
+ },
16
+ "keywords": [
17
+ "ai-agents",
18
+ "coding-agent",
19
+ "codex",
20
+ "claude-code",
21
+ "cursor",
22
+ "gemini-cli",
23
+ "opencode",
24
+ "agent-context",
25
+ "context-engineering",
26
+ "context-management",
27
+ "agents-md",
28
+ "project-memory",
29
+ "agent-memory",
30
+ "ai-coding",
31
+ "multi-agent",
32
+ "llm",
33
+ "developer-tools",
34
+ "developer-productivity",
35
+ "cli",
36
+ "ty-context",
37
+ "workflow"
38
+ ],
39
+ "type": "module",
40
+ "bin": {
41
+ "ty-context": "dist/cli.js"
42
+ },
43
+ "files": [
44
+ "README.md",
45
+ "dist",
46
+ "assets",
47
+ "migrations",
48
+ "source-mappings.yaml"
49
+ ],
50
+ "scripts": {
51
+ "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
52
+ "typecheck": "tsc -p tsconfig.json --noEmit",
53
+ "test": "npm run build && node --test ../../tests/ty-context/*.test.mjs",
54
+ "prepack": "npm run build"
55
+ },
56
+ "engines": {
57
+ "node": ">=20"
58
+ },
59
+ "dependencies": {
60
+ "@google/design.md": "^0.2.0",
61
+ "impeccable": "^2.3.2",
62
+ "yaml": "^2.9.0"
63
+ },
64
+ "devDependencies": {
65
+ "@types/node": "^24.0.0",
66
+ "typescript": "^5.5.0"
67
+ }
68
+ }
@@ -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"