project-tiny-context-harness 0.2.53 → 0.2.55

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 (46) hide show
  1. package/README.md +122 -69
  2. package/assets/README.md +113 -62
  3. package/assets/README.zh-CN.md +8 -6
  4. package/assets/agents/AGENTS_CORE.md +17 -16
  5. package/assets/context_templates/product-surface-contract.md +60 -0
  6. package/assets/github/harness.yml +15 -11
  7. package/assets/make/ty-context.mk +48 -0
  8. package/assets/skills/context_development_engineer/SKILL.md +9 -6
  9. package/assets/skills/context_full_project_export/SKILL.md +13 -13
  10. package/assets/skills/context_harness_upgrade/SKILL.md +9 -9
  11. package/assets/skills/context_product_plan/SKILL.md +7 -4
  12. package/assets/skills/context_surface_contract/SKILL.md +168 -0
  13. package/assets/skills/context_uiux_design/SKILL.md +7 -4
  14. package/assets/skills/plan_acceptance_checklist_compiler/SKILL.md +427 -0
  15. package/assets/tools/validate_context.py +1 -1
  16. package/dist/cli.js +1 -1
  17. package/dist/commands/check-modularity.js +14 -6
  18. package/dist/commands/export-context.js +4 -4
  19. package/dist/commands/index.js +8 -5
  20. package/dist/commands/init.js +1 -1
  21. package/dist/commands/package-source.js +1 -1
  22. package/dist/commands/upgrade.js +1 -1
  23. package/dist/lib/config.js +7 -2
  24. package/dist/lib/constants.d.ts +1 -1
  25. package/dist/lib/constants.js +1 -1
  26. package/dist/lib/context-export.js +5 -5
  27. package/dist/lib/harness-root.d.ts +5 -0
  28. package/dist/lib/harness-root.js +32 -4
  29. package/dist/lib/legacy-managed-scan.d.ts +2 -0
  30. package/dist/lib/legacy-managed-scan.js +79 -0
  31. package/dist/lib/legacy-sdlc-migration.d.ts +2 -0
  32. package/dist/lib/legacy-sdlc-migration.js +189 -0
  33. package/dist/lib/managed-file.d.ts +18 -12
  34. package/dist/lib/managed-file.js +25 -14
  35. package/dist/lib/migrations.js +4 -2
  36. package/dist/lib/modularity.d.ts +9 -0
  37. package/dist/lib/modularity.js +132 -8
  38. package/dist/lib/package-json-config.js +3 -3
  39. package/dist/lib/paths.d.ts +2 -2
  40. package/dist/lib/paths.js +2 -2
  41. package/dist/lib/sync-engine.js +33 -31
  42. package/dist/lib/types.d.ts +12 -0
  43. package/dist/lib/validators.js +37 -4
  44. package/package.json +5 -5
  45. package/source-mappings.yaml +13 -13
  46. package/assets/make/sdlc-harness.mk +0 -43
