Simplify onboarding, review guidance and business-facing language
Browse filesAdd a guided synthetic sample, plain-language task labels and human review perspective explanations. Show saved-state next steps, clarify source versus independent-testing decisions, and place storage and optional fix details behind accessible disclosures. Preserve browser-local data, authorization, evidence requirements and the no-cost static runtime. Verified with 42 core tests, four Chromium suites, deployment checks, HTML parity and desktop/mobile review.
Files changed (15)
- CONTRACT.mdAdded+26
- PROVENANCE.md+4-2
- README.md+24-5
- SOURCE-MANIFEST.json+15-12
- VERIFICATION.md+11
- deploy_hf.py+1-1
- docs/superpowers/plans/2026-11-03-usability.mdAdded+24
- index.html+27-19
- static/app.js+57-14
- static/index.html+27-19
- static/style.css+30-2
- tests/browser_engagement.cjs+1
- tests/browser_storage.cjs+1
- tests/browser_ui.cjs+5
- tests/browser_usability.cjsAdded+61
1234567891011121314151617181920212223242526# Shared implementation contract
## Current runtime — static browser application
The current deployed app is a public Hugging Face Static Space with `sdk: static` and root `index.html` as its entry point. HTML, CSS and JavaScript run locally in the browser; no Flask/Gradio backend, model, scanner, application password or Space Secrets are needed. Results and notes are saved in IndexedDB for the browser profile and origin. Raw submissions are discarded. The five hats are human review perspectives with suggested tasks and workbooks, not running agents.
Use README.md for current usage and verification. The static contract below records the architectural transition; subsequent supported features include JSON restore, analyst findings, role workbooks, report versions and linked continuations. The earlier “import not required” statement is historical scope, not a description of the current feature set. The current deployment is public; the optional helper creates new private projects only.
## Historical prototype — Flask and SQLite (superseded)
Python Flask + SQLite + vanilla JS. Root creates Docker, docs, deploy helper; backend owner: app.py, engine.py, tests/test_backend.py; frontend owner: static/index.html, static/app.js, static/style.css. No edits outside owned files.Single isolated customer workspace per deployment. APP_ACCESS_KEY min 24 chars and APP_SECRET_KEY min 32 chars mandatory unless TESTING config. DATA_DIR defaults ./data. Cookie sessions HttpOnly SameSite Strict, Secure by default (COOKIE_SECURE=false for loopback development only). CSRF token via X-CSRF-Token for all authenticated mutations.API JSON responses; errors {error:string}. GET /api/session returns {authenticated:bool,csrf_token:string|null,workspace:string}; POST /api/login {access_key} => same session response; POST /api/logout => {ok:true}. GET /api/assessments => {assessments:[assessment summaries]}. POST /api/assessments {name,workflow:'code'|'alerts'|'exercise',scope,authorization:true,content:string,roles:['red','blue','white','black','purple']} => {assessment:object} HTTP201. GET /api/assessments/<id> => {assessment:object}. DELETE same => {ok:true}. PATCH /api/assessments/<id>/findings/<fid> {verdict,note} => {assessment:object}. GET /api/assessments/<id>/export?format=json|markdown returns file.Assessment: {id,name,workflow,scope,created_at,roles,findings:[],missions:[],summary:string,coverage:[],activity:[]}. Finding: {id,title,severity:'high'|'medium'|'low',confidence:'medium'|'low',verdict:'unresolved'|'confirmed-static'|'confirmed-runtime'|'rejected',location,root_cause,input_to_impact,prerequisites,mitigations,evidence,remediation,review_note}. Every automatic result unresolved; manual confirm requires substantive note, no runtime proof claim from engine. Activity {at,action,note}; persisted without raw source/logs. Missions {role,title,objective,steps:[string],deliverable,limitations:[string]}. Summary list fields id,name,workflow,scope,created_at,roles,finding_count,unresolved_count.Code accepts Python snippets max 64000 chars, uses AST for eval/exec and subprocess shell=True candidates; secret-like assignment pattern returns redacted evidence, no raw secrets stored/returned. Alerts strict JSON array <=500 objects: event,actor,source_ip optional; events login_failed repeated >=5 actor+source, privilege_change, malware_detected. Exercise accepts scenario prose. All five roles generate bounded, role-specific mission plans with challenge/adjudication steps, no automatic tools/remote requests/exploitation. No model inference claimed.Frontend session checks; login screen with access key; dashboard starts empty, demo input fill explicit; assessment form; five role selectors; three workflows; scopes + checkbox authority; candidate ledger with analyst decisions and note; missions + coverage; search; JSON/MD export; delete confirmation; logout. No localStorage keys/customer data; textContent for untrusted output. No CDNs/external assets. Accessible labels, responsive mobile.
## Historical prototype — native Gradio (superseded)User explicitly requested no Docker. README now uses sdk:gradio and app_file:gradio_app.py. Native UI adapts the existing Flask API internally; the Flask web server is not exposed. Missing application secrets produce a locked setup page. Gradio uses its own external login (analyst / APP_ACCESS_KEY), share=False and disabled analytics. Raw inputs are not queued or exported as files. Static browser interface is optional legacy engineering UI. Private remote Space created at PabloRod11/napolean-cyber-command through authenticated browser.
## Static architecture transition — historical implementation instructionsUser requires no cost. Switch same private HF repo to sdk:static, app_file:static/index.html, no build command. No Docker/Gradio/compute/model/API secrets needed for deployed app. Existing Python code may remain as optional reference but is not executed or required by static runtime. Runtime HTML+CSS+JS only, same-origin local assets only.Static engine owner new static/local.js, static/playbooks.js, tests/test_local.cjs. Frontend owner static/index.html, static/app.js,static/style.css. Root owns metadata/docs/deploy helper and packaging. No concurrent shared files.Keep assessment schema and workflows exact. Python code review becomes explicitly limited REGEX/PATTERN nomination, never AST/parser/taint/exploit validation. All automatic candidates unresolved; no eval/Function/subprocess/server calls. Alerts same schema<=500; keyword scenario routing same original templates. Generate playbooks.js data from original engine. Source/raw alerts/scenario never persisted; store minimal output metadata/candidate evidence only. Secret redaction best effort. All roles preserved.Expose globalThis.CyberLocal with async request(path, options={}) returning existing API JSON shapes for /api/assessments list/create/detail/PATCH findings/DELETE; options.body can JSON string, method defaults GET. No auth/session/login API. exportText(id,format) returns authenticated-browser-local record as string (json/markdown). Browser state is NOT authentication or tenant isolation. Store results in IndexedDB and await transaction completion before reporting success. Error if browser storage unavailable; never silently pretend persistence. Browser profile/origin owns records, not cross-user shared database. Concurrent review updates should atomically append activity in readwrite transaction. Do not persist raw inputs. validate fields/roles/authorization, cap records=100 and findinghistory=200 to bound storage growth with clear errors.Expose analyze(payload), redact(value), markdownExport(assessment), LocalService(store), IndexedDBStore. Use plain script UMD/CommonJS for Node built-in tests. request/exportText delegate singleton service. Keep imports local and no runtime dependencies/CDNs. local.js/playbooks.js loaded with defer before app.js. UI auto opens browser workspace after DB ready/list; remove shared-key/login/CSRF/session claims and make clear records stay in this browser; private HF access gate remains separate. Close/clear-view only clears DOM sensitive state, never suggests logout/encryption. Export Blob text locally. Add export import? Not required; explicit JSON exports backup, no new import functionality. Surface storage errors and local-only warning. Demo input remains explicit synthetic sample only.1234563 unmodified lines10111213141516# Provenance and final runtimeThe user invoked Napolean and Napolean Security, then required no Docker and no-cost hosting. The final runtime is a public Hugging Face Static Space with dependency-free HTML/CSS/JavaScript. It runs no server, GPU, model provider or upstream scanner. The evidence lifecycle and mission templates are original implementation of the requested commander/scope/discovery/challenge/adjudication concepts.Napolean Security references AgriciDaniel/claude-cybersecurity, tanviet12/vbsec, agamm/claude-code-owasp, ghostsecurity/skills, goplussecurity/agentguard, codexstar69/bug-hunter, kenryu42/cc-safety-net, anthropics/defending-code-reference-harness, trailofbits/skills and cloudflare/security-audit-skill. None of their executables, source files or rule sets are bundled or claimed to run. Their licenses do not automatically license this original application.3 unmodified linesThe preferred local Crawl4AI documentation fetch failed because its browser could not start; official host web retrieval was used. Graphify was not run because the workspace started empty and source relationships were small enough to inspect directly.Primary documentation consulted on2026-10-31:- [Static HTML Spaces](https://huggingface.co/docs/hub/spaces-sdks-static): sdk:static, HTML entry points and no-compute free hosting.- [Space management](https://huggingface.co/docs/huggingface_hub/guides/manage-spaces): source publication and private repositories.- [Gradio Spaces](https://huggingface.co/docs/hub/spaces-sdks-gradio) and [ZeroGPU](https://huggingface.co/docs/hub/spaces-zerogpu): investigated before the final no-cost architecture; not the final hosting stack.1234563 unmodified lines101112131415161718# Provenance and final runtimeThe user invoked Napolean and Napolean Security, then required no Docker and no-cost hosting. The current deployment is a public Hugging Face Static Space with dependency-free HTML/CSS/JavaScript. It runs no server, GPU, model provider or upstream scanner. The evidence lifecycle and mission templates are original implementation of the requested commander/scope/discovery/challenge/adjudication concepts.Napolean Security references AgriciDaniel/claude-cybersecurity, tanviet12/vbsec, agamm/claude-code-owasp, ghostsecurity/skills, goplussecurity/agentguard, codexstar69/bug-hunter, kenryu42/cc-safety-net, anthropics/defending-code-reference-harness, trailofbits/skills and cloudflare/security-audit-skill. None of their executables, source files or rule sets are bundled or claimed to run. Their licenses do not automatically license this original application.3 unmodified linesThe preferred local Crawl4AI documentation fetch failed because its browser could not start; official host web retrieval was used. Graphify was not run because the workspace started empty and source relationships were small enough to inspect directly.The deployment was initially private; the current public Space was verified on 2026-11-03. The optional publishing helper still deliberately creates a new private Space and does not change the existing deployment. Public source and app access are separate from assessment records saved in each visitor’s browser.Primary documentation consulted on 2026-10-31:- [Static HTML Spaces](https://huggingface.co/docs/hub/spaces-sdks-static): sdk:static, HTML entry points and no-compute free hosting.- [Space management](https://huggingface.co/docs/huggingface_hub/guides/manage-spaces): source publication and private repositories.- [Gradio Spaces](https://huggingface.co/docs/hub/spaces-sdks-gradio) and [ZeroGPU](https://huggingface.co/docs/hub/spaces-zerogpu): investigated before the final no-cost architecture; not the final hosting stack.
10 unmodified lines11121314151617181920212223242517 unmodified lines434445464748491 unmodified line515253545556576 unmodified lines64656667686910 unmodified lines# Napolean Cyber CommandA no-cost, browser-based cybersecurity workbench for analyst-led business security reviews. Five perspectives share one local evidence ledger: red, blue, white, black and purple hats.Public project: [PabloRod11/napolean-cyber-command](https://huggingface.co/spaces/PabloRod11/napolean-cyber-command).## Zero-cost runtimeThe deployed app is HTML, CSS and JavaScript. It uses no Docker, backend server, GPU, paid plan, model API, application keys or runtime packages. Hugging Face documents that [Static Spaces are free and use no compute](https://huggingface.co/docs/hub/spaces-sdks-static). Platform terms can change; this project does not provision chargeable resources or subscribe to anything.All assessment processing runs in your browser. Results and analyst notes are saved in IndexedDB for that browser profile and app origin. They are not uploaded to a shared customer database. The hosted Space is public. Browser storage is local to each browser profile and origin; it is not application authentication, encryption, or tenant isolation.## Working flows17 unmodified lines## Open and runOpen the public Space; a Hugging Face account is not required to view the app. No application password or Space Secrets are needed. Keep the same browser profile and app URL to access the same local records. Browser storage restrictions or iframe partitioning can prevent persistence; use the top-level app URL when necessary. The app reports storage failures rather than silently pretending records were saved.To run locally without a build step:1 unmodified linepython3 -m http.server 7860 --bind 127.0.0.1```Open http://127.0.0.1:7860/static/index.html. Python only serves files; there is no Python assessment backend. Use workspace backups regularly: clearing site data, changing browser/profile/origin, private browsing or storage eviction can remove local records. Exports contain assessment metadata and analyst notes and must be handled accordingly.## Verify6 unmodified lines# With the local server running:PLAYWRIGHT_MODULE=/absolute/path/to/playwright node tests/browser_ui.cjsPLAYWRIGHT_MODULE=/absolute/path/to/playwright node tests/browser_engagement.cjs```Browser checks use an existing Playwright installation and its Chromium binary; they add no runtime dependency. Set `PLAYWRIGHT_EXECUTABLE_PATH` if using an existing compatible Chromium executable.10 unmodified lines11121314151617181920212223242526272829303132333435363738394041424317 unmodified lines616263646566671 unmodified line697071727374756 unmodified lines8283848586878810 unmodified lines# Napolean Cyber CommandA browser-based workspace for reviewing Python snippets or alert logs, planning security exercises, and recording analyst decisions. Five review perspectives help people organize the work; they do not launch AI agents, scanners, or attacks.Public app: [PabloRod11/napolean-cyber-command](https://huggingface.co/spaces/PabloRod11/napolean-cyber-command). The hosted app and source are public; your saved assessment records remain in your own browser.## Start a review1. **Choose your material and scope.** Create an assessment, choose Python code, JSON alerts, or an exercise scenario, and describe what you are authorized to review. Use the sample input to try the workflow before entering your own material.2. **Review the results and role tasks.** Possible issues need a person to check the evidence and record a decision. The five perspectives provide suggested tasks for people, including when no possible issues are found.3. **Track fixes and keep a copy.** Record owners, decisions and follow-up work, then export a report. Download a JSON backup to preserve your workspace.Saved only in this browser: changing browsers or clearing site data can remove access to records. A report is for sharing results; a JSON backup lets you restore saved work. Raw submissions are discarded after processing. Names, scopes, generated evidence and notes can still contain sensitive information.## What the five hats mean- **Red — Plan authorized tests:** challenge security assumptions within the agreed scope.- **Blue — Review alerts and response:** investigate signals and plan defensive action.- **White — Check evidence and fixes:** review causes, evidence and remediation.- **Black — Model attacker paths:** consider hypothetical abuse paths in a bounded exercise.- **Purple — Improve detection together:** connect exercise outcomes with detection improvements.Selecting a hat adds its suggested tasks and workbook. These are review perspectives, not separate agents, scanners, permission roles or independently verified conclusions. People supply evidence and record what they observed.## Zero-cost runtimeThe deployed app is HTML, CSS and JavaScript. It uses no Docker, backend server, GPU, paid plan, model API, application keys or runtime packages. Hugging Face documents that [Static Spaces are free and use no compute](https://huggingface.co/docs/hub/spaces-sdks-static). Platform terms can change; this project does not provision chargeable resources or subscribe to anything.All assessment processing runs in your browser. Results and analyst notes are saved in IndexedDB for that browser profile and app origin. They are not uploaded to a shared customer database. The current Hugging Face project is public. Browser storage is not application authentication, encryption, or tenant isolation; public hosting does not make your local records a shared team workspace.## Working flows17 unmodified lines## Open and runOpen the public Space. No application password or Space Secrets are needed. Keep the same browser profile and app URL to access the same local records. Browser storage restrictions or iframe partitioning can prevent persistence; use the top-level app URL when necessary. The app reports storage failures rather than silently pretending records were saved.To run locally without a build step:1 unmodified linepython3 -m http.server 7860 --bind 127.0.0.1```Open http://127.0.0.1:7860/index.html (the same entry point selected by the hosted app). Python only serves files; there is no Python assessment backend. Use workspace backups regularly: clearing site data, changing browser/profile/origin, private browsing or storage eviction can remove local records. Exports contain assessment metadata and analyst notes and must be handled accordingly.## Verify6 unmodified lines# With the local server running:PLAYWRIGHT_MODULE=/absolute/path/to/playwright node tests/browser_ui.cjsPLAYWRIGHT_MODULE=/absolute/path/to/playwright node tests/browser_engagement.cjsPLAYWRIGHT_MODULE=/absolute/path/to/playwright node tests/browser_usability.cjs```Browser checks use an existing Playwright installation and its Chromium binary; they add no runtime dependency. Set `PLAYWRIGHT_EXECUTABLE_PATH` if using an existing compatible Chromium executable.
1234567891011121314151617181920213 unmodified lines2526272829303132{"README.md": "d214fe0ab2687b4407cc2c72494467aecf1c09fd74484406ea8354d294dc23dc","index.html": "3f3ca9c20597739ff5f52486639735e9193de0d0fe54b2fc885c3f3e9e749a29","static/index.html": "33bf757d22f9c7f18d9e7ff483a2412322f350b7ac3a0023fe7486fa25be102a","static/style.css": "1c76cbdaf5d7583506050cf67469ca4bf794aad2166128450dcb6dd44fca35ce","static/app.js": "17611b65180c61a335afd8bf4db57011ec8afcdf9ea0e03626f9c79bb0487f6a","static/local.js": "a341a64d2a4671bc80e104e52877d9bcad7b0d572839e4c3d614532e8d85f0d3","static/playbooks.js": "3907230561f4573801651297fde26d835d964783a175363b6434c8a4e312e80c","tests/test_local.cjs": "5610014c165d662f83706570db6f47a34929cb1c44017a8d809be2038739cabb","tests/browser_storage.cjs": "fe3ad720d8d8a6137907b790bff5220735c556a7a914d2608f141fef431a3ee2","tests/browser_ui.cjs": "836b6d5bad9830ec53ba2e521d8a0d1182b7287befbf80ba21d9becd1e33fe4f","tests/detection-fixtures.cjs": "1d9fed45afab9f37d7d2715a8dcf0c2e1e6c80c57821509df44d07e22b12383b","SECURITY.md": "105ac97b2c07ca5b8b20e4162bfb311bc30a6c332354648d71b65feac1d9181b","SERVICE.md": "7bdd60baeca50ef6b6c0ef72c277f3fbbc6e02a16203f19a171eeb47e79faeca","PROVENANCE.md": "f7211a8170c1d7a854a0afc4a00085134e196079a403b7e66dd066b6ad65dfc3","VERIFICATION.md": "b4948765c0345a89f2c75f7c3a6b72614fff6298f7544358e94b8dcba159d5f3","IMPROVEMENTS.md": "eb26380eb8cb9bcf6964acd002ab8c1cb3d16de8109c89d832aa9578235eb673","deploy_hf.py": "5cb49b840d7077b01a3c50f41953d573274475d6f9fc5f4c7c12be5f4b13ae5f","requirements-deploy.txt": "81672301ff63877bdaf3f00b06ebed759f2d2e04f4372c57024fef78c0ea42bf","tests/test_deploy.py": "95fcbd4f01ade35dd55f35c589fce3c6043f8c95197ab23d84aea032a0321416","docs/superpowers/specs/2026-10-31-business-improvements-design.md": "036f59ddfb6733bd46209681e1342f1380625adde151a6bfb859f2526647a069",3 unmodified lines"static/favicon.svg": "eb535ad41f1e22491f0c7613aae75b08724128fbc05789d1606eac54b3f520a7","docs/superpowers/plans/2026-11-02-analyst-reliability.md": "3bdf439649b81d4d4103e29fcd7b93532c136005a3391daccb013b7c7fd6bc8d","docs/superpowers/specs/2026-11-02-analyst-reliability-design.md": "060254765a96aabece0b3388585273d05abed1e280ab6abe18633e5d2d9349e6","tests/browser_engagement.cjs": "94e2dd518c40797c76e010d70b6f6d66fc26d3180c3efc9a47f8d9269132f36f","tests/legacy-snapshot.json": "8422678b6caf5268cd8cdbc59cee2a6cf03ab00310e6923133ca24cd63a82c2d","docs/superpowers/plans/2026-11-02-engagement-workflows.md": "edb546e22a04106ac1aa5fec9b0964983ab5aa6554f6d69c455e5dfae274251b","docs/superpowers/specs/2026-11-02-engagement-workflows-design.md": "3b78b277df3cf59001cbf7b0a69d515143b057a4914bd53946bfcd565eb1d4dd"}1234567891011121314151617181920213 unmodified lines2526272829303132333435{"README.md": "958c9baaf99fe604332b902b7a8e94fa0713a6dde66cd0c1fc0217255300bc8f","index.html": "f2d602f3c51a97434b109656a89a2504bdc4d29e72939449047af59a64d39179","static/index.html": "0c0181b8234dbcd0747aeb1d18a6561f6d11d8781c248f6a7ddbdeacf1355c63","static/style.css": "11ced599ffd165983f06c044f7176763d48d92ca47505a1efadadf4d519beb14","static/app.js": "aebe9b22e8129af18a7b650ed74fbb130b03c397054a23bf4f62f5953acc1827","static/local.js": "a341a64d2a4671bc80e104e52877d9bcad7b0d572839e4c3d614532e8d85f0d3","static/playbooks.js": "3907230561f4573801651297fde26d835d964783a175363b6434c8a4e312e80c","tests/test_local.cjs": "5610014c165d662f83706570db6f47a34929cb1c44017a8d809be2038739cabb","tests/browser_storage.cjs": "fe7327875e08c4cc51f5f0ca32f25b2365362634180cac02af907e115344aa40","tests/browser_ui.cjs": "d6fe9ca16dfe59bed97f4a8d800fcf7eb863a3fe7b19b53d49a53e40be80e9fc","tests/detection-fixtures.cjs": "1d9fed45afab9f37d7d2715a8dcf0c2e1e6c80c57821509df44d07e22b12383b","SECURITY.md": "105ac97b2c07ca5b8b20e4162bfb311bc30a6c332354648d71b65feac1d9181b","SERVICE.md": "7bdd60baeca50ef6b6c0ef72c277f3fbbc6e02a16203f19a171eeb47e79faeca","PROVENANCE.md": "4f2e3bdc539df09f79e091086d5bd2bb855c34bc18acb712281e51c4d504c9a1","VERIFICATION.md": "82c76282c7f7a85b3b93dfa62dbefb725ab9e0e9ee738dd9168951d54534c068","IMPROVEMENTS.md": "eb26380eb8cb9bcf6964acd002ab8c1cb3d16de8109c89d832aa9578235eb673","deploy_hf.py": "82440fd36b692d785fc9bfd17d3e65bbee18cd83694978c09b223057ee1405dc","requirements-deploy.txt": "81672301ff63877bdaf3f00b06ebed759f2d2e04f4372c57024fef78c0ea42bf","tests/test_deploy.py": "95fcbd4f01ade35dd55f35c589fce3c6043f8c95197ab23d84aea032a0321416","docs/superpowers/specs/2026-10-31-business-improvements-design.md": "036f59ddfb6733bd46209681e1342f1380625adde151a6bfb859f2526647a069",3 unmodified lines"static/favicon.svg": "eb535ad41f1e22491f0c7613aae75b08724128fbc05789d1606eac54b3f520a7","docs/superpowers/plans/2026-11-02-analyst-reliability.md": "3bdf439649b81d4d4103e29fcd7b93532c136005a3391daccb013b7c7fd6bc8d","docs/superpowers/specs/2026-11-02-analyst-reliability-design.md": "060254765a96aabece0b3388585273d05abed1e280ab6abe18633e5d2d9349e6","tests/browser_engagement.cjs": "5c57f7943e156e3e04ce5ac886c49572c529a9965b80c22dbd5dc58cb37cc6c0","tests/legacy-snapshot.json": "8422678b6caf5268cd8cdbc59cee2a6cf03ab00310e6923133ca24cd63a82c2d","docs/superpowers/plans/2026-11-02-engagement-workflows.md": "edb546e22a04106ac1aa5fec9b0964983ab5aa6554f6d69c455e5dfae274251b","docs/superpowers/specs/2026-11-02-engagement-workflows-design.md": "3b78b277df3cf59001cbf7b0a69d515143b057a4914bd53946bfcd565eb1d4dd","CONTRACT.md": "7eaaab92c8af7bfe7817a62417a2ec2830893f84921dda5caf9948a066dcf23b","tests/browser_usability.cjs": "bd7a2e02a85363795c763be34724ed25b544a9414f3b7f90ded60290ba45ff53","docs/superpowers/plans/2026-11-03-usability.md": "89a5ee99bf6568462c7c3ea72d9d7eaeffe84d03b38c0c216d4ac7719faff15a"}
75 unmodified lines76777875 unmodified linesSource review covered optional-field import allowlists, canonical old snapshot preservation, assessment CAS, atomic continuation read/count/add, safe text rendering, no new external asset/network/runtime dependency, optional diagnostic failure handling and client-label limitations. No exploitable vulnerability was confirmed in this bounded local synthetic scope. Other browser engines, real disk exhaustion/eviction, a full accessibility audit and real customer workflows remain unverified. Graphify/upstream scanner runtimes did not run; direct source and regression evidence were used for this known small tree.Final integrated result: 42 engine tests, 16 Chromium storage checks, original browser UI workflow, new engagement browser workflow (including optional-channel and unknown-metadata fault injection), 4 publisher tests and syntax/HTML checks all pass. Original print tests now await fresh-read completion; the optional metadata test waits for the asynchronously rebuilt status panel. No application failure remained in the final reruns. Clean desktop/mobile screenshots were inspected before publication.75 unmodified lines767778798081828384858687888975 unmodified linesSource review covered optional-field import allowlists, canonical old snapshot preservation, assessment CAS, atomic continuation read/count/add, safe text rendering, no new external asset/network/runtime dependency, optional diagnostic failure handling and client-label limitations. No exploitable vulnerability was confirmed in this bounded local synthetic scope. Other browser engines, real disk exhaustion/eviction, a full accessibility audit and real customer workflows remain unverified. Graphify/upstream scanner runtimes did not run; direct source and regression evidence were used for this known small tree.Final integrated result: 42 engine tests, 16 Chromium storage checks, original browser UI workflow, new engagement browser workflow (including optional-channel and unknown-metadata fault injection), 4 publisher tests and syntax/HTML checks all pass. Original print tests now await fresh-read completion; the optional metadata test waits for the asynchronously rebuilt status panel. No application failure remained in the final reruns. Clean desktop/mobile screenshots were inspected before publication.## 2026-11-03 — usability releaseAdded plain-language onboarding, an explicit synthetic sample entry point, functional hat descriptions, task-first tabs, saved-state review guidance, and expandable storage and optional tracking details. No schema or detection-engine changes. Both HTML entrypoints remain equivalent except for asset paths.Verification: 42 Node tests pass; JavaScript syntax checks pass. All four Chromium suites pass: browser_ui.cjs, browser_storage.cjs, browser_engagement.cjs and browser_usability.cjs. The new suite checks sample input without auto-authorization, confirmation field visibility, saved decision to report navigation, zero-issue exercise guidance, keyboard navigation, backup disclosure and 390px overflow. Desktop (1440px) and mobile (390px) screenshots were inspected. Independent source review found no blocking defects.Browser suites needed unsandboxed local Chromium launch and a loopback server. Existing tests were updated to open the new disclosures before interacting with their controls. The mechanical design detector emitted heuristic warnings (including inferred white backgrounds on the dark theme); these do not represent a clean accessibility certification. Actual dark palette and visible focus were inspected.Graphify did not run; bounded direct source inspection was sufficient. Live release verification is recorded separately after publishing.
7 unmodified lines8910111213147 unmodified lines'README.md','index.html','static/index.html','static/style.css','static/app.js','static/local.js','static/playbooks.js','static/logo.svg','static/logo-print.svg','static/favicon.svg','tests/test_local.cjs','tests/browser_storage.cjs','tests/browser_ui.cjs','tests/browser_engagement.cjs','tests/legacy-snapshot.json','tests/detection-fixtures.cjs','SECURITY.md','SERVICE.md','PROVENANCE.md','VERIFICATION.md','IMPROVEMENTS.md',)7 unmodified lines8910111213147 unmodified lines'README.md','index.html','static/index.html','static/style.css','static/app.js','static/local.js','static/playbooks.js','static/logo.svg','static/logo-print.svg','static/favicon.svg','tests/test_local.cjs','tests/browser_storage.cjs','tests/browser_ui.cjs','tests/browser_engagement.cjs','tests/browser_usability.cjs','tests/legacy-snapshot.json','tests/detection-fixtures.cjs','SECURITY.md','SERVICE.md','PROVENANCE.md','VERIFICATION.md','IMPROVEMENTS.md',)
123456789101112131415161718192021222324# Cyber Command usability implementation plan
**Goal:** Make the existing workbench understandable to business owners, analysts and portfolio reviewers.
**Approved direction:** Explain the product, offer a guided sample, use task-first labels and a review → evidence → decision → report path. Preserve the visual identity, browser-local data model, security validation, no-cost runtime and no-Docker deployment.
**Architecture:** Existing vanilla JavaScript and native HTML controls. Keep root and static HTML entrypoints equivalent apart from asset paths. No schema or detection-engine changes.
## Tasks and ownership
- [x] Forms specialist: both HTML entrypoints only. Short local-storage explanation with expandable technical detail; functional hat labels; fix scope and review-note label ordering; explain review decisions. Preserve IDs, validation and authorization.- [x] Workflow specialist: static/app.js only. Plain overview, sample launch that opens the existing form without auto-consent or saving, collapsible workspace tools, actionable assessment guidance and task-first tab names. Show confirmation fields only when required. Preserve unsaved draft and conflict handling.- [x] Commander: shared CSS, updated first-use documentation, browser regression selectors and a meaningful guided sample test. Verify zero-finding exercises, keyboard use, small screens, storage failures and saved-decision/report workflow.- [x] Fresh reviewer: check integrated changes for misleading claims, lost controls, inaccessible hidden errors and regressions. Fix material findings and rerun affected checks.
## Acceptance evidence
Run existing Node detection/storage tests, JavaScript syntax checks and browser UI/engagement suites with the installed browser runtime. Verify the sample path visually in desktop and narrow viewports and save screenshots. Publishing requires the final tested source, an explicit allowlist and live verification; do not confuse local changes with the hosted release.
## Rulings
- User explicitly approved implementation and requested new agents; continue without another plan approval.- The current project is a source export without Git metadata. Keep edits in its existing task-owned directory and preserve a before copy; no speculative worktree.- Graphify is unnecessary for this bounded UI change; direct source/caller inspection is sufficient and Graphify did not run.9 unmodified lines10111213141516171819202144 unmodified lines666768697071727374757651 unmodified lines1281291301311321331 unmodified line13513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416550 unmodified lines21621721821922022122222322422522622722822923023123223323423523623730 unmodified lines26826927027127227336 unmodified lines3103113123133143153169 unmodified linesNapolean · Cyber Command</title><link href="./static/favicon.svg" rel="icon" type="image/svg+xml"/><link href="./static/style.css?v=20261102-engagement" rel="stylesheet"/><script defer="" src="./static/playbooks.js?v=20261102-engagement"></script><script defer="" src="./static/local.js?v=20261102-engagement"></script><script defer="" src="./static/app.js?v=20261102-engagement"></script></head><body>44 unmodified lines</header><section aria-label="Browser storage notice" class="local-notice"><strong>Your browser is the workspace.</strong><p>Results are stored locally in IndexedDB for this browser profile and site origin. No shared team database, model, or server is running. Raw source, alerts, and scenario input are not stored. Export JSON backups: clearing site data or changing browsers can remove access to records.</p></section><div id="view"></div>51 unmodified lines<label for="scope">Authorized scope</label><label for="client">Client label (optional)</label>1 unmodified line<p class="fine">Client labels organize records in this browser. They do not restrict access.</p><input id="scope" maxlength="1000" name="scope" placeholder="Owned service, repository, or exercise boundary" required=""/><fieldset><legend>Assign perspectives</legend><div class="role-checks"><label><input checked="" name="roles" type="checkbox" value="red"/>Red</label><label><input checked="" name="roles" type="checkbox" value="blue"/>Blue</label><label><input checked="" name="roles" type="checkbox" value="white"/>White</label><label><input checked="" name="roles" type="checkbox" value="black"/>Black</label><label><input checked="" name="roles" type="checkbox" value="purple"/>Purple</label></div></fieldset>50 unmodified lines</label><select id="verdict"><option value="unresolved">Unresolved</option><option value="confirmed-static">Confirmed static</option><option value="confirmed-runtime">Confirmed runtime</option><option value="rejected">Rejected</option></select><label for="review-note">Decision evidence / note</label><fieldset class="review-fields"><legend>Analyst attestation · required for confirmations</legend>30 unmodified linesFor confirmed verdicts, describe the method and result in at least 20 characters, including at least 10 letters or digits.</p></fieldset><fieldset><legend>Remediation tracking36 unmodified lines</label><textarea id="tracking-retest" maxlength="2000" rows="2"></textarea></fieldset><textarea id="review-note" maxlength="4000" minlength="20" placeholder="Describe the evidence supporting your decision." required="" rows="4"></textarea><p class="fine">A runtime verdict requires evidence you obtained independently. This workbench does not execute source or validate exploitation.</p>9 unmodified lines10111213141516171819202144 unmodified lines666768697071727374757677787951 unmodified lines1311321331341351361371 unmodified line13914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816950 unmodified lines22022122222322422522622722822923023123223323423523623723823924024124224330 unmodified lines27427527627727827928028136 unmodified lines3183193203213223233249 unmodified linesNapolean · Cyber Command</title><link href="./static/favicon.svg" rel="icon" type="image/svg+xml"/><link href="./static/style.css?v=20261103-usability" rel="stylesheet"/><script defer="" src="./static/playbooks.js?v=20261103-usability"></script><script defer="" src="./static/local.js?v=20261103-usability"></script><script defer="" src="./static/app.js?v=20261103-usability"></script></head><body>44 unmodified lines</header><section aria-label="Browser storage notice" class="local-notice"><strong>Saved only in this browser. Download a backup to keep a copy.</strong><details><summary>How local storage works</summary><p>Results are stored locally in IndexedDB for this browser profile and site origin. No shared team database, model, or server is running. Raw source, alerts, and scenario input are not stored. Export JSON backups: clearing site data or changing browsers can remove access to records.</p></details></section><div id="view"></div>51 unmodified lines<label for="scope">Authorized scope</label><input id="scope" maxlength="1000" name="scope" placeholder="Owned service, repository, or exercise boundary" required=""/><label for="client">Client label (optional)</label>1 unmodified line<p class="fine">Client labels organize records in this browser. They do not restrict access.</p><fieldset><legend>Assign perspectives</legend><p class="fine">Choose human review checklists for this assessment. These perspectives guide your team; they do not run agents or attacks.</p><div class="role-checks"><label><input checked="" name="roles" type="checkbox" value="red"/>Red · Test assumptions</label><label><input checked="" name="roles" type="checkbox" value="blue"/>Blue · Strengthen defense</label><label><input checked="" name="roles" type="checkbox" value="white"/>White · Validate evidence</label><label><input checked="" name="roles" type="checkbox" value="black"/>Black · Model attacker thinking</label><label><input checked="" name="roles" type="checkbox" value="purple"/>Purple · Connect testing and defense</label></div></fieldset>50 unmodified lines</label><select id="verdict"><option value="unresolved">Needs review</option><option value="confirmed-static">Confirmed by source review</option><option value="confirmed-runtime">Confirmed by independent testing</option><option value="rejected">Rejected after review</option></select><p class="fine">Source review means you checked the code and its conditions. Independent testing means you obtained runtime evidence outside this workbench.</p><label for="review-note">Decision evidence / note</label><textarea id="review-note" maxlength="4000" minlength="20" placeholder="Describe the evidence supporting your decision." required="" rows="4"></textarea><fieldset class="review-fields" id="confirmation-fields"><legend>Analyst attestation · required for confirmations</legend>30 unmodified linesFor confirmed verdicts, describe the method and result in at least 20 characters, including at least 10 letters or digits.</p></fieldset><details class="tracking-details"><summary>Fix tracking (optional)</summary><fieldset><legend>Remediation tracking36 unmodified lines</label><textarea id="tracking-retest" maxlength="2000" rows="2"></textarea></fieldset></details><p class="fine">A runtime verdict requires evidence you obtained independently. This workbench does not execute source or validate exploitation.</p>
2 unmodified lines3456789101112129 unmodified lines14214314414514614714814915015115215315415515615715815916016116216321 unmodified lines1851861871881891901911 unmodified line19319419519619719819922 unmodified lines2222232242252262272286 unmodified lines2352362372382392402412 unmodified lines24424524624724824925025125225325425557 unmodified lines3133143153163173183193 unmodified lines32332432532632732832919 unmodified lines34935035135235335435598 unmodified lines45445545645745845946080 unmodified lines5415425435445455462 unmodified linesconst state = {assessments: [], assessment: null, finding: null, tab: 'ledger', client: '', ledgerSearch: '', verdict: '', severity: '', restoreText: '', originalReview: ''};const roles = [ ['red', '01', 'Red hat', 'Test assumptions', 'Authorized adversary perspective.'], ['blue', '02', 'Blue hat', 'Strengthen defense', 'Triage signals and plan response.'], ['white', '03', 'White hat', 'Validate evidence', 'Review causes and remediation.'], ['black', '04', 'Black hat', 'Think like an attacker', 'Bounded threat modeling only.'], ['purple', '05', 'Purple hat', 'Close the loop', 'Connect scenarios to detection.'] ];const workflows = {code: 'Code review', alerts: 'Alert triage', exercise: 'Team exercise'};function el(tag, text, cls) {const node = document.createElement(tag);if (text !== undefined) node.textContent = String(text);129 unmodified linesnotify(error.message, true);}}function renderOverview() {const view = $('#view');if (state.client && !state.assessments.some(a => (a.client || 'Unassigned') === state.client)) state.client = '';view.replaceChildren();append(view, heading('COMMAND CENTER / OVERVIEW', 'Your security work, in evidence.', 'Scope a review. Challenge the findings. Record the decision.', button('+ New assessment', openCreate, 'primary')), strip());const title = el('div', undefined, 'section-title');append(title, el('h2', 'Assessment register'), el('span', `${String(state.assessments.length).padStart(2, '0')} ENGAGEMENTS`, 'count'));view.append(title);const workspaceActions = el('div', undefined, 'detail-actions');const backupAction = button('↓ Backup all clients JSON', backupWorkspace);append(workspaceActions, backupAction, button('↑ Restore backup', openRestore), button('Client remediation', openClientRemediation), button('Recovery guide', openRecovery), button('Refresh register', loadOverview));view.append(workspaceActions);const statusPanel = el('section', 'Loading local storage status (100 assessment limit)…', 'workspace-status fine');statusPanel.id = 'workspace-status';statusPanel.setAttribute('aria-live', 'polite');view.append(statusPanel);renderWorkspaceStatus(statusPanel);if (!state.assessments.length) {const box = empty('Start with a defined scope.', 'Review a Python snippet, triage structured alerts, or prepare a five-perspective security exercise.', button('Create first assessment ↗', openCreate, 'primary'));21 unmodified linescount.textContent = `${matches.length} of ${state.assessments.length}`;const table = el('table');const head = el('tr');['Assessment / scope', 'Workflow', 'Created', 'Candidates', 'Open'].forEach(t => head.append(el('th', t)));append(table, append(el('thead'), head));const body = el('tbody');matches.forEach(a => {1 unmodified lineconst identity = el('td');append(identity, button(a.name, () => openAssessment(a.id), 'row-button'), el('span', `${a.client || 'Unassigned'} / ${a.scope}`, 'subline'));append(row, identity, el('td', workflows[a.workflow] || a.workflow), el('td', date(a.created_at), 'mono'), el('td', a.finding_count, 'mono'), el('td', a.unresolved_count, 'mono'));labelCells(row, ['Assessment / scope', 'Workflow', 'Created', 'Candidates', 'Open']);body.append(row);});table.append(body);22 unmodified linesconst a = state.assessment;const view = $('#view');view.replaceChildren(button('← Assessment register', loadOverview, 'text-button back'));append(view, heading(`${workflows[a.workflow] || a.workflow} / ${date(a.created_at)}`, a.name, `${a.client || 'Unassigned'} / ${a.scope}`), strip(a.roles));const actions = el('div', undefined, 'detail-actions');append(actions, button('↓ Export JSON', () => download('json')), button('↓ Export Markdown', () => download('markdown')), button('Print executive report', printCurrentReport), button('Add analyst finding', openManual), button('Refresh saved assessment', refreshAssessment, 'refresh-assessment'), button('Continue engagement', continueEngagement, 'continue-engagement'), button('Record handoff', openHandoff), button('Delete assessment', () => $('#delete-dialog').showModal(), 'text-button'));view.append(actions);6 unmodified lineschangeHint.textContent = 'Saved workspace data changed in another tab. Use Refresh saved assessment to load it. Unsaved dialog inputs are preserved until you choose to discard.';view.append(changeHint);const stats = el('div', undefined, 'stats');[['Candidates', a.findings.length], ['Awaiting decision', a.findings.filter(f => f.verdict === 'unresolved').length], ['Perspectives assigned', a.roles.length]].forEach(([label, value]) => {const cell = el('div', undefined, 'stat');append(cell, el('span', label), el('strong', String(value).padStart(2, '0')));stats.append(cell);2 unmodified linesconst recordBytes = new TextEncoder().encode(JSON.stringify(a)).length;view.append(el('p', `Record limits: ${(a.activity || []).length} / 200 events · ${(a.snapshots || []).length} / 3 report snapshots · approximately ${recordBytes.toLocaleString()} serialized bytes. Continue the engagement to start fresh event/report capacity; export backups before retention changes.`, 'fine'));if ((a.activity || []).length >= 180 || (a.snapshots || []).length >= 3 || recordBytes >= 4 * 1024 * 1024) view.append(el('p', 'This engagement is nearing an event, frozen-report, or backup-size limit. Export a backup and continue the engagement for fresh history/report capacity.', 'fine'));const tabs = el('div', undefined, 'tabs');tabs.setAttribute('role', 'tablist');const panel = el('section');panel.id = 'assessment-panel';panel.setAttribute('role', 'tabpanel');[['ledger', 'Evidence ledger'], ['queue', 'Remediation'], ['reports', 'Reports'], ['delivery', 'Delivery'], ['missions', 'Missions'], ['coverage', 'Coverage & activity']].forEach(([key, label]) => {const node = button(label, () => {if (!allowDeliveryDiscard()) return;state.tab = key;57 unmodified linesappend(title, el('h2', 'Candidate findings'), el('span', 'ANALYST VERDICT REQUIRED', 'count'));panel.append(title);if (!a.findings.length) {panel.append(empty('No candidates from this input.', 'This result covers only the limited checks listed under Coverage. Use the assigned missions to continue the review.'));return;}const toolbar = el('div', undefined, 'toolbar');3 unmodified linessearch.value = state.ledgerSearch;search.setAttribute('aria-label', 'Search findings');const count = el('span', '', 'count');const verdictFilter = selectControl('Filter by verdict', [['', 'All verdicts'], ...['unresolved', 'confirmed-static', 'confirmed-runtime', 'rejected'].map(v => [v, v])]);const severityFilter = selectControl('Filter by severity', [['', 'All severities'], ...['high', 'medium', 'low'].map(v => [v, v])]);verdictFilter.value = state.verdict;severityFilter.value = state.severity;19 unmodified linesconst findingButton = button(f.title, () => openFinding(f), 'row-button');findingButton.dataset.finding = f.id;append(identity, findingButton, el('span', f.location, 'subline mono'));append(row, identity, el('td', f.severity, 'tag'), el('td', f.confidence, 'tag'), el('td', f.verdict, 'tag'));labelCells(row, ['Candidate / location', 'Severity', 'Confidence', 'Verdict']);body.append(row);});98 unmodified lines})), null, 2), exercise: 'A fictional retailer must respond to a suspected account takeover affecting its customer support portal. Scope: tabletop discussion only. Test escalation, identity verification, evidence preservation, and detection handoffs. No production systems or external targets.'};$('#content').value = samples[w];if (!$('#assessment-name').value) $('#assessment-name').value = `Sample ${workflows[w].toLowerCase()}`;if (!$('#scope').value) $('#scope').value = 'Fictional sample input only; no external systems';notify('Sample input loaded. Review scope and authorization before creating.');});80 unmodified lines}function updateReviewRequirements() {const confirmed = $('#verdict').value.startsWith('confirmed-');Object.values(reviewFields).forEach(id => { $(`#${id}`).required = confirmed; });const method = $('#review-method');method.minLength = confirmed ? 20 : 0;2 unmodified lines345678910111213129 unmodified lines14314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918021 unmodified lines2022032042052062072081 unmodified line21021121221321421521622 unmodified lines2392402412422432442452462472486 unmodified lines2552562572582592602612 unmodified lines26426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529657 unmodified lines3543553563573583593603 unmodified lines36436536636736836937019 unmodified lines39039139239339439539698 unmodified lines49549649749849950050180 unmodified lines5825835845855865875885892 unmodified linesconst state = {assessments: [], assessment: null, finding: null, tab: 'ledger', client: '', ledgerSearch: '', verdict: '', severity: '', restoreText: '', originalReview: ''};const roles = [ ['red', '01', 'Red hat', 'Test assumptions', 'Test how scoped weaknesses could be misused.'], ['blue', '02', 'Blue hat', 'Strengthen defense', 'Triage alerts and plan the response.'], ['white', '03', 'White hat', 'Validate evidence', 'Check evidence, causes, and proposed fixes.'], ['black', '04', 'Black hat', 'Think like an attacker', 'Map attacker paths within the authorized scope.'], ['purple', '05', 'Purple hat', 'Close the loop', 'Connect team exercises to detection improvements.'] ];const workflows = {code: 'Code review', alerts: 'Alert triage', exercise: 'Team exercise'};const verdictLabels = {unresolved: 'Needs review', 'confirmed-static': 'Confirmed by source review', 'confirmed-runtime': 'Confirmed by independent testing', rejected: 'Rejected after review'};function el(tag, text, cls) {const node = document.createElement(tag);if (text !== undefined) node.textContent = String(text);129 unmodified linesnotify(error.message, true);}}function openSampleReview() {openCreate();if ($('#create-dialog').open) $('#sample').click();}function renderOverview() {const view = $('#view');if (state.client && !state.assessments.some(a => (a.client || 'Unassigned') === state.client)) state.client = '';view.replaceChildren();append(view, heading('WORKSPACE', 'Security reviews, step by step.', 'Review Python code, review alert logs, or plan a team exercise. Keep the evidence and decisions together.', button('+ New assessment', openCreate, 'primary')));const intro = el('section', undefined, 'quick-start');append(intro, el('h2', 'How a review works'), el('p', 'You make the decisions. Suggested issues need human review and supporting evidence; this workbench does not certify that a system is secure.'));const steps = el('ol');['Choose a review type and describe the scope you are authorized to assess.', 'Inspect each suggested issue, add evidence, and save a review decision.', 'Track confirmed fixes and prepare a report or client summary.'].forEach(text => steps.append(el('li', text)));append(intro, steps, button('Try a sample review', openSampleReview), el('p', 'The sample opens the assessment form. Review its scope and authorization before saving. Records stay in this browser; download a backup to keep a separate copy.', 'fine'));view.append(intro);const perspectives = el('details', undefined, 'perspective-help');append(perspectives, el('summary', 'How the five security perspectives help'), el('p', 'Five checklists help people look at the same review from different angles. They do not run agents, scans, or attacks.'), strip());view.append(perspectives);const title = el('div', undefined, 'section-title');append(title, el('h2', 'Your assessments'), el('span', `${state.assessments.length} SAVED`, 'count'));view.append(title);const workspaceActions = el('div', undefined, 'detail-actions');const backupAction = button('↓ Backup all clients JSON', backupWorkspace);append(workspaceActions, backupAction, button('↑ Restore backup', openRestore), button('Client remediation', openClientRemediation), button('Recovery guide', openRecovery), button('Refresh register', loadOverview));const tools = el('details', undefined, 'workspace-tools');tools.append(el('summary', 'Workspace tools and backup'));tools.append(workspaceActions);view.append(tools);const statusPanel = el('section', 'Loading local storage status (100 assessment limit)…', 'workspace-status fine');statusPanel.id = 'workspace-status';statusPanel.setAttribute('aria-live', 'polite');tools.append(statusPanel);renderWorkspaceStatus(statusPanel);if (!state.assessments.length) {const box = empty('Start with a defined scope.', 'Review a Python snippet, triage structured alerts, or prepare a five-perspective security exercise.', button('Create first assessment ↗', openCreate, 'primary'));21 unmodified linescount.textContent = `${matches.length} of ${state.assessments.length}`;const table = el('table');const head = el('tr');['Assessment / scope', 'Workflow', 'Created', 'Possible issues', 'Needs review'].forEach(t => head.append(el('th', t)));append(table, append(el('thead'), head));const body = el('tbody');matches.forEach(a => {1 unmodified lineconst identity = el('td');append(identity, button(a.name, () => openAssessment(a.id), 'row-button'), el('span', `${a.client || 'Unassigned'} / ${a.scope}`, 'subline'));append(row, identity, el('td', workflows[a.workflow] || a.workflow), el('td', date(a.created_at), 'mono'), el('td', a.finding_count, 'mono'), el('td', a.unresolved_count, 'mono'));labelCells(row, ['Assessment / scope', 'Workflow', 'Created', 'Possible issues', 'Needs review']);body.append(row);});table.append(body);22 unmodified linesconst a = state.assessment;const view = $('#view');view.replaceChildren(button('← Assessment register', loadOverview, 'text-button back'));append(view, heading(`${workflows[a.workflow] || a.workflow} / ${date(a.created_at)}`, a.name, `${a.client || 'Unassigned'} / ${a.scope}`));const assignedPerspectives = el('details', undefined, 'perspective-help');append(assignedPerspectives, el('summary', `${a.roles.length} assigned security perspectives`), strip(a.roles));view.append(assignedPerspectives);const actions = el('div', undefined, 'detail-actions');append(actions, button('↓ Export JSON', () => download('json')), button('↓ Export Markdown', () => download('markdown')), button('Print executive report', printCurrentReport), button('Add analyst finding', openManual), button('Refresh saved assessment', refreshAssessment, 'refresh-assessment'), button('Continue engagement', continueEngagement, 'continue-engagement'), button('Record handoff', openHandoff), button('Delete assessment', () => $('#delete-dialog').showModal(), 'text-button'));view.append(actions);6 unmodified lineschangeHint.textContent = 'Saved workspace data changed in another tab. Use Refresh saved assessment to load it. Unsaved dialog inputs are preserved until you choose to discard.';view.append(changeHint);const stats = el('div', undefined, 'stats');[['Possible issues', a.findings.length], ['Needs review', a.findings.filter(f => f.verdict === 'unresolved').length], ['Perspectives assigned', a.roles.length]].forEach(([label, value]) => {const cell = el('div', undefined, 'stat');append(cell, el('span', label), el('strong', String(value).padStart(2, '0')));stats.append(cell);2 unmodified linesconst recordBytes = new TextEncoder().encode(JSON.stringify(a)).length;view.append(el('p', `Record limits: ${(a.activity || []).length} / 200 events · ${(a.snapshots || []).length} / 3 report snapshots · approximately ${recordBytes.toLocaleString()} serialized bytes. Continue the engagement to start fresh event/report capacity; export backups before retention changes.`, 'fine'));if ((a.activity || []).length >= 180 || (a.snapshots || []).length >= 3 || recordBytes >= 4 * 1024 * 1024) view.append(el('p', 'This engagement is nearing an event, frozen-report, or backup-size limit. Export a backup and continue the engagement for fresh history/report capacity.', 'fine'));const guide = el('section', undefined, 'review-guide');guide.setAttribute('aria-label', 'Assessment review guide');guide.append(el('h2', 'Work through this assessment'));const unresolved = a.findings.filter(f => f.verdict === 'unresolved');const reviewed = a.findings.length - unresolved.length;guide.append(el('p', a.findings.length ? `${reviewed} of ${a.findings.length} issues have a saved decision. ${unresolved.length} await review.` : 'No issues were suggested. Complete the assigned role tasks and record what you checked; this does not establish that the scope is secure.'));const guideSteps = el('ol');['Review: open an issue and inspect its location, impact, and limitations.', 'Evidence: check the supporting material and record your review notes.', 'Decision: save a verdict. Confirmed issues require evidence and a review method.', 'Report: check the saved decisions, track confirmed fixes, and prepare the report.'].forEach(text => guideSteps.append(el('li', text)));guide.append(guideSteps);const nextTab = key => {if (!allowDeliveryDiscard()) return;state.tab = key;renderAssessment();$(`#tab-${key}`).focus();};guide.append(unresolved.length? button('Review next issue', () => { if (allowDeliveryDiscard()) openFinding(unresolved[0]); }, 'primary'): a.findings.length? button('Prepare report', () => nextTab('reports'), 'primary'): button('Open role tasks', () => nextTab('missions'), 'primary'));view.insertBefore(guide, assignedPerspectives);const tabs = el('div', undefined, 'tabs');tabs.setAttribute('role', 'tablist');const panel = el('section');panel.id = 'assessment-panel';panel.setAttribute('role', 'tabpanel');[['ledger', 'Issues to review'], ['queue', 'Fix tracking'], ['reports', 'Reports'], ['delivery', 'Client summary'], ['missions', 'Role tasks'], ['coverage', 'Checks and history']].forEach(([key, label]) => {const node = button(label, () => {if (!allowDeliveryDiscard()) return;state.tab = key;57 unmodified linesappend(title, el('h2', 'Candidate findings'), el('span', 'ANALYST VERDICT REQUIRED', 'count'));panel.append(title);if (!a.findings.length) {panel.append(empty('No possible issues from this input.', 'This result covers only the limited checks listed under Checks and history. Open Role tasks to continue the review.'));return;}const toolbar = el('div', undefined, 'toolbar');3 unmodified linessearch.value = state.ledgerSearch;search.setAttribute('aria-label', 'Search findings');const count = el('span', '', 'count');const verdictFilter = selectControl('Filter by verdict', [['', 'All decisions'], ...Object.entries(verdictLabels)]);const severityFilter = selectControl('Filter by severity', [['', 'All severities'], ...['high', 'medium', 'low'].map(v => [v, v])]);verdictFilter.value = state.verdict;severityFilter.value = state.severity;19 unmodified linesconst findingButton = button(f.title, () => openFinding(f), 'row-button');findingButton.dataset.finding = f.id;append(identity, findingButton, el('span', f.location, 'subline mono'));append(row, identity, el('td', f.severity, 'tag'), el('td', f.confidence, 'tag'), el('td', verdictLabels[f.verdict] || f.verdict, 'tag'));labelCells(row, ['Candidate / location', 'Severity', 'Confidence', 'Verdict']);body.append(row);});98 unmodified lines})), null, 2), exercise: 'A fictional retailer must respond to a suspected account takeover affecting its customer support portal. Scope: tabletop discussion only. Test escalation, identity verification, evidence preservation, and detection handoffs. No production systems or external targets.'};$('#content').value = samples[w];if (!$('#assessment-name').value || Object.values(workflows).some(label => $('#assessment-name').value === `Sample ${label.toLowerCase()}`)) $('#assessment-name').value = `Sample ${workflows[w].toLowerCase()}`;if (!$('#scope').value) $('#scope').value = 'Fictional sample input only; no external systems';notify('Sample input loaded. Review scope and authorization before creating.');});80 unmodified lines}function updateReviewRequirements() {const confirmed = $('#verdict').value.startsWith('confirmed-');const confirmationFields = $('#confirmation-fields');if (confirmationFields) confirmationFields.hidden = !confirmed;Object.values(reviewFields).forEach(id => { $(`#${id}`).required = confirmed; });const method = $('#review-method');method.minLength = confirmed ? 20 : 0;
9 unmodified lines10111213141516171819202144 unmodified lines666768697071727374757651 unmodified lines1281291301311321331 unmodified line13513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416550 unmodified lines21621721821922022122222322422522622722822923023123223323423523623730 unmodified lines26826927027127227336 unmodified lines3103113123133143153169 unmodified linesNapolean · Cyber Command</title><link href="./favicon.svg" rel="icon" type="image/svg+xml"/><link href="./style.css?v=20261102-engagement" rel="stylesheet"/><script defer="" src="./playbooks.js?v=20261102-engagement"></script><script defer="" src="./local.js?v=20261102-engagement"></script><script defer="" src="./app.js?v=20261102-engagement"></script></head><body>44 unmodified lines</header><section aria-label="Browser storage notice" class="local-notice"><strong>Your browser is the workspace.</strong><p>Results are stored locally in IndexedDB for this browser profile and site origin. No shared team database, model, or server is running. Raw source, alerts, and scenario input are not stored. Export JSON backups: clearing site data or changing browsers can remove access to records.</p></section><div id="view"></div>51 unmodified lines<label for="scope">Authorized scope</label><label for="client">Client label (optional)</label>1 unmodified line<p class="fine">Client labels organize records in this browser. They do not restrict access.</p><input id="scope" maxlength="1000" name="scope" placeholder="Owned service, repository, or exercise boundary" required=""/><fieldset><legend>Assign perspectives</legend><div class="role-checks"><label><input checked="" name="roles" type="checkbox" value="red"/>Red</label><label><input checked="" name="roles" type="checkbox" value="blue"/>Blue</label><label><input checked="" name="roles" type="checkbox" value="white"/>White</label><label><input checked="" name="roles" type="checkbox" value="black"/>Black</label><label><input checked="" name="roles" type="checkbox" value="purple"/>Purple</label></div></fieldset>50 unmodified lines</label><select id="verdict"><option value="unresolved">Unresolved</option><option value="confirmed-static">Confirmed static</option><option value="confirmed-runtime">Confirmed runtime</option><option value="rejected">Rejected</option></select><label for="review-note">Decision evidence / note</label><fieldset class="review-fields"><legend>Analyst attestation · required for confirmations</legend>30 unmodified linesFor confirmed verdicts, describe the method and result in at least 20 characters, including at least 10 letters or digits.</p></fieldset><fieldset><legend>Remediation tracking36 unmodified lines</label><textarea id="tracking-retest" maxlength="2000" rows="2"></textarea></fieldset><textarea id="review-note" maxlength="4000" minlength="20" placeholder="Describe the evidence supporting your decision." required="" rows="4"></textarea><p class="fine">A runtime verdict requires evidence you obtained independently. This workbench does not execute source or validate exploitation.</p>9 unmodified lines10111213141516171819202144 unmodified lines666768697071727374757677787951 unmodified lines1311321331341351361371 unmodified line13914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816950 unmodified lines22022122222322422522622722822923023123223323423523623723823924024124224330 unmodified lines27427527627727827928028136 unmodified lines3183193203213223233249 unmodified linesNapolean · Cyber Command</title><link href="./favicon.svg" rel="icon" type="image/svg+xml"/><link href="./style.css?v=20261103-usability" rel="stylesheet"/><script defer="" src="./playbooks.js?v=20261103-usability"></script><script defer="" src="./local.js?v=20261103-usability"></script><script defer="" src="./app.js?v=20261103-usability"></script></head><body>44 unmodified lines</header><section aria-label="Browser storage notice" class="local-notice"><strong>Saved only in this browser. Download a backup to keep a copy.</strong><details><summary>How local storage works</summary><p>Results are stored locally in IndexedDB for this browser profile and site origin. No shared team database, model, or server is running. Raw source, alerts, and scenario input are not stored. Export JSON backups: clearing site data or changing browsers can remove access to records.</p></details></section><div id="view"></div>51 unmodified lines<label for="scope">Authorized scope</label><input id="scope" maxlength="1000" name="scope" placeholder="Owned service, repository, or exercise boundary" required=""/><label for="client">Client label (optional)</label>1 unmodified line<p class="fine">Client labels organize records in this browser. They do not restrict access.</p><fieldset><legend>Assign perspectives</legend><p class="fine">Choose human review checklists for this assessment. These perspectives guide your team; they do not run agents or attacks.</p><div class="role-checks"><label><input checked="" name="roles" type="checkbox" value="red"/>Red · Test assumptions</label><label><input checked="" name="roles" type="checkbox" value="blue"/>Blue · Strengthen defense</label><label><input checked="" name="roles" type="checkbox" value="white"/>White · Validate evidence</label><label><input checked="" name="roles" type="checkbox" value="black"/>Black · Model attacker thinking</label><label><input checked="" name="roles" type="checkbox" value="purple"/>Purple · Connect testing and defense</label></div></fieldset>50 unmodified lines</label><select id="verdict"><option value="unresolved">Needs review</option><option value="confirmed-static">Confirmed by source review</option><option value="confirmed-runtime">Confirmed by independent testing</option><option value="rejected">Rejected after review</option></select><p class="fine">Source review means you checked the code and its conditions. Independent testing means you obtained runtime evidence outside this workbench.</p><label for="review-note">Decision evidence / note</label><textarea id="review-note" maxlength="4000" minlength="20" placeholder="Describe the evidence supporting your decision." required="" rows="4"></textarea><fieldset class="review-fields" id="confirmation-fields"><legend>Analyst attestation · required for confirmations</legend>30 unmodified linesFor confirmed verdicts, describe the method and result in at least 20 characters, including at least 10 letters or digits.</p></fieldset><details class="tracking-details"><summary>Fix tracking (optional)</summary><fieldset><legend>Remediation tracking36 unmodified lines</label><textarea id="tracking-retest" maxlength="2000" rows="2"></textarea></fieldset></details><p class="fine">A runtime verdict requires evidence you obtained independently. This workbench does not execute source or validate exploitation.</p>
20 unmodified lines2122232425262712 unmodified lines40414243444546851 unmodified lines89889990020 unmodified linesbutton,input,select,textarea {font:inherit}button,a,input,select,textarea {touch-action:manipulation}button {12 unmodified linesopacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {outline:2px solid var(--accent);outline-offset:4px}851 unmodified lines#recovery-dialog li { font-size: 13px; line-height: 1.8; margin-bottom: 14px; color: #c2c2c8; }#delivery-form { max-width: 900px; }#reload-workbook, #reload-delivery { margin-bottom: 16px; }20 unmodified lines2122232425262712 unmodified lines40414243444546851 unmodified lines89889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792820 unmodified linesbutton,input,select,textarea {font:inherit}button,a,input,select,textarea,summary {touch-action:manipulation}button {12 unmodified linesopacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {outline:2px solid var(--accent);outline-offset:4px}851 unmodified lines#recovery-dialog li { font-size: 13px; line-height: 1.8; margin-bottom: 14px; color: #c2c2c8; }#delivery-form { max-width: 900px; }#reload-workbook, #reload-delivery { margin-bottom: 16px; }/* Plain-language guidance uses the existing workspace's quiet typography. */summary { cursor: pointer; min-height: 44px; padding: 12px 0; line-height: 1.5; }summary:hover { color: #fff; }.local-notice details p { max-width: 75ch; }.quick-start { max-width: 860px; margin: 24px 0 28px; }.quick-start h2 { font-size: 21px; }.quick-start p, .review-guide p { max-width: 72ch; }.quick-start ol, .review-guide ol { padding-left: 22px; line-height: 1.7; }.quick-start li, .review-guide li { margin-bottom: 8px; padding-left: 4px; }.quick-start .fine { margin-top: 12px; }.quick-start .fine, .local-notice p, .review-fields .fine { font-family: inherit; font-size: 13px; }.workspace-tools, .perspective-help { border-top: 1px solid var(--border); margin: 14px 0 22px; }.perspective-help > p { color: var(--muted); max-width: 72ch; }.workspace-tools .workspace-status { margin-bottom: 0; }.review-guide { margin: 24px 0 28px; padding: 20px 0; border-block: 1px solid var(--border); }.review-guide h2 { font-size: 21px; }.tracking-details { margin-block: 18px; }.tracking-details fieldset { margin-top: 0; }.role-checks label { align-items: flex-start; line-height: 1.5; }[hidden] { display: none !important; }@media (max-width: 700px) {.quick-start, .review-guide { margin-block: 20px; }.page-heading { display: flex; flex-direction: column; align-items: stretch; }.page-heading .primary { margin-top: 4px; width: 100%; }.quick-start h2, .review-guide h2 { font-size: 19px; line-height: 1.4; }.quick-start button, .review-guide > button { width: 100%; min-height: 44px; }}
68 unmodified lines69707172737468 unmodified linesassert.notEqual(continued.findings[0].id,fixture.first);console.log('PASS engagement continuation keeps provenance and starts fresh history');await page.locator('#nav-overview').click();await page.locator('#workspace-status').waitFor();assert.match(await page.locator('#workspace-status').textContent(),/100/);await page.getByRole('button',{name:'Recovery guide',exact:true}).click();await page.locator('#recovery-dialog').waitFor();await page.locator('#recovery-dialog [data-close]').first().click();68 unmodified lines6970717273747568 unmodified linesassert.notEqual(continued.findings[0].id,fixture.first);console.log('PASS engagement continuation keeps provenance and starts fresh history');await page.locator('#nav-overview').click();await page.locator('.workspace-tools summary').click();await page.locator('#workspace-status').waitFor();assert.match(await page.locator('#workspace-status').textContent(),/100/);await page.getByRole('button',{name:'Recovery guide',exact:true}).click();await page.locator('#recovery-dialog').waitFor();await page.locator('#recovery-dialog [data-close]').first().click();
196 unmodified lines197198199200201202196 unmodified linesconsole.log('PASS tampered snapshot digest rejects the whole backup before any IndexedDB mutation');await page.reload();await page.getByRole('button', { name: /Backup all clients JSON/ }).waitFor();const downloaded = page.waitForEvent('download');await page.getByRole('button', { name: /Backup all clients JSON/ }).click();196 unmodified lines197198199200201202203196 unmodified linesconsole.log('PASS tampered snapshot digest rejects the whole backup before any IndexedDB mutation');await page.reload();await page.locator('.workspace-tools summary').click();await page.getByRole('button', { name: /Backup all clients JSON/ }).waitFor();const downloaded = page.waitForEvent('download');await page.getByRole('button', { name: /Backup all clients JSON/ }).click();
34 unmodified lines35363738394024 unmodified lines65666768697018 unmodified lines89909192939471 unmodified lines16616716816917017122 unmodified lines19419519619719819934 unmodified linesawait page.locator('#review-note').fill('Reviewed only against this synthetic owned fixture.');await page.getByRole('button',{name:'Record decision ↗',exact:true}).click();assert.equal(await page.locator('#finding-dialog').evaluate(e=>e.open),true,'incomplete confirmation stays open');for (const [selector,value] of Object.entries({'#reviewer':'Synthetic analyst','#reference':'fixture revision 1','#review-prerequisites':'Caller controls command in the fixture.','#review-mitigations':'No validation in this bounded fixture.','#review-method':'Manual source trace of the synthetic owned fixture.','#tracking-owner':'Fictional application team','#tracking-due':'2000-01-01','#tracking-retest':'Recheck argument-list replacement in owned fixture.'})) await page.locator(selector).fill(value);await page.locator('#tracking-status').selectOption('in-progress');await page.evaluate(()=>{24 unmodified linesawait second.getByRole('button',{name:'Possible shell-enabled process invocation',exact:true}).click();await second.locator('#reviewer').fill('Newer synthetic analyst');await second.locator('#reference').fill('fixture revision 2');await second.locator('#tracking-owner').fill('Newer application team');await second.locator('#tracking-status').selectOption('retest');await second.locator('#review-note').fill('Newer saved synthetic evidence from the second tab.');18 unmodified linesconsole.log('PASS stale UI save preserves draft/current tracking until explicit latest-record reload');await candidate.click();for(const [selector,value] of Object.entries({'#review-note':'Unsaved synthetic draft note retained for close checks.','#reviewer':'Unsaved reviewer','#reference':'Unsaved reference','#review-prerequisites':'Unsaved prerequisites','#review-mitigations':'Unsaved mitigation details','#review-method':'Unsaved validation method details long enough.','#tracking-owner':'Unsaved remediation owner','#tracking-due':'2001-01-01','#tracking-retest':'Unsaved synthetic retest details'})) await page.locator(selector).fill(value);await page.locator('#verdict').selectOption('confirmed-runtime');await page.locator('#tracking-status').selectOption('in-progress');71 unmodified linesif(process.env.ARTIFACT_DIR) await page.screenshot({path:process.env.ARTIFACT_DIR+'/business-workflows.png',fullPage:true});await page.getByRole('button',{name:'← Assessment register',exact:true}).click();await page.getByRole('combobox',{name:'Filter by client'}).selectOption('Fictional retailer');const downloadPromise=page.waitForEvent('download');await page.getByRole('button',{name:/Backup.*JSON/}).click();const download=await downloadPromise;22 unmodified linesassert.equal(await page.getByRole('combobox',{name:'Filter by client'}).inputValue(),'','last filtered client deletion resets visible selection');assert.equal(await page.locator('tbody tr').count(),1);await page.getByRole('button',{name:'Other client fixture',exact:true}).waitFor();assert.match(await page.getByRole('button',{name:/Backup.*JSON/}).innerText(),/all clients/,'backup scope agrees with reset selection');const alertAndReport=await page.evaluate(()=>{const fixture={name:'Synthetic totals',scope:'Owned fixture',workflow:'alerts',roles:['blue'],authorization:true,content:JSON.stringify(Array.from({length:5},()=>({event:'login_failed'})))};34 unmodified lines3536373839404124 unmodified lines6667686970717218 unmodified lines9192939495969771 unmodified lines16917017117217317417522 unmodified lines19819920020120220320434 unmodified linesawait page.locator('#review-note').fill('Reviewed only against this synthetic owned fixture.');await page.getByRole('button',{name:'Record decision ↗',exact:true}).click();assert.equal(await page.locator('#finding-dialog').evaluate(e=>e.open),true,'incomplete confirmation stays open');await page.locator('.tracking-details summary').click();for (const [selector,value] of Object.entries({'#reviewer':'Synthetic analyst','#reference':'fixture revision 1','#review-prerequisites':'Caller controls command in the fixture.','#review-mitigations':'No validation in this bounded fixture.','#review-method':'Manual source trace of the synthetic owned fixture.','#tracking-owner':'Fictional application team','#tracking-due':'2000-01-01','#tracking-retest':'Recheck argument-list replacement in owned fixture.'})) await page.locator(selector).fill(value);await page.locator('#tracking-status').selectOption('in-progress');await page.evaluate(()=>{24 unmodified linesawait second.getByRole('button',{name:'Possible shell-enabled process invocation',exact:true}).click();await second.locator('#reviewer').fill('Newer synthetic analyst');await second.locator('#reference').fill('fixture revision 2');await second.locator('.tracking-details summary').click();await second.locator('#tracking-owner').fill('Newer application team');await second.locator('#tracking-status').selectOption('retest');await second.locator('#review-note').fill('Newer saved synthetic evidence from the second tab.');18 unmodified linesconsole.log('PASS stale UI save preserves draft/current tracking until explicit latest-record reload');await candidate.click();if (!await page.locator('#tracking-owner').isVisible()) await page.locator('.tracking-details summary').click();for(const [selector,value] of Object.entries({'#review-note':'Unsaved synthetic draft note retained for close checks.','#reviewer':'Unsaved reviewer','#reference':'Unsaved reference','#review-prerequisites':'Unsaved prerequisites','#review-mitigations':'Unsaved mitigation details','#review-method':'Unsaved validation method details long enough.','#tracking-owner':'Unsaved remediation owner','#tracking-due':'2001-01-01','#tracking-retest':'Unsaved synthetic retest details'})) await page.locator(selector).fill(value);await page.locator('#verdict').selectOption('confirmed-runtime');await page.locator('#tracking-status').selectOption('in-progress');71 unmodified linesif(process.env.ARTIFACT_DIR) await page.screenshot({path:process.env.ARTIFACT_DIR+'/business-workflows.png',fullPage:true});await page.getByRole('button',{name:'← Assessment register',exact:true}).click();await page.getByRole('combobox',{name:'Filter by client'}).selectOption('Fictional retailer');await page.locator('.workspace-tools summary').click();const downloadPromise=page.waitForEvent('download');await page.getByRole('button',{name:/Backup.*JSON/}).click();const download=await downloadPromise;22 unmodified linesassert.equal(await page.getByRole('combobox',{name:'Filter by client'}).inputValue(),'','last filtered client deletion resets visible selection');assert.equal(await page.locator('tbody tr').count(),1);await page.getByRole('button',{name:'Other client fixture',exact:true}).waitFor();await page.locator('.workspace-tools summary').click();assert.match(await page.getByRole('button',{name:/Backup.*JSON/}).innerText(),/all clients/,'backup scope agrees with reset selection');const alertAndReport=await page.evaluate(()=>{const fixture={name:'Synthetic totals',scope:'Owned fixture',workflow:'alerts',roles:['blue'],authorization:true,content:JSON.stringify(Array.from({length:5},()=>({event:'login_failed'})))};
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061'use strict';const assert = require('node:assert/strict');const fs = require('node:fs/promises');const {chromium} = require(process.env.PLAYWRIGHT_MODULE || 'playwright');(async () => { const browser = await chromium.launch({headless: true}); try { const context = await browser.newContext({viewport: {width: 1440, height: 1000}}); const page = await context.newPage(); const errors = []; page.on('pageerror', error => errors.push(error.message)); await page.goto(process.env.APP_URL || 'http://127.0.0.1:7861/'); await page.getByRole('button', {name: 'Try a sample review', exact: true}).click(); assert.equal(await page.locator('#authorization').isChecked(), false, 'sample never grants authorization'); assert.match(await page.locator('#content').inputValue(), /subprocess/); assert.match(await page.locator('#scope').inputValue(), /Fictional sample/); await page.locator('#authorization').check(); await page.locator('#create-form button[type=submit]').click(); await page.getByRole('button', {name: 'Review next issue', exact: true}).click(); assert.equal(await page.locator('#confirmation-fields').isVisible(), false); await page.locator('#verdict').selectOption('confirmed-static'); assert.equal(await page.locator('#confirmation-fields').isVisible(), true); await page.locator('#verdict').selectOption('rejected'); assert.equal(await page.locator('#confirmation-fields').isVisible(), false); await page.locator('#review-note').fill('Synthetic tutorial review only; rejecting this example to exercise saved decision navigation.'); await page.locator('#verdict-form button[type=submit]').click(); await page.getByRole('button', {name: 'Prepare report', exact: true}).click(); assert.equal(await page.locator('#tab-reports').getAttribute('aria-selected'), 'true'); console.log('PASS sample authorization, conditional evidence fields and saved-decision report path'); await page.locator('#nav-overview').click(); await page.getByRole('button', {name: 'Try a sample review', exact: true}).click(); page.once('dialog', dialog => dialog.accept()); await page.locator('#workflow').selectOption('exercise'); await page.locator('#sample').click(); assert.equal(await page.locator('#assessment-name').inputValue(), 'Sample team exercise'); await page.locator('#authorization').check(); await page.locator('#create-form button[type=submit]').click(); await page.getByRole('button', {name: 'Open role tasks', exact: true}).click(); assert.equal(await page.locator('#tab-missions').getAttribute('aria-selected'), 'true'); assert.match(await page.locator('.review-guide').innerText(), /does not establish.*secure/); await page.locator('#tab-missions').focus(); await page.keyboard.press('ArrowRight'); assert.equal(await page.locator('#tab-coverage').getAttribute('aria-selected'), 'true'); console.log('PASS zero-issue exercise guidance and keyboard tab navigation'); await page.locator('#nav-overview').click(); await page.locator('.workspace-tools summary').focus(); await page.keyboard.press('Enter'); assert.equal(await page.getByRole('button', {name: 'Recovery guide', exact: true}).isVisible(), true); if (process.env.ARTIFACT_DIR) { await fs.mkdir(process.env.ARTIFACT_DIR, {recursive: true}); await page.locator('.workspace-tools summary').click(); await page.waitForFunction(() => !document.querySelector('#notice').classList.contains('visible')); await page.screenshot({path: process.env.ARTIFACT_DIR + '/usability-desktop.png', fullPage: true}); await page.setViewportSize({width: 390, height: 844}); assert.equal(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1), true); await page.screenshot({path: process.env.ARTIFACT_DIR + '/usability-mobile.png', fullPage: true}); } assert.deepEqual(errors, []); console.log('PASS accessible backup disclosure, mobile overflow and no page errors'); } finally { await browser.close(); }})().catch(error => {console.error(error); process.exitCode = 1;});CONTRACT.mdAdded+26
PROVENANCE.md+4-2
README.md+24-5
SOURCE-MANIFEST.json+15-12
VERIFICATION.md+11
deploy_hf.py+1-1
docs/superpowers/plans/2026-11-03-usability.mdAdded+24
index.html+27-19
static/app.js+57-14
static/index.html+27-19
static/style.css+30-2
tests/browser_engagement.cjs+1
tests/browser_storage.cjs+1
tests/browser_ui.cjs+5
tests/browser_usability.cjsAdded+61