@hopla/claude-setup 1.3.2 → 1.3.3
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.
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Guide: Data Audit and Value Semantics
|
|
2
|
+
|
|
3
|
+
Use this guide when a feature reads from, calculates with, or references existing data or code patterns. Applies during planning (full audit) and execution (verification of documented findings).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Data Model Audit
|
|
8
|
+
|
|
9
|
+
When a feature reads from existing tables or APIs, audit ALL field variants — not just the happy path:
|
|
10
|
+
|
|
11
|
+
- **Nullability:** Can values be null? What does null mean in context? (e.g., null might indicate a formula, a default, or a computed value — not simply "empty")
|
|
12
|
+
- **Multiple representations:** Are there alternative forms of the same concept? (e.g., direct value vs expression vs derived value)
|
|
13
|
+
- **Resolution chain:** What is the complete lookup chain? (e.g., primary source → fallback → default)
|
|
14
|
+
|
|
15
|
+
Document every variant found: what each means and when it occurs.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 2. Value Semantics Verification
|
|
20
|
+
|
|
21
|
+
When a feature involves calculations with stored amounts, **do not assume** — verify by reading the display/formatter code in existing modules that already consume this data.
|
|
22
|
+
|
|
23
|
+
Check:
|
|
24
|
+
- Are values signed or unsigned?
|
|
25
|
+
- Are they absolute amounts, deltas, or percentages?
|
|
26
|
+
- What is the sign convention? A field named "amount" could be positive-means-add **or** positive-means-subtract depending on domain convention.
|
|
27
|
+
|
|
28
|
+
**How to verify:** Find a module that already displays or formats these values. Read it completely. Use it as ground truth for the formula.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 3. Working Reference Pattern
|
|
33
|
+
|
|
34
|
+
When using a framework-specific pattern (custom editors, middleware, event handlers, streaming, etc.):
|
|
35
|
+
|
|
36
|
+
- Do not list a file as "reference" without reading it
|
|
37
|
+
- Find a **proven working implementation** of the EXACT pattern needed
|
|
38
|
+
- Read it completely and extract: API calls, prop types, data flow, lifecycle assumptions
|
|
39
|
+
- Document this extracted pattern in the plan's task details — not as a vague "Pattern: see file X"
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 4. Derived Value Propagation
|
|
44
|
+
|
|
45
|
+
If any value is calculated from other fields, specify:
|
|
46
|
+
- The exact formula including how stored values are interpreted (sign, units, semantics)
|
|
47
|
+
- How derived values propagate when inputs change (event system, reactivity, polling, etc.)
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Responsibilities by Role
|
|
52
|
+
|
|
53
|
+
| Role | Responsibility |
|
|
54
|
+
|------|---------------|
|
|
55
|
+
| **Planner** | Runs the full audit. Documents all findings in the plan's **Context References** and **Gotchas** fields. |
|
|
56
|
+
| **Executor** | Verifies that the planner's findings still hold — confirms files exist, patterns match, fields haven't changed. Does NOT re-audit from scratch. |
|
|
57
|
+
|
|
58
|
+
If the executor finds a discrepancy between the plan's documented findings and reality, they stop and file a Blocker Report (see `hopla-execute.md`).
|
|
@@ -15,6 +15,31 @@ Read in this order:
|
|
|
15
15
|
|
|
16
16
|
Do not start implementing until you have read everything above.
|
|
17
17
|
|
|
18
|
+
### Verification Checkpoints (before writing code)
|
|
19
|
+
|
|
20
|
+
Verify that the plan's documented assumptions still hold. **You are not re-auditing from scratch** — the planner already did the full audit and documented findings in Context References and Gotchas. Your job is to confirm each finding is still accurate:
|
|
21
|
+
|
|
22
|
+
- **Data models:** Read the referenced API route or schema. Confirm the field variants the planner documented (null cases, alternative representations, resolution chain) still match the actual code.
|
|
23
|
+
- **Value semantics:** If the plan documents a formula, confirm the sign/unit convention still matches the actual display/formatter code.
|
|
24
|
+
- **Reference patterns:** Read each Pattern file completely. Confirm the specific API calls, types, and data flow still match what the plan describes.
|
|
25
|
+
|
|
26
|
+
See `.agents/guides/data-audit.md` for detailed criteria on what to check.
|
|
27
|
+
|
|
28
|
+
If a discrepancy is found, stop immediately and file a Blocker Report below. You may continue with tasks that are not blocked by the discrepancy.
|
|
29
|
+
|
|
30
|
+
#### Blocker Report
|
|
31
|
+
|
|
32
|
+
Use when a plan assumption does not match reality:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
## Blocker Report
|
|
36
|
+
|
|
37
|
+
- **Blocked task:** [Task number and name]
|
|
38
|
+
- **Failed assumption:** [What the plan said]
|
|
39
|
+
- **Actual state:** [What you found — include a code snippet or data example]
|
|
40
|
+
- **Recommendation:** [Replan X | Fix Y | Proceed with caution because Z]
|
|
41
|
+
```
|
|
42
|
+
|
|
18
43
|
## Step 2: Verify Git Branch
|
|
19
44
|
|
|
20
45
|
```bash
|
|
@@ -54,11 +79,12 @@ Work through each task in the plan sequentially. For each task:
|
|
|
54
79
|
5. **Report completion** with a brief status: what was done, what was skipped, any decision made
|
|
55
80
|
6. **Do not proceed** to the next task if the current one fails validation
|
|
56
81
|
|
|
57
|
-
**
|
|
58
|
-
|
|
59
|
-
|
|
82
|
+
**Git strategy:** Do not commit after individual tasks. Keep all changes staged but uncommitted until the full plan passes validation (Step 5). This allows a clean revert if later tasks fail.
|
|
83
|
+
|
|
84
|
+
**Pause and report if, during implementation:**
|
|
60
85
|
- A task is ambiguous or has multiple valid implementations
|
|
61
86
|
- Something unexpected is discovered that could affect subsequent tasks
|
|
87
|
+
- The plan's structure or ordering doesn't match conventions used elsewhere in the project
|
|
62
88
|
|
|
63
89
|
Do not improvise silently. When in doubt, stop and ask.
|
|
64
90
|
|
|
@@ -46,6 +46,12 @@ Use the Grep tool to find relevant files (pattern: relevant keyword, case-insens
|
|
|
46
46
|
|
|
47
47
|
Read the key files in their entirety — not just the parts that seem relevant.
|
|
48
48
|
|
|
49
|
+
### Data audit (required for features that consume existing data)
|
|
50
|
+
|
|
51
|
+
Follow the full checklist in `.agents/guides/data-audit.md`.
|
|
52
|
+
|
|
53
|
+
**Your responsibility as planner:** Run the complete audit and document ALL findings in the plan's **Context References** and **Gotchas** fields. The executing agent must be able to verify your findings without re-auditing — they should only confirm that what you documented still holds.
|
|
54
|
+
|
|
49
55
|
## Phase 4: Design the Approach
|
|
50
56
|
|
|
51
57
|
Based on research, define:
|
|
@@ -54,6 +60,7 @@ Based on research, define:
|
|
|
54
60
|
- What the data flow looks like end-to-end
|
|
55
61
|
- Any risks, edge cases, or gotchas to flag
|
|
56
62
|
- What tests are needed
|
|
63
|
+
- **Derived/computed values:** If any value is calculated from other fields, specify the exact formula including how stored values are interpreted (sign, units, semantics), AND how derived values propagate when inputs change (event system, reactivity, polling, etc.)
|
|
57
64
|
|
|
58
65
|
## Phase 5: Generate the Plan
|
|
59
66
|
|
|
@@ -127,6 +134,8 @@ Before saving the draft, review the plan against these criteria:
|
|
|
127
134
|
- [ ] Validation Checklist has **exact commands** from `CLAUDE.md` or `package.json` (not vague "run lint")
|
|
128
135
|
- [ ] The plan is complete enough that another agent can execute it without this conversation
|
|
129
136
|
- [ ] No ambiguous requirements left unresolved
|
|
137
|
+
- [ ] **Data audit complete:** All data sources audited per `.agents/guides/data-audit.md`, with all findings (null cases, value semantics, derived value propagation) documented in Context References and Gotchas
|
|
138
|
+
- [ ] **Working references specified:** Every framework-specific pattern references a proven working implementation with extracted API calls, prop types, and data flow — not just "see file X"
|
|
130
139
|
|
|
131
140
|
## Phase 7: Save Draft and Enter Review Loop
|
|
132
141
|
|