@n8r/surface 0.0.0-stage → 0.1.0-experimental.5

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 (181) hide show
  1. package/LICENSE +202 -0
  2. package/LICENSE-DOCS +395 -0
  3. package/LICENSING.md +36 -0
  4. package/README.md +207 -2
  5. package/dist/activity.d.ts +16 -0
  6. package/dist/activity.js +44 -0
  7. package/dist/cli.d.ts +2 -0
  8. package/dist/cli.js +412 -0
  9. package/dist/codec.d.ts +6 -0
  10. package/dist/codec.js +56 -0
  11. package/dist/codex.d.ts +72 -0
  12. package/dist/codex.js +526 -0
  13. package/dist/contracts.d.ts +235 -0
  14. package/dist/contracts.js +1 -0
  15. package/dist/cyclonedx-schemas/bom-1.7.schema.json +6700 -0
  16. package/dist/cyclonedx-schemas/cryptography-defs.schema.json +576 -0
  17. package/dist/cyclonedx-schemas/jsf-0.82.schema.json +240 -0
  18. package/dist/cyclonedx-schemas/spdx.schema.json +786 -0
  19. package/dist/cyclonedx-validation.d.ts +1 -0
  20. package/dist/cyclonedx-validation.js +45 -0
  21. package/dist/html.d.ts +5 -0
  22. package/dist/html.js +74 -0
  23. package/dist/index.d.ts +7 -0
  24. package/dist/index.js +5 -0
  25. package/dist/notes.d.ts +52 -0
  26. package/dist/notes.js +184 -0
  27. package/dist/portable.d.ts +10 -0
  28. package/dist/portable.js +71 -0
  29. package/dist/recent.d.ts +9 -0
  30. package/dist/recent.js +71 -0
  31. package/dist/revisions.d.ts +2 -0
  32. package/dist/revisions.js +60 -0
  33. package/dist/settings.d.ts +23 -0
  34. package/dist/settings.js +100 -0
  35. package/dist/setup.d.ts +9 -0
  36. package/dist/setup.js +161 -0
  37. package/dist/skill-artifacts-cli.d.ts +1 -0
  38. package/dist/skill-artifacts-cli.js +13 -0
  39. package/dist/skill-artifacts.d.ts +15 -0
  40. package/dist/skill-artifacts.js +184 -0
  41. package/dist/skill-cyclonedx.d.ts +26 -0
  42. package/dist/skill-cyclonedx.js +214 -0
  43. package/dist/skill-presentation.d.ts +10 -0
  44. package/dist/skill-presentation.js +108 -0
  45. package/dist/skill-surface-cli.d.ts +1 -0
  46. package/dist/skill-surface-cli.js +37 -0
  47. package/dist/skill-surface-store.d.ts +7 -0
  48. package/dist/skill-surface-store.js +126 -0
  49. package/dist/source-tools.d.ts +102 -0
  50. package/dist/source-tools.js +201 -0
  51. package/dist/startup.d.ts +7 -0
  52. package/dist/startup.js +74 -0
  53. package/dist/surface-bom.d.ts +73 -0
  54. package/dist/surface-bom.js +139 -0
  55. package/dist/surface-draft.d.ts +22 -0
  56. package/dist/surface-draft.js +112 -0
  57. package/dist/surface-instructions.d.ts +3 -0
  58. package/dist/surface-instructions.js +32 -0
  59. package/dist/surface-overview.d.ts +15 -0
  60. package/dist/surface-overview.js +86 -0
  61. package/dist/surface-store.d.ts +34 -0
  62. package/dist/surface-store.js +213 -0
  63. package/dist/surface-view.d.ts +3 -0
  64. package/dist/surface-view.js +50 -0
  65. package/dist/validate.d.ts +4 -0
  66. package/dist/validate.js +482 -0
  67. package/docs/n8r-surface/README.md +133 -0
  68. package/docs/n8r-surface/cli-bundles.md +72 -0
  69. package/docs/n8r-surface/codex-research-transcript.md +51 -0
  70. package/docs/n8r-surface/codex-research-verification.md +176 -0
  71. package/docs/n8r-surface/command-outcomes.md +711 -0
  72. package/docs/n8r-surface/contracts.md +220 -0
  73. package/docs/n8r-surface/critical-path.md +184 -0
  74. package/docs/n8r-surface/design.md +289 -0
  75. package/docs/n8r-surface/first-use-access.md +143 -0
  76. package/docs/n8r-surface/first-use-overview.md +262 -0
  77. package/docs/n8r-surface/getting-started.md +74 -0
  78. package/docs/n8r-surface/guided-journey-verification.md +137 -0
  79. package/docs/n8r-surface/host-contract.md +176 -0
  80. package/docs/n8r-surface/implementation-decisions.md +96 -0
  81. package/docs/n8r-surface/instance-first-research.md +209 -0
  82. package/docs/n8r-surface/npm-distribution.md +107 -0
  83. package/docs/n8r-surface/npm-release.md +315 -0
  84. package/docs/n8r-surface/product-direction.md +327 -0
  85. package/docs/n8r-surface/recreation-handoff.md +117 -0
  86. package/docs/n8r-surface/researcher-discovery.md +157 -0
  87. package/docs/n8r-surface/researcher-prepared-check.md +117 -0
  88. package/docs/n8r-surface/researcher-reconciliation-trial.md +149 -0
  89. package/docs/n8r-surface/researcher-repository-check.md +95 -0
  90. package/docs/n8r-surface/researcher-skeleton-check.md +84 -0
  91. package/docs/n8r-surface/researcher-skill-verification.md +725 -0
  92. package/docs/n8r-surface/researcher-skill.md +309 -0
  93. package/docs/n8r-surface/researcher-vault.md +134 -0
  94. package/docs/n8r-surface/save-reopen-transcript.md +211 -0
  95. package/docs/n8r-surface/save-reopen-verification.md +152 -0
  96. package/docs/n8r-surface/security-assurance-strategy.md +267 -0
  97. package/docs/n8r-surface/skill-bom-verification.md +142 -0
  98. package/docs/n8r-surface/skill-cyclonedx-verification.md +144 -0
  99. package/docs/n8r-surface/skill-cyclonedx.md +85 -0
  100. package/docs/n8r-surface/skill-manual.md +129 -0
  101. package/docs/n8r-surface/skill-surface-artifacts.md +234 -0
  102. package/docs/n8r-surface/skill-usefulness-verification.md +135 -0
  103. package/docs/n8r-surface/skill-workspace-automation.md +359 -0
  104. package/docs/n8r-surface/startup-human-check.md +172 -0
  105. package/docs/n8r-surface/startup-verification.md +161 -0
  106. package/docs/n8r-surface/startup.md +151 -0
  107. package/docs/n8r-surface/surface-description-contract.md +224 -0
  108. package/docs/n8r-surface/surface-descriptions.md +173 -0
  109. package/docs/n8r-surface/surface-relationships.md +231 -0
  110. package/docs/n8r-surface/surface-revisions-transcript.md +552 -0
  111. package/docs/n8r-surface/surface-revisions-verification.md +161 -0
  112. package/docs/n8r-surface/tester-candidate.md +158 -0
  113. package/docs/n8r-surface/vault-setup-verification.md +210 -0
  114. package/docs/n8r-surface/verification.md +117 -0
  115. package/docs/n8r-surface/versioning.md +172 -0
  116. package/docs/n8r-surface/workspace-human-check.md +101 -0
  117. package/docs/n8r-surface/workspace-installation.md +68 -0
  118. package/docs/n8r-surface/workspace-verification.md +350 -0
  119. package/docs/n8r-surface/workspace.md +83 -0
  120. package/examples/researcher/README.md +100 -0
  121. package/examples/researcher/composed.surface.json +430 -0
  122. package/examples/researcher/composed.surface.yaml +283 -0
  123. package/examples/researcher/cyclonedx/configured/README.md +7 -0
  124. package/examples/researcher/cyclonedx/configured/manifest.json +10 -0
  125. package/examples/researcher/cyclonedx/configured/mapping.json +323 -0
  126. package/examples/researcher/cyclonedx/configured/surface-records.json +1275 -0
  127. package/examples/researcher/cyclonedx/configured/surface.cdx.json +79 -0
  128. package/examples/researcher/descriptions/README.md +29 -0
  129. package/examples/researcher/descriptions/bound-r1.json +141 -0
  130. package/examples/researcher/descriptions/bound-r2.json +153 -0
  131. package/examples/researcher/descriptions/capability.json +167 -0
  132. package/examples/researcher/descriptions/research-r1.json +153 -0
  133. package/examples/researcher/descriptions/research-r2.json +157 -0
  134. package/examples/researcher/descriptions/sources.md +24 -0
  135. package/examples/researcher/harbor-r1.research.html +193 -0
  136. package/examples/researcher/harbor-r2.research.html +226 -0
  137. package/examples/researcher/lumen-manual-edit.pending.html +271 -0
  138. package/examples/researcher/lumen-r1.research.html +271 -0
  139. package/examples/researcher/lumen-r2.research.html +280 -0
  140. package/examples/researcher/relationships/README.md +34 -0
  141. package/examples/researcher/relationships/bound-r1.json +346 -0
  142. package/examples/researcher/relationships/bound-r2.json +358 -0
  143. package/examples/researcher/relationships/capability.json +325 -0
  144. package/examples/researcher/relationships/config/assistant.env.example +4 -0
  145. package/examples/researcher/relationships/research-r1.json +300 -0
  146. package/examples/researcher/relationships/research-r2.json +304 -0
  147. package/examples/researcher/relationships/sources.md +38 -0
  148. package/examples/researcher/sources/harbor-api.md +16 -0
  149. package/examples/researcher/sources/harbor-auth.md +8 -0
  150. package/examples/researcher/sources/lumen-guide.md +28 -0
  151. package/examples/researcher/sources/lumen-settings.md +9 -0
  152. package/examples/researcher/surface-bom/README.md +17 -0
  153. package/examples/researcher/surface-bom/initial.cdx.json +188 -0
  154. package/package.json +45 -4
  155. package/plugins/n8r-surface/.codex-plugin/plugin.json +31 -0
  156. package/plugins/n8r-surface/LICENSE +202 -0
  157. package/plugins/n8r-surface/LICENSE-DOCS +395 -0
  158. package/plugins/n8r-surface/LICENSING.md +39 -0
  159. package/plugins/n8r-surface/assets/icon.svg +5 -0
  160. package/plugins/n8r-surface/plugin.json +27 -0
  161. package/plugins/n8r-surface/skills/research/SKILL.md +163 -0
  162. package/plugins/n8r-surface/skills/research/agents/openai.yaml +4 -0
  163. package/plugins/n8r-surface/skills/research/references/artifacts.md +152 -0
  164. package/plugins/n8r-surface/skills/research/references/cyclonedx.md +207 -0
  165. package/plugins/n8r-surface/skills/research/references/discovery-map.md +178 -0
  166. package/plugins/n8r-surface/skills/research/references/examples/bound-r1.json +346 -0
  167. package/plugins/n8r-surface/skills/research/references/examples/capability.json +325 -0
  168. package/plugins/n8r-surface/skills/research/references/examples/research-r1.json +300 -0
  169. package/plugins/n8r-surface/skills/research/references/examples/surface.cdx.json +188 -0
  170. package/plugins/n8r-surface/skills/research/references/first-use-access.md +97 -0
  171. package/plugins/n8r-surface/skills/research/references/first-use-overview.md +101 -0
  172. package/plugins/n8r-surface/skills/research/references/instance-first.md +125 -0
  173. package/plugins/n8r-surface/skills/research/references/model-meanings.md +55 -0
  174. package/plugins/n8r-surface/skills/research/references/skeleton-surface.md +105 -0
  175. package/plugins/n8r-surface/skills/research/references/working-notes.md +121 -0
  176. package/plugins/n8r-surface/skills/research/references/workspace.md +89 -0
  177. package/plugins/n8r-surface/skills/research/scripts/THIRD-PARTY-NOTICES.txt +273 -0
  178. package/plugins/n8r-surface/skills/research/scripts/artifacts.mjs +8348 -0
  179. package/plugins/n8r-surface/skills/research/scripts/cyclonedx.mjs +28113 -0
  180. package/plugins/n8r-surface/skills/research/scripts/surface.mjs +27800 -0
  181. package/plugins/n8r-surface/skills/research/scripts/workspace.mjs +120 -0
