@hobin/developer 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.
Files changed (32) hide show
  1. package/README.md +33 -8
  2. package/SOURCES.md +104 -0
  3. package/extensions/developer.ts +67 -24
  4. package/extensions/references/behavior-preserving-structural-change.md +145 -0
  5. package/extensions/skills.ts +1 -16
  6. package/extensions/state.ts +9 -1
  7. package/package.json +26 -11
  8. package/skills/abstraction-review/SKILL.md +1 -1
  9. package/skills/abstraction-review/references/field-card.md +7 -0
  10. package/skills/abstraction-review/references/recipe-cards.md +67 -0
  11. package/skills/abstraction-review/references/repair-table.md +5 -0
  12. package/skills/model/SKILL.md +7 -2
  13. package/skills/model/references/problem-modeling.md +296 -225
  14. package/skills/model/references/worked-models-and-specialized-techniques.md +218 -0
  15. package/skills/naming-judgment/SKILL.md +6 -4
  16. package/skills/naming-judgment/references/domain-naming.md +202 -0
  17. package/skills/schedule/SKILL.md +10 -1
  18. package/skills/schedule/references/structural-change-timing.md +217 -0
  19. package/skills/signal/SKILL.md +10 -1
  20. package/skills/signal/references/structural-movement.md +202 -0
  21. package/skills/sketch/SKILL.md +38 -1
  22. package/skills/sketch/references/abstraction-barriers-and-closure.md +160 -0
  23. package/skills/sketch/references/abstraction-composition-and-state.md +184 -0
  24. package/skills/sketch/references/composition-generative-recursion-and-accumulators.md +196 -0
  25. package/skills/sketch/references/data-driven-design.md +177 -0
  26. package/skills/sketch/references/data-shape-template-catalog.md +241 -0
  27. package/skills/sketch/references/generic-operations-and-languages.md +134 -0
  28. package/skills/sketch/references/processes-state-and-time.md +171 -0
  29. package/skills/sketch/references/responsibility-and-variation.md +245 -0
  30. package/skills/verify/SKILL.md +10 -1
  31. package/skills/verify/references/verifier-selection-and-pass-but-wrong.md +227 -0
  32. package/skills/naming-judgment/references/elements-of-clojure-naming.md +0 -74
