skill-systems-thinking 0.1.0 → 0.1.2
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/CHANGELOG.md +39 -25
- package/LICENSE +21 -21
- package/README.md +470 -396
- package/SKILL.md +125 -125
- package/assets/runtime-prompt.txt +21 -21
- package/evals/checks.json +88 -88
- package/init.ps1 +68 -0
- package/package.json +36 -6
- package/references/bounded-control.md +82 -82
- package/references/closed-loop-workflow.md +89 -89
- package/references/discrete-systems.md +79 -79
- package/references/disturbance.md +98 -98
- package/references/modeling.md +87 -87
- package/references/multivariable.md +112 -112
- package/references/original-text.md +58 -58
- package/references/stability.md +97 -97
- package/references/state-and-control.md +84 -84
- package/scripts/install.js +146 -0
- package/templates/change-proposal.md +51 -51
- package/templates/debugging-checklist.md +44 -44
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# Change Proposal (control-systems thinking scaffold)
|
|
2
|
-
|
|
3
|
-
Fill this in before a non-trivial change. It forces the control-theoretic mindset: name the
|
|
4
|
-
plant, the setpoint, the actuator, and how you will know it converged.
|
|
5
|
-
|
|
6
|
-
## Target
|
|
7
|
-
- **Controlled variable x** (what must stay correct):
|
|
8
|
-
_________________________________
|
|
9
|
-
- **Setpoint x*** (target / invariant / acceptable range):
|
|
10
|
-
_________________________________
|
|
11
|
-
|
|
12
|
-
## Plant & model
|
|
13
|
-
- **Current behavior** (measured, not assumed):
|
|
14
|
-
_________________________________
|
|
15
|
-
- **Mental model of the plant** (and where it may be wrong):
|
|
16
|
-
_________________________________
|
|
17
|
-
- **Model validity range** (inputs/sizes/conditions where the model holds):
|
|
18
|
-
_________________________________
|
|
19
|
-
|
|
20
|
-
## Control action
|
|
21
|
-
- **Control variable u** (the lever I will change):
|
|
22
|
-
_________________________________
|
|
23
|
-
- **Bounds on u** (max retries / depth / rate / size):
|
|
24
|
-
_________________________________
|
|
25
|
-
- **Sensors** (how I will observe x after the change — tests/logs/metrics):
|
|
26
|
-
_________________________________
|
|
27
|
-
|
|
28
|
-
## Disturbances
|
|
29
|
-
- **Known external kicks** (load, network, other services):
|
|
30
|
-
_________________________________
|
|
31
|
-
- **Feedforward (if measurable)** / **feedback only (if not)**:
|
|
32
|
-
_________________________________
|
|
33
|
-
|
|
34
|
-
## Convergence
|
|
35
|
-
- **Pass condition** (bounded deviation ||ε|| under which perturbation?):
|
|
36
|
-
_________________________________
|
|
37
|
-
- **Test / observation that proves it**:
|
|
38
|
-
_________________________________
|
|
39
|
-
|
|
40
|
-
## Coupling
|
|
41
|
-
- **Subsystems that must stay separate** (decouple harmful coupling):
|
|
42
|
-
_________________________________
|
|
43
|
-
- **Subsystems that must stay coordinated** (keep beneficial coupling, regulate relations):
|
|
44
|
-
_________________________________
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
Anti-patterns to avoid:
|
|
48
|
-
- Unbounded retry/recursion/allocation → saturation → instability
|
|
49
|
-
- Feature creep before the base is stable → divergence
|
|
50
|
-
- Optimization before correctness → wrong trajectory
|
|
51
|
-
- Guessing the cause without measurement → open-loop patch
|
|
1
|
+
# Change Proposal (control-systems thinking scaffold)
|
|
2
|
+
|
|
3
|
+
Fill this in before a non-trivial change. It forces the control-theoretic mindset: name the
|
|
4
|
+
plant, the setpoint, the actuator, and how you will know it converged.
|
|
5
|
+
|
|
6
|
+
## Target
|
|
7
|
+
- **Controlled variable x** (what must stay correct):
|
|
8
|
+
_________________________________
|
|
9
|
+
- **Setpoint x*** (target / invariant / acceptable range):
|
|
10
|
+
_________________________________
|
|
11
|
+
|
|
12
|
+
## Plant & model
|
|
13
|
+
- **Current behavior** (measured, not assumed):
|
|
14
|
+
_________________________________
|
|
15
|
+
- **Mental model of the plant** (and where it may be wrong):
|
|
16
|
+
_________________________________
|
|
17
|
+
- **Model validity range** (inputs/sizes/conditions where the model holds):
|
|
18
|
+
_________________________________
|
|
19
|
+
|
|
20
|
+
## Control action
|
|
21
|
+
- **Control variable u** (the lever I will change):
|
|
22
|
+
_________________________________
|
|
23
|
+
- **Bounds on u** (max retries / depth / rate / size):
|
|
24
|
+
_________________________________
|
|
25
|
+
- **Sensors** (how I will observe x after the change — tests/logs/metrics):
|
|
26
|
+
_________________________________
|
|
27
|
+
|
|
28
|
+
## Disturbances
|
|
29
|
+
- **Known external kicks** (load, network, other services):
|
|
30
|
+
_________________________________
|
|
31
|
+
- **Feedforward (if measurable)** / **feedback only (if not)**:
|
|
32
|
+
_________________________________
|
|
33
|
+
|
|
34
|
+
## Convergence
|
|
35
|
+
- **Pass condition** (bounded deviation ||ε|| under which perturbation?):
|
|
36
|
+
_________________________________
|
|
37
|
+
- **Test / observation that proves it**:
|
|
38
|
+
_________________________________
|
|
39
|
+
|
|
40
|
+
## Coupling
|
|
41
|
+
- **Subsystems that must stay separate** (decouple harmful coupling):
|
|
42
|
+
_________________________________
|
|
43
|
+
- **Subsystems that must stay coordinated** (keep beneficial coupling, regulate relations):
|
|
44
|
+
_________________________________
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
Anti-patterns to avoid:
|
|
48
|
+
- Unbounded retry/recursion/allocation → saturation → instability
|
|
49
|
+
- Feature creep before the base is stable → divergence
|
|
50
|
+
- Optimization before correctness → wrong trajectory
|
|
51
|
+
- Guessing the cause without measurement → open-loop patch
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
# Debugging Checklist (closed-loop thinking mode)
|
|
2
|
-
|
|
3
|
-
This checklist is a **prompt scaffold for the LLM's internal loop** during debugging.
|
|
4
|
-
Work top to bottom; do not skip steps. If you find yourself on step 4 without a clear x
|
|
5
|
-
and u, return to step 1.
|
|
6
|
-
|
|
7
|
-
## 1. Identify (state & control)
|
|
8
|
-
- [ ] **Controlled variable x**: what must stay correct? Name it concretely, with a target/units.
|
|
9
|
-
- [ ] **Control variable u**: what lever will I actually change? (Not "rewrite"; the smallest editable thing.)
|
|
10
|
-
- [ ] **Observability**: do I have a sensor (log/test/metric) that reveals x? If not → add it first.
|
|
11
|
-
- [ ] **Bounds**: what are the limits on u and x? Size, rate, time, memory, retries, context.
|
|
12
|
-
|
|
13
|
-
## 2. Analyze (current behavior)
|
|
14
|
-
- [ ] Reproduced the fault deterministically? (Not "sometimes".)
|
|
15
|
-
- [ ] Measured the deviation ε = x* − x? Stated the mental model of the plant and where it breaks.
|
|
16
|
-
- [ ] Located the fault to a subsystem (not guessed).
|
|
17
|
-
|
|
18
|
-
## 3. Stabilize (before any feature)
|
|
19
|
-
- [ ] Tested with perturbations: empty / huge / null / concurrent / dependency-down / load spike.
|
|
20
|
-
- [ ] No unbounded growth, oscillation, or limit cycle?
|
|
21
|
-
- [ ] If unstable → fixed stability before adding anything.
|
|
22
|
-
|
|
23
|
-
## 4. Synthesize (minimal control action)
|
|
24
|
-
- [ ] Change is the smallest u that moves x to target. No speculative extras.
|
|
25
|
-
- [ ] Decoupled harmful coupling; kept beneficial coupling (coordination, not over-decoupling).
|
|
26
|
-
|
|
27
|
-
## 5. Close the loop (observe & correct)
|
|
28
|
-
- [ ] Ran the actual code; read the actual sensor output — did NOT assume u worked.
|
|
29
|
-
- [ ] Corrections are getting smaller, not larger.
|
|
30
|
-
- [ ] Reached target within stated bounds.
|
|
31
|
-
|
|
32
|
-
## 6. Compensate & clamp
|
|
33
|
-
- [ ] Measurable disturbances handled by feedforward where possible; feedback the rest.
|
|
34
|
-
- [ ] Control magnitude clamped (max retries/depth/rate). Graceful degradation at the bound.
|
|
35
|
-
|
|
36
|
-
## 7. Optimize (last)
|
|
37
|
-
- [ ] Only now tuning speed/cost/elegance. Stability and correctness already proven.
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
Anti-patterns (stop if you catch yourself):
|
|
41
|
-
- Adding retries without a bound → retry storm (unstable delay loop)
|
|
42
|
-
- Cranking gain on a delayed system → oscillation
|
|
43
|
-
- Optimizing before stabilizing → divergence on perturbation
|
|
44
|
-
- Guessing cause without reproduction → open-loop patch
|
|
1
|
+
# Debugging Checklist (closed-loop thinking mode)
|
|
2
|
+
|
|
3
|
+
This checklist is a **prompt scaffold for the LLM's internal loop** during debugging.
|
|
4
|
+
Work top to bottom; do not skip steps. If you find yourself on step 4 without a clear x
|
|
5
|
+
and u, return to step 1.
|
|
6
|
+
|
|
7
|
+
## 1. Identify (state & control)
|
|
8
|
+
- [ ] **Controlled variable x**: what must stay correct? Name it concretely, with a target/units.
|
|
9
|
+
- [ ] **Control variable u**: what lever will I actually change? (Not "rewrite"; the smallest editable thing.)
|
|
10
|
+
- [ ] **Observability**: do I have a sensor (log/test/metric) that reveals x? If not → add it first.
|
|
11
|
+
- [ ] **Bounds**: what are the limits on u and x? Size, rate, time, memory, retries, context.
|
|
12
|
+
|
|
13
|
+
## 2. Analyze (current behavior)
|
|
14
|
+
- [ ] Reproduced the fault deterministically? (Not "sometimes".)
|
|
15
|
+
- [ ] Measured the deviation ε = x* − x? Stated the mental model of the plant and where it breaks.
|
|
16
|
+
- [ ] Located the fault to a subsystem (not guessed).
|
|
17
|
+
|
|
18
|
+
## 3. Stabilize (before any feature)
|
|
19
|
+
- [ ] Tested with perturbations: empty / huge / null / concurrent / dependency-down / load spike.
|
|
20
|
+
- [ ] No unbounded growth, oscillation, or limit cycle?
|
|
21
|
+
- [ ] If unstable → fixed stability before adding anything.
|
|
22
|
+
|
|
23
|
+
## 4. Synthesize (minimal control action)
|
|
24
|
+
- [ ] Change is the smallest u that moves x to target. No speculative extras.
|
|
25
|
+
- [ ] Decoupled harmful coupling; kept beneficial coupling (coordination, not over-decoupling).
|
|
26
|
+
|
|
27
|
+
## 5. Close the loop (observe & correct)
|
|
28
|
+
- [ ] Ran the actual code; read the actual sensor output — did NOT assume u worked.
|
|
29
|
+
- [ ] Corrections are getting smaller, not larger.
|
|
30
|
+
- [ ] Reached target within stated bounds.
|
|
31
|
+
|
|
32
|
+
## 6. Compensate & clamp
|
|
33
|
+
- [ ] Measurable disturbances handled by feedforward where possible; feedback the rest.
|
|
34
|
+
- [ ] Control magnitude clamped (max retries/depth/rate). Graceful degradation at the bound.
|
|
35
|
+
|
|
36
|
+
## 7. Optimize (last)
|
|
37
|
+
- [ ] Only now tuning speed/cost/elegance. Stability and correctness already proven.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
Anti-patterns (stop if you catch yourself):
|
|
41
|
+
- Adding retries without a bound → retry storm (unstable delay loop)
|
|
42
|
+
- Cranking gain on a delayed system → oscillation
|
|
43
|
+
- Optimizing before stabilizing → divergence on perturbation
|
|
44
|
+
- Guessing cause without reproduction → open-loop patch
|