@@ -0,0 +1,427 @@
1
+ ---
2
+ name: plan_acceptance_checklist_compiler
3
+ description: Use when the user provides or references a long-task plan, Markdown plan, RFC, implementation plan, milestone plan, goal-mode task, or target-mode task and asks Codex to generate, audit, or sort a rigorous acceptance checklist or completion definition combined with project durable Context. English triggers include acceptance checklist for this plan, goal-mode prompt for this implementation plan, target-mode prompt for this plan, completion definition for this plan, long-task plan acceptance, and audit this plan for acceptance criteria. Chinese triggers must be tied to a plan, 方案, 计划, md, RFC, or implementation proposal, such as 整理这份方案,输出一份目标模式文本给我, 为这份方案生成验收清单, 方案验收清单, 长程任务方案验收, 实施计划验收清单, 结合项目 context 梳理方案验收, 为这份 md 生成目标模式验收文本, 把这份 md 整理成验收清单. Avoid standalone broad terms like goal mode, target mode, acceptance criteria, completion definition, 目标模式文本, 验收标准, or 完成定义 when no plan-like source is present. This Skill writes temporary plan/checklist artifacts under tmp/ty-context/plan-acceptance, compiles a generic acceptance checklist, and outputs a goal/target-mode prompt no longer than 4000 characters. It does not execute the plan, modify implementation code, run long validations, or mark goals complete.
4
+ ---
5
+
6
+ # Plan Acceptance Checklist Compiler
7
+
8
+ ## Package-Managed Boundary
9
+
10
+ This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `plan_acceptance_checklist_compiler` Skill directly in a consumer project.
11
+
12
+ Project-specific acceptance rules belong in `project_context/**`, `DESIGN.md` when visual design facts are durable, or a separate project-local Skill. Keep this package-managed Skill business-agnostic.
13
+
14
+ ## Purpose
15
+
16
+ Convert a given long-task plan into a strict, project-context-aware acceptance checklist and a short goal/target-mode execution prompt.
17
+
18
+ The output answers:
19
+
20
+ ```text
21
+ For this exact plan, what must be true before a future executor can honestly say the task is complete?
22
+ ```
23
+
24
+ This Skill is generic. Do not embed business-specific rules, provider-specific rules, product-domain assumptions, artifact schemas, API names, UI names, status names, or one-off project logic in this Skill. If the user's plan contains a specific domain, derive acceptance items from that plan and the project Context during the current invocation only.
25
+
26
+ ## Required Outputs
27
+
28
+ Every completed invocation must produce:
29
+
30
+ 1. A preserved copy of the plan under `tmp/ty-context/plan-acceptance/`.
31
+ 2. A rigorous acceptance checklist derived from the plan and relevant project Context.
32
+ 3. A goal/target-mode prompt the user can paste directly into Codex.
33
+
34
+ Exception: if the Context confirmation gate below triggers, stop after materializing the plan and reading enough Context to explain the uncertainty. Ask the user for confirmation before producing the checklist or goal/target-mode prompt.
35
+
36
+ The goal/target-mode prompt must be no longer than 4000 characters. Use the user's language when practical. For Chinese requests, use this shape:
37
+
38
+ ```text
39
+ 实施计划: tmp/ty-context/plan-acceptance/<plan>.md
40
+ 可多开agent,agent名额不够了就关掉不用的。
41
+ <验收清单>
42
+ ```
43
+
44
+ For English requests, use this shape:
45
+
46
+ ```text
47
+ Plan: tmp/ty-context/plan-acceptance/<plan>.md
48
+ You may use multiple agents; if agent slots run low, close idle or unnecessary agents.
49
+ <acceptance checklist>
50
+ ```
51
+
52
+ This resource lifecycle line is part of the generated execution prompt. It authorizes parallel decomposition for the future executor while requiring unused agents to be closed when slots run low.
53
+
54
+ ## Non-Scope
55
+
56
+ Do not execute the plan unless the user separately asks for execution.
57
+
58
+ Do not modify product code, migrations, UI, API, tests, runtime artifacts, or durable Context while using this Skill.
59
+
60
+ Do not run long validation, external probes, browser flows, cloud smoke tests, database writes, deployment commands, or other side-effect commands unless the user explicitly asks for validation execution.
61
+
62
+ Do not mark any goal complete. This Skill defines acceptance; it does not complete acceptance.
63
+
64
+ Do not lower the plan target to match current implementation.
65
+
66
+ ## Trigger Conditions
67
+
68
+ Use this Skill when the user asks for any of the following:
69
+
70
+ - Give a plan, Markdown file, RFC, milestone, or implementation proposal an acceptance checklist.
71
+ - Combine project durable Context with a long-task plan to produce acceptance criteria.
72
+ - Convert a long-range task plan into a checklist for Codex goal/target mode.
73
+ - Generate a completion definition for "execute this plan until done."
74
+ - Check whether a plan is missing acceptance conditions.
75
+ - Combine user objective, plan steps, project Context, code entry points, and verification paths into an executable acceptance matrix.
76
+
77
+ Typical trigger phrases:
78
+
79
+ ```text
80
+ acceptance checklist for this plan
81
+ goal-mode prompt for this implementation plan
82
+ target-mode prompt for this plan
83
+ completion definition for this plan
84
+ long-task plan acceptance
85
+ audit this plan for acceptance criteria
86
+ 整理这份方案,输出一份目标模式文本给我
87
+ 整理方案输出目标模式文本
88
+ 为这份方案生成验收清单
89
+ 方案验收清单
90
+ 长程任务方案验收
91
+ 实施计划验收清单
92
+ 结合项目 context 梳理方案验收
93
+ 为这份 md 生成目标模式验收文本
94
+ 把这份 md 整理成验收清单
95
+ ```
96
+
97
+ Do not trigger from standalone broad phrases such as `goal mode`, `target mode`, `acceptance criteria`, `completion definition`, `目标模式文本`, `验收标准`, or `完成定义` unless the same user request also identifies a plan-like source.
98
+
99
+ ## Input Priority
100
+
101
+ Build the checklist from these sources, in order:
102
+
103
+ 1. User's current instruction.
104
+ 2. The referenced or pasted plan.
105
+ 3. Relevant durable project Context under `project_context/**`.
106
+ 4. Repository guidance such as `AGENTS.md`, `README.md`, `DESIGN.md`, and relevant local Skills.
107
+ 5. Current code and tests, only to identify real surfaces, commands, routes, schemas, artifacts, entry points, and likely verification paths.
108
+ 6. Existing reports or artifacts, only to identify required evidence and invalidation risks. Existing artifacts are not proof unless the user explicitly asks to audit current completion.
109
+
110
+ If plan and Context conflict, preserve the conflict in the checklist. Do not silently choose the easier side.
111
+
112
+ ## Step 1: Materialize The Plan Under `tmp/ty-context/plan-acceptance/`
113
+
114
+ Before writing the checklist, write the user-specified plan into the repository `tmp/ty-context/plan-acceptance/` directory.
115
+
116
+ Rules:
117
+
118
+ - If `tmp/ty-context/plan-acceptance/` does not exist, create it.
119
+ - If the user references a file outside `tmp/ty-context/plan-acceptance/`, copy its current content into `tmp/ty-context/plan-acceptance/<safe-plan-name>.md`.
120
+ - If the user references a file already under `tmp/ty-context/plan-acceptance/`, use that path directly unless the user asks for a new copy.
121
+ - If the user pasted the plan text, write the pasted plan exactly into `tmp/ty-context/plan-acceptance/<safe-plan-name>.md`.
122
+ - Preserve the plan content. Do not summarize, normalize, reorder, translate, or edit it while materializing it.
123
+ - Use a stable readable filename derived from the plan title, source filename, or user topic. Use lowercase letters, digits, hyphens, and `.md`.
124
+ - If the source plan cannot be found or read, stop and report the missing source. Do not invent a plan.
125
+ - The materialized plan is temporary execution input. It is not durable Context and not proof that any acceptance item passed.
126
+
127
+ Recommended paths:
128
+
129
+ ```text
130
+ tmp/ty-context/plan-acceptance/<plan-slug>.md
131
+ tmp/ty-context/plan-acceptance/<plan-slug>-acceptance-checklist.md
132
+ ```
133
+
134
+ ## Step 2: Read Relevant Project Context
135
+
136
+ Read only the Context needed for the plan's impacted surfaces. Use Context to identify what the project says the system should mean.
137
+
138
+ Use code and tests to identify current implementation surfaces and verification commands. Code describes current state; it must not silently redefine the plan's completion definition.
139
+
140
+ Extract:
141
+
142
+ - Product or system contract.
143
+ - Module boundaries.
144
+ - API, data, artifact, runtime, UI, and test contracts.
145
+ - Validation and deployment paths.
146
+ - Security, privacy, redaction, and environment rules.
147
+ - Known non-goals and forbidden dependencies.
148
+ - Existing implementation entry points.
149
+
150
+ ## Step 3: Run The Context Confirmation Gate
151
+
152
+ After reading the plan and relevant Context, decide whether generating an acceptance checklist would require guessing or silently accepting many durable fact changes. If yes, stop and ask the user to confirm details before continuing.
153
+
154
+ Trigger this gate when any of these apply:
155
+
156
+ - The plan appears to add or change many long-term facts, such as product ownership, module boundaries, API/schema semantics, data contracts, state semantics, verification/deployment entry points, UI information architecture, security/privacy rules, or cross-domain dependency rules.
157
+ - The plan would likely require updates across multiple Context roles or areas, or more than a small number of durable Context files.
158
+ - The plan conflicts with current Context and the conflict changes the completion definition rather than only implementation details.
159
+ - The plan uses broad or strategic language whose meaning cannot be made falsifiable from the plan and Context alone, such as "rebuild the whole architecture", "unify every module", "production-grade", "fully integrated", "maximize capability", `重构整体架构`, `统一所有模块`, `生产级`, `长期方案`, `完全接入`, or similar.
160
+ - The acceptance outcome depends on choosing between product/architecture alternatives that the user has not explicitly chosen.
161
+ - External approvals, credentials, runtime environments, legal/compliance constraints, paid/provider access, or irreversible operational effects materially change what can be accepted.
162
+ - You judge that proceeding would encode a durable assumption the user probably expects to review.
163
+
164
+ When the gate triggers:
165
+
166
+ - Do not compile the final checklist, write the checklist file, or generate the goal/target-mode prompt yet.
167
+ - Ask 1-3 concise questions focused on the blocking durable assumptions.
168
+ - Include the materialized plan path if already written.
169
+ - State the specific Context files or Context roles that made confirmation necessary.
170
+ - Offer a concrete default only when it is safe and reversible; otherwise ask for an explicit decision.
171
+ - Resume from Step 2 after the user answers.
172
+
173
+ Do not trigger this gate merely because the plan is large. If the Context impact is clear, bounded, and the checklist can represent the durable Context updates as acceptance items without guessing, continue.
174
+
175
+ ## Step 4: Compile The Acceptance Contract
176
+
177
+ Before the detailed checklist, write a compact contract:
178
+
179
+ ```markdown
180
+ ## Acceptance Contract
181
+
182
+ - Plan source: `tmp/ty-context/plan-acceptance/<plan>.md`
183
+ - User objective: <objective>
184
+ - Completion definition: <what must be true>
185
+ - Core surfaces: <code/API/UI/data/runtime/artifact/test/context/etc.>
186
+ - Explicit non-goals: <items>
187
+ - External blockers: <accounts/session/credentials/network/cloud/manual approval/etc.>
188
+ - Evidence standard: <accepted proof types>
189
+ ```
190
+
191
+ If the plan uses broad words such as `all`, `complete`, `maximum`, `maximized`, `accepted`, `formal`, `production`, `real`, `current`, or `verified`, convert them into explicit inventory and evidence requirements.
192
+
193
+ ## Step 5: Build The Full Acceptance Checklist
194
+
195
+ Treat the checklist as the set of falsifiable acceptance items a future executor must satisfy. It is not a progress log.
196
+
197
+ Create a checklist table with these columns:
198
+
199
+ ```markdown
200
+ | ID | Acceptance item | Source | Scope | Required evidence | Verification method | Fail / not accepted if |
201
+ |---|---|---|---|---|---|---|
202
+ ```
203
+
204
+ Column rules:
205
+
206
+ - `ID`: stable ID such as `AC-01`; group by workstream if useful.
207
+ - `Acceptance item`: one atomic condition that must be true.
208
+ - `Source`: user instruction, plan section, Context file, code contract, schema, API, UI, test, or risk note.
209
+ - `Scope`: one of `core`, `conditional`, `blocked-external`, `out-of-scope`, `nice-to-have`.
210
+ - `Required evidence`: exact proof required.
211
+ - `Verification method`: concrete command, check, inspection path, API call, UI check, artifact validation, or manual proof.
212
+ - `Fail / not accepted if`: concrete invalidation case.
213
+
214
+ Each item must be evidence-bound and falsifiable. Split combined requirements into separate rows.
215
+
216
+ ## Generic Acceptance Dimensions
217
+
218
+ Include only dimensions relevant to the plan. Do not mechanically add irrelevant categories.
219
+
220
+ Consider these generic dimensions:
221
+
222
+ - Objective and completion definition.
223
+ - Scope inventory and coverage.
224
+ - Domain / project Context conformance.
225
+ - Code implementation behavior.
226
+ - API or interface contract.
227
+ - Data model, schema, migration, or persistence.
228
+ - Runtime state, configuration, session, credential, environment, or degraded behavior.
229
+ - Artifact generation, schema, freshness, provenance, and acceptance.
230
+ - UI or user-visible projection.
231
+ - Async job, worker, scheduler, queue, or background process.
232
+ - Security, privacy, redaction, secrets, and access control.
233
+ - Observability, logs, diagnostics, and operator visibility.
234
+ - Performance, timeout, boundedness, pagination, and resource budget.
235
+ - Backward compatibility and non-regression.
236
+ - Failure states, blocked states, retries, recovery, and next actions.
237
+ - Unit, integration, contract, smoke, browser, cloud, or production-like validation.
238
+ - Documentation or durable Context update, only when the plan requires a durable fact change.
239
+
240
+ ## Evidence Layer Separation
241
+
242
+ For evidence-heavy or validation-heavy plans, keep these layers separate:
243
+
244
+ ```text
245
+ infrastructure implemented
246
+ runtime exercised
247
+ evidence collected
248
+ evidence accepted
249
+ system surfaces reflect evidence
250
+ final validation passed
251
+ ```
252
+
253
+ Do not merge these layers unless the plan explicitly treats them as one.
254
+
255
+ Examples of generic false completion:
256
+
257
+ - Code exists, but runtime behavior was not exercised.
258
+ - Artifacts exist, but current validators reject them.
259
+ - Tests pass, but the required API/UI/runtime proof was not checked.
260
+ - A partial sample ran, but the plan required full inventory coverage.
261
+ - A document was updated, but the system state did not change.
262
+
263
+ ## Scope Labels
264
+
265
+ Use these exact labels:
266
+
267
+ - `core`: required to call the plan complete.
268
+ - `conditional`: required only when a stated condition applies.
269
+ - `blocked-external`: required for full completion but depends on unavailable external input.
270
+ - `out-of-scope`: explicitly excluded by the user or plan.
271
+ - `nice-to-have`: useful but not required; use sparingly.
272
+
273
+ Do not mark an item out of scope only because it is difficult.
274
+
275
+ ## Conflict Handling
276
+
277
+ If the plan, Context, and code disagree, add a conflict table:
278
+
279
+ ```markdown
280
+ | Conflict | Plan says | Context says | Code currently does | Acceptance impact | Required resolution |
281
+ |---|---|---|---|---|---|
282
+ ```
283
+
284
+ Do not resolve conflict by silently following current code.
285
+
286
+ ## False-Completion Traps
287
+
288
+ After the checklist, include traps that a future executor must not mistake for completion.
289
+
290
+ Use generic wording. Do not add business-specific traps to the Skill itself.
291
+
292
+ Template:
293
+
294
+ ```markdown
295
+ ## False-Completion Traps
296
+
297
+ - <activity> is not enough unless <acceptance proof> also exists.
298
+ - <partial proof> cannot prove <full acceptance item>.
299
+ - <old/stale/mismatched evidence> cannot prove current completion.
300
+ - <surface A> passing does not prove <surface B> unless the checklist links them.
301
+ ```
302
+
303
+ ## Suggested Execution Order
304
+
305
+ Suggest an execution order that prioritizes the highest-risk proof first:
306
+
307
+ 1. Confirm scope inventory and completion definition.
308
+ 2. Confirm schemas/contracts and invalid evidence rules.
309
+ 3. Implement or repair the core path.
310
+ 4. Produce or inspect required runtime/artifact/API/UI evidence.
311
+ 5. Run contract/integration/regression checks.
312
+ 6. Run build/typecheck/lint/smoke checks.
313
+ 7. Update temporary checklist status only if the user asked for status tracking.
314
+
315
+ Do not put low-signal checks before the core acceptance proof when the plan is evidence-driven.
316
+
317
+ ## Checklist Self-Test
318
+
319
+ Every generated checklist must pass this self-test:
320
+
321
+ ```markdown
322
+ ## Checklist Self-Test
323
+
324
+ - [ ] Every original plan section is mapped to at least one acceptance item or explicitly marked non-goal.
325
+ - [ ] Every broad word such as all / maximum / complete / formal / production / verified is converted into inventory + evidence.
326
+ - [ ] Every core item has a verification method.
327
+ - [ ] Every evidence item defines invalid evidence.
328
+ - [ ] Code, API, UI, data, runtime, artifacts, and tests are separated when they prove different things.
329
+ - [ ] External blockers are separated from local remaining work.
330
+ - [ ] Current implementation was not used to reduce the user's completion definition.
331
+ - [ ] The checklist can be handed to another Codex session without hidden assumptions.
332
+ ```
333
+
334
+ ## Goal/Target-Mode Prompt Generation
335
+
336
+ After compiling the checklist, produce a paste-ready goal/target-mode prompt.
337
+
338
+ Hard requirements:
339
+
340
+ - The prompt must be no longer than 4000 characters including line breaks.
341
+ - The first line must identify the plan path.
342
+ - Use `实施计划: <path>` for Chinese prompts and `Plan: <path>` for English prompts.
343
+ - The second line must be a resource lifecycle instruction: `可多开agent,agent名额不够了就关掉不用的。` for Chinese prompts or `You may use multiple agents; if agent slots run low, close idle or unnecessary agents.` for English prompts.
344
+ - The remaining content must be the acceptance checklist or a compact version of it.
345
+ - The prompt must be self-contained enough for goal/target-mode execution.
346
+ - Do not include explanatory preface inside the prompt.
347
+ - Do not include Markdown tables inside the prompt if they make it too long.
348
+ - Prefer short numbered items over verbose prose.
349
+ - If the full checklist is too large, write the full checklist to `tmp/ty-context/plan-acceptance/<plan-slug>-acceptance-checklist.md`, then compress the goal/target-mode prompt while preserving all core acceptance categories.
350
+ - The compact prompt may reference the full checklist path, but it must still include the core completion criteria directly.
351
+
352
+ Recommended compact Chinese prompt shape:
353
+
354
+ ```text
355
+ 实施计划: tmp/ty-context/plan-acceptance/<plan-slug>.md
356
+ 可多开agent,agent名额不够了就关掉不用的。
357
+
358
+ 验收清单:
359
+ AC1 <核心完成定义,包含验收证据>
360
+ AC2 <范围/清单/覆盖要求>
361
+ AC3 <Context/架构/边界要求>
362
+ AC4 <核心实现行为要求>
363
+ AC5 <数据/API/接口/契约要求>
364
+ AC6 <运行态/配置/外部依赖/阻塞分类要求>
365
+ AC7 <artifact/evidence/schema/freshness/provenance 要求>
366
+ AC8 <UI/用户可见/API 投影一致性要求>
367
+ AC9 <安全/隐私/脱敏/secret 要求>
368
+ AC10 <测试/构建/集成/smoke/回归要求>
369
+ AC11 <文档/Context 更新要求,仅在计划要求时执行>
370
+ AC12 完成前审计:逐条对照实施计划;每个 core 项必须有当前证据;未跑验证必须明示;有可继续执行的 core 项不得标记完成;外部阻塞必须写明原因、影响和下一步。
371
+
372
+ 禁止把以下内容当完成:只改代码、只更新计划、只跑部分测试、只生成旧/部分/不被当前契约接受的证据、只完成基础设施但未完成验收证据、API/UI/数据/测试之间仍矛盾。
373
+ ```
374
+
375
+ Recommended compact English prompt shape:
376
+
377
+ ```text
378
+ Plan: tmp/ty-context/plan-acceptance/<plan-slug>.md
379
+ You may use multiple agents; if agent slots run low, close idle or unnecessary agents.
380
+
381
+ Acceptance checklist:
382
+ AC1 <core completion definition with required evidence>
383
+ AC2 <scope inventory and coverage>
384
+ AC3 <Context / architecture / boundary conformance>
385
+ AC4 <core implementation behavior>
386
+ AC5 <data / API / interface / contract requirements>
387
+ AC6 <runtime / configuration / external dependency / blocker classification>
388
+ AC7 <artifact / evidence / schema / freshness / provenance requirements>
389
+ AC8 <UI / user-visible / API projection consistency>
390
+ AC9 <security / privacy / redaction / secret handling>
391
+ AC10 <test / build / integration / smoke / regression requirements>
392
+ AC11 <documentation / Context updates only when required by the plan>
393
+ AC12 Final audit: compare every item against the plan; every core item needs current evidence; missing validation must be stated; any executable core item left open means the task is not complete; external blockers need cause, impact, and next action.
394
+
395
+ Do not count these as completion: code-only changes, plan-only updates, partial tests, stale or partial evidence, infrastructure without acceptance proof, or contradictions between API/UI/data/tests.
396
+ ```
397
+
398
+ Before final response, check the prompt length. If it exceeds 4000 characters, compress it and check again.
399
+
400
+ ## Final Response Requirements
401
+
402
+ For completed checklist runs, the final response must include:
403
+
404
+ - `tmp/ty-context/plan-acceptance/` plan path.
405
+ - Full checklist path if a full checklist file was written.
406
+ - The paste-ready goal/target-mode prompt in a code block.
407
+ - Any unresolved ambiguity that affects checklist accuracy.
408
+
409
+ If the Context confirmation gate triggers, the response must ask for the needed confirmation instead of including the checklist or goal/target-mode prompt.
410
+
411
+ Do not claim that any acceptance item has passed unless the user explicitly asked for a current completion audit and current evidence was inspected.
412
+
413
+ ## Forbidden Behaviors
414
+
415
+ Do not include concrete business-domain logic in this Skill.
416
+
417
+ Do not hardcode project-specific provider names, API names, UI names, artifact paths, schemas, statuses, or commands in this Skill.
418
+
419
+ Do not execute the generated goal/target-mode prompt.
420
+
421
+ Do not use the checklist to mark the task complete.
422
+
423
+ Do not hide missing source files, ambiguous plan scope, or external blockers.
424
+
425
+ Do not rewrite the user's plan while copying it into `tmp/ty-context/plan-acceptance/`.
426
+
427
+ Do not use a short sample, stale artifact, old result, or current implementation convenience to reduce a plan that asked for full completion.
@@ -167,7 +167,7 @@ def validate_manifest(errors):
167
167
  roles = {}
