@punks/cli 5.0.1 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/BASELINE_CHANGELOG.md +24 -1
  2. package/dist/CHANGELOG.md +49 -0
  3. package/dist/baseline/scaffold-baseline/baseline.json +15 -5
  4. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +11 -1
  5. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +16 -0
  6. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.d.ts +2 -1
  7. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.mjs +21 -5
  8. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.test.ts +192 -14
  9. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/verify-behavior/SKILL.md +1 -1
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/verify-behavior/agents/openai.yaml +2 -0
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/tdd/SKILL.md +1 -1
  12. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/SKILL.md +8 -7
  13. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/references/layout.md +32 -6
  14. package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/SKILL.md +2 -0
  15. package/dist/baseline/scaffold-baseline/skills/frameworks/react/react-doctor/SKILL.md +19 -4
  16. package/dist/baseline/scaffold-baseline/skills/frameworks/react/react-doctor/references/explain.md +5 -1
  17. package/dist/baseline/scaffold-baseline.json +5 -5
  18. package/dist/baseline/scaffold-baseline.tgz +0 -0
  19. package/dist/data/scripts/commit-gate-runner.mjs +21 -5
  20. package/dist/index.js +56 -52
  21. package/dist/skills/agnostic/planning/verify-behavior/SKILL.md +1 -1
  22. package/dist/skills/agnostic/planning/verify-behavior/agents/openai.yaml +2 -0
  23. package/dist/skills/agnostic/quality/tdd/SKILL.md +1 -1
  24. package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +8 -7
  25. package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +32 -6
  26. package/dist/skills/frameworks/effect/effect-service-design/SKILL.md +2 -0
  27. package/dist/skills/frameworks/react/react-doctor/SKILL.md +19 -4
  28. package/dist/skills/frameworks/react/react-doctor/references/explain.md +5 -1
  29. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: verify-behavior
3
- description: Verify observable product behavior or reproduce reported failures through selected project-owned app references and falsifiable end-to-end evidence.
3
+ description: Verify observable product behavior through selected project-owned app references and falsifiable end-to-end evidence when Debugging Phase invokes reproduce or Implement Spec invokes verify.
4
4
  ---
5
5
 
6
6
  # Verify Behavior
@@ -0,0 +1,2 @@
1
+ policy:
2
+ allow_implicit_invocation: false
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tdd
3
- description: Test-drive behavior changes with a red-green-refactor loop through public interfaces. Use when the user wants TDD, test-first development, integration-style tests, RED/GREEN evidence, or a bugfix/feature built test-first.
3
+ description: Test-drive behavior changes with a red-green-refactor loop through public interfaces. Use when the user explicitly requests TDD, test-first development, RED/GREEN evidence, or behavior design remains unresolved.
4
4
  ---
5
5
 
6
6
  # Test-Driven Development
@@ -2,17 +2,18 @@
2
2
  name: effect-backend-structure
3
3
  description: |
4
4
  Apply Effect-specific backend structure on top of backend-domain-structure.
5
- Use when creating or changing Effect actions, repositories, transport adapters,
6
- DB integrations, test placement, backend boilerplate, or Layer composition
7
- ownership in any Effect backend root. Enforces actions-own-orchestration,
8
- integration dependency direction, three-level Layer composition operators,
9
- effect-solutions plus opensrc source lookup, and @effect/vitest conventions.
5
+ Use when creating or changing Effect internal modules, actions, repositories,
6
+ transport adapters, DB integrations, test placement, backend boilerplate, or
7
+ Layer composition ownership in any Effect backend root. Enforces concrete
8
+ module boundaries, actions-own-orchestration, integration dependency direction,
9
+ three-level Layer composition operators, effect-solutions plus opensrc source
10
+ lookup, and @effect/vitest conventions.
10
11
  compatibility: Requires Effect v4. Examples are reviewed against the version documented in this repository.
11
12
  ---
12
13
 
13
14
  # Effect Backend Structure
14
15
 
15
- Use this skill with `$backend-domain-structure` and `$effect` for Effect backend code. `$effect` owns Effect v4 API guidance. Use `$effect-service-design` for service qualification, service modules, Layers, requirements, test substitutes, and service audits.
16
+ Use this skill with `$backend-domain-structure` and `$effect` for Effect backend code. `$effect` owns Effect v4 API guidance. Use `$effect-service-design` for service qualification, application policy, service modules, Layers, requirements, test substitutes, and service audits.
16
17
 
