@punks/cli 3.1.11 → 3.1.12
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/dist/BASELINE_CHANGELOG.md +28 -0
- package/dist/CHANGELOG.md +27 -0
- package/dist/index.js +6 -6
- package/dist/skills/agnostic/docs/writing-beats/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-beats/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/docs/writing-fragments/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-fragments/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/docs/writing-shape/LICENSE +21 -0
- package/dist/skills/agnostic/docs/writing-shape/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/frontend/frontend-domain-structure/SKILL.md +24 -42
- package/dist/skills/agnostic/frontend/frontend-domain-structure/agents/openai.yaml +1 -1
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/react/structure.md +51 -78
- package/dist/skills/agnostic/frontend/frontend-domain-structure/references/structure.md +89 -212
- package/dist/skills/agnostic/generic/handoff/LICENSE +21 -0
- package/dist/skills/agnostic/generic/handoff/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/quality/codebase-design/LICENSE +21 -0
- package/dist/skills/agnostic/quality/codebase-design/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/quality/review/LICENSE +21 -0
- package/dist/skills/agnostic/quality/review/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/quality/tdd/LICENSE +21 -0
- package/dist/skills/agnostic/quality/tdd/UPSTREAM.md +11 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/LICENSE +21 -0
- package/dist/skills/agnostic/research/improve-codebase-architecture/UPSTREAM.md +11 -0
- package/dist/skills/frameworks/effect/effect/SKILL.md +5 -12
- package/dist/skills/frameworks/effect/effect/references/CONFIG.md +10 -19
- package/dist/skills/frameworks/effect/effect/references/SERVICES_LAYERS.md +3 -63
- package/dist/skills/frameworks/effect/effect/references/TESTING.md +2 -72
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +12 -29
- package/dist/skills/frameworks/effect/effect-backend-structure/agents/openai.yaml +1 -1
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +9 -9
- package/dist/skills/frameworks/sqlalchemy/sqlalchemy-schema-design/SKILL.md +199 -0
- package/dist/skills/frameworks/sqlalchemy/sqlalchemy-schema-design/UPSTREAM.md +31 -0
- package/dist/skills/frameworks/sqlalchemy/sqlalchemy-schema-design/agents/openai.yaml +4 -0
- package/dist/skills/phases/prototype-phase/agents/openai.yaml +2 -0
- package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +622 -0
- package/dist/skills/phases/review-phase/SKILL.md +9 -36
- package/dist/skills/phases/review-phase/phases/prepare-review.md +105 -0
- package/dist/skills/phases/review-phase/phases/retain-report.md +113 -0
- package/dist/skills/phases/review-phase/phases/return-route.md +95 -0
- package/dist/skills/phases/review-phase/phases/router.md +78 -0
- package/dist/skills/phases/review-phase/phases/run-review.md +128 -0
- package/dist/skills/phases/review-phase/references/durable-report.md +11 -30
- package/dist/skills/phases/review-phase/references/runtime-handoff.md +138 -0
- package/package.json +63 -9
- package/dist/skills/phases/review-phase/REFERENCE.md +0 -85
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Review Runtime Handoff
|
|
2
|
+
|
|
3
|
+
This is the single runtime resume contract for review gates and router-owned
|
|
4
|
+
stateful outcomes. Retained reports remain finding and pass authority. Delivery
|
|
5
|
+
handoffs remain delivery-route and repair authority.
|
|
6
|
+
|
|
7
|
+
## Storage
|
|
8
|
+
|
|
9
|
+
Delivery mode reuses the caller-provided delivery handoff:
|
|
10
|
+
|
|
11
|
+
1. The explicit invocation context supplies `delivery_handoff_path`.
|
|
12
|
+
2. Resolve that path from the repository root. It must already be the durable
|
|
13
|
+
delivery handoff for the same `delivery_goal_identity`; otherwise return
|
|
14
|
+
`review_context_blocked` without writing.
|
|
15
|
+
3. Append review records under its `Review Phase Runtime Handoffs` section.
|
|
16
|
+
Review never creates a second delivery handoff.
|
|
17
|
+
|
|
18
|
+
Standalone mode stores records at this deterministic repository-local path:
|
|
19
|
+
|
|
20
|
+
`<repo-root>/.devpunks/review-phase/handoffs/<review_lineage_id>/<review_run_id>.md`
|
|
21
|
+
|
|
22
|
+
Both path components are the canonical lowercase 64-character identities. A
|
|
23
|
+
standalone record cannot be written until both identities are derived. This
|
|
24
|
+
local workflow state is not a retained review report, pass record, or reviewed
|
|
25
|
+
target artifact. Keep it uncommitted, never push or retain it, and exclude it
|
|
26
|
+
from the report retention envelope and reviewed artifact bytes.
|
|
27
|
+
|
|
28
|
+
## Record Schema
|
|
29
|
+
|
|
30
|
+
Append one fenced `review-handoff-v1` record per stateful attempt. Use every
|
|
31
|
+
category and nested field exactly; write `null`, `[]`, or `none` rather than
|
|
32
|
+
omitting an inapplicable value.
|
|
33
|
+
|
|
34
|
+
```review-handoff-v1
|
|
35
|
+
Phase: prepare-review | run-review | retain-report | return-route | router
|
|
36
|
+
Status: complete | retryable | failed | blocked | checkpoint
|
|
37
|
+
Scope:
|
|
38
|
+
mode: delivery | standalone
|
|
39
|
+
review_lineage_id:
|
|
40
|
+
target_locator:
|
|
41
|
+
inclusive_scope_hash:
|
|
42
|
+
Artifacts:
|
|
43
|
+
accepted_bounds_identity:
|
|
44
|
+
accepted_bounds_hash:
|
|
45
|
+
normalized_target_locator:
|
|
46
|
+
frozen_target_evidence_locator:
|
|
47
|
+
frozen_source_evidence_locator:
|
|
48
|
+
snapshot_hash:
|
|
49
|
+
source_set_hash:
|
|
50
|
+
local_report_path:
|
|
51
|
+
local_report_sha256:
|
|
52
|
+
report_commit:
|
|
53
|
+
retained_ref:
|
|
54
|
+
stable_finding_ids: []
|
|
55
|
+
primary_route:
|
|
56
|
+
secondary_architecture_follow_up:
|
|
57
|
+
Validation:
|
|
58
|
+
outcome:
|
|
59
|
+
evidence_locator:
|
|
60
|
+
Review state:
|
|
61
|
+
Next suggested route:
|
|
62
|
+
Blockers:
|
|
63
|
+
Resume identity:
|
|
64
|
+
review_run_id:
|
|
65
|
+
review_ordinal:
|
|
66
|
+
recovered_review_count:
|
|
67
|
+
attempt:
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`Review state` is exactly one of `review_due`, `review_running`,
|
|
71
|
+
`report_retention_pending`, `retained_ref_approval_required`,
|
|
72
|
+
`review_context_blocked`, `review_routed`, `review_complete`, or
|
|
73
|
+
`review_failed`. `Next suggested route` is optional advice represented by
|
|
74
|
+
`none` when absent and is always lowest authority. `attempt` starts at 1 for a
|
|
75
|
+
run and increases by one for each new stateful record. Persist locators and
|
|
76
|
+
hashes, not reconstructible raw target, source, report, validation, or finding
|
|
77
|
+
bytes.
|
|
78
|
+
|
|
79
|
+
## Write And Reconciliation
|
|
80
|
+
|
|
81
|
+
Before writing, revalidate storage identity, mode, lineage, run identity, scope,
|
|
82
|
+
and the evidence supporting the declared exit. Append only after the gate owns
|
|
83
|
+
a complete record. A partial or malformed trailing fence is invalid and cannot
|
|
84
|
+
advance state.
|
|
85
|
+
|
|
86
|
+
Appending the same canonical record for the same attempt is an idempotent
|
|
87
|
+
no-op. Two different valid records for the same attempt are
|
|
88
|
+
`review_state_conflict`; preserve both authorities, write nothing, and return
|
|
89
|
+
their exact evidence. Markdown defines this protocol but cannot guarantee
|
|
90
|
+
exclusive writers or atomic persistence; use the repository's existing safe
|
|
91
|
+
writer when those guarantees matter.
|
|
92
|
+
|
|
93
|
+
## Cold-Resume Discovery
|
|
94
|
+
|
|
95
|
+
1. Resolve mode from current direct invocation evidence.
|
|
96
|
+
2. For delivery, open only the validated caller-provided
|
|
97
|
+
`delivery_handoff_path`. For standalone, derive the exact deterministic path
|
|
98
|
+
from current lineage and run identity.
|
|
99
|
+
3. Parse complete `review-handoff-v1` records. Reject records with another mode,
|
|
100
|
+
lineage, run, target scope, or malformed schema.
|
|
101
|
+
4. Select the highest valid `attempt` for the applicable run. A missing attempt,
|
|
102
|
+
a gap, or different records at one attempt is `review_state_conflict`.
|
|
103
|
+
5. Recompute current bounds, target, source, report, and retained-pass evidence.
|
|
104
|
+
Direct current evidence outranks fresh workflow artifacts, which outrank the
|
|
105
|
+
selected handoff; its suggested route remains last.
|
|
106
|
+
6. Project the route from the highest fresh valid evidence. A stale or
|
|
107
|
+
contradictory handoff never advances the router and remains exact diagnostic
|
|
108
|
+
evidence.
|
|
109
|
+
|
|
110
|
+
Delivery recovery may scan earlier records in the same caller handoff only to
|
|
111
|
+
match the active lineage and run. Standalone recovery reads no sibling lineage
|
|
112
|
+
or run file. Retained report discovery and delivery counter projection continue
|
|
113
|
+
to use the retained-pass contract, not handoff recency.
|
|
114
|
+
|
|
115
|
+
## Required Writes And No-Write Outcomes
|
|
116
|
+
|
|
117
|
+
Every gate exit and router-owned checkpoint writes a record when storage and run
|
|
118
|
+
identity are valid, including successful completion, retryable return, failure,
|
|
119
|
+
blocker, and retained-ref approval checkpoint.
|
|
120
|
+
|
|
121
|
+
The following already-authoritative outcomes write no new runtime record:
|
|
122
|
+
|
|
123
|
+
- `review_budget_exhausted`, which preserves the caller's valid delivery
|
|
124
|
+
handoff and retained-count authority unchanged;
|
|
125
|
+
- `review_not_due`, whose caller-provided delivery handoff already proves a
|
|
126
|
+
delivery-owned state;
|
|
127
|
+
- pre-run `review_failed` from an unsupported target, invalid bounds, or
|
|
128
|
+
non-retryable identity failure, before a valid run and storage identity exist;
|
|
129
|
+
- pre-storage `review_context_blocked`, when safe storage, lineage, or run
|
|
130
|
+
identity cannot be established; return exact direct evidence instead;
|
|
131
|
+
- `review_state_conflict`, because conflicting handoff authority cannot safely
|
|
132
|
+
authorize another append;
|
|
133
|
+
- rediscovery of an identical already-recorded terminal, blocker, checkpoint,
|
|
134
|
+
`review_routed`, or `review_complete` outcome.
|
|
135
|
+
|
|
136
|
+
These are idempotent no-write returns, not missing handoffs. Once storage and
|
|
137
|
+
run identity are valid, a new stateful failure or blocker uses the normal record
|
|
138
|
+
schema.
|
package/package.json
CHANGED
|
@@ -1,19 +1,73 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@punks/cli",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.12",
|
|
4
4
|
"description": "Harness Intelligence scaffolding CLI",
|
|
5
|
-
"bin": {
|
|
6
|
-
"hi": "dist/index.js",
|
|
7
|
-
"hint": "dist/index.js"
|
|
8
|
-
},
|
|
9
|
-
"type": "module",
|
|
10
5
|
"homepage": "https://github.com/wearedevpunks/harness-intelligence/tree/main/apps/cli#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/wearedevpunks/harness-intelligence/issues"
|
|
8
|
+
},
|
|
11
9
|
"repository": {
|
|
12
10
|
"type": "git",
|
|
13
11
|
"url": "git+https://github.com/wearedevpunks/harness-intelligence.git",
|
|
14
12
|
"directory": "apps/cli"
|
|
15
13
|
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
14
|
+
"bin": {
|
|
15
|
+
"hi": "dist/index.js",
|
|
16
|
+
"hint": "dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"AGENTS.md"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/build-dist.mjs",
|
|
26
|
+
"baseline:build": "bun ./scripts/build-baseline.mjs",
|
|
27
|
+
"baseline:publish": "node ./scripts/publish-baseline.mjs",
|
|
28
|
+
"baseline:rollback": "node ./scripts/rollback-baseline.mjs",
|
|
29
|
+
"check-types": "\"${HI_TEST_NODE_PATH:-node}\" --input-type=module -e \"await import(new URL('./bin/tsc', import.meta.resolve('@typescript/native/package.json')))\" -- tsc --noEmit",
|
|
30
|
+
"dev": "bun run ./src/index.ts scaffold",
|
|
31
|
+
"entrypoints": "bun ./scripts/print-entrypoints.mjs",
|
|
32
|
+
"fixtures:check:managed-assets": "vitest run --config vitest.config.ts src/features/context-planning/managed-assets-fixture.native.test.ts",
|
|
33
|
+
"fixtures:update:managed-assets": "bun run build && HI_UPDATE_MANAGED_ASSETS_FIXTURE=1 bun run fixtures:check:managed-assets",
|
|
34
|
+
"local": "bun run build && bun run ./dist/index.js",
|
|
35
|
+
"release:attest": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-cli-verification.mjs attest",
|
|
36
|
+
"release:publish": "node ./scripts/release-dispatcher.mjs",
|
|
37
|
+
"release:publish:beta": "NPM_TAG=beta node ./scripts/release-dispatcher.mjs",
|
|
38
|
+
"release:verify": "HI_CACHE_NAMESPACE=protected node ./scripts/run-cli-verification.mjs release",
|
|
39
|
+
"sync:skills": "node ./scripts/sync-skills-repo.mjs",
|
|
40
|
+
"test": "vitest run --config vitest.config.ts",
|
|
41
|
+
"test:parallel": "vitest run --config vitest.config.ts --fileParallelism --maxWorkers=2",
|
|
42
|
+
"test:release": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs",
|
|
43
|
+
"test:release:complete": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs complete",
|
|
44
|
+
"test:release:ordinary:ambient": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs ordinary:ambient",
|
|
45
|
+
"test:release:ordinary:deterministic": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs ordinary:deterministic",
|
|
46
|
+
"test:release:ordinary:native:capability": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs ordinary:native:capability",
|
|
47
|
+
"test:release:ordinary:native:forced": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs ordinary:native:forced",
|
|
48
|
+
"test:release:update:0": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs update:0",
|
|
49
|
+
"test:release:update:1": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs update:1",
|
|
50
|
+
"test:release:update:2": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs update:2",
|
|
51
|
+
"test:release:update:uncached": "\"${HI_TEST_NODE_PATH:-node}\" ./scripts/run-release-tests.mjs update:uncached",
|
|
52
|
+
"ui:catalog": "bun ./scripts/run-renderer-catalog.mjs",
|
|
53
|
+
"check": "oxlint src scripts && oxfmt --check src scripts package.json tsconfig.json vitest.config.ts && bun run fixtures:check:managed-assets"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"react-devtools-core": "^6.1.5"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@effect/eslint-plugin": "latest",
|
|
60
|
+
"@effect/platform-bun": "catalog:",
|
|
61
|
+
"@effect/vitest": "catalog:",
|
|
62
|
+
"@punks/contract": "workspace:*",
|
|
63
|
+
"@punks/env": "workspace:*",
|
|
64
|
+
"@punks/scaffold": "workspace:*",
|
|
65
|
+
"@types/node": "catalog:",
|
|
66
|
+
"effect": "catalog:",
|
|
67
|
+
"oxlint": "latest",
|
|
68
|
+
"typescript": "catalog:",
|
|
69
|
+
"ultracite": "latest",
|
|
70
|
+
"vitest": "catalog:"
|
|
71
|
+
},
|
|
72
|
+
"packageManager": "bun@1.3.5"
|
|
19
73
|
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Review Phase Reference
|
|
2
|
-
|
|
3
|
-
Load [references/targets.md](references/targets.md) for target normalization,
|
|
4
|
-
identity, or resume. Load
|
|
5
|
-
[references/state-graph.md](references/state-graph.md) for delivery budget,
|
|
6
|
-
failure, retention, routing, repair, or final-fix behavior. Load
|
|
7
|
-
[references/durable-report.md](references/durable-report.md) before writing or
|
|
8
|
-
retaining a report.
|
|
9
|
-
|
|
10
|
-
## One All-Lens Run
|
|
11
|
-
|
|
12
|
-
Evaluate exactly one frozen bounded snapshot per completed invocation.
|
|
13
|
-
|
|
14
|
-
1. Run `autoreview` exactly once as advisory candidate generation. A ClawPatch
|
|
15
|
-
helper, when present, stays inside that call and consumes no additional pass.
|
|
16
|
-
2. The parent verifies all advisory candidates against the frozen target and
|
|
17
|
-
adjacent evidence. Only verified candidates become findings.
|
|
18
|
-
3. Dispatch independent lenses against the same snapshot in parallel:
|
|
19
|
-
- Standards
|
|
20
|
-
- skill adherence and scoped skills
|
|
21
|
-
- architecture
|
|
22
|
-
- simplify
|
|
23
|
-
- Spec
|
|
24
|
-
4. Record an explicit outcome for every lens. Standards and skill adherence,
|
|
25
|
-
architecture, simplify, then Spec controls presentation and triage order
|
|
26
|
-
only. Parallel execution is unchanged. Standards and Spec stay distinct
|
|
27
|
-
report sections without cross-axis merging or reranking.
|
|
28
|
-
|
|
29
|
-
The `review` skill supplies separate Standards and Spec checks. Apply
|
|
30
|
-
`improve-codebase-architecture`, `simplify`, the nearest `AGENTS.md`, and every
|
|
31
|
-
named scoped skill as their own bounded lenses.
|
|
32
|
-
|
|
33
|
-
## Skill-Adherence Lens
|
|
34
|
-
|
|
35
|
-
Treat `assigned_skills` as planning provenance. For every implementation task:
|
|
36
|
-
|
|
37
|
-
1. Match every implementation-applicable `assigned_skills` item to exactly one
|
|
38
|
-
`implementation_skill_guidance` entry.
|
|
39
|
-
2. Match every guidance entry to exactly one `IMPLEMENTATION-NOTES.md` evidence
|
|
40
|
-
record.
|
|
41
|
-
3. Check evidence cardinality and every record, including `not_applicable`,
|
|
42
|
-
against frozen changed artifacts and the cited how/where location.
|
|
43
|
-
4. Report missing, extra, or contradicted claims as a skill-adherence finding.
|
|
44
|
-
|
|
45
|
-
When a requirements or design wrapper claims grilling behavior, verify its
|
|
46
|
-
named guidance, routed log/status artifacts, stable question mapping, carried
|
|
47
|
-
unanswered questions, and downstream synthesis evidence instead of accepting
|
|
48
|
-
the wrapper claim alone.
|
|
49
|
-
|
|
50
|
-
## Validation Boundary
|
|
51
|
-
|
|
52
|
-
Run the smallest safe readonly validation needed to verify candidates or
|
|
53
|
-
governing acceptance evidence. Broader checks run only when the accepted spec
|
|
54
|
-
or plan explicitly requires them. Missing required RED/GREEN evidence becomes
|
|
55
|
-
a reported and routed finding; review never creates that evidence.
|
|
56
|
-
|
|
57
|
-
Before every validation command, record the frozen-target hash. A command may
|
|
58
|
-
run against the reviewed checkout only when its no-write mode is proven. Run any
|
|
59
|
-
command that may write caches, generated files, snapshots, lockfiles, or other
|
|
60
|
-
state in a disposable checkout or snapshot rooted at the frozen revision.
|
|
61
|
-
|
|
62
|
-
Always recompute and compare the frozen-target hash after validation. A mismatch
|
|
63
|
-
invalidates the run and any local report, returns `review_due` with exact
|
|
64
|
-
mutation evidence, and consumes no pass. Record exact commands, isolation mode,
|
|
65
|
-
before/after hashes, sources, skipped checks, and residual risk. Keep this
|
|
66
|
-
validation bounded; isolation is a safety boundary, not permission to broaden
|
|
67
|
-
the test surface.
|
|
68
|
-
|
|
69
|
-
Use the executable before/after decision in
|
|
70
|
-
[`scripts/review-contract.mjs`](scripts/review-contract.mjs); mutation returns
|
|
71
|
-
`review_due` and consumes no pass.
|
|
72
|
-
|
|
73
|
-
## Finding And Route Output
|
|
74
|
-
|
|
75
|
-
Every stable finding records severity, location, impact, evidence, and action.
|
|
76
|
-
Determine route precedence from verified evidence:
|
|
77
|
-
|
|
78
|
-
1. runtime evidence: debugging
|
|
79
|
-
2. otherwise, an in-scope non-runtime blocker: implementation
|
|
80
|
-
3. otherwise, broad architecture debt: debt follow-up
|
|
81
|
-
4. otherwise: documentation ingest or closeout by documentation completeness
|
|
82
|
-
|
|
83
|
-
Broad architecture debt may accompany debugging or implementation as a
|
|
84
|
-
secondary follow-up. Review returns this routing output and stops. Delivery
|
|
85
|
-
owns route mutation and repairs.
|