168
168
  if not manifest_path.exists():
169
169
  if schema_requires_manifest():
170
- errors.append("missing project_context/context.toml; run sdlc-harness upgrade to create the Schema v4 Context graph manifest")
170
+ errors.append("missing project_context/context.toml; run ty-context upgrade to create the Schema v4 Context graph manifest")
171
171
  return roles
172
172
  manifest = parse_manifest(manifest_path, errors)
173
173
  if not manifest["areas"]:
package/dist/cli.js CHANGED
@@ -7,6 +7,6 @@ async function main() {
7
7
  }
8
8
  main().catch((error) => {
9
9
  const message = error instanceof Error ? error.message : String(error);
10
- console.error(`sdlc-harness: ${message}`);
10
+ console.error(`ty-context: ${message}`);
11
11
  process.exitCode = 1;
12
12
  });
@@ -23,21 +23,27 @@ export async function checkModularity(args) {
23
23
  files: parsed.files,
24
24
  limit: parsed.limit
25
25
  });
26
- console.log(`check-modularity audited=${report.files.length} warning=${report.warnings.length} limit=${report.limit}`);
26
+ console.log(`check-modularity audited=${report.files.length} warning=${report.warnings.length} limit=${report.limit} waived=${report.waivedWarnings.length}`);
27
27
  if (report.files.length === 0) {
28
28
  console.log("No handwritten source files matched the selected scope.");
29
29
  }
