@punks/cli 5.0.0 → 5.1.0
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 +33 -1
- package/dist/CHANGELOG.md +45 -0
- package/dist/baseline/scaffold-baseline/baseline.json +15 -5
- package/dist/baseline/scaffold-baseline/data/catalog/packs.json +11 -1
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +16 -0
- package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.d.ts +2 -1
- package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.mjs +21 -5
- package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.test.ts +192 -14
- package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/commands.md +4 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +10 -4
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/verify-behavior/SKILL.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/verify-behavior/agents/openai.yaml +2 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/quality/tdd/SKILL.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/SKILL.md +8 -7
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/references/layout.md +32 -6
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/SKILL.md +2 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/react/react-doctor/SKILL.md +19 -4
- package/dist/baseline/scaffold-baseline/skills/frameworks/react/react-doctor/references/explain.md +5 -1
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/scripts/commit-gate-runner.mjs +21 -5
- package/dist/index.js +19 -18
- package/dist/skills/agnostic/cli/hi-cli/references/commands.md +4 -2
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +10 -4
- package/dist/skills/agnostic/planning/verify-behavior/SKILL.md +1 -1
- package/dist/skills/agnostic/planning/verify-behavior/agents/openai.yaml +2 -0
- package/dist/skills/agnostic/quality/tdd/SKILL.md +1 -1
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +8 -7
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +32 -6
- package/dist/skills/frameworks/effect/effect-service-design/SKILL.md +2 -0
- package/dist/skills/frameworks/react/react-doctor/SKILL.md +19 -4
- package/dist/skills/frameworks/react/react-doctor/references/explain.md +5 -1
- package/package.json +1 -1
|
@@ -19,15 +19,41 @@ Inside the current Effect backend root, prefer:
|
|
|
19
19
|
client.ts
|
|
20
20
|
features/
|
|
21
21
|
<domain>/
|
|
22
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
126
|
+
operation and guard behavior, named for the owning use case
|
|
101
127
|
- `tests/integration`
|
|
102
128
|
live router/app behavior
|
|
103
129
|
|
package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-service-design/SKILL.md
CHANGED
|
@@ -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
|
|
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
|
-
##
|
|
11
|
+
## Changed Scope Scan
|
|
12
12
|
|
|
13
|
-
|
|
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
|
-
|
|
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 |
|
package/dist/baseline/scaffold-baseline/skills/frameworks/react/react-doctor/references/explain.md
CHANGED
|
@@ -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
|
-
|
|
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
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"channel": "stable",
|
|
4
|
-
"version": "2026.09.
|
|
5
|
-
"tag": "baseline/stable/2026.09.
|
|
6
|
-
"commit": "
|
|
4
|
+
"version": "2026.09.15-1ee7f8b7",
|
|
5
|
+
"tag": "baseline/stable/2026.09.15-1ee7f8b7",
|
|
6
|
+
"commit": "1ee7f8b72f8fe116ad74aa15923238d3b985c751",
|
|
7
7
|
"archive": "scaffold-baseline.tgz",
|
|
8
|
-
"archiveSha256": "
|
|
8
|
+
"archiveSha256": "0b6c897042951d208ad50e58463e0f00f8c53b04a156c3a0ec3f3512b9cfde08",
|
|
9
9
|
"compatibility": {
|
|
10
|
-
"cliVersionRange": ">=5.
|
|
10
|
+
"cliVersionRange": ">=5.1.0 <5.2.0"
|
|
11
11
|
}
|
|
12
12
|
}
|
|
Binary file
|
|
@@ -15,10 +15,20 @@ const run = async (command, cwd, environment) => {
|
|
|
15
15
|
env: { ...process.env, ...environment },
|
|
16
16
|
maxBuffer: 10 * 1024 * 1024,
|
|
17
17
|
});
|
|
18
|
-
return { code: 0, stderr: result.stderr, stdout: result.stdout };
|
|
18
|
+
return { code: 0, launchError: "", stderr: result.stderr, stdout: result.stdout };
|
|
19
19
|
} catch (error) {
|
|
20
|
+
const launchError =
|
|
21
|
+
typeof error.code === "number"
|
|
22
|
+
? ""
|
|
23
|
+
: [
|
|
24
|
+
typeof error.code === "string" ? error.code : "",
|
|
25
|
+
error instanceof Error ? error.message : String(error),
|
|
26
|
+
]
|
|
27
|
+
.filter(Boolean)
|
|
28
|
+
.join(": ");
|
|
20
29
|
return {
|
|
21
30
|
code: typeof error.code === "number" ? error.code : 1,
|
|
31
|
+
launchError,
|
|
22
32
|
stderr: error.stderr ?? "",
|
|
23
33
|
stdout: error.stdout ?? "",
|
|
24
34
|
};
|
|
@@ -36,6 +46,11 @@ const stagedPaths = async () => {
|
|
|
36
46
|
return stdout.split("\0").filter(Boolean);
|
|
37
47
|
};
|
|
38
48
|
|
|
49
|
+
const activeWorktreeRoot = async () => {
|
|
50
|
+
const { stdout } = await execFile("git", ["rev-parse", "--show-toplevel"]);
|
|
51
|
+
return stdout.replace(/\n$/u, "");
|
|
52
|
+
};
|
|
53
|
+
|
|
39
54
|
const shellQuote = (value) => `'${value.replaceAll("'", "'\\''")}'`;
|
|
40
55
|
|
|
41
56
|
const argument = (name) => {
|
|
@@ -51,6 +66,7 @@ if (contractsPath === null) {
|
|
|
51
66
|
try {
|
|
52
67
|
const contractsContent = await readFile(contractsPath, "utf-8");
|
|
53
68
|
const contracts = JSON.parse(contractsContent);
|
|
69
|
+
const worktreeRoot = await activeWorktreeRoot();
|
|
54
70
|
const staged = await stagedPaths();
|
|
55
71
|
if (staged.length === 0) {
|
|
56
72
|
process.exit(0);
|
|
@@ -59,7 +75,7 @@ if (contractsPath === null) {
|
|
|
59
75
|
const failuresByContract = await Promise.all(
|
|
60
76
|
contracts.map(async (contract) => {
|
|
61
77
|
const relativePath = contract.path ?? ".";
|
|
62
|
-
const
|
|
78
|
+
const ownerCwd = path.resolve(worktreeRoot, relativePath);
|
|
63
79
|
const prefix =
|
|
64
80
|
relativePath === "." || relativePath === "" ? "" : `${relativePath.replace(/\/$/u, "")}/`;
|
|
65
81
|
const files = staged
|
|
@@ -79,10 +95,10 @@ if (contractsPath === null) {
|
|
|
79
95
|
const command = scopedTemplate.includes("{files}")
|
|
80
96
|
? scopedTemplate.replaceAll("{files}", fileArguments)
|
|
81
97
|
: `${scopedTemplate} -- ${fileArguments}`;
|
|
82
|
-
const result = await run(command,
|
|
98
|
+
const result = await run(command, ownerCwd, {
|
|
83
99
|
HI_STAGED_FILES: files.join("\n"),
|
|
84
100
|
});
|
|
85
|
-
return { ...result, kind, owner: contract.owner ??
|
|
101
|
+
return { ...result, cwd: ownerCwd, kind, owner: contract.owner ?? ownerCwd };
|
|
86
102
|
}),
|
|
87
103
|
);
|
|
88
104
|
return results.filter((result) => result.code !== 0);
|
|
@@ -92,7 +108,7 @@ if (contractsPath === null) {
|
|
|
92
108
|
|
|
93
109
|
for (const failure of failures) {
|
|
94
110
|
process.stderr.write(
|
|
95
|
-
`Commit Gate ${failure.kind} failed for ${failure.owner} (exit ${failure.code}).\n${failure.stdout}${failure.stderr}`,
|
|
111
|
+
`Commit Gate ${failure.kind} failed for ${failure.owner} in ${failure.cwd} (exit ${failure.code})${failure.launchError === "" ? "" : `: ${failure.launchError}`}.\n${failure.stdout}${failure.stderr}`,
|
|
96
112
|
);
|
|
97
113
|
}
|
|
98
114
|
process.exitCode = failures.length === 0 ? 0 : 1;
|