Strix (STRIX) — Stage Explorer

S0 through S15: every pipeline stage, the real files that implement it, and what each key function does in plain English. See docs/design/data-flow.md for the full narrative.

S0 · CLI entry S1 · Run preparation S2 · State init S3 · Sandbox creation S4 · Root agent construction S5 · Root loop starts S6 · Target decomposition S7 · Child spawn S8 · Parallel testing S9 · PoC validation S10 · Finding submission S11 · Child completion S12 · Root aggregation S13 · Scan completion S14 · Artifact writing S15 · Sandbox teardown

S0 · CLI entry

The command line reads what you typed and checks Docker is ready before anything else happens.

Inargv (strix --target ...)
Outparsed args + scan_config
strix/interface/main.py
main() — Top-level dispatch: routes to `strix view`, `strix auth`, or a scan.
_bootstrap_scan() — Runs preflight checks, then hands off to the CLI or TUI.
strix/interface/cli_args.py
parse_arguments() — Reads every --flag you can pass to strix.

S1 · Run preparation

Strix decides what to call this run and figures out exactly what to mount into the sandbox.

Intarget path/URL/repo
Outrun_name, local_sources
strix/interface/scan_setup.py
prepare_run() — Generates the run name, resolves local source paths, computes diff-scope for CI.

S2 · State init

Strix opens a blank notebook for this run's findings before anything starts.

Inrun_name, scan_config
OutReportState instance
strix/report/state.py
ReportState.__init__() — Creates the in-memory findings tracker for one run.
get_global_report_state() — Where every other part of Strix looks up the current run's notebook.

S3 · Sandbox creation

A disposable container is started and loaded with the real hacking tools, plus a proxy that watches all its traffic.

Inscan_id, image, local_sources
Outlive sandbox session + Caido client
strix/runtime/session_manager.py
create_or_reuse() — Builds the sandbox manifest and starts (or reuses) the container.
strix/runtime/docker_client.py
StrixDockerSandboxClient._create_container() — The actual Docker container creation, with raw-socket capabilities for nmap.
strix/runtime/caido_bootstrap.py
bootstrap_caido() — Logs into the in-container proxy sidecar so it's ready to intercept traffic.

S4 · Root agent construction

Strix builds its 'team lead' AI agent: gives it its tools and its job description.

Inis_root=True, scan_mode, skills
Outone SandboxAgent
strix/agents/factory.py
build_strix_agent() — Assembles the tool list and the lifecycle stop-condition for one agent.
strix/agents/prompt.py
render_system_prompt() — Turns the agent's role + relevant skill files into its actual instructions.

S5 · Root loop starts

The lead agent starts working — reading, thinking, and calling tools, one turn at a time.

Inroot agent, initial task
Outstreaming agent events
strix/core/execution.py
run_agent_loop() — Drives one agent's turns until it calls a lifecycle tool or hits a limit.

S6 · Target decomposition

The lead reads the brief and decides which kinds of testing are worth doing.

Inscope + target
Outa plan of specialist tasks
strix/agents/prompts/system_prompt.jinja
<root_agent_directive> — The instructions telling the root agent it must delegate, never test directly.

S7 · Child spawn

Every time the lead decides on a specialist, one gets hired and starts working immediately, in parallel.

Increate_agent(name, task, skills)
Outa new, running child agent
strix/tools/agents_graph/tools.py
create_agent() — The tool call the root agent uses to hire a specialist.
strix/core/execution.py
spawn_child_agent() — Builds the child, registers it, and launches its own turn loop as a background task.

S8 · Parallel testing

Specialists actually run the tools — port scans, injection attempts, browser automation — for real, inside the shared sandbox.

Inchild agent + sandbox
Outtool output, HTTP traffic
strix/tools/proxy/tools.py
repeat_request() — Replays and modifies a captured HTTP request — the 'Repeater' feature.
strix/tools/shell/
exec_command — SDK-native — runs any shell command inside the sandbox.

S9 · PoC validation

Before filing anything, the specialist has to actually prove the bug is real.

Incandidate issue
Outa working exploit/proof
strix/tools/reporting/tool.py
_do_create() — Validates every required field before a finding can even be considered.

S10 · Finding submission

The finding gets scored, checked against everything already found, and — if new — saved.

Invalidated PoC + CVSS
Outvuln-NNNN or rejection
strix/report/dedupe.py
check_duplicate() — An AI judge asks: is this the same root cause on the same asset as something already found?
strix/report/state.py
add_vulnerability_report() — Assigns the next vuln-NNNN id and stores the full finding.

S11 · Child completion

The specialist wraps up and mails a summary back to whoever hired it.

Inresult_summary, findings
Outa mailbox message to the parent
strix/tools/agents_graph/tools.py
agent_finish() — Renders a completion report and sends it to the parent's inbox.

S12 · Root aggregation

The lead wakes up, reads what the specialist found, and decides whether more specialists are needed.

Inmailbox message
Outupdated coverage decision
strix/tools/agents_graph/tools.py
wait_for_agents() — The blocking call the lead uses to wait for a specialist's report.

S13 · Scan completion

The lead decides testing is done and writes the executive summary.

In4 narrative fields
Outfinal scan result
strix/tools/finish/tool.py
finish_scan() — Root-only — validates the summary fields and ends the scan.

S14 · Artifact writing

Everything found gets written to disk in a form a human or a CI pipeline can actually read.

InReportState
Outreport.md, vulns/*.md, .csv, .json, .sarif
strix/report/writer.py
write_executive_report() — Writes the narrative report.
write_vulnerabilities() — Writes one Markdown file per finding, plus CSV/JSON indexes.
strix/report/sarif.py
write_sarif_report() — Writes the CI/CD-ready SARIF file.

S15 · Sandbox teardown

The disposable container and everything in it is deleted — nothing about the target's environment is left behind.

Inscan_id
Outclean environment
strix/runtime/session_manager.py
cleanup() — Closes the Caido client and deletes the Docker container.