| 1 | id: STK-REQ-007 |
| 2 | version: 1 |
| 3 | status: review |
| 4 | priority: shall |
| 5 | category: functional |
| 6 | req_type: guarantee |
| 7 | fretish: "" |
| 8 | description: Library users shall parse raw JSON scalar tokens into Go boolean, integer, float, and decoded string values with deterministic error behavior on malformed input. |
| 9 | formalization_strategy: informal |
| 10 | informal_verification: |
| 11 | method: "" |
| 12 | evidence: "" |
| 13 | verified: false |
| 14 | component: parser |
| 15 | rationale: The Parse* helpers are public token-level conversion utilities and their malformed-input behavior is part of the callable API surface. |
| 16 | tags: |
| 17 | - parse |
| 18 | - decomposition |
| 19 | variables: [] |
| 20 | traces: |
| 21 | documented_by_extra: |
| 22 | - README.md |
| 23 | reviewed_at: "2026-04-27T06:25:19.208511Z" |
| 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:21:50Z" |
| 36 | last_modified_by: agent:codex |
| 37 | last_modified_at: "2026-04-14T15:45:00Z" |
| 38 | stakeholder: |
| 39 | persona: Go developers converting raw JSON scalar tokens into typed values |
| 40 | story: As a Go developer working with raw JSON scalar tokens, I want Parse helpers that convert boolean, integer, float, and string tokens into Go values with deterministic malformed-input behavior so that I can safely reuse the parser below full document traversal. |
| 41 | acceptance_criteria: |
| 42 | - id: AC-1 |
| 43 | text: A caller can parse raw boolean tokens through ParseBoolean and receive the expected bool value or the documented malformed-token error. |
| 44 | testable: true |
| 45 | derived_reqs: |
| 46 | - SYS-REQ-012 |
| 47 | - SYS-REQ-036 |
| 48 | - SYS-REQ-057 |
| 49 | - SYS-REQ-066 |
| 50 | - id: AC-2 |
| 51 | text: A caller can parse raw floating-point tokens through ParseFloat and receive the expected float64 value or the documented malformed-token error. |
| 52 | testable: true |
| 53 | derived_reqs: |
| 54 | - SYS-REQ-013 |
| 55 | - SYS-REQ-037 |
| 56 | - SYS-REQ-065 |
| 57 | - id: AC-3 |
| 58 | text: A caller can parse raw string tokens through ParseString and receive the expected decoded Go string value or the documented malformed-token error. |
| 59 | testable: true |
| 60 | derived_reqs: |
| 61 | - SYS-REQ-014 |
| 62 | - SYS-REQ-038 |
| 63 | - SYS-REQ-060 |
| 64 | - SYS-REQ-061 |
| 65 | - SYS-REQ-062 |
| 66 | - SYS-REQ-063 |
| 67 | - SYS-REQ-067 |
| 68 | - id: AC-4 |
| 69 | text: A caller can parse raw integer tokens through ParseInt and receive the expected int64 value, the documented overflow error, or the documented malformed-token error. |
| 70 | testable: true |
| 71 | derived_reqs: |
| 72 | - SYS-REQ-015 |
| 73 | - SYS-REQ-039 |
| 74 | - SYS-REQ-040 |
| 75 | - SYS-REQ-058 |
| 76 | - SYS-REQ-059 |
| 77 | - SYS-REQ-064 |
| 78 | - SYS-REQ-106 |
| 79 | - SYS-REQ-107 |
| 80 | - SYS-REQ-108 |
| 81 | - SYS-REQ-109 |
| 82 | obligation_checklist: |
| 83 | - nominal |
| 84 | - malformed_input |
| 85 | - boundary |
| 86 | - partial_literal |
| 87 | - truncated_escape_sequence |
| 88 | - empty_input |
| 89 | - determinism |
| 90 | - nil_safety |
| 91 | - encoding_safety |
| 92 | - edge_case |
| 93 | lifecycle: |
| 94 | change_history: |
| 95 | - date: "2026-04-13T17:27:00Z" |
| 96 | from: draft |
| 97 | to: review |
| 98 | reason: "" |
| 99 | changed_by: human:cli |
| 100 | - date: "2026-04-14T15:45:00Z" |
| 101 | from: review |
| 102 | to: review |
| 103 | reason: Strengthened Parse helper acceptance criteria to distinguish valid, malformed, and overflow behaviors. |
| 104 | changed_by: agent:codex |