jorgex-stack 1.0.2 → 1.0.4
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/PRD.md +16 -3
- package/README.md +44 -2
- package/dist/cli.js +32 -4
- package/package.json +2 -2
- package/stack/agents/code-simplifier.md +21 -10
- package/stack/agents/implementer.md +1 -0
- package/stack/agents/orchestrator.md +2 -0
- package/stack/agents/security-auditor.md +7 -0
- package/stack/agents/silent-failure-hunter.md +7 -0
- package/stack/agents/test-analyzer.md +7 -0
- package/stack/agents/type-design-analyzer.md +1 -1
- package/stack/commands/lean-audit.md +59 -0
- package/stack/commands/xreview.md +4 -2
- package/stack/plugins/opencode/goal/artifacts.ts +142 -0
- package/stack/plugins/opencode/goal/command.ts +255 -0
- package/stack/plugins/opencode/goal/db.ts +68 -0
- package/stack/plugins/opencode/goal/opencode-hooks.ts +272 -0
- package/stack/plugins/opencode/goal/state.ts +85 -0
- package/stack/plugins/opencode/goal/store.ts +906 -0
- package/stack/plugins/opencode/goal/supervisor.ts +269 -0
- package/stack/plugins/opencode/goal/types.ts +187 -0
- package/stack/plugins/opencode/goal-plugin.ts +176 -0
- package/stack/scripts/post-pr-review.cjs +6 -3
- package/stack/skills/lean-code/SKILL.md +69 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lean-code
|
|
3
|
+
description: Lean / anti-overengineering skill. Use when deciding whether code should exist, when to prefer stdlib or native APIs, and when to simplify recently changed code without changing behavior.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Lean Code
|
|
7
|
+
|
|
8
|
+
Use the smallest change that genuinely solves the problem.
|
|
9
|
+
|
|
10
|
+
## The ladder
|
|
11
|
+
|
|
12
|
+
Work top-down. Stop as soon as a step solves it:
|
|
13
|
+
|
|
14
|
+
1. **Do nothing / delete it** if the need is speculative or nothing depends on the code.
|
|
15
|
+
2. **Reuse existing project code** if a helper, component, command or module already solves the same need.
|
|
16
|
+
3. **Use stdlib first** before adding a package or custom helper.
|
|
17
|
+
4. **Use native/platform APIs** before wrapping them in new abstractions.
|
|
18
|
+
5. **Use an already-installed dependency** when it safely covers the case.
|
|
19
|
+
6. **Write the smallest obvious code** only when the previous steps do not fit.
|
|
20
|
+
|
|
21
|
+
## Questions to ask
|
|
22
|
+
|
|
23
|
+
- Does this need new code at all?
|
|
24
|
+
- Is there already a project helper or pattern that does it?
|
|
25
|
+
- Can stdlib or the platform do it directly?
|
|
26
|
+
- Can an existing dependency already cover this safely without adding a new one?
|
|
27
|
+
- Can the same result be expressed with one clear step instead of a new layer?
|
|
28
|
+
|
|
29
|
+
## Guardrails
|
|
30
|
+
|
|
31
|
+
Lean code does **not** mean weaker code.
|
|
32
|
+
|
|
33
|
+
Keep explicit code when the change touches:
|
|
34
|
+
|
|
35
|
+
- security or permissions
|
|
36
|
+
- validation or sanitisation
|
|
37
|
+
- accessibility
|
|
38
|
+
- data-loss or persistence boundaries
|
|
39
|
+
- public contracts, types, schemas, or APIs
|
|
40
|
+
- tests or regression seams
|
|
41
|
+
|
|
42
|
+
If simplification weakens any of those, stop.
|
|
43
|
+
|
|
44
|
+
Do not add a new dependency unless the task explicitly requires it or the project already has approval for that dependency.
|
|
45
|
+
|
|
46
|
+
## How to use it
|
|
47
|
+
|
|
48
|
+
### Implementation
|
|
49
|
+
|
|
50
|
+
Before adding a new helper, wrapper, abstraction, or dependency, run the ladder again.
|
|
51
|
+
Prefer the narrowest change that solves the real need.
|
|
52
|
+
|
|
53
|
+
### Review / simplification
|
|
54
|
+
|
|
55
|
+
Use it as a bloat filter: delete, stdlib, native/platform, reuse, or shrink.
|
|
56
|
+
If the code is already minimal and clear, leave it alone.
|
|
57
|
+
|
|
58
|
+
### Audit
|
|
59
|
+
|
|
60
|
+
Rank findings as:
|
|
61
|
+
|
|
62
|
+
- delete
|
|
63
|
+
- stdlib
|
|
64
|
+
- native/platform
|
|
65
|
+
- reuse
|
|
66
|
+
- yagni
|
|
67
|
+
- shrink
|
|
68
|
+
|
|
69
|
+
Do not propose rewrites that only move complexity around.
|