30
30
  for (const file of report.files) {
31
- const prefix = file.overLimit ? "over-limit" : "ok";
31
+ const prefix = file.overLimit && file.waived ? "waived" : file.overLimit ? "over-limit" : "ok";
32
32
  console.log(`${prefix}: ${file.relativePath} ${file.lines} lines`);
33
33
  }
34
+ for (const error of report.errors) {
35
+ console.error(`error: ${error}`);
36
+ }
34
37
  for (const warning of report.warnings) {
35
38
  console.warn(`warning: ${warning}`);
36
39
  }
40
+ for (const waiver of report.waivedWarnings) {
41
+ console.warn(`waived: ${waiver}`);
42
+ }
37
43
  if (report.warnings.length > 0) {
38
- console.warn("warning: over-limit touched files need a split, or final handoff should include `Modularity: exception documented` with file, reason and future boundary.");
44
+ console.warn("warning: over-limit touched files need a split or, when modularity.policy is scoped_waivers, a valid <harnessRoot>/config.yaml modularity waiver with file, reason and future split boundary.");
39
45
  }
40
- if (report.warnings.length > 0 && parsed.failOnWarning) {
46
+ if (report.errors.length > 0 || (report.warnings.length > 0 && parsed.failOnWarning)) {
41
47
  process.exitCode = 1;
42
48
  }
43
49
  }
