eagle-mem 4.9.7 → 4.9.9

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,123 @@
1
+ ---
2
+ name: eagle-mem-feature
3
+ description: >
4
+ Manage Eagle Mem feature verification and anti-regression guardrails. Use when:
5
+ 'feature pending', 'verify feature', 'waive feature', 'feature verification',
6
+ 'pending verifications', 'release blocked', 'feature guard', 'smoke test',
7
+ 'what needs verification', 'mark feature verified', 'skip verification'.
8
+ Uses the eagle-mem CLI.
9
+ ---
10
+
11
+ # Eagle Mem — Feature Verification
12
+
13
+ ## Purpose
14
+
15
+ **For the user:** Every tracked feature has files, dependencies, and smoke tests. When you edit a tracked file, Eagle Mem automatically flags the feature as needing re-verification. Release-boundary commands stay blocked until all pending verifications are resolved. This prevents shipping regressions.
16
+
17
+ **For you:** The pending verification list tells you what's at risk after your edits. Resolve each one: run smoke tests and `verify`, or explain why it's safe and `waive`. Don't leave pending items unresolved — they block the user's workflow.
18
+
19
+ ## Core Concepts
20
+
21
+ ### Verify vs Waive
22
+
23
+ These are semantically different operations:
24
+
25
+ **Verify** = "I tested this exact change and it works." Fingerprint-specific — tied to the current diff hash. If the file changes again, a new pending verification appears.
26
+
27
+ **Waive** = "I accept changes to this feature+file pair." Fingerprint-agnostic — covers the current change AND all future changes to that file for that feature. Use when the change is known-safe (e.g., comment-only edit, unrelated code path).
28
+
29
+ **Decision rule:** Did you run the smoke test or manually confirm behavior? Use `verify`. Is the change structurally irrelevant to the feature? Use `waive`.
30
+
31
+ ### Pending Verifications
32
+
33
+ When you Edit/Write a file tracked by a feature, PostToolUse automatically creates a pending verification record. Each record is keyed by (project, feature, file, fingerprint). The `pending` list shows what needs attention before release.
34
+
35
+ ### Release Boundary
36
+
37
+ Release-boundary commands (publish, deploy) check for unresolved pending verifications. If any exist, the command is blocked with a list of what's pending. This is the enforcement mechanism — it only gates release, not development.
38
+
39
+ ## Steps
40
+
41
+ ### 1. Check what's pending
42
+
43
+ ```bash
44
+ eagle-mem feature pending # current project
45
+ eagle-mem feature pending --raw # include trigger, fingerprint, timestamp
46
+ eagle-mem feature pending --limit 100 # show more than default 50
47
+ ```
48
+
49
+ Each entry shows: feature name, file path, reason, and smoke test command (if registered).
50
+
51
+ ### 2. Resolve by verifying
52
+
53
+ After running smoke tests or confirming the feature works:
54
+
55
+ ```bash
56
+ eagle-mem feature verify <feature-name> --notes "smoke tests pass, tested login flow"
57
+ ```
58
+
59
+ This marks ALL pending verifications for that feature as verified (for the current fingerprints) and updates the feature's `last_verified_at` timestamp.
60
+
61
+ ### 3. Resolve by waiving
62
+
63
+ When a change is known-safe without testing — waive by feature name:
64
+
65
+ ```bash
66
+ eagle-mem feature waive <feature-name> --reason "comment-only change, no behavior impact"
67
+ ```
68
+
69
+ Or waive a single pending record by ID:
70
+
71
+ ```bash
72
+ eagle-mem feature waive <id> --reason "unrelated code path"
73
+ ```
74
+
75
+ **Prefer waive-by-name** over waive-by-ID. IDs are ephemeral (new edits create new IDs), but names are stable. Waiving by name resolves all pending records for that feature at once.
76
+
77
+ A reason is always required — it's the audit trail for why verification was skipped.
78
+
79
+ ### 4. Register a new feature
80
+
81
+ ```bash
82
+ eagle-mem feature add auth-flow \
83
+ --desc "User authentication and session management" \
84
+ --file src/auth/login.ts \
85
+ --file src/auth/session.ts \
86
+ --smoke "npm test -- --grep auth" \
87
+ --requires env_var:AUTH_SECRET
88
+ ```
89
+
90
+ ### 5. List and inspect features
91
+
92
+ ```bash
93
+ eagle-mem feature list # all active features
94
+ eagle-mem feature show <name> # files, deps, smoke tests, last verified
95
+ ```
96
+
97
+ ## Judgment
98
+
99
+ **Always verify when:**
100
+ - You edited core logic in a tracked file
101
+ - The smoke test exists and is quick to run
102
+ - Multiple features depend on the changed file
103
+
104
+ **Waive when:**
105
+ - The edit is cosmetic (formatting, comments, imports)
106
+ - The changed code path is unrelated to the feature's functionality
107
+ - The feature's smoke test would test something you already tested another way
108
+
109
+ **Don't ignore pending verifications.** If you see them in the recall block, address them before your session ends. The user will be blocked on release otherwise.
110
+
111
+ ## Reference
112
+
113
+ | Command | What it does |
114
+ |---|---|
115
+ | `feature list` | All active features with file/dep/test counts |
116
+ | `feature show <name>` | Full detail: files, dependencies, smoke tests |
117
+ | `feature pending` | All unresolved pending verifications |
118
+ | `feature verify <name>` | Mark feature verified (fingerprint-specific) |
119
+ | `feature waive <name\|id>` | Waive verification (fingerprint-agnostic for name) |
120
+ | `feature add <name>` | Register a new feature with files/deps/tests |
121
+ | `--notes "text"` | Attach notes to verify/waive (audit trail) |
122
+ | `--reason "text"` | Required for waive — explains why safe |
123
+ | `--raw` | Show trigger, fingerprint, and timestamp in pending |