Skip to content

Commit 1a33a68

Browse files
jobordujoborduclaude
authored
feat: improve nForma reporting for feature usefulness and bugs caught (#67)
* docs(quick-380): create plan for feature usefulness reporting * feat(quick-380): add feature telemetry event schema with validation and tests - Define FEATURE_IDS, FEATURE_ACTIONS, FEATURE_OUTCOMES enumerations - Implement validateFeatureEvent with comprehensive field validation - Implement createFeatureEvent convenience constructor with defaults - Add 24 unit tests covering all positive and negative validation cases - Register feature-events path type in planning-paths.cjs * feat(quick-380): add feature report generator with metrics, bug linkage, and insights - Implement generateReport with per-feature metrics aggregation - Add bug linkage connecting features to detected/prevented bugs - Generate narrative insights based on data patterns (failures, bugs, unused) - Support CLI with --json, --since, --project-root flags - 11 tests including end-to-end pilot with realistic event simulation * feat(quick-380): wire feature report into observe pipeline as Category 17 - Add Category 17 to observe-handler-internal.cjs - Surface high failure rate features as medium-severity issues - Surface detected bugs as info-level issues - Surface narrative insights as summary issue - Follow existing fail-open spawn-with-timeout pattern * docs(quick-380): Improve nForma reporting for feature usefulness and bugs caught * docs(quick-380): update verification status * chore(quick-380): sync formal models and add scope contract Update formal model versions and timestamps after feature report implementation. Add scope contract for quick-380 task tracking. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: jobordu <jonathan@jonathanborduas.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6767d13 commit 1a33a68

20 files changed

Lines changed: 1787 additions & 19 deletions

.planning/STATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ See: .planning/PROJECT.md
1717
| 374 | Make API slots backup-only | 2026-04-04 | 99b79b4f | Verified | [374-make-api-slots-backup-only-dispatch-to-a](./quick/374-make-api-slots-backup-only-dispatch-to-a/) |
1818
| 379 | Issue #46: Add formal model staleness detection via content hashing | 2026-04-05 | 7ae0fe01 | Needs Review | [379-issue-46-add-formal-model-staleness-dete](./quick/379-issue-46-add-formal-model-staleness-dete/) |
1919
| 375 | issue-47-agents-skip-formal-modeling | 2026-04-05 | d174cae7 | Verified | [375-issue-47-agents-skip-formal-modeling](./quick/375-issue-47-agents-skip-formal-modeling/) |
20+
| 380 | Improve nForma reporting for feature usefulness and bugs caught | 2026-04-07 | 0e3bb9ee | Verified | [380-improve-nforma-reporting-for-feature-use](./quick/380-improve-nforma-reporting-for-feature-use/) |
2021

2122
## Session Log
2223

2324
- 2026-04-05 - Completed quick task 375: issue-47-agents-skip-formal-modeling
2425
- 2026-04-04: Completed quick task 374 - Make API slots backup-only
2526
- 2026-04-04: STATE.md regenerated by /gsd:health --repair
2627
- 2026-04-05: Completed quick task 379 - Issue #46: Add formal model staleness detection via content hashing
28+
- 2026-04-07: Completed quick task 380 - Improve nForma reporting for feature usefulness and bugs caught

.planning/formal/alloy/quorum-votes.als

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- GENERATED — do not edit by hand.
33
-- Source of truth: src/machines/nf-workflow.machine.ts
44
-- Regenerate: node bin/generate-formal-specs.cjs
5-
-- Generated: 2026-04-06
5+
-- Generated: 2026-04-07
66

77
-- nForma Quorum Vote-Counting Model (Alloy 6)
88
-- Requirements: ALY-01

.planning/formal/model-registry.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": "1.0",
3-
"last_sync": "2026-04-06T10:48:40.157Z",
3+
"last_sync": "2026-04-07T09:10:18.813Z",
44
"models": {
55
".planning/formal/alloy/account-pool-structure.als": {
66
"version": 1,
@@ -1335,8 +1335,8 @@
13351335
"consecutive_pass_count": 780
13361336
},
13371337
".planning/formal/alloy/quorum-votes.als": {
1338-
"version": 2560,
1339-
"last_updated": "2026-04-06T10:48:40.027Z",
1338+
"version": 2628,
1339+
"last_updated": "2026-04-07T09:10:18.282Z",
13401340
"update_source": "generate",
13411341
"source_id": "generate:formal-specs",
13421342
"session_id": null,
@@ -2308,8 +2308,8 @@
23082308
"consecutive_pass_count": 780
23092309
},
23102310
".planning/formal/prism/quorum.pm": {
2311-
"version": 2560,
2312-
"last_updated": "2026-04-06T10:48:40.029Z",
2311+
"version": 2628,
2312+
"last_updated": "2026-04-07T09:10:18.285Z",
23132313
"update_source": "generate",
23142314
"source_id": "generate:formal-specs",
23152315
"session_id": null,
@@ -2571,16 +2571,16 @@
25712571
"consecutive_pass_count": 780
25722572
},
25732573
".planning/formal/tla/NFQuorum.tla": {
2574-
"version": 2560,
2575-
"last_updated": "2026-04-06T10:48:40.025Z",
2574+
"version": 2628,
2575+
"last_updated": "2026-04-07T09:10:18.278Z",
25762576
"update_source": "generate",
25772577
"source_id": "generate:formal-specs",
25782578
"session_id": null,
25792579
"description": ""
25802580
},
25812581
".planning/formal/tla/NFQuorum_xstate.tla": {
2582-
"version": 1776,
2583-
"last_updated": "2026-04-06T10:48:40.157Z",
2582+
"version": 1844,
2583+
"last_updated": "2026-04-07T09:10:18.813Z",
25842584
"update_source": "generate",
25852585
"source_id": "generate:formal-specs",
25862586
"session_id": null,

.planning/formal/prism/quorum.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// GENERATED — do not edit by hand.
33
// Source of truth: src/machines/nf-workflow.machine.ts
44
// Regenerate: node bin/generate-formal-specs.cjs
5-
// Generated: 2026-04-06
5+
// Generated: 2026-04-07
66

77
// nForma Quorum Convergence — DTMC Model
88
// Requirements: PRM-01

.planning/formal/prism/quorum.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// GENERATED — do not edit by hand.
33
// Source of truth: src/machines/nf-workflow.machine.ts
44
// Regenerate: node bin/generate-formal-specs.cjs
5-
// Generated: 2026-04-06
5+
// Generated: 2026-04-07
66
//
77
// Run all properties:
88
// $PRISM_BIN .planning/formal/prism/quorum.pm .planning/formal/prism/quorum.props

.planning/formal/tla/MCNFQuorum.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\* .planning/formal/tla/MCNFQuorum.cfg
22
\* GENERATED by bin/fsm-to-tla.cjs
33
\* Regenerate: node bin/fsm-to-tla.cjs src/machines/nf-workflow.machine.ts --module=NFQuorum
4-
\* Generated: 2026-04-06
4+
\* Generated: 2026-04-07
55

66
CONSTANT MaxBound = 4
77

.planning/formal/tla/MCliveness.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
\* GENERATED — do not edit by hand.
33
\* Source of truth: src/machines/nf-workflow.machine.ts
44
\* Regenerate: node bin/generate-formal-specs.cjs
5-
\* Generated: 2026-04-06
5+
\* Generated: 2026-04-07
66
\*
77
\* TLC liveness model: N=3 agents, no symmetry (incompatible with liveness).
88
\* Run: node bin/run-tlc.cjs MCliveness

.planning/formal/tla/MCsafety.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
\* GENERATED — do not edit by hand.
33
\* Source of truth: src/machines/nf-workflow.machine.ts
44
\* Regenerate: node bin/generate-formal-specs.cjs
5-
\* Generated: 2026-04-06
5+
\* Generated: 2026-04-07
66
\*
77
\* TLC safety model: N=5 agents, symmetry reduction, no liveness.
88
\* Run: node bin/run-tlc.cjs MCsafety

.planning/formal/tla/NFQuorum.tla

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* GENERATED — do not edit by hand.
55
* Source of truth: src/machines/nf-workflow.machine.ts
66
* Regenerate: node bin/generate-formal-specs.cjs
7-
* Generated: 2026-04-06
7+
* Generated: 2026-04-07
88
99
* Models the quorum workflow defined in src/machines/nf-workflow.machine.ts.
1010
* Guard translations (from GUARD_REGISTRY in bin/generate-formal-specs.cjs):

.planning/formal/tla/NFQuorum_xstate.tla

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* GENERATED by bin/fsm-to-tla.cjs
55
* Source: src/machines/nf-workflow.machine.ts
66
* Regenerate: node bin/fsm-to-tla.cjs src/machines/nf-workflow.machine.ts --module=NFQuorum
7-
* Generated: 2026-04-06
7+
* Generated: 2026-04-07
88
*
99
* Machine id: nf-workflow
1010
* Framework: xstate-v5

0 commit comments

Comments
 (0)