@@ -127,11 +133,13 @@ function parseLimit(value) {
127
133
  return limit;
128
134
  }
129
135
  function helpText() {
130
- return `sdlc-harness check-modularity:
136
+ return `ty-context check-modularity:
131
137
  check-modularity --touched [--limit 300] [--fail-on-warning]
132
138
  check-modularity --file <path> [--file <path> ...] [--limit 300] [--fail-on-warning]
133
139
  check-modularity --base <ref> [--limit 300] [--fail-on-warning]
134
140
 
135
141
  Audits selected handwritten source files for physical line-count risk.
136
- The default is warning-only; --fail-on-warning lets projects opt into CI enforcement.`;
142
+ The default is warning-only; --fail-on-warning lets projects opt into CI enforcement.
143
+ Generated configs default to modularity.policy: strict_except_generated; omitted policy is treated as scoped_waivers for compatibility.
144
+ Over-limit files can be waived only through <harnessRoot>/config.yaml modularity.waivers when policy is scoped_waivers.`;
137
145
  }
@@ -136,14 +136,14 @@ function printWarnings(warnings) {
136
136
  }
137
137
  }
138
138
  function helpText() {
139
- return `sdlc-harness export-context:
140
- export-context --full [--output tmp/sdlc/context-exports/<name>.md] [--check]
141
- export-context --code [--output tmp/sdlc/context-exports/<name>.md] [--check]
139
+ return `ty-context export-context:
140
+ export-context --full [--output tmp/ty-context/context-exports/<name>.md] [--check]
141
+ export-context --code [--output tmp/ty-context/context-exports/<name>.md] [--check]
142
142
  export-context --all [--check]
143
143
 
144
144
  Creates temporary Markdown artifacts for copying or external-tool ingestion.
145
145
  --full exports the project Context summary as a full-project-context artifact.
146
146
  --code exports one current implementation snapshot as a code-level-implementation artifact.
147
147
  --all exports both default artifacts in one command.
148
- The artifact must stay under tmp/sdlc/context-exports/** and must not be referenced from project_context/context.toml.`;
148
+ The artifact must stay under tmp/ty-context/context-exports/** and must not be referenced from project_context/context.toml.`;
149
149
  }
@@ -16,11 +16,12 @@ export const commands = {
16
16
  "export-context": exportContext,
17
17
  validate,
18
18
  "validate-context": (args) => validate(["validate-context", ...args]),
19
+ "validate-code-modularity": (args) => validate(["validate-code-modularity", ...args]),
19
20
  "validate-harness": (args) => validate(["validate-harness", ...args]),
20
21
  package: packageSource
21
22
  };
22
23
  export function help() {
23
- console.log(`sdlc-harness commands:
24
+ console.log(`ty-context commands:
24
25
  init [--adopt] [--harness-folder <path>]
25
26
  Initialize/adopt a project; without --harness-folder, choose target agent first
26
27
  sync Refresh managed assets; refuses when upgrade migrations are pending
@@ -30,9 +31,11 @@ export function help() {
30
31
  check-modularity --touched|--file <path>|--base <ref> [--limit 300] [--fail-on-warning]
31
32
  Warn when selected handwritten source files exceed a line-count limit
32
33
  export-context --full|--code|--all [--output <path>] [--check]
33
- Export a temporary Context summary or code implementation Markdown artifact
34
- validate <gate> Run a Harness validation gate (Minimal Context only)
35
- validate-context Validate Minimal Context fact-source recoverability
36
- validate-harness Compatibility alias for validate-context
34
+ Export a temporary Context summary or code implementation Markdown artifact
35
+ validate <gate> Run a Harness validation gate
36
+ validate-context Validate Minimal Context fact-source recoverability
37
+ validate-code-modularity
38
+ Enforce touched handwritten source file modularity
39
+ validate-harness Run validate-context and validate-code-modularity
37
40
  package <subcommand> Maintain package canonical source`);
38
41
  }
@@ -20,7 +20,7 @@ export async function init(args) {
20
20
  const configuredRoot = await resolveInitHarnessRoot(projectRoot, args);
21
21
  if (configuredRoot) {
22
22
  await writePackageHarnessRoot(projectRoot, configuredRoot);
23
- console.log(`configured package.json sdlcHarness.harnessFolderName=${JSON.stringify(configuredRoot)}`);
23
+ console.log(`configured package.json tyContext.harnessFolderName=${JSON.stringify(configuredRoot)}`);
24
24
  }
25
25
  const report = await runInit(projectRoot, { adopt, force });
26
26
  for (const line of report) {
@@ -18,7 +18,7 @@ export async function packageSource(args) {
18
18
  console.log("package source OK");
19
19
  return;
20
20
  }
21
- console.log(`sdlc-harness package commands:
21
+ console.log(`ty-context package commands:
22
22
  sync-source Update package canonical assets from this source workspace
23
23
  check-source Verify package canonical assets match this source workspace`);
24
24
  }
@@ -55,7 +55,7 @@ function parseArgs(args) {
55
55
  return options;
56
56
  }
57
57
  function printHelp() {
58
- console.log(`sdlc-harness upgrade:
58
+ console.log(`ty-context upgrade:
59
59
  upgrade Run safe migrations, sync managed assets and doctor
60
60
  upgrade --check Print the upgrade plan without writing files
61
61
  upgrade --check --json
@@ -9,12 +9,16 @@ export function defaultConfig(root) {
9
9
  package: CANONICAL_CORE_PACKAGE,
10
10
  schema_version: CURRENT_SCHEMA_VERSION
11
11
  },
12
+ modularity: {
13
+ limit: 300,
14
+ policy: "strict_except_generated"
15
+ },
12
16
  managed_files: [
13
17
  { path: "AGENTS.md", strategy: "merge-block" },
14
18
  { path: "Makefile", strategy: "merge-block" },
15
19
  { path: harnessPath(root, "skills"), strategy: "managed" },
16
- { path: harnessPath(root, "pjsdlc_managed", "context_templates"), strategy: "managed" },
17
- { path: harnessPath(root, "pjsdlc_managed", "make", "sdlc-harness.mk"), strategy: "managed" },
20
+ { path: harnessPath(root, "ty-context-managed", "context_templates"), strategy: "managed" },
21
+ { path: harnessPath(root, "ty-context-managed", "make", "ty-context.mk"), strategy: "managed" },
18
22
  { path: "tools", strategy: "managed" },
19
23
  { path: ".github/workflows/harness.yml", strategy: "create-if-missing" }
20
24
  ],
@@ -46,6 +50,7 @@ export function normalizeConfig(value, root = ".agent") {
46
50
  package: value.core?.package ?? fallback.core.package,
47
51
  schema_version: value.core?.schema_version ?? fallback.core.schema_version
48
52
  },
53
+ modularity: value.modularity,
49
54
  managed_files: value.managed_files ?? fallback.managed_files,
50
55
  never_overwrite: value.never_overwrite ?? fallback.never_overwrite
51
56
  };
@@ -1,3 +1,3 @@
1
1
  export declare const CANONICAL_CORE_PACKAGE = "project-tiny-context-harness";
2
2
  export declare const CURRENT_SCHEMA_VERSION = "4";
3
- export declare const CANONICAL_NPX_COMMAND = "npx --yes --package project-tiny-context-harness@latest sdlc-harness";
3
+ export declare const CANONICAL_NPX_COMMAND = "npx --yes --package project-tiny-context-harness@latest ty-context";
@@ -1,3 +1,3 @@
1
1
  export const CANONICAL_CORE_PACKAGE = "project-tiny-context-harness";
2
2
  export const CURRENT_SCHEMA_VERSION = "4";
3
- export const CANONICAL_NPX_COMMAND = `npx --yes --package ${CANONICAL_CORE_PACKAGE}@latest sdlc-harness`;
3
+ export const CANONICAL_NPX_COMMAND = `npx --yes --package ${CANONICAL_CORE_PACKAGE}@latest ty-context`;
@@ -8,7 +8,7 @@ import { harnessRoot } from "./harness-root.js";
8
8
  import { SAFE_EXAMPLE_FILE_NAMES, shouldExcludeRelativePath, shouldIncludeCodeFile, toPosix } from "./source-files.js";
9
9
  const execFileAsync = promisify(execFile);
10
10
  const EXPORT_HEADER = "Export artifact. Do not reference from project_context/context.toml.";
11
- const DEFAULT_EXPORT_DIR = "tmp/sdlc/context-exports";
11
+ const DEFAULT_EXPORT_DIR = "tmp/ty-context/context-exports";
12
12
  const CODE_EXPORT_FILE_NAME = "code-level-implementation.md";
13
13
  const MAX_TREE_ENTRIES = 300;
14
14
  const MAX_TREE_DEPTH = 4;
@@ -187,17 +187,17 @@ function resolveOutputPath(projectRoot, requestedOutput, now, mode) {
187
187
  const absoluteOutput = path.resolve(projectRoot, rawOutput);
188
188
  const relative = repoRelative(projectRoot, absoluteOutput);
189
189
  if (relative.startsWith("..") || path.isAbsolute(relative)) {
190
- throw new Error("export-context --output must stay inside the workspace; use tmp/sdlc/context-exports/<name>.md");
190
+ throw new Error("export-context --output must stay inside the workspace; use tmp/ty-context/context-exports/<name>.md");
191
191
  }
192
192
  const normalized = toPosix(relative);
193
193
  if (normalized === "project_context" || normalized.startsWith("project_context/")) {
194
- throw new Error("export-context output is a temporary artifact; use tmp/sdlc/context-exports/** instead of project_context/**");
194
+ throw new Error("export-context output is a temporary artifact; use tmp/ty-context/context-exports/** instead of project_context/**");
195
195
  }
196
196
  if (!normalized.startsWith(`${DEFAULT_EXPORT_DIR}/`)) {
197
- throw new Error("export-context only writes temporary artifacts under tmp/sdlc/context-exports/**");
197
+ throw new Error("export-context only writes temporary artifacts under tmp/ty-context/context-exports/**");
198
198
  }
199
199
  if (!normalized.endsWith(".md")) {
200
- throw new Error("export-context --output must be a Markdown file under tmp/sdlc/context-exports/**");
200
+ throw new Error("export-context --output must be a Markdown file under tmp/ty-context/context-exports/**");
201
201
  }
202
202
  return absoluteOutput;
203
203
  }