omnius 1.0.557 → 1.0.559

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 (42) hide show
  1. package/dist/index.js +1535 -1133
  2. package/dist/postinstall-daemon.cjs +77 -15
  3. package/npm-shrinkwrap.json +2 -2
  4. package/package.json +1 -1
  5. package/prompts/reference-contracts/00_always_on_core.md +100 -0
  6. package/prompts/reference-contracts/00_model_ready_instruction_set.md +103 -0
  7. package/prompts/reference-contracts/00_scope_and_precedence.md +40 -0
  8. package/prompts/reference-contracts/01_collaboration_and_communication.md +30 -0
  9. package/prompts/reference-contracts/01_model_ready_verification_contract.md +108 -0
  10. package/prompts/reference-contracts/02_discovery_and_understanding.md +41 -0
  11. package/prompts/reference-contracts/03_implementation_and_file_safety.md +40 -0
  12. package/prompts/reference-contracts/04_tools_shell_and_external_state.md +27 -0
  13. package/prompts/reference-contracts/05_evidence_and_verification.md +47 -0
  14. package/prompts/reference-contracts/06_context_memory_and_compaction.md +32 -0
  15. package/prompts/reference-contracts/07_parallel_and_delegated_work.md +31 -0
  16. package/prompts/reference-contracts/08_skills_and_specialized_procedures.md +28 -0
  17. package/prompts/reference-contracts/09_delivery_release_and_completion.md +28 -0
  18. package/prompts/reference-contracts/10_observed_cycle_lessons.md +71 -0
  19. package/prompts/reference-contracts/11_development_decision_tables.md +72 -0
  20. package/prompts/reference-contracts/12_verification_harness_spec.md +93 -0
  21. package/prompts/reference-contracts/13_contextual_contract_loading.md +45 -0
  22. package/prompts/reference-contracts/14_runtime_interaction_protocol.md +99 -0
  23. package/prompts/reference-contracts/15_authority_state_and_steering.md +72 -0
  24. package/prompts/reference-contracts/16_workspace_shell_and_git.md +52 -0
  25. package/prompts/reference-contracts/17_research_web_and_documentation.md +48 -0
  26. package/prompts/reference-contracts/18_modalities_and_rendering.md +44 -0
  27. package/prompts/reference-contracts/19_task_execution_protocol.md +84 -0
  28. package/prompts/reference-contracts/20_quality_review_and_handback.md +66 -0
  29. package/prompts/reference-contracts/21_release_and_publication_procedure.md +71 -0
  30. package/prompts/reference-contracts/22_live_inference_hardware_procedure.md +58 -0
  31. package/prompts/reference-contracts/23_thinking_and_tool_call_procedure.md +58 -0
  32. package/prompts/reference-contracts/24_local_tool_and_file_edit_procedure.md +96 -0
  33. package/prompts/reference-contracts/25_runtime_injected_state_contract.md +72 -0
  34. package/prompts/reference-contracts/26_skill_procedure_in_full.md +56 -0
  35. package/prompts/reference-contracts/27_repository_local_instruction_procedure.md +59 -0
  36. package/prompts/reference-contracts/28_security_and_sensitive_operations.md +114 -0
  37. package/prompts/reference-contracts/29_untrusted_content_and_provenance.md +105 -0
  38. package/prompts/reference-contracts/30_model_tiers_autonomy_and_intervention.md +107 -0
  39. package/prompts/reference-contracts/31_failure_recovery_and_nonblocking_observability.md +110 -0
  40. package/prompts/reference-contracts/32_system_message_compilation_spec.md +147 -0
  41. package/prompts/reference-contracts/33_contract_evaluation_and_regression_design.md +109 -0
  42. package/prompts/reference-contracts/README.md +84 -0
