@punks/cli 3.3.4 → 3.3.6
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/AGENTS.md +1 -1
- package/dist/BASELINE_CHANGELOG.md +8 -3
- package/dist/CHANGELOG.md +14 -0
- package/dist/baseline/scaffold-baseline/baseline.json +5 -5
- package/dist/baseline/scaffold-baseline/skills/agnostic/backend/backend-domain-structure/SKILL.md +3 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/backend/backend-domain-structure/references/layout.md +14 -1
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/SKILL.md +20 -10
- package/dist/baseline/scaffold-baseline/skills/frameworks/effect/effect-backend-structure/references/layout.md +38 -2
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/index.js +7 -7
- package/dist/skills/agnostic/backend/backend-domain-structure/SKILL.md +3 -1
- package/dist/skills/agnostic/backend/backend-domain-structure/references/layout.md +14 -1
- package/dist/skills/frameworks/effect/effect-backend-structure/SKILL.md +20 -10
- package/dist/skills/frameworks/effect/effect-backend-structure/references/layout.md +38 -2
- package/package.json +52 -9
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +0 -29
|
@@ -16,7 +16,7 @@ routed `requirements-grill` status artifact. Preserve its canonical terms;
|
|
|
16
16
|
route proposed terminology changes through `requirements-grill` instead of
|
|
17
17
|
silently renaming them.
|
|
18
18
|
|
|
19
|
-
Read `references/layout.md` before structure decisions or large refactors.
|
|
19
|
+
Read `references/layout.md` before structure decisions or large refactors. It owns the recursive composition classifier and placement rules.
|
|
20
20
|
|
|
21
21
|
## Quick Classifier
|
|
22
22
|
|
|
@@ -65,3 +65,5 @@ Default to explicit use-case actions.
|
|
|
65
65
|
- Keep dependencies flowing: transport/composition -> features -> integrations/infrastructure -> external systems.
|
|
66
66
|
- Keep tests near the feature or module that owns the behavior.
|
|
67
67
|
- Validate module import direction, import cycles, stale symbols after moves, architecture tests when available, and focused compile/type checks.
|
|
68
|
+
|
|
69
|
+
**Complete when:** every file and composition boundary has one owner under the layout classifier and all applicable validation passes or each failure is reported.
|
|
@@ -78,7 +78,7 @@ Common local folders:
|
|
|
78
78
|
- `services/`
|
|
79
79
|
- `tests/`
|
|
80
80
|
- `errors.ts`
|
|
81
|
-
- `
|
|
81
|
+
- `container.ts`, `module.ts`, or the framework's equivalent composition file
|
|
82
82
|
- `router.ts`, `controller.ts`, or equivalent transport adapter when the feature exposes endpoints
|
|
83
83
|
|
|
84
84
|
Feature domains own use cases, policy, persistence contracts, and public behavior.
|
|
@@ -167,6 +167,19 @@ Composition roots own container wiring.
|
|
|
167
167
|
- Treat lazy imports as a smell when they avoid a cycle instead of fixing import direction.
|
|
168
168
|
- Keep test wiring in test support or feature composition helpers, not inside production domain logic.
|
|
169
169
|
|
|
170
|
+
### Recursive composition ownership
|
|
171
|
+
|
|
172
|
+
A composition boundary belongs to the nearest honest parent that owns the coordination. Apply this rule recursively at every depth of a domain tree.
|
|
173
|
+
|
|
174
|
+
- A leaf feature or module assembles only the capability it owns.
|
|
175
|
+
- The nearest common parent feature composes its public child capabilities and owns product policy spanning them. Those children are siblings to one another.
|
|
176
|
+
- The process composition root closes the application graph and selects runtime or external adapters across otherwise independent public contracts.
|
|
177
|
+
- Parent composition imports public child entrypoints. Each child retains ownership of its internals.
|
|
178
|
+
|
|
179
|
+
Classify coordination by meaning. Ordering, authorization, state transitions, and choices that change product behavior are parent-feature policy. Selecting an adapter, constructing a runtime, or binding independent public contracts is pure technical binding at the process root.
|
|
180
|
+
|
|
181
|
+
**Complete when:** every boundary is classified exactly once as leaf/module capability assembly, nearest-common-parent business composition, or process-root technical binding.
|
|
182
|
+
|
|
170
183
|
## Public Boundaries
|
|
171
184
|
|
|
172
185
|
Feature modules or package roots should expose deliberate public API.
|
|
@@ -3,8 +3,9 @@ name: effect-backend-structure
|
|
|
3
3
|
description: |
|
|
4
4
|
Apply Effect-specific backend structure on top of backend-domain-structure.
|
|
5
5
|
Use when creating or changing Effect actions, repositories, transport adapters,
|
|
6
|
-
DB integrations, test placement,
|
|
7
|
-
root. Enforces actions-own-orchestration,
|
|
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,
|
|
8
9
|
effect-solutions plus opensrc source lookup, and @effect/vitest conventions.
|
|
9
10
|
compatibility: Requires Effect v4. Examples are reviewed against the version documented in this repository.
|
|
10
11
|
---
|
|
@@ -24,14 +25,21 @@ This skill adds Effect-specific backend topology, action ownership, source looku
|
|
|
24
25
|
|
|
25
26
|
## Workflow
|
|
26
27
|
|
|
27
|
-
1. Identify the backend root
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
1. Identify the backend root, read its nearest `AGENTS.md` files, `$backend-domain-structure`, `$effect`, this skill's layout reference, and `$effect-service-design` when services or Layers are in scope.
|
|
29
|
+
|
|
30
|
+
**Complete when:** the backend root and every governing instruction or reference used for the change are named.
|
|
31
|
+
|
|
32
|
+
2. Run the smallest relevant `effect-solutions` guides, then inspect local `opensrc` Effect sources for unfamiliar or ambiguous APIs.
|
|
33
|
+
|
|
34
|
+
**Complete when:** every Effect API decision in scope is supported by a relevant guide or the current source.
|
|
35
|
+
|
|
36
|
+
3. Classify each Layer exactly once as leaf/module capability implementation, nearest-common-parent business composition, or process production root. Keep transport thin and preserve dependency requirements until their truthful owner supplies them.
|
|
37
|
+
|
|
38
|
+
**Complete when:** every Layer in scope has exactly one owner and its public outputs and remaining requirements match that boundary.
|
|
39
|
+
|
|
40
|
+
4. Add or update colocated `@effect/vitest` tests for the changed unit or integration boundary.
|
|
41
|
+
|
|
42
|
+
**Complete when:** focused tests validate the resulting public boundary and the repository's required checks pass or each failure is reported.
|
|
35
43
|
|
|
36
44
|
## Required Source Lookup
|
|
37
45
|
|
|
@@ -58,6 +66,8 @@ For non-Effect libraries, run `opensrc path <package>` or `opensrc path owner/re
|
|
|
58
66
|
- Prefer `catchTag` / `catchTags`, not `catchAll`.
|
|
59
67
|
- Avoid `any`.
|
|
60
68
|
|
|
69
|
+
Read `references/layout.md` for the mutually exclusive Layer ownership classifier, composition terminology, and v4 operator rules.
|
|
70
|
+
|
|
61
71
|
## Testing Rules
|
|
62
72
|
|
|
63
73
|
- Keep tests inside the owning feature or module.
|
|
@@ -36,11 +36,47 @@ Dependency direction:
|
|
|
36
36
|
|
|
37
37
|
Composition file placement:
|
|
38
38
|
|
|
39
|
-
- `platform/effect/app.ts` or local equivalent is the
|
|
39
|
+
- `platform/effect/app.ts` or local equivalent is the process production root
|
|
40
40
|
- `platform/effect/request.ts` or local equivalent owns request-scoped runtime context
|
|
41
|
-
- `features/<domain>/layer.ts`
|
|
41
|
+
- a leaf `features/<domain>/layer.ts` implements the capability owned by that domain
|
|
42
|
+
- the nearest common parent domain's `layer.ts` composes its public child Layers; those children are siblings to one another
|
|
42
43
|
- `features/<domain>/tests/support/` owns feature-local reusable test support
|
|
43
44
|
|
|
45
|
+
## Three Layer Levels
|
|
46
|
+
|
|
47
|
+
### Leaf/module capability implementation Layer
|
|
48
|
+
|
|
49
|
+
A leaf or module Layer implements only its owned public capability. Keep dependency-requiring variants available so callers can compose without inheriting an inner implementation choice. Cross-child coordination has the nearest common parent as its owner.
|
|
50
|
+
|
|
51
|
+
**Complete when:** the Layer outputs only the module's public capability and every unowned dependency remains in its requirement type.
|
|
52
|
+
|
|
53
|
+
### Nearest common parent business Layer
|
|
54
|
+
|
|
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.
|
|
56
|
+
|
|
57
|
+
**Complete when:** every cross-child product decision has one parent owner and the parent Layer exposes the composed parent-domain capability.
|
|
58
|
+
|
|
59
|
+
### Process production root
|
|
60
|
+
|
|
61
|
+
`platform/effect/app.ts`, or the repository's equivalent, closes the final Layer graph. It selects runtime and cross-module integration adapters, binds otherwise independent public contracts, and supplies the remaining requirements.
|
|
62
|
+
|
|
63
|
+
**Complete when:** the production graph has no unsatisfied runtime requirements, the root contains technical binding, and reusable product policy remains with its business owner.
|
|
64
|
+
|
|
65
|
+
## Effect v4 Layer Operators
|
|
66
|
+
|
|
67
|
+
- `Layer.merge` and `Layer.mergeAll` combine Layer outputs, errors, and requirements. Use them for capabilities that remain available side by side. Feeding outputs into requirements uses `provide` or `provideMerge`.
|
|
68
|
+
- `Layer.provide` feeds provider outputs into the target Layer's requirements and returns the target outputs. Provider outputs stay private to that binding.
|
|
69
|
+
- `Layer.provideMerge` feeds provider outputs into the target Layer's requirements and retains both target and provider outputs.
|
|
70
|
+
- Preserve dependency-requiring Layers until the module, nearest parent business, or process root that truthfully owns the choice supplies them.
|
|
71
|
+
|
|
72
|
+
Choose the operator from the intended public output. Side-by-side capabilities use `merge` or `mergeAll`; a private dependency uses `provide`; a dependency that remains public uses `provideMerge`.
|
|
73
|
+
|
|
74
|
+
**Complete when:** every operator's retained outputs match the boundary's public contract and every supplied dependency is chosen by its truthful owner.
|
|
75
|
+
|
|
76
|
+
## Composition terminology
|
|
77
|
+
|
|
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.
|
|
79
|
+
|
|
44
80
|
Do not import live implementations directly inside actions, services, repositories, or transport adapters.
|
|
45
81
|
|
|
46
82
|
Test layout:
|
package/package.json
CHANGED
|
@@ -1,22 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@punks/cli",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.6",
|
|
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
|
-
"
|
|
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
|
+
"local": "bun run build && bun run ./dist/index.js",
|
|
33
|
+
"release:authority": "cd ../.. && node ./apps/cli/scripts/run-release-authority.mjs",
|
|
34
|
+
"release:candidate": "cd ../.. && node ./apps/cli/scripts/run-release-candidate.mjs",
|
|
35
|
+
"release:classify": "cd ../.. && node ./apps/cli/scripts/classify-release-impact.mjs",
|
|
36
|
+
"release:publish": "node ./scripts/release-dispatcher.mjs",
|
|
37
|
+
"release:publish:beta": "NPM_TAG=beta node ./scripts/release-dispatcher.mjs",
|
|
38
|
+
"release:publication": "cd ../.. && node ./apps/cli/scripts/run-release-publication.mjs",
|
|
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
|
+
"ui:catalog": "bun ./scripts/run-renderer-catalog.mjs",
|
|
43
|
+
"lint": "oxlint src scripts",
|
|
44
|
+
"check": "bun run lint && oxfmt --check src scripts package.json tsconfig.json vitest.config.ts"
|
|
18
45
|
},
|
|
19
46
|
"dependencies": {
|
|
20
47
|
"react-devtools-core": "^6.1.5"
|
|
21
|
-
}
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@effect/eslint-plugin": "latest",
|
|
51
|
+
"@effect/platform-bun": "catalog:",
|
|
52
|
+
"@effect/vitest": "catalog:",
|
|
53
|
+
"@oxlint/plugins": "latest",
|
|
54
|
+
"@punks/contract": "workspace:*",
|
|
55
|
+
"@punks/env": "workspace:*",
|
|
56
|
+
"@punks/scaffold": "workspace:*",
|
|
57
|
+
"@types/node": "catalog:",
|
|
58
|
+
"effect": "catalog:",
|
|
59
|
+
"oxlint": "latest",
|
|
60
|
+
"typescript": "catalog:",
|
|
61
|
+
"ultracite": "latest",
|
|
62
|
+
"vitest": "catalog:"
|
|
63
|
+
},
|
|
64
|
+
"packageManager": "bun@1.3.5"
|
|
22
65
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Dependencies
|
|
2
|
-
node_modules/
|
|
3
|
-
|
|
4
|
-
# Website (lives on docs branch)
|
|
5
|
-
website/
|
|
6
|
-
|
|
7
|
-
# Build outputs
|
|
8
|
-
dist/
|
|
9
|
-
*.js
|
|
10
|
-
*.d.ts
|
|
11
|
-
*.js.map
|
|
12
|
-
|
|
13
|
-
# IDE
|
|
14
|
-
.idea/
|
|
15
|
-
.vscode/
|
|
16
|
-
*.swp
|
|
17
|
-
*.swo
|
|
18
|
-
|
|
19
|
-
# OS
|
|
20
|
-
.DS_Store
|
|
21
|
-
Thumbs.db
|
|
22
|
-
|
|
23
|
-
# Logs
|
|
24
|
-
*.log
|
|
25
|
-
npm-debug.log*
|
|
26
|
-
|
|
27
|
-
# Environment
|
|
28
|
-
.env
|
|
29
|
-
.env.local
|