@@ -0,0 +1,227 @@
1
+ # Verifier Selection And Pass-But-Wrong Risk
2
+
3
+ Use this reference when a completion claim depends on several kinds of evidence,
4
+ a passing check may not exercise the claim, or structural correctness matters in
5
+ addition to visible behavior.
6
+
7
+ ## Contents
8
+
9
+ - Claim Before Check
10
+ - Evidence Map
11
+ - Verifier Ladder
12
+ - Execution Versus Relevance
13
+ - Pass-But-Wrong Search
14
+ - Test Design And Cost
15
+ - Structural Degradation
16
+ - Feedback Classification
17
+ - Residual Risk And Stop Checks
18
+ - Complete Evidence Example
19
+
20
+ ## Claim Before Check
21
+
22
+ State the claim before selecting a verifier. "Tests pass" is an observation;
23
+ "the conversion rejects every impossible schedule variant" is a claim.
24
+
25
+ Split broad completion statements into independently checkable claims:
26
+
27
+ - product behavior;
28
+ - forbidden and boundary cases;
29
+ - type or API contract;
30
+ - transition and history behavior;
31
+ - compatibility with the requested source or version;
32
+ - representation or abstraction boundary;
33
+ - operational property such as performance, ordering, or idempotency.
34
+
35
+ If a claim cannot be stated, return to specification or modeling rather than
36
+ choosing a convenient command.
37
+
38
+ ## Evidence Map
39
+
40
+ For each claim record:
41
+
42
+ ```text
43
+ Claim: the narrow statement under review
44
+ Verifier: command, inspection, fixture, or human acceptance
45
+ Observation: what actually happened
46
+ Relevance: why the observation bears on the claim
47
+ Counterexample coverage: meaningful wrong shapes exercised or omitted
48
+ Residual: uncertainty that remains
49
+ ```
50
+
51
+ Evidence may be direct, supporting, weak, contradicted, unavailable, or
52
+ human-owned. Do not merge unavailable evidence with passing evidence.
53
+
54
+ ## Verifier Ladder
55
+
56
+ Prefer the cheapest verifier that can actually falsify the claim:
57
+
58
+ | Verifier | Best fit |
59
+ | --- | --- |
60
+ | static inspection or focused diff | locality, wiring, ownership, stale code, representation boundary |
61
+ | typecheck, lint, build, manifest check | syntax, imports, compile-time contracts, packaging |
62
+ | focused example test | one concrete behavior or regression |
63
+ | table or parameterized test | finite meaningful cases and boundaries |
64
+ | property or metamorphic check | many examples share a stable rule |
65
+ | integration or UI check | composition, rendering, persistence, external boundaries |
66
+ | state-transition or concurrency fixture | history, ordering, retry, stale events, idempotency |
67
+ | performance or resource measurement | runtime shape is part of the claim |
68
+ | model, solver, or exhaustive check | small critical rule space justifies exhaustive reasoning |
69
+ | human acceptance | the remaining question is policy, meaning, or visual judgment |
70
+
71
+ Use a stronger verifier when a weaker one can pass under a plausible wrong
72
+ implementation. Use a weaker verifier when it is the only practical evidence,
73
+ but narrow the claim and record the residual.
74
+
75
+ ## Execution Versus Relevance
76
+
77
+ A verifier execution proves only that the verifier ran and produced an
78
+ observation. Check relevance separately:
79
+
80
+ - Did the fixture reach the changed branch?
81
+ - Did assertions inspect the product meaning or only absence of an exception?
82
+ - Did the build use the source and version requested by the user?
83
+ - Did a UI snapshot expose interaction and state changes or only initial pixels?
84
+ - Did a broad suite include the new boundary case?
85
+ - Did the manual inspection examine the actual generated artifact?
86
+
87
+ A green but irrelevant verifier creates a `verifier-gap`; it does not support
88
+ the broader claim.
89
+
90
+ ## Pass-But-Wrong Search
91
+
92
+ For every consequential claim, imagine at least one implementation that passes
93
+ current checks while violating the intended meaning. Look for:
94
+
95
+ - missing branches whose fixtures never occur;
96
+ - fallback/default behavior that silently selects product policy;
97
+ - assertions that accept both the intended and an unintended value;
98
+ - mocks that bypass the real boundary;
99
+ - tests coupled to the implementation rather than the contract;
100
+ - source/version mismatch;
101
+ - current-state checks that miss invalid transitions;
102
+ - correct result with wrong ordering, mutation, sharing, or complexity;
103
+ - public API compatibility tested without real consumers.
104
+
105
+ When a plausible shape remains cheap to test, add the smallest distinguishing
106
+ fixture. Otherwise record it as residual risk instead of broadening the claim.
107
+
108
+ ## Test Design And Cost
109
+
110
+ Tests are design evidence only when their boundary and maintenance cost remain
111
+ useful. Prefer tests that expose public responsibility and product meaning over
112
+ tests that echo private method structure.
113
+
114
+ Choose the unit by the claim:
115
+
116
+ - focused examples for stable responsibility and boundary cases;
117
+ - role or contract tests when several implementations must substitute;
118
+ - integration tests for collaborations, creation, persistence, and wiring;
119
+ - properties when many examples share a generatable rule;
120
+ - stateful fixtures when history, retry, order, or identity matters.
121
+
122
+ Do not require one test layer per class. Loose coupling may make a smaller unit
123
+ economical to test, while simple forwarding or framework glue may be better
124
+ covered by a larger behavior check. Fakes should remove irrelevant context while
125
+ preserving the collaborator role; mocks that restate call internals create an
126
+ echo chamber.
127
+
128
+ Delete or reorganize tests only when the remaining evidence still supports the
129
+ same claims. Redundancy is sometimes cheap insurance and sometimes obsolete
130
+ context that prevents a design from moving. State which claim each retained test
131
+ protects.
132
+
133
+ ## Structural Degradation
134
+
135
+ Behavior may pass while the change weakens the code's ability to preserve the
136
+ same guarantee. Inspect for:
137
+
138
+ - duplicated invariant or absence/default policy;
139
+ - representation details leaking through a caller contract;
140
+ - generic abstraction without stable examples or a nameable purpose;
141
+ - hidden state, history, ordering, or ownership;
142
+ - vocabulary drifting away from the accepted model;
143
+ - a local fix that makes the next accepted requirement harder or unsafe;
144
+ - tests passing only because they mirror the new implementation.
145
+
146
+ Structural degradation is evidence for structural observation or abstraction
147
+ review. It does not automatically require refactoring now.
148
+
149
+ ## Feedback Classification
150
+
151
+ Use a small, stable taxonomy:
152
+
153
+ - `pass`: the evidence supports the narrow claim;
154
+ - `implementation-fail`: relevant evidence contradicts the accepted claim;
155
+ - `model-or-spec-fail`: evidence shows the accepted meaning or case model is
156
+ wrong or incomplete;
157
+ - `verifier-gap`: the check is missing or irrelevant to the claim;
158
+ - `blocked-environment`: the required source or environment was not exercised;
159
+ - `pass-but-wrong-risk`: current evidence passes while a plausible wrong shape
160
+ remains;
161
+ - `structural-degradation`: behavior passes but structure weakens a relevant
162
+ boundary or guarantee.
163
+
164
+ Classification describes the observation. The caller decides whether to
165
+ repair, remodel, add evidence, ask a human, accept residual risk, or continue.
166
+
167
+ ## Residual Risk And Stop Checks
168
+
169
+ Verification is complete enough when:
170
+
171
+ - every stated claim is supported, narrowed, or explicitly unverified;
172
+ - each important forbidden or boundary case has evidence or a residual;
173
+ - actual source and version match the requested target;
174
+ - plausible pass-but-wrong shapes were attempted or recorded;
175
+ - structural claims have more than behavioral evidence when needed;
176
+ - human-owned acceptance is distinguished from mechanical checks;
177
+ - another verifier would cost more than the information it is expected to add.
178
+
179
+ Do not claim total correctness from a finite evidence set. State the strongest
180
+ claim justified now.
181
+
182
+ ## Complete Evidence Example
183
+
184
+ ```text
185
+ Claim: recurring schedules without an end date remain valid.
186
+ Verifier: focused table test with one-time, recurring-open, recurring-bounded,
187
+ and invalid-interval rows.
188
+ Observation: all rows produce the expected domain result.
189
+ Relevance: each semantic variant crosses the new conversion boundary.
190
+ Pass-but-wrong search: a mapper could still ignore timezone normalization.
191
+ Residual: timezone behavior remains unverified and is not included in the
192
+ supported claim.
193
+ ```
194
+
195
+ Now attempt a wrong implementation that always emits `recurring-open` whenever
196
+ `endDate` is absent. It passes the open-recurring row but also misclassifies a
197
+ one-time schedule whose UI omitted an optional display field. Add a one-time row
198
+ with the same absence shape but a different recurrence discriminator. This
199
+ fixture fails the plausible wrong rule while remaining at the public conversion
200
+ boundary.
201
+
202
+ Map the broader completion claim:
203
+
204
+ | Claim | Verifier | What it can still miss |
205
+ | --- | --- | --- |
206
+ | semantic variants convert correctly | focused table test | persisted legacy shapes not in the table |
207
+ | public type accepts intended callers | typecheck plus real caller build | runtime external input |
208
+ | legacy saved schedules remain readable | migration fixture through persistence adapter | unknown production corruption |
209
+ | UI shows the converted meaning | interaction test or manual run | timezone/environment variance |
210
+ | package contains the changed source | packed-tarball inspection and fresh install | registry propagation delay |
211
+
212
+ If only the first row is executed, report only the first claim. The correct
213
+ result is a narrower supported statement, not an unqualified “done.”
214
+
215
+ ## Source Trace
216
+
217
+ - Hillel Wayne, *Logic for Programmers*, version 0.14.0, May 4, 2026:
218
+ strong and weak tests, partial specifications, structural properties,
219
+ property-based testing, contracts, and proof limitations.
220
+ - Sandi Metz, Katrina Owen, and TJ Stankus, *99 Bottles of OOP*, Second
221
+ Edition, version 2.2.2, 2024: chapters 2 and 9 on cost-effective tests,
222
+ avoiding implementation echo, choosing units, unit versus integration tests,
223
+ context independence, fakes, role verification, and obsolete-test removal.
224
+ - Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram
225
+ Krishnamurthi, *How to Design Programs, Second Edition*, MIT Press, 2018:
226
+ representative examples and tests as successive constraints in a design
227
+ recipe.
@@ -1,74 +0,0 @@
1
- # Elements Of Clojure Naming Notes
2
-
3
- These notes adapt naming ideas from Zachary Tellman's *Elements of Clojure*
4
- (2019), especially the `Names` chapter and the beginning of `Indirection`. Use
5
- them as judgment prompts, not hard rules.
6
-
7
- ## Core Observations
8
-
9
- - Names are a common form of indirection. A name lets a reader stop at what the
10
- code means without reading how it works.
11
- - A name has a textual sign, a current referent, and a sense. In software, the
12
- sense matters most because the referent can change while callers keep relying
13
- on the same idea.
14
- - Narrow does not mean maximally specific. A too-general name hides necessary
15
- properties; a too-specific name exposes implementation details that should be
16
- free to change.
17
- - Consistency is contextual. A name is understood through local code, domain
18
- language, ecosystem conventions, documentation, and conversation.
19
- - Natural names help readers reason by analogy but carry multiple senses.
20
- Synthetic names can be precise for experts but create a cliff for new readers.
21
- - A name can be valid in one audience or namespace and misleading in another.
22
- Reusing a natural word across different product contexts requires active
23
- boundary management.
24
-
25
- ## Data Names
26
-
27
- - Data names should communicate the invariant or role readers can rely on, not
28
- every structural detail.
29
- - A function parameter only controls the sign; the caller controls the value. If
30
- the name assumes an invariant, enforce it at the boundary where outside data
31
- enters.
32
- - A local binding name should let the reader skip the right-hand expression. If
33
- the name does not improve skimming, prefer direct composition or keep the
34
- expression inline.
35
- - Avoid naming every intermediate value. Introduce a name when it adds a stable
36
- concept or removes real cognitive load.
37
- - Collection and map shape can help when it distinguishes real cases. Prefer
38
- local project conventions over imported notation.
39
-
40
- ## Function Names
41
-
42
- - Functions pull data into scope, transform data already in scope, push data into
43
- another scope, or combine those actions.
44
- - A function that crosses a data-scope boundary should usually have a verb.
45
- - A pure transform can often be named by its result, property, or conversion
46
- rather than a generic verb.
47
- - A function that both pushes and returns data should make the combined behavior
48
- explicit or be split.
49
- - Namespace/module context can narrow function names. If every function operates
50
- on the same domain object or data scope, the repeated noun can often move to
51
- the module boundary.
52
-
53
- ## Indirection And Modules
54
-
55
- - Indirection separates what from how and gives permission not to inspect deeper
56
- layers.
57
- - A software module can be viewed as model, interface, and environment. Names
58
- live on the interface side: they describe what the model is and what it is
59
- expected to become.
60
- - An abstraction is useful only in an environment. A name that is internally tidy
61
- but wrong for the product context is not a good name.
62
- - Every model omits facets of the environment; the omissions become assumptions.
63
- Names should not quietly turn fragile assumptions into permanent facts.
64
-
65
- ## Practical Review Prompts
66
-
67
- - What does this name let a reader safely ignore?
68
- - Which property must remain true if the implementation changes?
69
- - Is the name too close to the current implementation, storage, UI widget, or
70
- library?
71
- - Is the name too broad to exclude invalid uses?
72
- - Is a natural word carrying different senses in different parts of the system?
73
- - Would a shorter name become clear if this code moved into a better module?
74
- - Is the name hiding a side effect, external boundary, or mutation?