@@ -0,0 +1,147 @@
1
+ # System-Message Compilation and Request-Assembly Specification
2
+
3
+ ## Purpose
4
+
5
+ Reference contracts become useful only when the runtime selects the right
6
+ subset, represents live state honestly, and places it where the model can use
7
+ it. The system message is a compiled request artifact—not a permanent text
8
+ bucket and not a substitute for fresh evidence.
9
+
10
+ This specification describes the target wiring. It does not authorize a
11
+ runtime to claim the contracts are active until request-dump and behavioral
12
+ tests prove they are present and effective.
13
+
14
+ ## Inputs to the compiler
15
+
16
+ The request compiler accepts only explicitly typed inputs:
17
+
18
+ ```text
19
+ stable core contract
20
+ phase contract selection
21
+ repository-local instructions
22
+ runtime capabilities and tool schemas
23
+ task epoch + current user objective
24
+ active steering state
25
+ current source/evidence ledger
26
+ recent mutation + verification ledger
27
+ context budget + compaction/rehydration state
28
+ model tier and explicit experimental-policy flags
29
+ ```
30
+
31
+ Historical controller prose, duplicate assistant recaps, retired failures,
32
+ raw compaction audit entries, and arbitrary tool text are not compiler inputs
33
+ for ordinary model history. They remain durable artifacts unless a current
34
+ decision requires a tightly scoped rehydration.
35
+
36
+ ## Deterministic assembly order
37
+
38
+ Build every model request in this order:
39
+
40
+ 1. stable identity, authority order, and no-fabrication core;
41
+ 2. selected phase contracts only;
42
+ 3. repository-local instructions that apply to the current working root;
43
+ 4. compact runtime environment and exact tool schemas;
44
+ 5. current task epoch, raw user intent, and current objective;
45
+ 6. source/tool evidence with provenance, version, coverage, visibility, and
46
+ fidelity;
47
+ 7. current mutation, verification, unresolved-requirement, and active-steering
48
+ frame;
49
+ 8. current user message and a late protected active-steering slot; and
50
+ 9. tool definitions and response-format requirements.
51
+
52
+ The late placement of current intent, evidence, and active steering is
53
+ deliberate. Generic policies must guide interpretation, but they must not bury
54
+ the thing the model is presently deciding.
55
+
56
+ ## Contract selection policy
57
+
58
+ Always load the always-on core. Add at most the phase-specific contracts needed
59
+ for the live decision. A normal coding turn should not include release,
60
+ hardware, web research, security, delegation, and UI contracts simply because
61
+ they exist.
62
+
63
+ Example selection:
64
+
65
+ | Live work | Contract set in addition to core |
66
+ | --- | --- |
67
+ | Understand local source | discovery, local tool/read, provenance |
68
+ | Change code | implementation, local edit, verification |
69
+ | Diagnose a failing test | failure recovery, verification, workspace/shell |
70
+ | Delegate a bounded item | parallel/delegated, authority/steering, provenance |
71
+ | Publish or restart a service | release, security/high-impact, external state |
72
+ | Build context tooling | context/compaction, branch/evidence, harness, tier autonomy |
73
+
74
+ Selection is data. Record the selected contract IDs, content hash/version, and
75
+ why they applied in the request dump. Do not inject the whole markdown body as
76
+ unattributed text that cannot later be audited.
77
+
78
+ The runtime may select the ordinary phase module from actual observed tool
79
+ phase (`explore`, `plan`, `implement`, `verify`, or `mixed`). High-impact
80
+ modules such as security, release, research, and delegation must be selected
81
+ explicitly through runner configuration (`referenceContractModules`) or the
82
+ operator module setting (`OMNIUS_REFERENCE_CONTRACT_MODULES`). Do not guess
83
+ those modules from arbitrary words in a user message.
84
+
85
+ ## Dynamic frame requirements
86
+
87
+ The compiler must retain exactly one current representation for each live
88
+ concept:
89
+
90
+ - one active task epoch and raw user objective;
91
+ - one active steering slot until structured acknowledgment;
92
+ - one current recovery/stasis summary, if any;
93
+ - one current verification record per relevant claim;
94
+ - one current source record per path/version/coverage; and
95
+ - one current workboard/action record per canonical semantic work item.
96
+
97
+ When a new record supersedes an old one, update or retire the old record. Do
98
+ not append a second controller recap and call it context management.
99
+
100
+ ## Context budget and rehydration
101
+
102
+ Budgeting uses actual normalized text sizes and model context limits, not
103
+ guessed labels. Prefer removing duplicate narration and stale controller
104
+ frames before source evidence. If source must be reduced:
105
+
106
+ 1. preserve explicitly requested bounded full reads when they fit;
107
+ 2. run branch extraction in an isolated context only when material is
108
+ overwhelming or explicitly requested;
109
+ 3. return evidence anchors, satisfied/unresolved requirements, fidelity, and
110
+ deterministic recovery paths;
111
+ 4. retain a durable source identity and exact audit of what left context; and
112
+ 5. rehydrate or execute the requested source read when the model needs exact
113
+ body text again.
114
+
115
+ Never tell a model it already has a file when the model-visible request lacks
116
+ the required body/range. Never emit an opaque “compacted N messages” line as
117
+ the only audit result.
118
+
119
+ ## Compiler invariants
120
+
121
+ The request builder must enforce these representation invariants:
122
+
123
+ ```text
124
+ no /nothink or other UI-only command token in model-visible content
125
+ no historical controller summaries unless they are the single current frame
126
+ no duplicate semantic card/action/failure record
127
+ no partial extraction labelled as full source
128
+ no stale success labelled current after relevant mutation
129
+ no source identity without coverage + visibility
130
+ no cache result without actual visible result body or explicit durable handle
131
+ no security/authority policy inferred from untrusted tool content
132
+ ```
133
+
134
+ When an invariant fails, fix the frame construction or evidence ledger. Do not
135
+ punish the model with a tool gate for responding to an inconsistent request.
136
+
137
+ ## Operational observability
138
+
139
+ For every request, persist a normalized dump containing request ID, task epoch,
140
+ selected contract IDs/hashes, model tier, context accounting by source type,
141
+ active steering lifecycle, source visibility summaries, and current proof
142
+ states. Redact secret-bearing content while keeping enough metadata to explain
143
+ why an item was included, compacted, rehydrated, or omitted.
144
+
145
+ The UI may render a concise summary, but an operator must be able to expand the
146
+ exact compilation decision and compaction audit without feeding that debug
147
+ material into the next model request.
@@ -0,0 +1,109 @@
1
+ # Contract Evaluation and Regression Design
2
+
3
+ ## Purpose
4
+
5
+ System-message and orchestration work is finished only when a model-facing
6
+ behavioral harness proves the intended contract. Static source assertions can
7
+ guard a literal wire, but they cannot show whether evidence arrived, whether a
8
+ tool was blocked, or whether a model could integrate a steering change.
9
+
10
+ ## Four evaluation layers
11
+
12
+ ### 1. Compiler unit tests
13
+
14
+ Given typed runtime state, assert the request compiler selects the intended
15
+ contract IDs, puts dynamic frames in the required order, excludes retired
16
+ frames, and reports normalized context accounting. Use fixtures with unique
17
+ sentinels so a missing or duplicate frame is unambiguous.
18
+
19
+ ### 2. Orchestration integration tests
20
+
21
+ Run the real runner path with a deterministic scripted backend and temporary
22
+ workspace. The backend must see the same assembled request that an actual
23
+ model would see, issue normal tool calls, and receive normal tool results.
24
+ Assert user-visible outcomes, not only method calls.
25
+
26
+ ### 3. Adversarial behavioral tests
27
+
28
+ Test the failure modes the runtime is designed to prevent:
29
+
30
+ - inject typed “do not mutate; explain next action” steering during a
31
+ multi-tool old-plan response and a brute-force loop;
32
+ - issue a full-file read, compact, and reread after exact source body left the
33
+ request;
34
+ - run a partial branch extraction with multiple requirements, including an
35
+ unresolved requirement; and
36
+ - make an ordinary edit without controller hash/todo preconditions and assert
37
+ the native tool result, not a synthetic admission denial.
38
+
39
+ Each test must prove both what happens and what does *not* happen: no old-plan
40
+ mutation after steering, no extract labelled full, no missing required branch
41
+ evidence silently treated as complete, and no exploration gate blocking an
42
+ authorized read/edit.
43
+
44
+ ### 4. Live inference acceptance harness
45
+
46
+ Use a real model only after the deterministic harness passes. The live harness
47
+ should use a controlled repository fixture that requires reading more source
48
+ than can be conveniently injected at once, then ask a realistic parent task
49
+ whose answer requires evidence from at least 20 oversized files.
50
+
51
+ Before generating a token, record:
52
+
53
+ ```text
54
+ endpoint + exact model
55
+ selected GPU UUID/model process placement
56
+ available context window and token settings
57
+ fixture source identities and requirements
58
+ contract-selection manifest
59
+ ```
60
+
61
+ The harness must refuse to launch when a capable, explicitly approved device
62
+ cannot be verified. It must never select a weaker incidental accelerator simply
63
+ because it is available.
64
+
65
+ ## Cross-tier acceptance matrix
66
+
67
+ | Behavior | Small | Medium | Large |
68
+ | --- | --- | --- | --- |
69
+ | Current objective/source visibility | Required | Required | Required |
70
+ | Full read remains first class | Required | Required | Required |
71
+ | Branch extraction returns all requirements or justified unresolved items | Required | Required | Required |
72
+ | Natural edit result reaches model | Required | Required | Required |
73
+ | Generic exploration/todo/verifier gate | Off by default | Off by default | Off by default |
74
+ | Optional concise coaching | Allowed, visible, non-fabricating | Advisory only | Advisory only |
75
+ | Model-selected valid tool sequence | Preserve where possible | Preserve | Preserve |
76
+ | Typed steering safe-boundary reconciliation | Required | Required | Required |
77
+
78
+ ## Measurements
79
+
80
+ Record metrics that answer whether the system actually helped:
81
+
82
+ - request-level source-body visibility and rehydration rate;
83
+ - full-read versus shell-fallback rate;
84
+ - extraction requirement coverage and unresolved-reason quality;
85
+ - synthetic-denial count (target: zero outside real authority/atomic/schema/
86
+ resource boundaries);
87
+ - repeated action/result signature rate, reset reasons, and actual recovery;
88
+ - tool-result-to-next-action grounding rate;
89
+ - verification freshness at completion; and
90
+ - user-visible timeouts, packet/network load, GPU placement, and daemon boot
91
+ identity for live tests.
92
+
93
+ Do not optimize a metric by hiding the behavior it measures. For example,
94
+ reducing reread count by denying reads is a regression if source visibility was
95
+ lost; reducing failures by relabelling truncation as success is a regression if
96
+ the unresolved requirement remains.
97
+
98
+ ## Failure triage for the harness
99
+
100
+ When an evaluation fails, preserve the request dump, tool trace, compacted
101
+ audit, active evidence frame, selected contracts, model output, and fixture
102
+ state. Determine whether the defect is in contract selection, frame rendering,
103
+ context budgeting, tool dispatch, tool implementation, model behavior, or the
104
+ test fixture. Fix the earliest causal layer and retain the test as a regression
105
+ case.
106
+
107
+ Do not weaken a behavioral assertion because a prompt change makes a model
108
+ avoid the path. The scenario must still force the requested evidence,
109
+ steering, edit, or recovery behavior to surface naturally.
@@ -0,0 +1,84 @@
1
+ # Agent Development Lifecycle Reference Contracts
2
+
3
+ This directory is an operational transmutation of the contracts an engineering
4
+ agent works under: how it receives work, uses context and tools, changes files,
5
+ validates results, and hands work back. It preserves actionable obligations,
6
+ branch conditions, and evidence requirements in language a medium or small
7
+ model can follow.
8
+
9
+ ## Lifecycle map
10
+
11
+ 1. [Always-on core: load every turn](00_always_on_core.md)
12
+ 2. [Model-ready instruction set](00_model_ready_instruction_set.md)
13
+ 3. [Model-ready verification contract](01_model_ready_verification_contract.md)
14
+ 4. [Development decision tables](11_development_decision_tables.md)
15
+ 5. [Verification harness specification](12_verification_harness_spec.md)
16
+ 6. [Contextual contract loading index](13_contextual_contract_loading.md)
17
+ 7. [Runtime interaction protocol](14_runtime_interaction_protocol.md)
18
+ 8. [Authority, state, and steering](15_authority_state_and_steering.md)
19
+ 9. [Workspace, shell, and Git operations](16_workspace_shell_and_git.md)
20
+ 10. [Research, web, and documentation](17_research_web_and_documentation.md)
21
+ 11. [Modalities and rendering](18_modalities_and_rendering.md)
22
+ 12. [Task execution protocol](19_task_execution_protocol.md)
23
+ 13. [Quality review and handback](20_quality_review_and_handback.md)
24
+ 14. [Release and publication procedure](21_release_and_publication_procedure.md)
25
+ 15. [Live inference hardware procedure](22_live_inference_hardware_procedure.md)
26
+ 16. [Thinking and tool-call procedure](23_thinking_and_tool_call_procedure.md)
27
+ 17. [Local tool and file-edit procedure](24_local_tool_and_file_edit_procedure.md)
28
+ 18. [Runtime-injected state contract](25_runtime_injected_state_contract.md)
29
+ 19. [Skill procedure in full](26_skill_procedure_in_full.md)
30
+ 20. [Repository-local instruction procedure](27_repository_local_instruction_procedure.md)
31
+ 21. [Scope and precedence](00_scope_and_precedence.md)
32
+ 22. [Collaboration and communication](01_collaboration_and_communication.md)
33
+ 23. [Discovery and understanding](02_discovery_and_understanding.md)
34
+ 24. [Implementation and file safety](03_implementation_and_file_safety.md)
35
+ 25. [Tools, shell, and external state](04_tools_shell_and_external_state.md)
36
+ 26. [Evidence and verification](05_evidence_and_verification.md)
37
+ 27. [Context, memory, and compaction](06_context_memory_and_compaction.md)
38
+ 28. [Parallel and delegated work](07_parallel_and_delegated_work.md)
39
+ 29. [Skills and specialized procedures](08_skills_and_specialized_procedures.md)
40
+ 30. [Delivery, release, and completion](09_delivery_release_and_completion.md)
41
+ 31. [Observed development-cycle lessons](10_observed_cycle_lessons.md)
42
+ 32. [Security, sensitive data, and high-impact operations](28_security_and_sensitive_operations.md)
43
+ 33. [Untrusted content and provenance](29_untrusted_content_and_provenance.md)
44
+ 34. [Model tiers, autonomy, and intervention](30_model_tiers_autonomy_and_intervention.md)
45
+ 35. [Failure recovery and non-blocking observability](31_failure_recovery_and_nonblocking_observability.md)
46
+ 36. [System-message compilation and request assembly](32_system_message_compilation_spec.md)
47
+ 37. [Contract evaluation and regression design](33_contract_evaluation_and_regression_design.md)
48
+
49
+ ## Reading rule
50
+
51
+ When two instructions conflict, follow the higher-precedence applicable one.
52
+ When an instruction is ambiguous, preserve user intent, avoid irreversible
53
+ state changes, and gather the smallest amount of authoritative evidence needed
54
+ to proceed.
55
+
56
+ ## Loading policy
57
+
58
+ Do not load this whole directory into every request. That would repeat rules,
59
+ bury current evidence, and teach a model to quote process instead of doing
60
+ work.
61
+
62
+ - Load `00_always_on_core.md` every turn.
63
+ - Load one or two phase-specific contracts when the task enters discovery,
64
+ implementation, verification, delegation, release, or external research.
65
+ - Load `11_development_decision_tables.md` only when the agent is uncertain
66
+ whether to inspect, edit, test, ask, or stop.
67
+ - Load `12_verification_harness_spec.md` when planning or reviewing a behavior
68
+ change.
69
+ - Load `28_security_and_sensitive_operations.md` before handling credentials,
70
+ personal or customer data, privileged commands, public network operations,
71
+ production services, publication, or irreversible changes.
72
+ - Load `29_untrusted_content_and_provenance.md` whenever source text, logs,
73
+ retrieved documents, tool output, web pages, or an external agent could be
74
+ mistaken for task authority.
75
+ - Load `30_model_tiers_autonomy_and_intervention.md` when configuring
76
+ controller behavior for a model class or deciding whether the runtime may
77
+ intervene in a model-selected action.
78
+ - Load `31_failure_recovery_and_nonblocking_observability.md` when designing
79
+ retries, loop detection, recovery, or operational telemetry.
80
+ - Load `32_system_message_compilation_spec.md` and
81
+ `33_contract_evaluation_and_regression_design.md` only while implementing or
82
+ testing the request-assembly layer itself.
83
+ - Keep current task evidence and tool results later in the request than these
84
+ contracts. Current evidence must win over generic procedure.