project-tiny-context-harness 0.2.57 → 0.2.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +496 -496
- package/assets/README.md +550 -550
- package/assets/README.zh-CN.md +133 -133
- package/assets/agents/.gitkeep +1 -1
- package/assets/agents/AGENTS_CORE.md +59 -59
- package/assets/context_templates/architecture.md +31 -31
- package/assets/context_templates/area.md +38 -38
- package/assets/context_templates/context.toml +27 -27
- package/assets/context_templates/deployment.md +35 -35
- package/assets/context_templates/global.md +53 -53
- package/assets/context_templates/product-surface-contract.md +60 -60
- package/assets/context_templates/verification.md +32 -32
- package/assets/github/.gitkeep +1 -1
- package/assets/github/harness.yml +41 -41
- package/assets/make/.gitkeep +1 -1
- package/assets/make/ty-context.mk +48 -48
- package/assets/skills/context_development_engineer/SKILL.md +108 -108
- package/assets/skills/context_full_project_export/SKILL.md +55 -55
- package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
- package/assets/skills/context_product_plan/SKILL.md +89 -89
- package/assets/skills/context_surface_contract/SKILL.md +168 -168
- package/assets/skills/context_uiux_design/SKILL.md +113 -113
- package/assets/skills/plan_acceptance_checklist_compiler/SKILL.md +435 -393
- package/assets/tools/validate_context.py +276 -276
- package/dist/commands/check-modularity.js +8 -8
- package/dist/commands/export-context.js +9 -9
- package/dist/commands/index.js +16 -16
- package/dist/commands/package-source.js +2 -2
- package/dist/commands/upgrade.js +9 -9
- package/migrations/README.md +3 -3
- package/package.json +68 -68
- package/source-mappings.yaml +25 -25
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# Deployment Context: main
|
|
2
|
-
|
|
3
|
-
This optional role Context records critical repeat-execution paths for deploy, runtime bootstrap, cloud initialization and operational recovery. Keep it minimal and durable.
|
|
4
|
-
|
|
5
|
-
## Owner
|
|
6
|
-
|
|
7
|
-
- Owning area: `main`.
|
|
8
|
-
|
|
9
|
-
## Runtime Topology
|
|
10
|
-
|
|
11
|
-
- List durable service distribution only when it matters for rerunning deploy or bootstrap, such as Web/API/worker/Redis/DB/Docker/cloud instance boundaries.
|
|
12
|
-
|
|
13
|
-
## Deployment Paths
|
|
14
|
-
|
|
15
|
-
- List the shortest deploy, CI/CD, bootstrap, migration, health-check or rollback/degradation command/path.
|
|
16
|
-
|
|
17
|
-
## Required Preparation
|
|
18
|
-
|
|
19
|
-
- List only durable setup such as cloud resources, env files, compose profiles, secret mounting names or database initialization steps. Do not store secret values.
|
|
20
|
-
|
|
21
|
-
## Expected Signals
|
|
22
|
-
|
|
23
|
-
- Name health checks, status transitions, URLs, queues, containers or logs-at-a-glance that show the path reached the intended stage.
|
|
24
|
-
|
|
25
|
-
## Acceptable Warnings
|
|
26
|
-
|
|
27
|
-
- List known benign warnings or slow-start states.
|
|
28
|
-
|
|
29
|
-
## Excluded Dead Ends
|
|
30
|
-
|
|
31
|
-
- List previously ruled-out deploy/bootstrap paths only when remembering them prevents repeated wasted work.
|
|
32
|
-
|
|
33
|
-
## Forbidden Content
|
|
34
|
-
|
|
35
|
-
- Do not record one-off logs, full command output, CI artifacts, release ledgers, secrets, tokens, cookies, device ids, raw payloads or claims that deployment already succeeded.
|
|
1
|
+
# Deployment Context: main
|
|
2
|
+
|
|
3
|
+
This optional role Context records critical repeat-execution paths for deploy, runtime bootstrap, cloud initialization and operational recovery. Keep it minimal and durable.
|
|
4
|
+
|
|
5
|
+
## Owner
|
|
6
|
+
|
|
7
|
+
- Owning area: `main`.
|
|
8
|
+
|
|
9
|
+
## Runtime Topology
|
|
10
|
+
|
|
11
|
+
- List durable service distribution only when it matters for rerunning deploy or bootstrap, such as Web/API/worker/Redis/DB/Docker/cloud instance boundaries.
|
|
12
|
+
|
|
13
|
+
## Deployment Paths
|
|
14
|
+
|
|
15
|
+
- List the shortest deploy, CI/CD, bootstrap, migration, health-check or rollback/degradation command/path.
|
|
16
|
+
|
|
17
|
+
## Required Preparation
|
|
18
|
+
|
|
19
|
+
- List only durable setup such as cloud resources, env files, compose profiles, secret mounting names or database initialization steps. Do not store secret values.
|
|
20
|
+
|
|
21
|
+
## Expected Signals
|
|
22
|
+
|
|
23
|
+
- Name health checks, status transitions, URLs, queues, containers or logs-at-a-glance that show the path reached the intended stage.
|
|
24
|
+
|
|
25
|
+
## Acceptable Warnings
|
|
26
|
+
|
|
27
|
+
- List known benign warnings or slow-start states.
|
|
28
|
+
|
|
29
|
+
## Excluded Dead Ends
|
|
30
|
+
|
|
31
|
+
- List previously ruled-out deploy/bootstrap paths only when remembering them prevents repeated wasted work.
|
|
32
|
+
|
|
33
|
+
## Forbidden Content
|
|
34
|
+
|
|
35
|
+
- Do not record one-off logs, full command output, CI artifacts, release ledgers, secrets, tokens, cookies, device ids, raw payloads or claims that deployment already succeeded.
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
# Project / Delivery Context
|
|
2
|
-
|
|
3
|
-
## Project Goal
|
|
4
|
-
|
|
5
|
-
- Describe the user-visible goal this project is trying to achieve.
|
|
6
|
-
|
|
7
|
-
## Non-goals / Boundaries
|
|
8
|
-
|
|
9
|
-
- List what this project intentionally does not do.
|
|
10
|
-
|
|
11
|
-
## Background
|
|
12
|
-
|
|
13
|
-
- Capture the minimum background a fresh agent needs before changing code.
|
|
14
|
-
|
|
15
|
-
## Design Rationale
|
|
16
|
-
|
|
17
|
-
- Record durable choices that are hard to infer from code or tests. Classify changes before implementation; if a change alters product ownership/plans, module responsibilities, information architecture, API/Schema, state/scheduler semantics, cross-area boundaries, verification role paths or deployment role paths, update Context before code with enough durable context to guide implementation.
|
|
18
|
-
|
|
19
|
-
## Architecture Context
|
|
20
|
-
|
|
21
|
-
- Link to `project_context/architecture.md`; keep architecture notes minimal and focused on boundaries, components and constraints that are not obvious from code.
|
|
22
|
-
|
|
23
|
-
## Context Graph
|
|
24
|
-
|
|
25
|
-
- Link to `project_context/context.toml` and keep its default area, role, trigger, read policy and boundary metadata aligned with this Context.
|
|
26
|
-
- When adding or reorganizing files under `project_context/areas/**`, run a soft role placement scan before registering every Markdown file as an area: product ownership stays in `area` / `domain` / `subdomain`; contracts, foundations, verification, deployment, implementation indexes, decision rationale and archives should use role Context when that better fits the reading purpose.
|
|
27
|
-
|
|
28
|
-
## Product / Delivery Brief
|
|
29
|
-
|
|
30
|
-
- Capture durable product goals, users, core flows, acceptance signals and non-goals.
|
|
31
|
-
|
|
32
|
-
## UX / Screen Brief
|
|
33
|
-
|
|
34
|
-
- Capture durable screen, flow, interaction, responsive and accessibility facts. Use `DESIGN.md` for visual identity and design tokens when needed.
|
|
35
|
-
- For web/front-end surfaces, record durable page responsibilities, core user judgments, persistent information boundaries and cross-page or cross-layer ownership when they guide future changes.
|
|
36
|
-
|
|
37
|
-
## Verification Entry Points
|
|
38
|
-
|
|
39
|
-
- Point to the default verification context for repeatable test, smoke, CI or validation paths.
|
|
40
|
-
- Project-level cross-domain verification may live here only as a short index; execution details belong in `verification` role Context.
|
|
41
|
-
|
|
42
|
-
## Current State
|
|
43
|
-
|
|
44
|
-
- Summarize what is implemented, blocked or risky right now.
|
|
45
|
-
|
|
46
|
-
## Next Safe Action
|
|
47
|
-
|
|
48
|
-
- State the safest next step for a fresh agent, including whether the next change should update Context before code.
|
|
49
|
-
|
|
50
|
-
## Context Index
|
|
51
|
-
|
|
52
|
-
- [main](areas/main.md)
|
|
53
|
-
- [main verification](areas/main/verification.md)
|
|
1
|
+
# Project / Delivery Context
|
|
2
|
+
|
|
3
|
+
## Project Goal
|
|
4
|
+
|
|
5
|
+
- Describe the user-visible goal this project is trying to achieve.
|
|
6
|
+
|
|
7
|
+
## Non-goals / Boundaries
|
|
8
|
+
|
|
9
|
+
- List what this project intentionally does not do.
|
|
10
|
+
|
|
11
|
+
## Background
|
|
12
|
+
|
|
13
|
+
- Capture the minimum background a fresh agent needs before changing code.
|
|
14
|
+
|
|
15
|
+
## Design Rationale
|
|
16
|
+
|
|
17
|
+
- Record durable choices that are hard to infer from code or tests. Classify changes before implementation; if a change alters product ownership/plans, module responsibilities, information architecture, API/Schema, state/scheduler semantics, cross-area boundaries, verification role paths or deployment role paths, update Context before code with enough durable context to guide implementation.
|
|
18
|
+
|
|
19
|
+
## Architecture Context
|
|
20
|
+
|
|
21
|
+
- Link to `project_context/architecture.md`; keep architecture notes minimal and focused on boundaries, components and constraints that are not obvious from code.
|
|
22
|
+
|
|
23
|
+
## Context Graph
|
|
24
|
+
|
|
25
|
+
- Link to `project_context/context.toml` and keep its default area, role, trigger, read policy and boundary metadata aligned with this Context.
|
|
26
|
+
- When adding or reorganizing files under `project_context/areas/**`, run a soft role placement scan before registering every Markdown file as an area: product ownership stays in `area` / `domain` / `subdomain`; contracts, foundations, verification, deployment, implementation indexes, decision rationale and archives should use role Context when that better fits the reading purpose.
|
|
27
|
+
|
|
28
|
+
## Product / Delivery Brief
|
|
29
|
+
|
|
30
|
+
- Capture durable product goals, users, core flows, acceptance signals and non-goals.
|
|
31
|
+
|
|
32
|
+
## UX / Screen Brief
|
|
33
|
+
|
|
34
|
+
- Capture durable screen, flow, interaction, responsive and accessibility facts. Use `DESIGN.md` for visual identity and design tokens when needed.
|
|
35
|
+
- For web/front-end surfaces, record durable page responsibilities, core user judgments, persistent information boundaries and cross-page or cross-layer ownership when they guide future changes.
|
|
36
|
+
|
|
37
|
+
## Verification Entry Points
|
|
38
|
+
|
|
39
|
+
- Point to the default verification context for repeatable test, smoke, CI or validation paths.
|
|
40
|
+
- Project-level cross-domain verification may live here only as a short index; execution details belong in `verification` role Context.
|
|
41
|
+
|
|
42
|
+
## Current State
|
|
43
|
+
|
|
44
|
+
- Summarize what is implemented, blocked or risky right now.
|
|
45
|
+
|
|
46
|
+
## Next Safe Action
|
|
47
|
+
|
|
48
|
+
- State the safest next step for a fresh agent, including whether the next change should update Context before code.
|
|
49
|
+
|
|
50
|
+
## Context Index
|
|
51
|
+
|
|
52
|
+
- [main](areas/main.md)
|
|
53
|
+
- [main verification](areas/main/verification.md)
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
# Product Surface Contract
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
This Context records durable responsibilities for user-facing Product Surfaces in this project or product domain.
|
|
6
|
-
|
|
7
|
-
Write only project-specific facts that should guide future implementation. Do not copy generic platform rules, one-off audit notes, screenshots, test logs, implementation summaries, visual tokens or secrets into this file.
|
|
8
|
-
|
|
9
|
-
## Surfaces
|
|
10
|
-
|
|
11
|
-
### `<surface name>`
|
|
12
|
-
|
|
13
|
-
- Surface:
|
|
14
|
-
- Surface Platform:
|
|
15
|
-
- Owning Product Domain:
|
|
16
|
-
- Primary User Question:
|
|
17
|
-
- Surface Type:
|
|
18
|
-
- Main Surface Allows:
|
|
19
|
-
- Main Surface Forbids:
|
|
20
|
-
- Drilldown Ownership:
|
|
21
|
-
- Long Task State Requirement:
|
|
22
|
-
- Empty / Loading / Stale / Unavailable:
|
|
23
|
-
- Security / Redaction:
|
|
24
|
-
- Verification:
|
|
25
|
-
|
|
26
|
-
## Cross-Surface Rules
|
|
27
|
-
|
|
28
|
-
- `<durable project-specific rule>`
|
|
29
|
-
|
|
30
|
-
## Registration Example
|
|
31
|
-
|
|
32
|
-
Use the existing `contract` role for cross-surface or cross-area contracts:
|
|
33
|
-
|
|
34
|
-
```toml
|
|
35
|
-
[[context]]
|
|
36
|
-
path = "project_context/areas/product-surface-contracts.md"
|
|
37
|
-
role = "contract"
|
|
38
|
-
triggers = ["surface", "screen", "ui", "ux", "web", "app", "mobile", "desktop", "game", "cli", "tui", "页面", "界面", "屏幕", "产品接触面", "信息架构", "页面职责", "界面职责", "product surface"]
|
|
39
|
-
read_policy = "on-demand"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
If using front matter in a Context Markdown file, use `context_role: contract`; do not use `role = "contract"` in Markdown front matter.
|
|
43
|
-
|
|
44
|
-
## Maintenance Rules
|
|
45
|
-
|
|
46
|
-
Update this Context when:
|
|
47
|
-
|
|
48
|
-
- A surface responsibility changes.
|
|
49
|
-
- Main/drilldown ownership changes.
|
|
50
|
-
- A durable long-task state contract is introduced.
|
|
51
|
-
- A repeated UI/product rule becomes reusable.
|
|
52
|
-
- A platform-specific interaction rule becomes stable.
|
|
53
|
-
|
|
54
|
-
Do not update this Context for:
|
|
55
|
-
|
|
56
|
-
- CSS-only fixes.
|
|
57
|
-
- One-off screenshot observations.
|
|
58
|
-
- Temporary audit notes.
|
|
59
|
-
- Test logs.
|
|
60
|
-
- Local implementation summaries.
|
|
1
|
+
# Product Surface Contract
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This Context records durable responsibilities for user-facing Product Surfaces in this project or product domain.
|
|
6
|
+
|
|
7
|
+
Write only project-specific facts that should guide future implementation. Do not copy generic platform rules, one-off audit notes, screenshots, test logs, implementation summaries, visual tokens or secrets into this file.
|
|
8
|
+
|
|
9
|
+
## Surfaces
|
|
10
|
+
|
|
11
|
+
### `<surface name>`
|
|
12
|
+
|
|
13
|
+
- Surface:
|
|
14
|
+
- Surface Platform:
|
|
15
|
+
- Owning Product Domain:
|
|
16
|
+
- Primary User Question:
|
|
17
|
+
- Surface Type:
|
|
18
|
+
- Main Surface Allows:
|
|
19
|
+
- Main Surface Forbids:
|
|
20
|
+
- Drilldown Ownership:
|
|
21
|
+
- Long Task State Requirement:
|
|
22
|
+
- Empty / Loading / Stale / Unavailable:
|
|
23
|
+
- Security / Redaction:
|
|
24
|
+
- Verification:
|
|
25
|
+
|
|
26
|
+
## Cross-Surface Rules
|
|
27
|
+
|
|
28
|
+
- `<durable project-specific rule>`
|
|
29
|
+
|
|
30
|
+
## Registration Example
|
|
31
|
+
|
|
32
|
+
Use the existing `contract` role for cross-surface or cross-area contracts:
|
|
33
|
+
|
|
34
|
+
```toml
|
|
35
|
+
[[context]]
|
|
36
|
+
path = "project_context/areas/product-surface-contracts.md"
|
|
37
|
+
role = "contract"
|
|
38
|
+
triggers = ["surface", "screen", "ui", "ux", "web", "app", "mobile", "desktop", "game", "cli", "tui", "页面", "界面", "屏幕", "产品接触面", "信息架构", "页面职责", "界面职责", "product surface"]
|
|
39
|
+
read_policy = "on-demand"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If using front matter in a Context Markdown file, use `context_role: contract`; do not use `role = "contract"` in Markdown front matter.
|
|
43
|
+
|
|
44
|
+
## Maintenance Rules
|
|
45
|
+
|
|
46
|
+
Update this Context when:
|
|
47
|
+
|
|
48
|
+
- A surface responsibility changes.
|
|
49
|
+
- Main/drilldown ownership changes.
|
|
50
|
+
- A durable long-task state contract is introduced.
|
|
51
|
+
- A repeated UI/product rule becomes reusable.
|
|
52
|
+
- A platform-specific interaction rule becomes stable.
|
|
53
|
+
|
|
54
|
+
Do not update this Context for:
|
|
55
|
+
|
|
56
|
+
- CSS-only fixes.
|
|
57
|
+
- One-off screenshot observations.
|
|
58
|
+
- Temporary audit notes.
|
|
59
|
+
- Test logs.
|
|
60
|
+
- Local implementation summaries.
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
# Verification Context: main
|
|
2
|
-
|
|
3
|
-
This role Context records critical repeat-execution paths for the owning area. Keep it minimal: enough for a future agent to rerun verification without rediscovering setup, not a test report.
|
|
4
|
-
|
|
5
|
-
## Owner
|
|
6
|
-
|
|
7
|
-
- Owning area: `main`.
|
|
8
|
-
|
|
9
|
-
## Verification Paths
|
|
10
|
-
|
|
11
|
-
- `npm test` or the shortest project-specific test, smoke, CI, probe or validation command.
|
|
12
|
-
- Verification paths are reusable execution instances, not independent definitions of the verification target. For capability, metric or acceptance claims, first use the owning module's design Context to decide what claim should be proven, then choose the command or probe.
|
|
13
|
-
|
|
14
|
-
## Required Preparation
|
|
15
|
-
|
|
16
|
-
- List only durable setup such as services, env files, fixtures, local runtimes or external dependencies needed before rerun.
|
|
17
|
-
|
|
18
|
-
## Expected Signals
|
|
19
|
-
|
|
20
|
-
- Name the stage, health check, status, artifact shape or observable signal that means the path reached the intended point.
|
|
21
|
-
|
|
22
|
-
## Acceptable Warnings
|
|
23
|
-
|
|
24
|
-
- List warnings that are expected and should not trigger repeated investigation.
|
|
25
|
-
|
|
26
|
-
## Excluded Dead Ends
|
|
27
|
-
|
|
28
|
-
- List previously ruled-out commands, providers, endpoints or setup paths only when remembering them prevents repeated wasted work.
|
|
29
|
-
|
|
30
|
-
## Forbidden Content
|
|
31
|
-
|
|
32
|
-
- Do not record one-off logs, full command output, temporary JSON, CI artifacts, test reports, secrets, tokens, cookies, device ids, raw payloads or pass/fail claims.
|
|
1
|
+
# Verification Context: main
|
|
2
|
+
|
|
3
|
+
This role Context records critical repeat-execution paths for the owning area. Keep it minimal: enough for a future agent to rerun verification without rediscovering setup, not a test report.
|
|
4
|
+
|
|
5
|
+
## Owner
|
|
6
|
+
|
|
7
|
+
- Owning area: `main`.
|
|
8
|
+
|
|
9
|
+
## Verification Paths
|
|
10
|
+
|
|
11
|
+
- `npm test` or the shortest project-specific test, smoke, CI, probe or validation command.
|
|
12
|
+
- Verification paths are reusable execution instances, not independent definitions of the verification target. For capability, metric or acceptance claims, first use the owning module's design Context to decide what claim should be proven, then choose the command or probe.
|
|
13
|
+
|
|
14
|
+
## Required Preparation
|
|
15
|
+
|
|
16
|
+
- List only durable setup such as services, env files, fixtures, local runtimes or external dependencies needed before rerun.
|
|
17
|
+
|
|
18
|
+
## Expected Signals
|
|
19
|
+
|
|
20
|
+
- Name the stage, health check, status, artifact shape or observable signal that means the path reached the intended point.
|
|
21
|
+
|
|
22
|
+
## Acceptable Warnings
|
|
23
|
+
|
|
24
|
+
- List warnings that are expected and should not trigger repeated investigation.
|
|
25
|
+
|
|
26
|
+
## Excluded Dead Ends
|
|
27
|
+
|
|
28
|
+
- List previously ruled-out commands, providers, endpoints or setup paths only when remembering them prevents repeated wasted work.
|
|
29
|
+
|
|
30
|
+
## Forbidden Content
|
|
31
|
+
|
|
32
|
+
- Do not record one-off logs, full command output, temporary JSON, CI artifacts, test reports, secrets, tokens, cookies, device ids, raw payloads or pass/fail claims.
|
package/assets/github/.gitkeep
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
# ty-context:github-workflow:begin
|
|
2
|
-
name: Harness Gates
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
pull_request:
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
workflow_dispatch:
|
|
10
|
-
inputs:
|
|
11
|
-
gate:
|
|
12
|
-
description: "Make target to run"
|
|
13
|
-
required: true
|
|
14
|
-
default: "validate-context"
|
|
15
|
-
type: choice
|
|
16
|
-
options:
|
|
17
|
-
- validate-context
|
|
18
|
-
- validate-code-modularity
|
|
19
|
-
- validate-harness
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
harness:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v6
|
|
26
|
-
with:
|
|
27
|
-
fetch-depth: 0
|
|
28
|
-
- uses: actions/setup-node@v6
|
|
29
|
-
with:
|
|
30
|
-
node-version: "24"
|
|
31
|
-
- name: Prepare source workspace CLI
|
|
32
|
-
if: ${{ hashFiles('packages/ty-context/package.json') != '' }}
|
|
33
|
-
run: |
|
|
34
|
-
npm ci
|
|
35
|
-
npm run build --workspace project-tiny-context-harness
|
|
36
|
-
- name: Run harness gate
|
|
37
|
-
run: make "${HARNESS_GATE}"
|
|
38
|
-
env:
|
|
39
|
-
HARNESS_GATE: ${{ github.event.inputs.gate || 'validate-harness' }}
|
|
40
|
-
TY_CONTEXT_MODULARITY_BASE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before || '' }}
|
|
41
|
-
# ty-context:github-workflow:end
|
|
1
|
+
# ty-context:github-workflow:begin
|
|
2
|
+
name: Harness Gates
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
gate:
|
|
12
|
+
description: "Make target to run"
|
|
13
|
+
required: true
|
|
14
|
+
default: "validate-context"
|
|
15
|
+
type: choice
|
|
16
|
+
options:
|
|
17
|
+
- validate-context
|
|
18
|
+
- validate-code-modularity
|
|
19
|
+
- validate-harness
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
harness:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v6
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0
|
|
28
|
+
- uses: actions/setup-node@v6
|
|
29
|
+
with:
|
|
30
|
+
node-version: "24"
|
|
31
|
+
- name: Prepare source workspace CLI
|
|
32
|
+
if: ${{ hashFiles('packages/ty-context/package.json') != '' }}
|
|
33
|
+
run: |
|
|
34
|
+
npm ci
|
|
35
|
+
npm run build --workspace project-tiny-context-harness
|
|
36
|
+
- name: Run harness gate
|
|
37
|
+
run: make "${HARNESS_GATE}"
|
|
38
|
+
env:
|
|
39
|
+
HARNESS_GATE: ${{ github.event.inputs.gate || 'validate-harness' }}
|
|
40
|
+
TY_CONTEXT_MODULARITY_BASE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before || '' }}
|
|
41
|
+
# ty-context:github-workflow:end
|
package/assets/make/.gitkeep
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
PYTHON ?= python3
|
|
2
|
-
TY_CONTEXT ?= $(if $(wildcard packages/ty-context/dist/cli.js),node packages/ty-context/dist/cli.js,npx --yes --package project-tiny-context-harness@latest ty-context)
|
|
3
|
-
TY_CONTEXT_MODULARITY_SCOPE = $(if $(TY_CONTEXT_MODULARITY_BASE),--base $(TY_CONTEXT_MODULARITY_BASE),--touched)
|
|
4
|
-
|
|
5
|
-
.PHONY: help ty-context-doctor ty-context-sync ty-context-upgrade ty-context-check-modularity validate-context validate-code-modularity validate-harness lint test-current-domain test-all build
|
|
6
|
-
|
|
7
|
-
help:
|
|
8
|
-
@echo "Minimal Context Harness commands"
|
|
9
|
-
@echo " make ty-context-doctor Diagnose Harness root, core package and schema version"
|
|
10
|
-
@echo " make ty-context-sync Refresh managed assets; does not run migrations"
|
|
11
|
-
@echo " make ty-context-upgrade Run safe upgrade migrations, sync managed assets and doctor"
|
|
12
|
-
@echo " make ty-context-check-modularity Warn on oversized touched handwritten source files"
|
|
13
|
-
@echo " make validate-context Check whether project_context/** supports context recovery"
|
|
14
|
-
@echo " make validate-code-modularity Fail on oversized touched handwritten source files"
|
|
15
|
-
@echo " make validate-harness Run validate-context and validate-code-modularity"
|
|
16
|
-
@echo " make test-all Run the project regression suite after replacing this placeholder"
|
|
17
|
-
|
|
18
|
-
ty-context-doctor:
|
|
19
|
-
$(TY_CONTEXT) doctor
|
|
20
|
-
|
|
21
|
-
ty-context-sync:
|
|
22
|
-
$(TY_CONTEXT) sync
|
|
23
|
-
|
|
24
|
-
ty-context-upgrade:
|
|
25
|
-
$(TY_CONTEXT) upgrade
|
|
26
|
-
|
|
27
|
-
ty-context-check-modularity:
|
|
28
|
-
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE)
|
|
29
|
-
|
|
30
|
-
validate-context:
|
|
31
|
-
$(TY_CONTEXT) validate-context
|
|
32
|
-
|
|
33
|
-
validate-code-modularity:
|
|
34
|
-
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE) --fail-on-warning
|
|
35
|
-
|
|
36
|
-
validate-harness: validate-context validate-code-modularity
|
|
37
|
-
|
|
38
|
-
lint:
|
|
39
|
-
@echo "No project lint command configured yet. Replace this target with your stack-specific lint command."
|
|
40
|
-
|
|
41
|
-
test-current-domain:
|
|
42
|
-
@echo "No domain test command configured yet. Replace this target with focused tests for the current change."
|
|
43
|
-
|
|
44
|
-
test-all:
|
|
45
|
-
@echo "No full test command configured yet. Replace this target with the project regression suite."
|
|
46
|
-
|
|
47
|
-
build:
|
|
48
|
-
@echo "No build command configured yet. Replace this target with the project build/package command."
|
|
1
|
+
PYTHON ?= python3
|
|
2
|
+
TY_CONTEXT ?= $(if $(wildcard packages/ty-context/dist/cli.js),node packages/ty-context/dist/cli.js,npx --yes --package project-tiny-context-harness@latest ty-context)
|
|
3
|
+
TY_CONTEXT_MODULARITY_SCOPE = $(if $(TY_CONTEXT_MODULARITY_BASE),--base $(TY_CONTEXT_MODULARITY_BASE),--touched)
|
|
4
|
+
|
|
5
|
+
.PHONY: help ty-context-doctor ty-context-sync ty-context-upgrade ty-context-check-modularity validate-context validate-code-modularity validate-harness lint test-current-domain test-all build
|
|
6
|
+
|
|
7
|
+
help:
|
|
8
|
+
@echo "Minimal Context Harness commands"
|
|
9
|
+
@echo " make ty-context-doctor Diagnose Harness root, core package and schema version"
|
|
10
|
+
@echo " make ty-context-sync Refresh managed assets; does not run migrations"
|
|
11
|
+
@echo " make ty-context-upgrade Run safe upgrade migrations, sync managed assets and doctor"
|
|
12
|
+
@echo " make ty-context-check-modularity Warn on oversized touched handwritten source files"
|
|
13
|
+
@echo " make validate-context Check whether project_context/** supports context recovery"
|
|
14
|
+
@echo " make validate-code-modularity Fail on oversized touched handwritten source files"
|
|
15
|
+
@echo " make validate-harness Run validate-context and validate-code-modularity"
|
|
16
|
+
@echo " make test-all Run the project regression suite after replacing this placeholder"
|
|
17
|
+
|
|
18
|
+
ty-context-doctor:
|
|
19
|
+
$(TY_CONTEXT) doctor
|
|
20
|
+
|
|
21
|
+
ty-context-sync:
|
|
22
|
+
$(TY_CONTEXT) sync
|
|
23
|
+
|
|
24
|
+
ty-context-upgrade:
|
|
25
|
+
$(TY_CONTEXT) upgrade
|
|
26
|
+
|
|
27
|
+
ty-context-check-modularity:
|
|
28
|
+
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE)
|
|
29
|
+
|
|
30
|
+
validate-context:
|
|
31
|
+
$(TY_CONTEXT) validate-context
|
|
32
|
+
|
|
33
|
+
validate-code-modularity:
|
|
34
|
+
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE) --fail-on-warning
|
|
35
|
+
|
|
36
|
+
validate-harness: validate-context validate-code-modularity
|
|
37
|
+
|
|
38
|
+
lint:
|
|
39
|
+
@echo "No project lint command configured yet. Replace this target with your stack-specific lint command."
|
|
40
|
+
|
|
41
|
+
test-current-domain:
|
|
42
|
+
@echo "No domain test command configured yet. Replace this target with focused tests for the current change."
|
|
43
|
+
|
|
44
|
+
test-all:
|
|
45
|
+
@echo "No full test command configured yet. Replace this target with the project regression suite."
|
|
46
|
+
|
|
47
|
+
build:
|
|
48
|
+
@echo "No build command configured yet. Replace this target with the project build/package command."
|