@anselmdk/feature-spec-md 0.5.0 → 0.6.0

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 (65) hide show
  1. package/README.md +59 -78
  2. package/SPEC_FORMAT.md +38 -78
  3. package/dist/cli.js +194 -86
  4. package/dist/cli.js.map +1 -1
  5. package/dist/featureSpecs.d.ts +1 -1
  6. package/dist/featureSpecs.d.ts.map +1 -1
  7. package/dist/featureSpecs.js +57 -10
  8. package/dist/featureSpecs.js.map +1 -1
  9. package/dist/githubActionDiffReport.d.ts +61 -0
  10. package/dist/githubActionDiffReport.d.ts.map +1 -1
  11. package/dist/githubActionDiffReport.js +343 -119
  12. package/dist/githubActionDiffReport.js.map +1 -1
  13. package/dist/index.d.ts +8 -2
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +4 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/mockReports.d.ts +36 -0
  18. package/dist/mockReports.d.ts.map +1 -0
  19. package/dist/mockReports.js +250 -0
  20. package/dist/mockReports.js.map +1 -0
  21. package/dist/mocks/current/app/supportDesk.d.ts +12 -0
  22. package/dist/mocks/current/app/supportDesk.d.ts.map +1 -0
  23. package/dist/mocks/current/app/supportDesk.js +19 -0
  24. package/dist/mocks/current/app/supportDesk.js.map +1 -0
  25. package/dist/mocks/current/tests/supportDesk.spec.d.ts +3 -0
  26. package/dist/mocks/current/tests/supportDesk.spec.d.ts.map +1 -0
  27. package/dist/mocks/current/tests/supportDesk.spec.js +15 -0
  28. package/dist/mocks/current/tests/supportDesk.spec.js.map +1 -0
  29. package/dist/mocks/previous/app/supportDesk.d.ts +10 -0
  30. package/dist/mocks/previous/app/supportDesk.d.ts.map +1 -0
  31. package/dist/mocks/previous/app/supportDesk.js +9 -0
  32. package/dist/mocks/previous/app/supportDesk.js.map +1 -0
  33. package/dist/mocks/previous/tests/supportDesk.spec.d.ts +3 -0
  34. package/dist/mocks/previous/tests/supportDesk.spec.d.ts.map +1 -0
  35. package/dist/mocks/previous/tests/supportDesk.spec.js +15 -0
  36. package/dist/mocks/previous/tests/supportDesk.spec.js.map +1 -0
  37. package/dist/reportMetadata.d.ts +9 -0
  38. package/dist/reportMetadata.d.ts.map +1 -0
  39. package/dist/reportMetadata.js +28 -0
  40. package/dist/reportMetadata.js.map +1 -0
  41. package/dist/screenshots.d.ts +3 -1
  42. package/dist/screenshots.d.ts.map +1 -1
  43. package/dist/screenshots.js +23 -0
  44. package/dist/screenshots.js.map +1 -1
  45. package/dist/types.d.ts +11 -1
  46. package/dist/types.d.ts.map +1 -1
  47. package/docs/evidence-policy.md +63 -0
  48. package/docs/report-development.md +102 -0
  49. package/docs/spec-driven-flow.md +67 -8
  50. package/package.json +3 -1
  51. package/src/mocks/current/app/supportDesk.ts +27 -0
  52. package/src/mocks/current/screenshots/SUPPORT-INBOX-S001-line-27-current.svg +10 -0
  53. package/src/mocks/current/screenshots/SUPPORT-REPLY-S001-line-27-current.svg +10 -0
  54. package/src/mocks/current/screenshots/screenshots.json +18 -0
  55. package/src/mocks/current/specs/support-desk.model.md +29 -0
  56. package/src/mocks/current/specs/ticket-inbox.feature.md +27 -0
  57. package/src/mocks/current/specs/ticket-reply.feature.md +33 -0
  58. package/src/mocks/current/tests/supportDesk.spec.ts +17 -0
  59. package/src/mocks/previous/app/supportDesk.ts +17 -0
  60. package/src/mocks/previous/screenshots/SUPPORT-INBOX-S001-line-27-previous.svg +10 -0
  61. package/src/mocks/previous/screenshots/screenshots.json +11 -0
  62. package/src/mocks/previous/specs/support-desk.model.md +29 -0
  63. package/src/mocks/previous/specs/ticket-inbox.feature.md +26 -0
  64. package/src/mocks/previous/specs/ticket-reply.feature.md +26 -0
  65. package/src/mocks/previous/tests/supportDesk.spec.ts +17 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "screenshots": [
3
+ {
4
+ "specPath": "src/mocks/previous/specs/ticket-inbox.feature.md",
5
+ "line": 27,
6
+ "path": "screenshots/SUPPORT-INBOX-S001-line-27-previous.svg",
7
+ "title": "Inbox before priority badges",
8
+ "testPath": "src/mocks/previous/tests/supportDesk.spec.ts"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,29 @@
1
+ ---
2
+ id: SUPPORT
3
+ title: Support desk
4
+ status: active
5
+ ---
6
+
7
+ # Support desk
8
+
9
+ ## Purpose
10
+
11
+ Define the shared vocabulary for a small customer support workflow.
12
+
13
+ ## Model
14
+
15
+ ### SUPPORT-M001: Ticket
16
+
17
+ A customer request that needs a response from an agent.
18
+
19
+ ### SUPPORT-M002: Agent
20
+
21
+ A team member who reviews tickets and sends replies.
22
+
23
+ ### SUPPORT-M003: Priority
24
+
25
+ An internal urgency label.
26
+
27
+ ## Rules
28
+
29
+ - SUPPORT-M-R001: Tickets MUST keep a stable public reference.
@@ -0,0 +1,26 @@
1
+ ---
2
+ id: SUPPORT-INBOX
3
+ title: Ticket inbox
4
+ status: active
5
+ model: SUPPORT
6
+ test: playwright
7
+ screenshots: optional
8
+ ---
9
+
10
+ # Ticket inbox
11
+
12
+ ## Purpose
13
+
14
+ Let agents find the next ticket to work on without losing context.
15
+
16
+ ## Rules
17
+
18
+ - SUPPORT-INBOX-R001: The inbox MUST show open tickets first.
19
+
20
+ ## Scenarios
21
+
22
+ ### SUPPORT-INBOX-S001: Agent reviews the queue
23
+
24
+ Given an agent has open tickets
25
+ When they open the inbox
26
+ Then open tickets are listed by age
@@ -0,0 +1,26 @@
1
+ ---
2
+ id: SUPPORT-REPLY
3
+ title: Ticket replies
4
+ status: draft
5
+ model: SUPPORT
6
+ test: playwright
7
+ screenshots: optional
8
+ ---
9
+
10
+ # Ticket replies
11
+
12
+ ## Purpose
13
+
14
+ Help agents answer a customer without leaving the ticket.
15
+
16
+ ## Rules
17
+
18
+ - SUPPORT-REPLY-R001: The reply composer MUST preserve unsent text.
19
+
20
+ ## Scenarios
21
+
22
+ ### SUPPORT-REPLY-S001: Agent drafts a reply
23
+
24
+ Given an agent has selected a ticket
25
+ When they write a reply
26
+ Then the draft remains visible
@@ -0,0 +1,17 @@
1
+ import { draftReply, visibleTickets } from "../app/supportDesk.js";
2
+
3
+ const tickets = [
4
+ { id: "T-2", title: "Newer", status: "open" as const, priority: "high" as const, createdAt: "2026-01-02T10:00:00Z" },
5
+ { id: "T-1", title: "Older", status: "open" as const, priority: "normal" as const, createdAt: "2026-01-01T10:00:00Z" },
6
+ ];
7
+
8
+ export function verifiesTicketInboxMock() {
9
+ // Covers SUPPORT-M001, SUPPORT-M002, SUPPORT-M003 and SUPPORT-M-R001.
10
+ // Covers SUPPORT-INBOX-R001 and SUPPORT-INBOX-S001.
11
+ return visibleTickets(tickets);
12
+ }
13
+
14
+ export function verifiesReplyDraftMock() {
15
+ // Covers SUPPORT-REPLY-R001 and SUPPORT-REPLY-S001.
16
+ return draftReply("Existing draft", "Updated draft");
17
+ }