17
18
  The agnostic skill owns the layer model:
18
19
 
@@ -21,7 +22,7 @@ The agnostic skill owns the layer model:
21
22
  - `features/*`
22
23
  - shared libraries and packages
23
24
 
24
- This skill adds Effect-specific backend topology, action ownership, source lookup, and test placement rules.
25
+ This skill adds Effect-specific internal-module topology, repository boundaries, action ownership, source lookup, and test placement rules. Read the layout reference when placing code inside an Effect module; `$effect-service-design` remains the authority for deciding whether a seam is a service and for application policy.
25
26
 
26
27
  ## Workflow
27
28
 
@@ -19,15 +19,41 @@ Inside the current Effect backend root, prefer:
19
19
  client.ts
20
20
  features/
21
21
  <domain>/
22
- actions/
22
+ services/
23
+ <capability>/
24
+ service.ts
25
+ binding.ts
26
+ operations/
27
+ <use-case>/
28
+ operation.ts
23
29
  models/
30
+ <model>.ts
24
31
  repositories/
25
- services/
32
+ <entity>.ts
33
+ mappers/
34
+ <model>.ts
26
35
  errors.ts
27
36
  layer.ts
28
37
  router.ts
29
38
  ```
30
39
 
40
+ ## Internal module topology
41
+
42
+ - Public capabilities live in `services/<capability>/service.ts` as the public `Context.Service` capability.
43
+ - Effect backends use `operations/<use-case>/operation.ts` as private `Effect.fn` orchestration for a use case; this replaces the base skill's `actions/` directory convention. Call these units operations consistently inside the Effect feature.
44
+ - `services/<capability>/binding.ts` contains the private `Context.Service` seams that bind the public capability beside it; do not create a separate `composition/` directory for them.
45
+ - Domain models live in `models/<model>.ts`; persistence contracts and adapters live in `repositories/<entity>.ts`; boundary transforms live in `mappers/<model>.ts`. External provider clients and adapter mechanics remain under `integrations/<provider>/` and do not move into repositories.
46
+ - Place an operation's tests in the feature-owned `tests/unit/<use-case>.test.ts` or `tests/integration/<use-case>.test.ts` path shown below; keep reusable local support under `tests/support/`.
47
+
48
+ - Keep module internals private; callers use an explicit public capability surface.
49
+ - Use relative imports within an internal module and source aliases across module boundaries.
50
+ - Avoid pass-through barrels that only re-export private implementation.
51
+ - Repositories expose a narrow capability rather than a table-shaped grab bag.
52
+ - A mapper changes representation; delete a spread-only mapper.
53
+ - Derive types from their owner instead of creating structurally identical duplicate `*Data` types.
54
+
55
+ **Complete when:** every internal file has one role, callers reach only the public capability surface, and each import, repository, mapper, data type, and colocated test preserves that boundary.
56
+
31
57
  Dependency direction:
32
58
 
33
59
  - `platform -> features -> integrations`
@@ -52,7 +78,7 @@ A leaf or module Layer implements only its owned public capability. Keep depende
52
78
 
53
79
  ### Nearest common parent business Layer
54
80
 
55
- The nearest common parent business Layer composes its public child Layers. Those child features are siblings to one another. Actions or services owned by the parent hold ordering, authorization, state transitions, and other cross-child product policy. The parent imports public child surfaces and keeps child internals private.
81
+ The nearest common parent business Layer composes its public child Layers. Those child features are siblings to one another. Operations or services owned by the parent hold ordering, authorization, state transitions, and other cross-child product policy. The parent imports public child surfaces and keeps child internals private.
56
82
 
57
83
  **Complete when:** every cross-child product decision has one parent owner and the parent Layer exposes the composed parent-domain capability.
58
84
 
@@ -75,9 +101,9 @@ Choose the operator from the intended public output. Side-by-side capabilities u
75
101
 
76
102
  ## Composition terminology
77
103
 
78
- Reserve composition terminology for Layers that assemble public capabilities. Name private `Context.Service` seams by capability under `services/` or in an owner-named module. Use `features/<domain>/layer.ts` for domain Layer ownership and `platform/effect/app.ts`, or the repository's equivalent, for the production root.
104
+ Reserve composition terminology for Layers that assemble public capabilities. Put a private `Context.Service` binding seam at `services/<capability>/binding.ts` beside the public capability it supports. Use `features/<domain>/layer.ts` for domain Layer ownership and `platform/effect/app.ts`, or the repository's equivalent, for the production root.
79
105
 
80
- Do not import live implementations directly inside actions, services, repositories, or transport adapters.
106
+ Do not import live implementations directly inside operations, services, repositories, or transport adapters.
81
107
 
82
108
  Test layout:
83
109
 
@@ -97,7 +123,7 @@ Testing split:
97
123
  - `tests/support`
98
124
  feature-local reusable test support
99
125
  - `tests/unit`
100
- action and guard behavior
126
+ operation and guard behavior, named for the owning use case
101
127
  - `tests/integration`
102
128
  live router/app behavior
103
129
 
@@ -7,6 +7,8 @@ description: Design Effect services. Use when designing a new Effect service mod
7
7
 
8
8
  Treat a service as an **authority seam**: a cohesive capability whose requirements should propagate through Effect context. An **Effect service module** owns the service contract, construction, production Layer, and any honest reusable test implementation that belong to the same capability.
9
9
 
10
+ For concrete Effect internal-module topology and repository boundaries, use `$effect-backend-structure`. It owns placement and privacy inside an Effect module; this skill owns service qualification, authority seams, and application policy.
11
+
10
12
  ## 1. Establish the local rules
11
13
 
12
14
  Read the nearest `AGENTS.md`, architecture docs, coding standards, project Effect guidance, pinned Effect version/source, and relevant vendored examples. Prefer current project-compatible patterns over remembered APIs.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: react-doctor
3
- description: Use when finishing a feature, fixing a bug, before committing React code, or when the user types `/doctor`, asks to scan, triage, or clean up React diagnostics. Covers lint, accessibility, bundle size, architecture. Includes a regression check and a full local-triage workflow that fetches the canonical playbook.
3
+ description: Use when the user explicitly requests React Doctor or production changes overlap React runtime APIs.
4
4
  version: "1.2.0"
5
5
  ---
6
6
 
@@ -8,9 +8,20 @@ version: "1.2.0"
8
8
 
9
9
  Scans React codebases for security, performance, correctness, and architecture issues. Outputs a 0-100 health score.
10
10
 
11
- ## After Making React Code Changes
11
+ ## Changed Scope Scan
12
12
 
13
- Run `npx react-doctor@latest --verbose --scope changed` and check the score did not regress.
13
+ Resolve the checked-out branch's configured upstream. If there is no configured
14
+ upstream, stop and ask the user to configure one or select a base explicitly.
15
+
16
+ ```bash
17
+ base="$(git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}')" || {
18
+ echo "React Doctor changed scan has no configured upstream." >&2
19
+ exit 1
20
+ }
21
+ npx react-doctor@latest --verbose --scope changed --base "$base"
22
+ ```
23
+
24
+ Check that the score did not regress.
14
25
 
15
26
  If the score dropped, fix the regressions before committing.
16
27
 
@@ -47,7 +58,11 @@ Then apply the narrowest control via `npx react-doctor@latest rules disable|set|
47
58
  ## Command
48
59
 
49
60
  ```bash
50
- npx react-doctor@latest --verbose --scope changed
61
+ base="$(git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}')" || {
62
+ echo "React Doctor changed scan has no configured upstream." >&2
63
+ exit 1
64
+ }
65
+ npx react-doctor@latest --verbose --scope changed --base "$base"
51
66
  ```
52
67
 
53
68
  | Flag | Purpose |
@@ -18,7 +18,11 @@ npx react-doctor@latest rules explain react-doctor/no-array-index-as-key
18
18
  5. Validate the change did what the user wanted:
19
19
 
20
20
  ```bash
21
- npx react-doctor@latest --verbose --scope changed
21
+ base="$(git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}')" || {
22
+ echo "React Doctor changed scan has no configured upstream." >&2
23
+ exit 1
24
+ }
25
+ npx react-doctor@latest --verbose --scope changed --base "$base"
22
26
  ```
23
27
 
24
28
  ## Commands
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punks/cli",
3
- "version": "5.0.1",
3
+ "version": "5.1.1",
4
4
  "description": "Harness Intelligence scaffolding CLI",
5
5
  "homepage": "https://github.com/wearedevpunks/harness-intelligence/tree/main/apps/cli#readme",
6
6
  "bugs": {