Implement Hackpert active engine orchestration and canonical state mutation #49
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#49
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
Add Hackpert active mode on top of the passive Prolog foundation merged in #25.
Active mode is not just recommendation. It owns the expert reasoning/orchestration loop and must be able to dispatch typed Hackmode capabilities, observe results, update operation state/graph/operational KB through canonical Common Lisp APIs, and continue reasoning.
Parent tracker: #24
Foundation: #25
Required mode split
Passive
Active
Active action protocol
Define a typed Common Lisp boundary for Prolog-emitted actions. At minimum the protocol needs actions equivalent to:
Do not expose arbitrary Prolog shell execution or raw Tek9 mutation. Prolog decides what action/state delta it wants; Common Lisp validates and applies it through Hackmode's canonical interfaces.
Execution loop
Mutation semantics
Active-mode mutation is intentional and first-class, not an accidental side effect.
Every mutation must be:
Operational KB writes are allowed from active mode. Long-term/global KB promotion remains a separate explicit lifecycle decision so one noisy run does not automatically poison reusable knowledge.
Provider orchestration
Active Hackpert must use Hackmode's existing capability/provider actor runtime rather than reintroducing Hackpert's old direct shell runner.
This preserves:
LISH integration
Add first-class Hackpert controls to LISH:
LISH is the user-facing shell for Hackpert; do not add a separate Hackpert REPL.
Dependencies / sequencing
Acceptance proof
Auto-RAGE Hackpert slice merged via #40 at
dec92721cd32334850d0dec2915c2787dbe95fc7.Completed the explicit engine-authority foundation:
expert-enginehas closed:passive/:activeauthority modes;:provider-dispatchand:canonical-mutation;expert-effect-denied;RED:
920784a566f4f5d271fc22578fbf65c985e93708added tests against the missing mode/effect API.GREEN:
e64de42b9e07072bfc00cdeef2695577fb76e4eb; exact-headcoreandmonorepoActions both passed before expected-head squash merge.Next owned slice remains the typed active action/state-delta protocol. Database graph/KB persistence stays fenced to the sibling worker.
Hackpert Auto-RAGE progress: merged typed active action protocol via #44 at master commit
71b3f5d817eb61adebf0f90d6eb2e47929bda083.RED:
53b62aff3f1faa3e3ad8839d1dc7312e849851a2specified the missing typed action API.Exact GREEN PR head:
6f6956af5b6b9623ba2c9c8a2a0902efbde68c90; exact-headcoreandmonorepoboth passed twice (the second pair after reopening the identical head as non-draft PR #44 because the connector's ready-for-review mutation failed internally).Protocol now provides one operation/run/expert/version/evidence-scoped
expert-active-actionenvelope with closed payloads for provider dispatch, graph delta, discovery, operational-KB delta, plan transition, and active-run control. Validation is pure and fail-closed: passive denies every active action; active dispatch requires:provider-dispatch; canonical deltas require:canonical-mutation; run control requires:active-control; operation/run mismatch and kind/payload mismatch are rejected. No provider execution, Tek9 mutation, second scheduler, or database internals were added.Next Hackpert-owned dependency-ready slice: consume validated
:dispatchactions through Hackmode's existing canonical provider/capability runtime, while preserving a single executor/effect boundary. Graph/KB persistence consumer work remains fenced to the database worker's typed storage APIs.Hackpert provider-orchestration slice merged as #50 at
9b8cbafa95310ae803c25553ef46aab8a65807f4.Acceptance now covered:
:dispatchactions validate exact operation/run scope;dispatch-capabilitywith no second executor/direct Tek9 write;2e2191e168bced54dd0a74046bcc8cf44100c573passed core, monorepo, and agent-framework-boundary CI before expected-head squash merge.Database #45 is also now merged, so the next dependency-ready Hackpert slice can consume the operation-scoped operational-KB API and execution-graph evidence from the sibling boundary rather than implementing storage internals.
Hackpert Auto-RAGE progress: merged #52 at
7a9edae29772845f5a916df244cfee23246e5888.Concrete provider slice now available through Hackmode's canonical capability/provider runtime:
subdomain-enumerate / subfindersubdomain-enumerate / crtshhttp-probe / curlThe stale green #48 branch was not merged because it had diverged behind current master; the executable provider delta was forward-reconciled onto current master instead. During reconciliation, exact-head core exposed a real load-order bug where HTTP registration ran before
run-http-probeexisted. Registration is now deferred until concrete runners load, with a state-independent regression covering runner availability + baseline provider registration.Exact PR head
d4ea5326ff4b57c0ab71e73ca83a4d19b810e1f5passed core, monorepo, and agent-framework-boundary, with zero unresolved review threads, before expected-head squash merge.No database internals, direct Tek9 mutation, second executor, or StarIntel product work was introduced. Next dependency-ready Hackpert work is to consume execution evidence/operational-KB state in the expert reasoning loop through the typed database APIs, then advance plan/playbook/recon-expert behavior.
Hackpert Auto-RAGE slice merged via #54 at
dda01c91636afdd8f22f4db2afdbfe304b19d30b.Hackpert can now project canonical typed execution records and operational-KB entries into deterministic Prolog facts for reasoning. The layer is projection-only: no DB writes, direct Tek9 access, provider dispatch, or shadow graph/KB authority.
Exact PR head
4b1fa96793edced8d34c6cb2bc71634152074c1apassed core, monorepo, and agent-framework-boundary before expected-head squash merge.Database sibling handoff / next dependency: expose operation-scoped typed enumeration APIs for persisted execution records and operational-KB entries (optionally run-scoped) so Hackpert can reconstruct these snapshots from canonical persisted state without owning storage traversal. Acceptance: deterministic typed results, operation isolation, no raw Tek9 objects, replay-safe ordering/identity. Until then Hackpert accepts canonical typed records supplied by the DB boundary.
Hackpert plan/playbook slice merged via #56 at
d3ffd6df26009b3f31f5dfd40005cb211fb48b64.Completed in this slice:
expert-playbook-step,expert-playbook, and operation/run-scopedexpert-planprimitives;:plan-transitionactive action and remain non-mutating until the canonical effect boundary accepts/applies them;RED head:
15e608aa24b77291229794397ccdf5c35121cd43.Exact GREEN PR head:
82643e394a00baecdab400e324dd38e408506274;core,monorepo, andagent-framework-boundaryall passed before expected-head squash merge.Database handoff still outstanding: the current
hackmode-databasepublic package exports point fetches/persistence but no operation-scoped enumeration API for execution records or operational-KB entries. Hackpert therefore still cannot rebuild a full persisted reasoning snapshot directly from canonical storage without violating the sibling fence. Needed contract: bounded operation-scoped enumeration, optionally run-filtered, returning typedexecution-record/operational-kb-entryvalues in deterministic order and performing no mutation.Database dependency update: #58 merged as
78d24647b52805bf47f172d17914651fce4e4ef4.Active-loop storage now has a typed read side matching the persisted execution/operational-KB data: operation-scoped execution enumeration, run/kind filters, operational-KB assertion/retraction enumeration, validated reconstruction from Tek9 nodes, deterministic ordering, and fail-closed scope checks.
This is database-only plumbing. The consumer that refreshes the next Hackpert iteration from these reads remains in the Hackpert lane.
Hackpert canonical snapshot-refresh slice merged via #60 at
9e80edbe8affef1a862e144cb67d3fa4c6c075c0.Database #58 removed the prior read-boundary blocker. Hackpert now has
expert-operation-snapshot, which consumes the sibling database package's typed operation-scoped execution-record and operational-KB enumeration APIs, then delegates to the existing deterministic Prolog projection. Repeated calls re-read canonical state, so a subsequent reasoning iteration observes newly persisted execution/KB evidence.RED:
166b3558767f9c290afb581d5f123bfb83622b87— exact-head core failed on the missing snapshot-refresh API while monorepo/boundary remained green.GREEN exact head:
f6b60c875447d0cf2d27b24d9f4b7bc04646e19b— core, monorepo, and agent-framework-boundary all passed twice across the draft/non-draft identical-head PR transition; zero review threads/reviews before expected-head squash merge.No direct Tek9 traversal/mutation, persistence internals, provider executor, or shadow graph/KB authority was added. This closes the specific #27 acceptance gap where the next Prolog iteration must see updated graph/operational-KB state. Next dependency-ready Hackpert work is the first recon expert over the shared plan/provider/snapshot substrate, then active-loop stop/escalation behavior.
Hackpert first recon-expert slice merged via #63 at
ae09008407040a86f4f338b85ec54217f7a17f31.RED exact head
e9357fca5977585e884c91a08b08f7f5188014bafailed specifically becauseHACKMODE:EXPERT-RECON-NEXT-ACTIONdid not exist.GREEN exact head
659b4b70cda300fed78f12a9fb4543defc992d55passed core, monorepo, and agent-framework-boundary twice across the draft/non-draft identical-head transition, with zero reviews or unresolved review threads before expected-head squash merge.Completed behavior:
subdomain-enumerateandhttp-probe;:dispatchaction carrying operation/run/expert/version/evidence provenance;No database internals, direct Tek9 access, second executor/scheduler, or StarIntel product work was added.
Next dependency-ready Hackpert slice: explicit active-loop stop/escalation behavior over plan + refreshed canonical snapshot evidence, including no-viable-action/stall handling without hard-coding a fixed recon->model pipeline.
Hackpert loop-control slice merged via #67 at
eeca3cf48c265f5fa31863996d0185cfc8722a77.RED exact head
07b5ec1bb0fe791f2f47d948c40bf7d2838eb40c: core failed because the new loop-policy API did not exist; monorepo and agent-framework-boundary were green.GREEN exact head
a5697aecee31e951056e1080c28e82913f9fc7cd: core, monorepo, and agent-framework-boundary all passed again on the non-draft PR before expected-head squash merge.The new pure loop-control boundary keeps reasoning strategy separate from effect authority: symbolic is the default; configurable repeated symbolic non-progress/failure escalates to direct; direct progress returns to symbolic; declared plan stop conditions preserve explicit reasons; operation/run mismatch fails closed. It adds no model/tool executor, scheduler, persistence path, direct Tek9 access, or database internals.
Next dependency-ready Hackpert work is wiring this decision boundary into an inspectable active run/controller without creating a second scheduler, then LISH run/mode/reasoning/action inspection. Prolog-RLM remains later #28 work.
Hackpert run-inspection slice merged via #89 at
d018476a144db62c776d0f91165aa0a82810d5dd.Adds a pure typed
expert-run-inspectionsurface for operator/LISH consumers. It exposes operation/run identity, active/passive authority, symbolic/direct reasoning strategy, non-progress count, and last loop reason while keeping authority and reasoning strategy explicitly independent. No provider execution, canonical mutation, persistence, database internals, or scheduler is introduced.RED
9cbaa3eb56fb00c1c13a25328951f8c88fc93507: core failed against the missing inspection API while monorepo/boundary were green.GREEN exact head
ff34505104981f404afe9d71b8af37f3fd0c5987: core, monorepo, and agent-framework-boundary all passed. PR #89 was mergeable with zero reviews and zero review threads before expected-head squash merge.Draft #88 used the identical head and was replaced only because the ready-for-review connector mutation hit GitHub's recurring
fullDatabaseIdGraphQL error.Hackpert operator-inspection progress merged via #92 at
1ace3c2620de7698d5933afb5f1563a0b7302098.Added side-effect-free typed plan inspection alongside the existing run inspection: plan/objective identity, current step, current-step required capabilities, success/failure branches, terminal state, and deterministically normalized stop conditions. List-valued inspection fields are defensive copies. This surface performs no provider execution, canonical mutation, persistence, or scheduling.
RED:
8ba7df814811a158c0b1d4459d83469748800c95— exact-head core failed against the missing plan-inspection API while monorepo and agent-framework-boundary passed.GREEN:
b69cc5603d1a31d07f2048fe1763aa63e75e49c8— exact-head core, monorepo, and agent-framework-boundary all passed. PR #92 had zero reviews and zero unresolved review threads and was merged with expected-head protection.Draft #91 carried the same exact green head but GitHub's ready-for-review mutation hit the recurring
fullDatabaseIdconnector error; #92 reused the identical head without code changes.Hackpert action-inspection slice merged via #95 at
842563fd02619bcc306d0642f243d0bd1261edc5.RED:
c681f7dbc8309ca1a0c42f231ab32e79564f4e08specified bounded, side-effect-free inspection for typed active actions.GREEN exact head:
98b06522f343ec5da63398789f778114e4883cd9; fresh non-draftcore,monorepo, andagent-framework-boundaryall passed. PR #95 was mergeable with zero reviews and zero unresolved threads before expected-head squash merge.Inspection now exposes action/effect kind, operation/run scope, expert/version provenance, normalized evidence IDs, and bounded payload metadata while deliberately excluding provider inputs and graph/KB payload contents. No provider execution, canonical mutation, database internals, second scheduler, or StarIntel product work was introduced.
Draft #94 was closed and reopened as #95 on the identical head because GitHub's ready-for-review mutation hit the recurring
fullDatabaseIdconnector error.Hackpert action-admission inspection slice merged via #98 at
7496a31fc476f4d230343953db4bd2714f92da73.RED exact head
4970d9710d2a51e05bf6eb7404fd0a6a341ed415: core failed becauseEXPERT-ACTION-ADMISSION-INSPECTIONdid not exist; monorepo and agent-framework-boundary were green.GREEN exact head
d42c2b57986a24c56d914209794c5cc82426cfc7: fresh non-draft core, monorepo, and agent-framework-boundary all passed before expected-head squash merge. PR #98 was mergeable with zero reviews and zero unresolved review threads.The new pure inspection wrapper reports
:acceptedor:rejectedaction admission, distinguishes authority denial from invalid/stale action scope, and exposes only bounded reason/effect metadata while reusing the existing payload-redacted action inspection. It does not dispatch providers, mutate canonical state, access Tek9 directly, create a scheduler, or touch StarIntel product work.Draft #97 was closed and reopened as #98 on the identical green head because GitHub's ready-for-review mutation hit the recurring
fullDatabaseIdconnector error.Database worker handoff: PR #121 is blocked before its database regression runs by a sibling-owned compile failure on current master
54e61994188ab99276a64dac7454cd9f01c8dc12. Exact RED head4f9ff2ae415aa914a9219886fd3194c99df5d7b3has monorepo + agent-framework-boundary green, butcorefails compilingsource/hackmode-core/expert/inspection.lisp: duplicate definitions ofEXPERT-RUN-INSPECTION-OPERATIONandEXPERT-RUN-INSPECTION-RUN-IDclobber the structure accessors, producingUIOP/LISP-BUILD:COMPILE-FILE-ERROR. This is inside the Hackpert sibling fence, so I am not modifying it. PR #121's database implementation remains isolated to the typed operational-KB fetch boundary and will stay unmerged until the sibling regression is repaired and exact-head core reaches the database tests.