@@ -0,0 +1,152 @@
1
+ # Saved continuation: evidence and limits
2
+
3
+ Related to [#17](https://github.com/injectionator/n8r-surface/issues/17).
4
+ Use [the short human check](getting-started.md). This increment implements
5
+ SAVE-01 in numbered Markdown; it does not complete structured HTML/JSON/YAML,
6
+ broader host/live trials, Lab integration or registry distribution.
7
+
8
+ ## Current verification
9
+
10
+ **Pass (agent rehearsal), 5 November 2026. Human acceptance remains pending.**
11
+ The prior conversation increment was user-reported Pass and PR #33 merged at
12
+ `b186050`; the new saved-continuation evidence is recorded separately here.
13
+
14
+ - Implementation: [`447f440`](https://github.com/injectionator/n8r-surface/commit/447f44058c142d3a49ed827298d922a6458fbcb1).
15
+ Rehearsal completed while repository HEAD was `b4407aa`, which changes only the
16
+ offline test driver's prompt matching and plan notes, not product code.
17
+ - Installed tarball SHA-256:
18
+ `926823a95209ace0183875b2aaa2a3423f46671ad423f38e2b1fcdf885ef9b2d`.
19
+ - Environment: macOS arm64, Node 26.13.0, Codex CLI 0.166.0, existing ChatGPT
20
+ sign-in, explicit `gpt-6-astra`. A private run under the selected vault held the
21
+ isolated install, n8r HOME/settings and copied synthetic source. Existing Codex
22
+ sign-in was reused through CODEX_HOME without copying credentials.
23
+ - Loaded Researcher 0.1.8, combined instruction SHA-256
24
+ `8af29c3073df9b8210a7dd94ced9700379b0a98f76bd3a2902f9430b93c98a2a`.
25
+ - [Actual sanitized terminal transcripts](save-reopen-transcript.md) retain model
26
+ messages and source-read activity. Findings and note prose were produced by
27
+ real Codex, not prewritten by the developing agent.
28
+
29
+ ### Exercised interaction and independent readback
30
+
31
+ Starting state: copied `lumen-guide.md`, complete configured test vault, no saved
32
+ notes and unchanged version-1 settings. The installed command performed the short
33
+ human walkthrough's source investigation and OIDC decision, `/save`, `/exit`,
34
+ explicit-note reopen with renewed transmission consent, authentication follow-up,
35
+ `/save`, `/exit`. Both processes exited **0**. The original first note remained
36
+ byte-identical after its successor was saved.
37
+
38
+ A third process tested the user's additional request: append a human edit to the
39
+ older first note, prioritizing session-expiry evidence while retaining the OIDC
40
+ non-selection, then run `reopen --source SOURCE --model gpt-6-astra` without NOTE.
41
+ It suggested the edited `research-001.md`, showed its edit time, and waited for
42
+ selection and transmission consent. The conversation retained that edit and saved
43
+ `research-003.md`, linking the edited first note. It did not overwrite 002 or edit
44
+ 001 again. This process also exited **0**.
45
+
46
+ Independent file reads found all five stable IDs in every note:
47
+ `component:lumen`, `component:inference`, `component:archive`,
48
+ `component:callback`, `component:oidc`. All retained the OIDC decision separately
49
+ from source claims, cited the actual guide, preserved unknowns and included
50
+ recommended next steps. The third retained the session-expiry priority. The first
51
+ note explicitly explains that source references require the accompanying guide.
52
+ No runtime connection or alternative authentication mechanism was invented as fact.
53
+
54
+ | Readback | SHA-256 / result |
55
+ | --- | --- |
56
+ | Source before and after all processes | `98d3374c79c166b37f0debb4ffb5e457eda1385dd7847b042cbad674cac98693` |
57
+ | Original 001, preserved after saving 002 and referenced by 002 | `9910959c740959e943e7d6cf4e81b1d365468ab33576fb9c83aa9ce25dc054e7` |
58
+ | Deliberately edited 001, preserved after saving 003 and referenced by 003 | `76b6abe6d616b903f641f2b8d52f06777ad5383060701ce49a314d3ff68eca52` |
59
+ | Saved 002 | `927a6a84a810d518b5e7bc8f37df3f29916e353a3bb6817ccf21b2cc36aee265` |
60
+ | Saved 003 | `56f317af8dfd30ea76cbfe0318bf74b226cc3be0ef851e0edc67bcd120d029d6` |
61
+ | n8r settings | Unchanged bytes |
62
+
63
+ Raw transcripts, saved files and readback report remain under the selected vault's
64
+ runs/ convention. No local vault path or private infrastructure data is published.
65
+ These are agent rehearsals using supplied synthetic human input, not human acceptance.
66
+
67
+ ### Automated verification and review
68
+
69
+ - 97 Node tests passed on each of Node 22.23.2, 24.22.2 and 26.13.0.
70
+ - Installed-package checks passed on all three runtimes, including 20 offline
71
+ discovery/save/reopen terminal scenarios. They cover no premature writes,
72
+ failed and cancelled staged drafts, source scope, latest selection/refusal,
73
+ changed-source comparisons, preserved predecessors and process cleanup.
74
+ - Storage tests cover edit-time ranking, occupied names, changed predecessors,
75
+ symlink/replaced-folder refusal, bounded UTF-8 and human edits after metadata.
76
+ - Fresh review found missing historical evidence and incompatible reopen-size
77
+ limits. Regression tests failed first, then passed after preserving unavailable
78
+ evidence and using bounded comparison summaries rather than embedded source text.
79
+ - Linux CI exposed a test-driver race: a generic `[y/N]` matcher reused the first
80
+ prompt's suffix. The driver now waits for the complete transmission prompt.
81
+ Product code was unchanged; the initial failed CI run remains visible.
82
+ - Python fixture/workflow suite: 24 passed. Shell syntax, Markdownlint 0.24.0,
83
+ offline Lychee 0.24.2 with fragments, cffconvert 2.0.0 and whitespace passed.
84
+
85
+ Scripted protocol tests are not AI evidence; fixture integrity is not model
86
+ conformance. The real rehearsal used one synthetic source and unchanged source
87
+ bytes. Broader products, live observations, second-source integration, structured
88
+ HTML/JSON/YAML, named Lab consumers and npm distribution remain open in #17/#27.
89
+
90
+ ## Storage and continuation boundary
91
+
92
+ `/save` authorizes one numbered Markdown output. A dynamic `research_note` call
93
+ stages a draft in memory only during that host-authorized turn. The host writes
94
+ only after successful turn completion; ordinary conversation and unsolicited tool
95
+ calls cannot write. Natural-language save requests receive `/save` guidance.
96
+ The host shows the destination, appends current source-tool evidence and identified
97
+ Researcher/model metadata, writes a temporary file, publishes by exclusive hard
98
+ link, independently reads it back and prints the saved path and byte digest.
99
+ Predecessors retain their bytes; successors link their name and exact digest.
100
+ A changed predecessor requires reopening its edited version before another save.
101
+
102
+ Notes have a 256 KiB total limit, with at most 192 KiB of model prose and 1,000
103
+ source evidence entries. They use an experimental host metadata envelope, not
104
+ an AI Surface interchange schema. Model-authored prose and IDs are checked in the
105
+ rehearsal, not mechanically validated for truth. Metadata and human-edited prose
106
+ are untrusted input on reopening; hashes identify bytes, not authenticity.
107
+
108
+ `reopen [NOTE] --source SOURCE` requires explicit current source selection and
109
+ renewed note/source transmission permission. It starts a new ephemeral Codex
110
+ thread, compares saved evidence hashes with the selected source, reports changed
111
+ or unavailable evidence, and supplies the note plus comparisons as untrusted
112
+ research context. Reopening compares the saved evidence paths, retaining unavailable prior evidence
113
+ for subsequent attempts. Compact comparisons sent to the model are bounded to
114
+ 128 KiB with an explicit omitted count; full source text is read on demand through
115
+ the normal tools. Combined context is bounded to 512 KiB. Current source reads retain their normal limits;
116
+ no shell, broad filesystem write or extra execution environment is granted.
117
+
118
+ Without NOTE, the command suggests the latest filesystem-edited numbered note in
119
+ that source's research folder, showing UTC edit time and requiring acceptance.
120
+ A tied time sorts by filename; an invalid newest note is reported, not skipped.
121
+ Folder naming and edit time do not establish source identity. Explicit NOTE can
122
+ select another folder, and successors remain there. Only this command's metadata
123
+ notes are supported; generic Markdown import is later work.
124
+
125
+ Destination ancestor identities and predecessor bytes are checked again before
126
+ publishing. Existing names are never replaced. Directory topology must remain
127
+ stable during synchronous filesystem operations; this is not protection against
128
+ an adversarial concurrent directory replacement. An interrupted process can leave
129
+ an unreferenced hidden temporary file; it does not overwrite an earlier note.
130
+ Local storage does not provide backup, encryption or publication.
131
+
132
+ ## Pending-operation indicator follow-up
133
+
134
+ The user reported long silent waits during `/save` and after questions. Commit
135
+ `a6d11ad` adds a terminal-only spinner with elapsed seconds for connecting,
136
+ answering, reopening and preparing a note. It clears around normal output and
137
+ stops before returning to the prompt, including errors/cancellation. It reports a
138
+ pending request, not known server-side progress; nonterminal output never animates.
139
+
140
+ An isolated installed candidate was rehearsed with real Codex 0.166.0,
141
+ `gpt-6-astra`, ChatGPT sign-in and Node 26.13.0 on macOS. The same synthetic Lumen
142
+ question/OIDC choice was followed by `/save` and `/exit`. The spinner produced
143
+ 162 preparation frames over approximately 40 seconds, cleared before
144
+ **Saved and read back**, and produced no activity after the final `You>` prompt.
145
+ One note was saved, exit was 0, and source/settings bytes remained unchanged.
146
+ Raw terminal output and independent readback remain in the selected vault's runs/.
147
+ Tarball SHA-256: `d90df87bc3f1db05a5de01ee0080d88a599ca4050e63473e548907f53b6dfe3a`.
148
+
149
+ 99 Node tests and the installed-package check passed. Terminal scenarios still
150
+ cover cancellation/failure; focused tests verify repeated activity, clearing around
151
+ output, timer cleanup and nonterminal silence. The six GitHub checks passed on
152
+ `a6d11ad`. The short walkthrough now names the visible labels and expected stop.
@@ -0,0 +1,267 @@
1
+ # Strategic direction: AI Surface security assurance
2
+
3
+ Agreed direction, 12 November 2026. Tracked in
4
+ [issue #64](https://github.com/injectionator/n8r-surface/issues/64).
5
+ This document captures the destination and proposed delivery milestones. It does
6
+ not claim an implemented framework, accepted assurance levels or runtime results.
7
+
8
+ ## Purpose and primary reader
9
+
10
+ Provide a practical security assurance framework for people building and operating
11
+ AI Surfaces, supported by professional services, reusable guidance and tools.
12
+ The primary reader is the consultant advising a security engineer or architect,
13
+ who helps the system owner decide what protection is needed and whether the
14
+ evidence supports operation, release or a corrective change.
15
+
16
+ The consultant must be able to explain the expected security capabilities,
17
+ applicable controls, implementation options, verification procedures and remaining
18
+ risk in language the owner can act on. The owner selects or approves the policy,
19
+ required assurance level and any exceptions with that advice. Assessment records
20
+ identify the assessor and the basis for each judgment; automation supplies evidence
21
+ and repeatable checks without silently making the owner's risk decision.
22
+
23
+ The intended service is to define the security expected of an AI Surface, discover
24
+ how it is implemented, and demonstrate through observable testing whether the
25
+ running system meets those expectations. Retain the evidence needed to explain
26
+ its posture and verify improvements. A readable framework and a useful assessment
27
+ are deliverables in their own right; the tools support their production and reuse.
28
+
29
+ This is a strategic use of the independently usable AI Surface Model. There remains
30
+ one model. The framework must work across different compositions, including
31
+ applications, agents, models, tools, data services and their external dependencies.
32
+ Unknown or inaccessible service internals remain explicit coverage limits.
33
+
34
+ ## From policy to implementation and observable verification
35
+
36
+ | Layer | Required content and intended use |
37
+ | --- | --- |
38
+ | Policy and security objectives | Protected assets, intended users and authority, threats, obligations, scope and acceptable behaviour. |
39
+ | Security capabilities and levels | Human-readable capability areas and versioned L1/L2-style profiles stating which requirements and verification obligations apply. |
40
+ | Controls | Requirement, rationale, applicability, responsible party, protected resources/paths, enforcement points, dependencies and exceptions. |
41
+ | Implementation guidance | Concrete steps and configuration requirements for named component versions and compositions; alternatives that satisfy the same intent. |
42
+ | Verification procedures | Static inspection and live probes/attacks, prerequisites, authorized scope, expected outcomes, required observation points and failure/inconclusive criteria. |
43
+ | Assessment and improvement | Findings, evidence, conformance, coverage, limitations, remediation and repeat verification against an identified successor setup. |
44
+
45
+ Security capabilities here mean abilities such as enforcing user authority; they
46
+ are not synonymous with a Capability Surface, which describes supported component
47
+ and integration possibilities. L1/L2 are intended framework concepts, not existing
48
+ levels or product ratings. Their control membership, applicability rules and
49
+ verification depth still need definition. Decide explicitly whether a level adds
50
+ controls, stronger evidence or both. Version policies and profiles so later changes
51
+ do not silently change earlier assessments.
52
+
53
+ Each control entry should let a practitioner answer: what is required, why it
54
+ applies, where it is enforced, how to implement it, how to verify it, and what
55
+ counts as sufficient evidence. A component's controls may depend on controls
56
+ provided by another service. Evaluate complete paths as well as isolated nodes.
57
+
58
+ ## Bidirectional assessment of static and live Surfaces
59
+
60
+ Work downwards from policy to controls, implementation and tests, and upwards from
61
+ discovered components and behaviour to the requirements they support or violate.
62
+ Neither direction requires a complete inventory before useful work can begin.
63
+
64
+ Static inputs include repositories, documentation, inventories and configuration
65
+ artifacts. Live inputs include running instances, effective configuration, service
66
+ connections, user/role context, logs and permitted observations or probe results.
67
+ Bind these to the relevant component and relationship identities, source revisions,
68
+ effective setup, time and test Run. Repository configuration can differ from the
69
+ effective running setup; preserve and investigate that disagreement.
70
+
71
+ Keep these judgments separate:
72
+
73
+ - **Required:** a policy/profile makes a control applicable to an identified scope.
74
+ - **Claimed or configured:** documentation, code or instance configuration provides
75
+ evidence about the implementation, with its own limitations.
76
+ - **Demonstrated:** a scoped observation or test supports or contradicts a claim
77
+ about the running system under stated conditions.
78
+
79
+ These judgments complement Capability/Bound/Observed evidence distinctions; they
80
+ are not replacements or automatic conversions. Configuration does not establish
81
+ runtime effectiveness. Missing evidence is unknown, not proof of an absent
82
+ control; a supported finding of absence must explain the examined scope.
83
+
84
+ Link policy requirements to controls; controls to protected nodes, relationships
85
+ and paths; implementations to enforcement components and configuration; and
86
+ verification procedures/results to the exact claims and setup they assess. Users
87
+ must be able to navigate from a component to its controls and tests, or from a
88
+ control to every known implementation, uncovered path and outstanding question.
89
+
90
+ ## Domain, identity and control-aware runtime paths
91
+
92
+ Assess the paths an LLM can assemble at runtime against the security framework.
93
+ A test needs business meaning: which actor, acting from which context, attempts
94
+ which operation on which resource, under which policy? HR records, CRM accounts,
95
+ financial transactions and clinical data introduce different permissions and
96
+ consequences. Trace authentication, authorization and accounting across the path,
97
+ including changes from the initiating user to delegated or service identities.
98
+
99
+ The circuit analogy describes how a request can connect tools, data and services
100
+ into an execution path. It is an explanatory view of the same AI Surface Model,
101
+ not a separate model or a claim that the LLM controls every connection. Host logic,
102
+ tool availability, permissions and external systems also determine execution.
103
+ The following synthetic diagram illustrates one candidate path, not live evidence:
104
+
105
+ ```mermaid
106
+ flowchart LR
107
+ U[User and request context] --> A[Application and LLM]
108
+ A -->|Proposed tool call| G[Tool gateway]
109
+ G -->|Executed request| C[Service authorization]
110
+ C -->|Permitted operation| D[Protected business data]
111
+ C -->|Denied operation| X[Denial]
112
+ P[Policy and control requirements] -.-> G
113
+ P -.-> C
114
+ G -.-> E[Correlated execution evidence]
115
+ C -.-> E
116
+ D -.-> E
117
+ ```
118
+
119
+ The illustrated enforcement points are candidates to investigate; their presence,
120
+ coverage and effectiveness require evidence. A real path may branch, run in
121
+ parallel, retry, loop or invoke further agents. Finite tools do not imply a small
122
+ set of histories: arguments, state and repeated operations can produce an enormous
123
+ or unbounded execution space. Do not promise exhaustive testing of arbitrary
124
+ human inputs or every possible circuit.
125
+
126
+ Assess the intended protection of each technique against explicit requirements:
127
+ input constraints, actor/task-specific tool access, per-action authorization,
128
+ sequence/state restrictions, approval bound to the executed action, execution/data
129
+ budgets, and detection/interruption. These are candidate control families, not an
130
+ adopted catalog. Input filtering or an LLM guardrail must not receive credit for
131
+ service authorization without evidence that it enforces the relevant requirement.
132
+ Individually permitted operations may combine into a forbidden business outcome.
133
+
134
+ The assessment must identify which control held or failed. If the model proposes
135
+ a prohibited read and the service denies it, downstream authorization held for
136
+ that attempt even if a guardrail did not. If the model refuses after a tool has
137
+ retrieved protected data, investigate the retrieval and disclosure separately.
138
+ If the response invents a record without retrieval, assess integrity rather than
139
+ claiming demonstrated unauthorized data access. Prompt injection is one means of
140
+ exercising these boundaries; direct requests, retrieved content, tool outputs and
141
+ stateful sequences can test the same business rule. Existing probe engines can
142
+ supply inputs; the framework supplies context, expectations and evidence criteria.
143
+
144
+ ### Proof, counterexamples and bounded tests
145
+
146
+ | Conclusion | Required basis and limit |
147
+ | --- | --- |
148
+ | Proved within stated assumptions | An identified property and explicit model/scope, justified assumptions and a suitable proof or exhaustive analysis of a bounded state space. Establish how the analyzed model corresponds to the deployed setup; a model proof alone is not proof of the whole live service. |
149
+ | Disproved by a counterexample | A traceable execution violating the exact claim under its applicable conditions. One valid counterexample defeats a universal claim, even if the behavior is intermittent; it does not establish prevalence or failure of unrelated controls. |
150
+ | Supported by bounded testing | Identified cases, repetitions, outcomes and observation coverage. Report the tested conditions and unexplored space; passing samples do not prove all paths safe. |
151
+ | Inconclusive or blocked | Missing prerequisites, ambiguous attribution or insufficient telemetry. State what evidence would resolve the judgment; no observed failure does not imply a pass. |
152
+
153
+ For probabilistic behavior, retain model/provider version where available, relevant
154
+ settings, prompts and source context subject to privacy rules, initial state,
155
+ identity/role, setup revision, attempts and observed outcomes. Record unknown
156
+ provider details and changes. Repeated trials can characterize the sampled
157
+ conditions; do not infer a general failure probability without a justified sampling
158
+ method. Keep a retained counterexample even if later attempts cannot reproduce it.
159
+
160
+ ### Proposed Labs view: watch and replay the circuit
161
+
162
+ A proposed n8r-labs consumer capability is to draw observed execution paths as
163
+ events arrive and replay them afterwards. It should help the consultant see the
164
+ initiating and effective identities, proposed versus executed tool calls, data
165
+ movement, control decisions and resulting effects, with links back to the policy
166
+ and evidence. A denied operation may be an exercised enforcement point without
167
+ being a completed data-access path. A configured control without decision evidence
168
+ must not be displayed as an observed successful check.
169
+
170
+ Such a view depends on sufficiently correlated, authorized telemetry. Make missing
171
+ instrumentation, delayed events, uncertain ordering and inferred links visible;
172
+ chronological proximity alone does not establish causality. Describe observed data
173
+ movement only to the granularity supported by evidence, without exposing protected
174
+ payloads. Preserve the Run and effective setup so replay cannot silently substitute
175
+ today's configuration for the one tested. The visualization is a view onto evidence,
176
+ not proof of complete execution coverage.
177
+
178
+ This records a consumer outcome and evidence requirements only. Labs UI design,
179
+ instrumentation, event transport/storage and implementation belong in the separate
180
+ n8r-labs repository. A static evidence-linked path is enough for the first framework
181
+ slice; live animation is not a prerequisite for proving a bounded control failure.
182
+
183
+ ## Demonstrating conformance and reporting posture
184
+
185
+ The distinguishing outcome is observable testing of control effectiveness.
186
+ Probes and attacks must test explicit expected behaviour, including legitimate
187
+ use, and retain enough downstream evidence to explain the result. A model refusal
188
+ alone does not establish that a tool made no prohibited request or disclosed no
189
+ protected data. Correlate initiating and effective identities, executed operations,
190
+ authorization decisions, returned data and effects where relevant.
191
+
192
+ For example, a tenant-isolation requirement leads to inspection of identity
193
+ propagation and authorization, then authorized cross-user retrieval probes on a
194
+ controlled composition. A successful prohibited read contradicts the control claim
195
+ even if configuration inspection passed. After a defensive change, repeat both
196
+ prohibited and legitimate access and preserve the original setup and evidence.
197
+ A passing test supports the exercised conditions, not every possible attack.
198
+ Missing telemetry or unavailable prerequisites produce an inconclusive or blocked
199
+ verification result, not a pass.
200
+
201
+ The strategic goal includes scoring a service against an agreed profile. Report
202
+ conformance, assessment coverage, evidence strength/freshness and critical failures
203
+ separately. A score must name its policy/profile version, applicable scope,
204
+ assessment time and evidence basis. Untested controls must not appear as passes;
205
+ exclusions and accepted exceptions must remain visible. Critical failures must not
206
+ be hidden by averaging many easy passes. Numeric formulas, weights, level gates,
207
+ expiry rules and treatment of exceptions remain design work; no current Surface
208
+ artifact earns a framework score merely by validating or being saved.
209
+
210
+ The consultant's report should show the target level, requirement-by-requirement
211
+ judgments, supporting and contrary evidence, gaps, prioritized corrections and the
212
+ owner's recorded decisions. Use concise defaults with explanations and evidence
213
+ within one request, following the [presentation guidance](product-direction.md#presentation-brief-by-default-explanation-within-reach).
214
+
215
+ ## Existing work and proposed next milestones
216
+
217
+ Status snapshot: 12 November 2026. Milestones below are a recommended sequence,
218
+ not implementation authorization or release commitments. Close the existing
219
+ acceptance loop while developing the first bounded framework example.
220
+
221
+ | Work or milestone | Position and contribution | Evidence needed to advance |
222
+ | --- | --- | --- |
223
+ | Discovery and durable descriptions | Capability/Bound contract, standalone skill 0.1.11 and two-product verification merged in #53/#54/#58. These provide identities, relationships, evidence and revision preservation. | Retain the accepted bounded evidence; do not reinterpret it as security-posture acceptance. |
224
+ | Practical consultant intake | Incremental source discovery and fresh-session correction rehearsed in draft #63; installation handoff in draft #62. | User review of the saved brief and useful next enquiries; preserve source/configuration/runtime distinctions. |
225
+ | First framework slice | Next proposed milestone: one security capability, a small explicit control set, a provisional level profile, domain/identity context, implementation guidance and verification procedures with explicit proof/test limits. | A consultant and engineer can trace one policy requirement down to a test and a discovered fact back to the requirement, using a synthetic worked example. Approve the bounded profile before rating against it. |
226
+ | Static and configured assessment | Apply that slice to a known composition using the existing discovery path. LibreChat/VPS/Atlas is an existing motivating path, not a required architecture or verified posture. | Evidence-linked control applicability, implementation claims, gaps and proposed probes; independent source/configuration readback. |
227
+ | Observable runtime proof | Extend the [first value demonstration](product-direction.md#smallest-end-to-end-value-demonstration) with the selected control/profile and assessment record. Fixture and execution owner remain to be selected. | One discovered authority failure, a defensive change, prohibited/legitimate retests, downstream evidence attributing the result to a specific control, a retained runtime path and preserved before/after setup references. |
228
+ | Repeatable assessment and scoring | Derive the initial reporting/rating rules from the worked example, then exercise another composition without product-specific control meanings. | Explicit coverage and critical-failure rules; independent review can reproduce judgments from retained evidence and identify inconclusive cases. |
229
+ | Live path visualization | Proposed Labs consumer outcome: watch/replay observed circuits with identity and control context. No Labs implementation is included here. | Correlated events resolve to the same Run/setup and evidence; proposed/executed/denied actions, inferred links and telemetry gaps remain distinguishable. |
230
+ | Distribution and consumer integration | CLI #59 and scoped candidate #60 remain drafts; #60 is stacked on #59. Labs adaptation belongs in its own repository. | Separate experience acceptance, release decisions and named-consumer evidence; these are delivery channels, not substitutes for assurance proof. |
231
+
232
+ The narrow runtime demonstration is intended to become the first exercised path
233
+ through the framework, not the whole strategic destination. Broader control coverage, additional levels,
234
+ continuous reassessment and more implementations can follow evidence from that
235
+ path. Existing issues #13/#17/#27 retain their wider remaining scope.
236
+
237
+ ## Standards and delivery boundaries
238
+
239
+ The separate [CycloneDX adoption direction, #66](https://github.com/injectionator/n8r-surface/issues/66)
240
+ and [draft #67](https://github.com/injectionator/n8r-surface/pull/67) establish the
241
+ inventory/exchange foundation and SBOM-first discovery direction. Inventory,
242
+ assembly and operational records should connect to controls and assessments.
243
+ Their existence alone does not establish effectiveness or conformance.
244
+
245
+ Investigate bounded mappings to CycloneDX 1.7 definitions/declarations and reference
246
+ mechanisms, and OSCAL control implementation and assessment concepts. CycloneDX
247
+ 1.7 defines claims, targets and evidence; OSCAL describes component control
248
+ implementations and assessment records. See the
249
+ [CycloneDX 1.7 reference](https://cyclonedx.org/docs/1.7/proto/)
250
+ and [OSCAL model overview](https://pages.nist.gov/OSCAL/learn/concepts/layer/).
251
+ OSCAL is a mapping candidate, not an adopted dependency. Pin its selected version
252
+ before producing a mapping. Follow the [interoperability evidence requirements](../interoperability.md#evidence-for-compatibility);
253
+ no mapping, round trip or consumer compatibility is established by this strategy.
254
+
255
+ n8r-surface supplies discovery descriptions and the meanings required to connect
256
+ policy, claims and evidence. Execution owners supply authorized test/probe runs;
257
+ observability supplies correlated evidence. Labs application design remains in
258
+ its separate repository, with Lab-owned configuration and bindings. A manual
259
+ execution handoff can prove the first slice without a general telemetry platform.
260
+
261
+ The installed skill remains read-only with respect to target systems. This strategy
262
+ does not add runtime collection, attack execution, an Observed Surface contract,
263
+ a control catalog or a scoring engine. Each behavior change needs its own intent,
264
+ installed-product attempt or recorded blocker, implementation and verification.
265
+ Customer configurations, user data and raw telemetry remain in permitted private
266
+ storage; publish only approved sanitized evidence. Framework conformance claims
267
+ must stay within their assessed scope and do not imply certification.
@@ -0,0 +1,142 @@
1
+ # Self-contained Surface verification
2
+
3
+ Issue [#68](https://github.com/injectionator/n8r-surface/issues/68), draft
4
+ [PR #69](https://github.com/injectionator/n8r-surface/pull/69). Candidate 0.1.13.
5
+ This record separates exercised behavior from pending human acceptance.
6
+
7
+ ## Baseline
8
+
9
+ An actual installed 0.1.12 session inspected its instructions/helpers and ran
10
+ exporter help. It reported that BOM-only recovery was unavailable: native records
11
+ and mapping siblings were required. This was a capability inspection, not a full
12
+ research round trip. No product findings or historical research were supplied.
13
+
14
+ ## Synthetic checks
15
+
16
+ The new fixture retains four database alternatives, one selected dependency,
17
+ unknown inference, source evidence, a decision and investigation entries in one
18
+ BOM. Tests exercise copied-BOM recovery, selected graph equality, source/evidence
19
+ references, independent observations, hosting distinctions, successor preservation,
20
+ changed-view reconciliation, unsafe directories and HTML escaping. These are
21
+ bounded automated checks, not model conformance or human acceptance.
22
+
23
+ Sunshine commit `beaab3faf2bab234069a8677fc627de2f0f01a3d` generated HTML with the
24
+ synthetic application, model and services but omitted profile alternatives/evidence
25
+ and investigation entries. It is not the selected investigation renderer.
26
+
27
+ Browser review of the generated local HTML was blocked by the browser tool's
28
+ `file:` URL policy. No alternate route was attempted. File-level checks do not
29
+ establish visual/browser acceptance.
30
+
31
+ CycloneDX Python Library 11.12.0 with JSON validation extras accepted the synthetic
32
+ BOM against 1.7 and loaded both components, four services and sixteen properties.
33
+ It exposes no `annotations` attribute in this deserialization API; no complete
34
+ profile round-trip claim is made. The native profile reader checks the complete
35
+ BOM directly, including annotations and references.
36
+
37
+ ## Independent review
38
+
39
+ Three material findings were reproduced in tests and fixed: BOM-path bypass of
40
+ edited sibling views, disconnected inventory missing from human views, and dropped
41
+ historical observations. The focused suite now has fifteen passing checks.
42
+
43
+ ## Installed assessment
44
+
45
+ The user explicitly selected a local LibreChat checkout. Sources, transcripts and
46
+ research remain in a new private run, separate from prior historical rehearsal.
47
+ The everyday installation remains unchanged. All sessions used Codex CLI 0.166.0,
48
+ ChatGPT sign-in, configured `gpt-6-astra`, Node 26.13.0 and macOS. No API-key or
49
+ provider/model fallback. The exact initial installation matches `2b2816e`; the
50
+ reviewed candidate used for diversion/continuation matches
51
+ `bd2b8aef4ef7e6154d40c23349a846be69146da8` (24 plugin files).
52
+
53
+ The harness supplied the installed skill, selected source and writable private
54
+ workspace. Network, memory, unrelated tools and repository instruction loading
55
+ were disabled. Filesystem probes checked denied historical evidence; these
56
+ specific controls are not a general claim of host-memory isolation.
57
+
58
+ The installed Researcher saved revision 001 with an initial plan before research.
59
+ It independently inspected bounded ranges in fourteen files and saved revision
60
+ 002 with twelve nodes, thirteen relationships, twelve evidence records, ten
61
+ journal entries and five gaps. All fourteen source hashes matched independent
62
+ readback. No deployment selections were asserted. Git inspection was blocked
63
+ inside the rehearsal; the Researcher recorded inspected hashes and the limit,
64
+ rather than asserting a clean checkout. Developer-only source identity metadata
65
+ is retained privately and was not supplied as research findings.
66
+
67
+ The scripted user diversion paused tool/document investigations and prioritized
68
+ authentication. The reviewed candidate inspected two additional files and saved
69
+ revision 003. The BOM retains the rehearsal user decision, seventeen journal
70
+ entries and three deferred paths with reasons. All ten files in revisions 001/002
71
+ remain byte-identical. This is an agent-run user scenario, not human acceptance.
72
+
73
+ One independent presentation assertion searched for an unescaped setting name in
74
+ Markdown and failed after the successful save. The installed agent normalized
75
+ Markdown-escaped underscores and completed readback; both results are retained.
76
+ No saved files were replaced to make the assertion pass.
77
+
78
+ For the final continuation, only revision 003's BOM was copied to a new writable
79
+ workspace. The harness confirmed that the old workspace was denied and the prior
80
+ ephemeral thread was unavailable. The reviewed installation recovered the objective,
81
+ authentication-first choice, deferred paths/reasons and uncertainties, then saved
82
+ revision 004 with a brief/map/journal. It did not need native siblings or old chats.
83
+
84
+ Independent readback found twelve nodes, thirteen unchanged relationships, fifteen
85
+ evidence records, twenty-two journal entries, two scoped rehearsal decisions and
86
+ three deferred paths. All inherited evidence and source-backed claims were unchanged;
87
+ the additional user-basis record describes continuation scope, not a source finding.
88
+ All fifteen files in revisions 001–003 remain byte-identical. Seventeen source
89
+ references across sixteen unique inspected files match their hashes; the original
90
+ checkout's revision and working-tree status remain unchanged.
91
+
92
+ The developer's first final assertion mistakenly required equality of the whole
93
+ evidence array, rejecting the legitimate appended continuation-scope record. It
94
+ was corrected to require preservation of inherited evidence and equality of all
95
+ non-user source evidence; that check passed. Both attempts are recorded privately.
96
+
97
+ These are agent rehearsals of the documented interactions. They do not establish
98
+ human acceptance, actual deployment selections, runtime effectiveness or exhaustive
99
+ source coverage. Selected/possible visual semantics are exercised by the synthetic
100
+ fixture; the real assessment appropriately leaves deployment selection unknown.
101
+
102
+ ## Human task list
103
+
104
+ Prerequisites: candidate 0.1.13 installed, Node 22/24/26 and readable selected
105
+ sources; a new writable Surface folder outside the source checkout. The maintainer
106
+ provides the exact candidate revision/digest and rehearsal output separately.
107
+
108
+ - [ ] Open a fresh chat with the installed Researcher and the selected source.
109
+ Ask: “Explain the AI-relevant paths in this source. Save the Surface and maintain
110
+ an investigation journal in this folder as you go. Show me what to inspect next.”
111
+ Expect an initial plan, useful partial findings and openable journal/map/brief.
112
+ - [ ] Inspect the map. Possible paths and selected paths must look different.
113
+ Open a relationship's evidence; unknown selection must not be called absent.
114
+ Selection must not be called observed runtime use without dated evidence.
115
+ - [ ] Redirect: “Pause that path and investigate authentication first. Keep the
116
+ deferred work and explain what access would help.” Expect a recorded diversion,
117
+ deferred reason, new next steps and a new revision preserving earlier files.
118
+ - [ ] In another fresh chat supply only the latest BOM and source access. Ask:
119
+ “Continue this Surface. What did I choose, what remains uncertain, and what
120
+ should we investigate next?” Expect recovery of the choices, evidence and
121
+ investigation state without requiring a native sibling or old chat.
122
+ - [ ] Report **Pass / Fail / Blocked**, the interaction, candidate revision and
123
+ relevant output paths. Fail for lost decisions, invented bindings, changed old
124
+ files or missing state; Blocked for inaccessible sources/runtime. Keep source
125
+ data private. Retain outputs until reviewed; cleanup is only the disposable run.
126
+
127
+ ## Automated checks and retained candidate
128
+
129
+ - Node 22.23.2, 24.22.2 and 26.13.0: 224 tests and package checks pass on each.
130
+ - Markdown lint 0.24.0, offline lychee 0.24.2 links/anchors, cffconvert 2.0.0,
131
+ JSON parsing (18 examples), workflow shell syntax and 24 Python tests pass.
132
+ - `npm ci` and `npm cache add yaml@2.9.1` completed; no new runtime dependency.
133
+ - Exact reviewed candidate ZIP retained privately; SHA-256
134
+ `bdab66880bc1763c73ee30d98d3b188a4c8ae2af410f03b364785fbcc58640dd`.
135
+ No everyday plugin replacement, release or merge.
136
+
137
+ The first package check failed because its golden instruction digest still named
138
+ the earlier instructions; the reviewed digest was updated and all three package
139
+ checks passed. Earlier red regression runs are retained as development evidence,
140
+ not counted as final successes. Browser visual review and human acceptance remain
141
+ pending. Structure, byte integrity and named consumer reads do not prove research
142
+ accuracy or deployment behavior.