Integrate Hackpert as a Prolog expert layer over canonical Hackmode state #201
Labels
No labels
bug
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/hackmode#201
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Outcome
Fold Hackpert into the canonical Hackmode monorepo as a SWI-Prolog expert/orchestration layer with two explicit engine modes: passive and active.
Hackpert must not become a second operation database or parallel source of truth. Hackmode/Tek9 remains canonical for operations, typed assets, graph persistence, KB lifecycle, and StarIntel synchronization. However, Hackpert does orchestrate tool runs, and in active mode it may intentionally drive canonical state changes through Hackmode's normal mutation APIs.
Source inspiration: https://github.com/lost-rob0t/hackpert
Engine modes
Passive mode
Passive Hackpert observes canonical Hackmode state, typed tool calls/results, and passive evidence such as IPX traffic.
Passive mode may:
Passive mode must not:
Active mode
Active Hackpert is an orchestrating expert engine. It is required for fuzzing, SQLi, OOB, XSS/blind-XSS, and other experts whose reasoning loop must take an action, inspect the result, update knowledge, and continue.
Active mode may:
Active mode does not get arbitrary mutation authority. Prolog emits typed actions/state deltas; the Common Lisp active-engine wrapper validates them and executes them through canonical Hackmode interfaces. No direct Prolog writes into Tek9 and no arbitrary shell primitive.
Tool orchestration
Hackpert already conceptually runs/orchestrates tools; the Hackmode adaptation must preserve that capability instead of reducing Hackpert to a recommendation service.
All active execution still uses Hackmode's registered provider/capability runtime so:
The active loop is roughly:
Graph model
Hackpert consumes canonical operation state plus typed tool calls/results. Its durable reasoning output/state transition is graph-shaped.
The graph covers:
Passive mode returns graph/advice deltas only. Active mode may return graph + typed action/state deltas for Common Lisp to accept and apply.
Knowledge-base model
Hackmode should have three explicit KB scopes:
Hackpert may propose promotions/exports. Common Lisp validates and persists them. Active mode may mutate operational state directly through the wrapper; long-term/global promotion remains an explicit lifecycle operation.
Learning requirements
Expert families / goals
Shared graph + KB substrate should support specialized experts rather than separate state silos:
Attack plans and playbooks are first-class graph structures with prerequisites, candidate capabilities, expected evidence, success/failure branches, and stop conditions.
SQLi/fuzzing-class experts are expected to run in active mode because they require iterative action -> evidence -> state mutation -> next action loops.
Possible Prolog-RLM integration comes later once stable and must reuse Hackmode's graph/KB/active-engine boundary.
LISH integration
Hackpert needs first-class LISH integration rather than a separate Hackpert REPL.
LISH should be able to:
Authority boundary
targets.txt,inscope.txt,outscope.txt,expert-state.prolog, or environment-variable operation authority.First slice in PR #25
hackmode-expertbridge using SWI-Prolog when installedswipl, quoting/injection safety, and no canonical-state mutation in the passive foundationPR #25 implemented the passive foundation only. Its "no mutation" property is not the final Hackpert architecture; active mode is the next major execution layer.
Next implementation slices
:passive/:active)Invariants
Acceptance proof for active mode