Orchestrata Ultimate / RTM / 023-goal-system
RTM: 023-goal-system
Requirement to symbol to test rows for 023-goal-system: Goal-Driven Session System.
At a glance
| Item | Value |
|---|---|
| Requirement IDs | 155 |
Traced from src/ |
17 (11.0%) |
| Untraced | 138 |
Cited from tests/ |
0 (0.0%) |
Traced in src/ but not cited from tests/ |
17 |
Reading this matrix
This matrix lists each of the 155 requirement IDs of spec 023-goal-system with the src/ symbols that cite it and the tests that cite it. 17 of them (11.0%) have at least one citing symbol and 138 have none.
0 requirements are also cited from tests/, and 17 are traced in code but never named by a test. A test citation is a @traces on a test function; it shows intent to cover, not that the test runs or reaches the symbol.
Rows showing none in the symbols column are the gaps to close first. The densest untraced groups are REQ-023-* (138).
Requirement to symbols to tests
| Requirement | Symbols in src/ |
Tests citing it |
|---|---|---|
REQ-023-007 After every CI run, test execution, or code change, the agent evaluates all exit... |
orchestrata_ultimate/session/controller/_goals _run_criterion_verifier L312orchestrata_ultimate/session/controller/_goals goal_evaluate L246 |
none |
REQ-023-008 A criterion transitioning pending -> met is logged and announced — goal_evaluate... |
orchestrata_ultimate/session/controller/_goals goal_evaluate L246 |
none |
REQ-023-009 A criterion regressing met -> failed is logged and announced — goal_evaluate... |
orchestrata_ultimate/session/controller/_goals goal_evaluate L246 |
none |
REQ-023-010 All criteria met => goal transitions to achieved (achieved_at recorded). Tests:... |
orchestrata_ultimate/session/controller/_goals goal_evaluate L246 |
none |
REQ-023-011 Evaluation is automatic — wired into SessionController.end()'s Stop gate; the user... |
orchestrata_ultimate/session/controller/_goals goal_evaluate L246 |
none |
REQ-023-012 Each evaluation is logged as a progress entry with timestamp — GoalProgress entry... |
orchestrata_ultimate/session/controller/_goals goal_evaluate L246 |
none |
REQ-023-013 The goal persists in context.json under state.goal — ContextFileManager store,... |
none | none |
REQ-023-014 A new session injects the goal into the conversation —... |
orchestrata_ultimate/session/hooks/session_auto_start_hook _format_goal_injection L164 |
none |
REQ-023-015 The first hook output includes the goal statement and criteria status. Tests:... |
orchestrata_ultimate/session/hooks/session_auto_start_hook _format_goal_injection L164 |
none |
REQ-023-016 The goal is always in context.json, never conversation memory alone (pre-existing). |
none | none |
REQ-023-017 All criteria met => success alarm (ascending tones) — AudioAlarm.play_success,... |
orchestrata_ultimate/session/audio_alarm AudioAlarm L137 |
none |
REQ-023-018 Blocked => attention alarm (low tones) — AudioAlarm.play_attention, triggered by... |
orchestrata_ultimate/session/audio_alarm AudioAlarm L137 |
none |
REQ-023-019 Backend chain ffplay -> paplay -> aplay -> mpv -> terminal bell —... |
orchestrata_ultimate/session/audio_alarm AudioAlarm L137 |
none |
REQ-023-020 Alarm repeats every 30 seconds until the user sends a message —... |
orchestrata_ultimate/session/audio_alarm AudioAlarm L137 |
none |
REQ-023-021 Alarm is non-blocking — detached subprocesses + daemon thread. Tests:... |
orchestrata_ultimate/session/audio_alarm AudioAlarm L137 |
none |
REQ-023-022 On every Stop event the gate reads state.goal from context.json —... |
orchestrata_ultimate/session/controller/_goals _enforce_goal_stop_gate L212orchestrata_ultimate/session/exceptions GoalNotAchievedError L44 |
none |
REQ-023-023 Active + incomplete + unblocked => inject "Goal not achieved. Remaining: [...]" and... |
orchestrata_ultimate/session/controller/_goals _enforce_goal_stop_gate L212orchestrata_ultimate/session/exceptions GoalNotAchievedError L44 |
none |
REQ-023-024 Active + blocked => inject the blocker reason and trigger the attention alarm. Tests:... |
orchestrata_ultimate/session/controller/_goals _enforce_goal_stop_gate L212 |
none |
REQ-023-025 No active goal => the gate does nothing. Tests: tests/session/test_goal_stop_gate.py. |
orchestrata_ultimate/session/controller/_goals _enforce_goal_stop_gate L212 |
none |
REQ-023-026 The agent reads the injected message and resumes — the CLI surfaces the injected text... |
none | none |
REQ-023-027 Task failure logs the failure and evaluates alternative approaches. |
none | none |
REQ-023-028 Criterion regression creates a new investigation task. |
none | none |
REQ-023-029 Re-planning never discards completed tasks. |
none | none |
REQ-023-030 3 failed attempts on the same task => goal blocked + alarm. |
none | none |
REQ-023-031 Re-planning logged as a progress entry. |
none | none |
REQ-023-032 /goal set <statement> defines the goal, replacing any existing active goal... |
none | none |
REQ-023-033 /goal status shows statement, criteria, tasks, progress, blockers (pre-existing).... |
none | none |
REQ-023-034 /goal achieved marks achieved (override) + success alarm. Tests:... |
none | none |
REQ-023-035 /goal abandon [reason] abandons and logs the reason (pre-existing). Tests:... |
none | none |
REQ-023-036 /goal block <reason> marks blocked + attention alarm. Tests:... |
none | none |
REQ-023-037 /goal unblock clears the blocked status and resumes. Tests:... |
none | none |
REQ-023-038 All commands update context.json atomically — every command writes through... |
none | none |
REQ-023-001 The goal system SHALL NOT execute destructive actions autonomously — it SHALL evaluate... |
none | none |
REQ-023-002 Given a new session with no active goal, when the session starts, then the agent SHALL... |
none | none |
REQ-023-003 Given the command /goal set, when the user provides a statement, then the agent... |
none | none |
REQ-023-004 Given exit criteria, when each is defined, then it SHALL be stored as a boolean... |
none | none |
REQ-023-005 Given a goal is set, when context.json is read, then state.goal SHALL contain the... |
none | none |
REQ-023-006 Given a goal is set, when a new session starts (including after compaction), then the... |
none | none |
REQ-023-039 The system SHALL play the sound pattern defined for each event: goal achieved — 3... |
none | none |
REQ-023-040 On achievement the alarm SHALL play once and then every 30 seconds until the user... |
none | none |
REQ-023-041 The alarm repeat SHALL be a background process that checks the flag file... |
none | none |
REQ-023-042 The system SHALL persist all goal state in context.json including statement,... |
none | none |
REQ-023-043 The goal SHALL survive session restarts, context compaction, and conversation truncation. |
none | none |
REQ-023-044 The SessionStart hook SHALL read the goal from context.json and inject it into the... |
none | none |
REQ-023-045 If an active goal exists, the hook SHALL display the goal statement and all criteria... |
none | none |
REQ-023-046 After every CI run, test execution, or code modification, the system SHALL... |
none | none |
REQ-023-047 Each exit criterion SHALL be validated by executing its verify_command and matching... |
none | none |
REQ-023-048 The system SHALL transition criterion status from pending to met when the pattern... |
none | none |
REQ-023-049 The Stop hook SHALL prevent the agent from stopping when an active goal exists with... |
none | none |
REQ-023-050 The hook SHALL inject a continue message and signal continuation instead of allowing... |
none | none |
REQ-023-051 When all exit criteria are met, the system SHALL play a success audio alarm. |
none | none |
REQ-023-052 When the goal becomes blocked, the system SHALL play an attention audio alarm. |
none | none |
REQ-023-053 The alarm SHALL persist until the user sends a message. |
none | none |
REQ-023-054 The system SHALL support /goal commands for set, status, achieved, abandon, block,... |
none | none |
REQ-023-055 All commands SHALL update context.json atomically and SHALL provide user feedback. |
none | none |
REQ-023-056 When a task fails or a criterion regresses, the system SHALL evaluate alternative... |
none | none |
REQ-023-057 After 3 consecutive failures on the same task, the system SHALL mark the goal as... |
none | none |
REQ-023-058 The system SHALL detect blockers that prevent goal progress. Blockers MAY be... |
none | none |
REQ-023-059 When blocked, the system SHALL trigger the attention alarm. |
none | none |
REQ-023-060 The system SHALL enforce goal state transitions according to the defined state... |
none | none |
REQ-023-061 Every goal state change SHALL be logged as a progress entry with timestamp, action,... |
none | none |
REQ-023-062 Progress SHALL be stored in context.json and MAY be persisted to Neo4j. |
none | none |
REQ-023-063 When a previously met criterion regresses to failed status, the system SHALL log the... |
none | none |
REQ-023-064 The system SHALL detect the first available audio backend at startup using the... |
none | none |
REQ-023-065 The detected backend SHALL be cached for subsequent use. |
none | none |
REQ-023-066 The goal field in context.json SHALL maintain referential integrity: task criteria... |
none | none |
REQ-023-067 Invalid references SHALL be rejected during goal creation. |
none | none |
REQ-023-068 An active goal SHALL be visible across all sessions within the same project. |
none | none |
REQ-023-069 New Claude Code sessions SHALL receive the goal via session hooks, not via... |
none | none |
REQ-023-070 Audio alarms SHALL NOT block agent output or tool execution. |
none | none |
REQ-023-071 Alarms SHALL run as background processes with a flag file to coordinate state. |
none | none |
REQ-023-072 When a goal is abandoned, the system SHALL log the abandonment reason, timestamp, and... |
none | none |
REQ-023-073 Abandoned goals SHALL be displayable via /goal status. |
none | none |
REQ-023-074 ERR-001 — When a goal is set with a blank statement, the system SHALL reject it with... |
none | none |
REQ-023-075 ERR-002 — When a criterion has no verify_command or verify_pattern, the system... |
none | none |
REQ-023-076 ERR-003 — When a goal state transition targets an invalid state, the system SHALL... |
none | none |
REQ-023-077 ERR-004 — When no audio backend is available, the system SHALL log a warning, disable... |
none | none |
REQ-023-078 ERR-005 — When the goal field in context.json is corrupted JSON, the system SHALL... |
none | none |
REQ-023-079 ERR-006 — When the Stop hook cannot read the goal from context.json, it SHALL allow... |
none | none |
REQ-023-080 ERR-007 — When all criteria remain pending after 100 task completions, the system... |
none | none |
REQ-023-081 ERR-008 — On a goal ID collision during goal creation, the system SHALL generate a new... |
none | none |
REQ-023-082 ERR-009 — When a task references a non-existent criterion ID, the system SHALL reject... |
none | none |
REQ-023-083 ERR-010 — When goal evaluation times out after 30 seconds, the system SHALL log the... |
none | none |
REQ-023-084 ERR-011 — When an alarm process cannot be spawned, the system SHALL log the error to... |
none | none |
REQ-023-085 ERR-012 — When the flag file /tmp/orchestrata-alarm-active cannot be written, the... |
none | none |
REQ-023-086 ERR-013 — On a user prompt during an alarm repeat, the system SHALL attempt to kill... |
none | none |
REQ-023-087 ERR-014 — When Neo4j persistence fails for goal state, the system SHALL continue with... |
none | none |
REQ-023-088 ERR-015 — When re-planning generates no new tasks after 3 failures, the system SHALL... |
none | none |
REQ-023-089 ERR-016 — On goal achievement with conflicting criterion statuses, the system SHALL... |
none | none |
REQ-023-090 ERR-017 — On session start with corrupted goal progress entries, the system SHALL... |
none | none |
REQ-023-091 ERR-018 — When the alarm backend probe fails for all backends, the system SHALL fall... |
none | none |
REQ-023-092 ERR-019 — When a goal criterion verify_command execution fails, the system SHALL log... |
none | none |
REQ-023-093 ERR-020 — On multiple concurrent goal updates (race condition), last write SHALL win... |
none | none |
REQ-023-094 SessionController SHALL expose the goal API with the parameters, return values, side... |
none | none |
REQ-023-095 AudioAlarm SHALL expose play_success_alarm() -> bool, `play_blocked_alarm() ->... |
none | none |
REQ-023-101 Goal evaluation SHALL complete within 30 seconds |
none | none |
REQ-023-102 Audio alarm playback SHALL complete within 5 seconds |
none | none |
REQ-023-103 context.json reads/writes SHALL complete within 1 second |
none | none |
REQ-023-104 Session hook execution SHALL complete within 2 seconds |
none | none |
REQ-023-105 Goal system SHALL maintain functionality if audio alarms fail |
none | none |
REQ-023-106 Goal persistence SHALL work even if Neo4j is unavailable |
none | none |
REQ-023-107 Session hooks SHALL gracefully degrade if context.json is temporarily unavailable |
none | none |
REQ-023-108 Goal statements SHALL NOT execute arbitrary code |
none | none |
REQ-023-109 verify_command values SHALL be validated against a whitelist of safe commands |
none | none |
REQ-023-110 Goal status updates SHALL be logged for audit |
none | none |
REQ-023-111 User SHALL be able to abandon goals at any time (user autonomy) |
none | none |
REQ-023-112 System SHALL support up to 50 active criteria per goal |
none | none |
REQ-023-113 System SHALL support up to 1000 progress entries per goal |
none | none |
REQ-023-114 System SHALL support concurrent goal operations from multiple session instances |
none | none |
REQ-023-115 Goal model SHALL be defined using Pydantic for validation |
none | none |
REQ-023-116 Hook architecture SHALL be modular for easy testing |
none | none |
REQ-023-117 Error conditions SHALL be logged with context for debugging |
none | none |
REQ-023-118 Goal state SHALL be consistent across session restarts |
none | none |
REQ-023-119 Audio alarms SHALL have fallback chain to ensure user notification |
none | none |
REQ-023-120 Goal evaluation SHALL be idempotent (multiple evaluations yield same result) |
none | none |
REQ-023-121 Goal status SHALL be human-readable at a glance |
none | none |
REQ-023-122 Audio alarms SHALL be distinguishable by sound pattern |
none | none |
REQ-023-123 Goal commands SHALL provide immediate feedback |
none | none |
REQ-023-124 Goal statements SHALL be validated for maximum length (512 characters) |
none | none |
REQ-023-125 Reason strings for abandon/block SHALL be sanitized to prevent injection |
none | none |
REQ-023-126 User SHALL be able to inspect and override any automated goal operations |
none | none |
REQ-023-127 All goal state changes SHALL be logged with timestamp, user, and reason |
none | none |
REQ-023-128 Goal progress SHALL be stored in Neo4j for complete audit trail |
none | none |
REQ-023-129 Authentication status SHALL be included in all goal-related logs |
none | none |
REQ-023-130 Failed verification commands SHALL be logged with full error context |
none | none |
REQ-023-131 Any user SHALL be able to view goal status |
none | none |
REQ-023-132 Any user SHALL be able to abandon or block goals |
none | none |
REQ-023-133 Goal modification SHALL require an active session (no background changes without user... |
none | none |
REQ-023-134 Critical operations (abandon, achieve) SHALL be confirmed before execution |
none | none |
REQ-023-135 Goal data SHALL NOT contain sensitive information (passwords, tokens) |
none | none |
REQ-023-136 context.json file SHALL have restricted permissions (owner read/write only) |
none | none |
REQ-023-137 Audio alarms SHALL NOT expose system information in their execution |
none | none |
REQ-023-096 The goal schema in context.json SHALL be versioned for backward compatibility |
none | none |
REQ-023-097 local-ci.sh results SHALL be parsed for criterion evaluation: test pass/fail counts... |
none | none |
REQ-023-098 Goal state persisted to Neo4j SHALL use Goal nodes with a CONTAINS relationship to... |
none | none |
REQ-023-099 When no goal exists or the goal is not active, the SessionStart hook SHALL output `No... |
none | none |
REQ-023-100 When the Stop hook evaluates all criteria and finds them all met, it SHALL mark the... |
none | none |
REQ-023-138 Primary Framework: pytest for Python test implementation |
none | none |
REQ-023-139 Test Type: Behavior-Driven Development (BDD) approach emphasizing goal-oriented... |
none | none |
REQ-023-140 Test Organization: Tests grouped by functional requirement (FR-<num>) and user... |
none | none |
REQ-023-141 Mocking Policy: No mocking of core goal system components; real implementations... |
none | none |
REQ-023-142 Assertion Style: Use explicit assertions with descriptive error messages |
none | none |
REQ-023-143 Each functional requirement MUST have corresponding unit tests: |
none | none |
REQ-023-144 Each user story MUST have end-to-end tests simulating real usage: |
none | none |
REQ-023-145 Line-coverage minimums SHALL be met: goal system modules 95%, session controller 90%,... |
none | none |
REQ-023-146 Coverage measurement SHALL exclude audio backend probe failures, actual audio... |
none | none |
REQ-023-147 The pre-commit hook SHALL run the goal system unit tests, enforce the 90% coverage... |
none | none |
REQ-023-148 CI SHALL run `python -m pytest tests/test_goal_system/ -v --cov=src/goal_system... |
none | none |
REQ-023-149 Test runs SHALL generate JUnit XML for CI integration, HTML coverage reports for... |
none | none |
REQ-023-150 Each error condition MUST have tests verifying proper handling: |
none | none |
REQ-023-151 The goal system SHALL log all major operations with appropriate log levels, include... |
none | none |
REQ-023-152 The goal system SHALL expose performance metrics: operation duration histograms,... |
none | none |
REQ-023-153 The goal system SHALL support distributed tracing: trace propagation across component... |
none | none |
REQ-023-154 The goal system SHALL raise critical alerts on error rate spikes, performance... |
none | none |
REQ-023-155 The goal system SHALL provide an operational dashboard covering real-time system... |
none | none |