| 1 | id: STK-REQ-004 |
| 2 | version: 1 |
| 3 | status: review |
| 4 | priority: shall |
| 5 | category: functional |
| 6 | req_type: guarantee |
| 7 | fretish: "" |
| 8 | description: Library users shall traverse arrays and objects and extract multiple key paths from one payload without manually walking the JSON structure. |
| 9 | formalization_strategy: informal |
| 10 | informal_verification: |
| 11 | method: "" |
| 12 | evidence: "" |
| 13 | verified: false |
| 14 | component: parser |
| 15 | rationale: The traversal helpers and EachKey are part of the library's value proposition for dynamic JSON inspection without struct predeclaration or hand-written walkers. |
| 16 | tags: |
| 17 | - traversal |
| 18 | - decomposition |
| 19 | variables: [] |
| 20 | traces: |
| 21 | documented_by_extra: |
| 22 | - README.md |
| 23 | reviewed_at: "2026-04-27T06:25:19.202291Z" |
| 24 | reviewed_by: human:leonidbugaev |
| 25 | verification: |
| 26 | assurance_level: E |
| 27 | formalization_status: none |
| 28 | review: |
| 29 | status: approved |
| 30 | reviewer: human:leonidbugaev |
| 31 | reviewed_at: "2026-04-23T00:00:00Z" |
| 32 | ai_generated: false |
| 33 | history: |
| 34 | created_by: human:cli |
| 35 | created_at: "2026-04-13T17:10:34Z" |
| 36 | last_modified_by: agent:codex |
| 37 | last_modified_at: "2026-04-14T15:45:00Z" |
| 38 | stakeholder: |
| 39 | persona: Go developers traversing dynamic JSON structures |
| 40 | story: As a Go developer inspecting dynamic JSON payloads, I want traversal helpers that iterate arrays and objects and resolve multiple paths in one scan so that I can process payloads without writing custom walkers. |
| 41 | acceptance_criteria: |
| 42 | - id: AC-1 |
| 43 | text: A caller can iterate an addressed JSON array in encounter order, receive no callbacks for a well-formed empty addressed array, and receive an error for malformed or otherwise unusable array input. |
| 44 | testable: true |
| 45 | derived_reqs: |
| 46 | - SYS-REQ-006 |
| 47 | - SYS-REQ-028 |
| 48 | - SYS-REQ-029 |
| 49 | - SYS-REQ-052 |
| 50 | - SYS-REQ-053 |
| 51 | - SYS-REQ-055 |
| 52 | - SYS-REQ-083 |
| 53 | - id: AC-2 |
| 54 | text: A caller can iterate an addressed JSON object and receive the correct key, value, and value type tuples for well-formed entries, no entries for well-formed empty objects, propagated callback errors, and an error for malformed or otherwise unusable object input. |
| 55 | testable: true |
| 56 | derived_reqs: |
| 57 | - SYS-REQ-007 |
| 58 | - SYS-REQ-030 |
| 59 | - SYS-REQ-031 |
| 60 | - SYS-REQ-032 |
| 61 | - SYS-REQ-054 |
| 62 | - SYS-REQ-084 |
| 63 | - id: AC-3 |
| 64 | text: A caller can request multiple key paths from one payload scan and receive the correct found or missing-path behavior for each requested path. |
| 65 | testable: true |
| 66 | derived_reqs: |
| 67 | - SYS-REQ-008 |
| 68 | - SYS-REQ-085 |
| 69 | - SYS-REQ-097 |
| 70 | - SYS-REQ-098 |
| 71 | - SYS-REQ-099 |
| 72 | obligation_checklist: |
| 73 | - nominal |
| 74 | - empty_input |
| 75 | - malformed_input |
| 76 | - truncated_at_value_boundary |
| 77 | - truncated_mid_structure |
| 78 | - truncated_mid_element |
| 79 | - callback_error_propagation |
| 80 | - sentinel_value_boundary |
| 81 | - determinism |
| 82 | - nil_safety |
| 83 | - edge_case |
| 84 | lifecycle: |
| 85 | change_history: |
| 86 | - date: "2026-04-13T17:14:56Z" |
| 87 | from: draft |
| 88 | to: review |
| 89 | reason: "" |
| 90 | changed_by: human:cli |
| 91 | - date: "2026-04-14T15:45:00Z" |
| 92 | from: review |
| 93 | to: review |
| 94 | reason: Strengthened stakeholder traversal acceptance criteria to match decomposed array and object behaviors. |
| 95 | changed_by: agent:codex |