[EPIC][symbolic-port] Private-source semantics → public symbolic expert/rule corpus #408

Open
opened 2026-09-08 01:29:20 +00:00 by nsaspy · 1 comment
Owner

Mission

Add a reusable semantic-port pipeline to Prolog-RLM for translating authorized private/reference implementations into public symbolic knowledge, expert contracts, rules, plans, verification predicates and synthetic conformance fixtures without requiring publication of the original private source.

Initial consumer: lost-rob0t/hackmode#190 — public ZeroForge symbolic port into Hackmode/Hackpert.

This epic is not about bundling ZeroForge or any private product into prolog-rlm. It is about making the reusable private/reference semantics → typed public symbolic representation workflow first-class.

Authorization / publication model

The operator has explicitly authorized using their private ZeroForge repository as reference material for a public symbolic reimplementation in Hackmode.

The reusable Prolog-RLM mechanism should enforce a distinction between:

PRIVATE SOURCE / REFERENCE
        ↓ semantic extraction
BEHAVIORAL / ARCHITECTURAL MODEL
        ↓ normalization
PUBLIC SYMBOLIC REPRESENTATION
        ↓ validation
PUBLIC EXPERTS / RULES / PLANS / TESTS / DOCS

Authorization to derive and publish the public symbolic implementation does not imply automatic publication of verbatim source, history, credentials, private target data or unrelated proprietary artifacts.

Relationship to existing architecture

Reuse:

  • #376 — first-class expert registry/routing/invocation;
  • #389 — generic cyber host/harness for Hackmode;
  • #335 — canonical reasoning modes;
  • project/source knowledge infrastructure;
  • Spec/Plan/Verify/repair;
  • proof/evidence acceptance;
  • structured outcomes/traces/provenance;
  • existing external-context/retrieval mechanisms.

Do not create a second expert runtime, second parser/runtime authority, or a special ZeroForge execution engine.

Core capability: semantic extraction

Given authorized reference material such as source, design notes, logs, examples, transcripts, tests or behavioral observations, produce candidate symbolic artifacts such as:

fact(...).
constraint(...).
precondition(...).
postcondition(...).
expert_for(...).
applicable_when(...).
requires_evidence(...).
proposes_action(...).
transition(...).
failure_condition(...).
no_progress_condition(...).
verify(...).
repair_rule(...).

Exact schemas follow the expert/spec/plan systems being implemented under #376 and related issues.

The important requirement is that the output represents semantics, not merely chunks of copied natural-language/source text.

Public-port artifact classes

Support explicit classifications equivalent to:

PUBLIC_FACT
PUBLIC_RULE
PUBLIC_CONSTRAINT
PUBLIC_EXPERT_CONTRACT
PUBLIC_PLAN_OR_STATE_MACHINE
PUBLIC_VERIFICATION_RULE
PUBLIC_KB_ENTRY
PUBLIC_SYNTHETIC_FIXTURE
PUBLIC_INTERFACE_CONTRACT
PRIVATE_REFERENCE_ONLY
REQUIRES_MANUAL_REVIEW
DROP

Each artifact carries provenance sufficient to audit derivation while allowing private source locators/details to remain non-public when needed.

Provenance boundary

Internally, an authorized migration run may retain private references/digests/locators needed for review.

A public projection must be able to strip/redact private-only provenance while retaining safe metadata such as:

  • port/migration run identity;
  • symbolic artifact version;
  • derivation method/version;
  • reviewer/acceptance state;
  • public conformance fixture references;
  • statement that the artifact was derived from an authorized private reference implementation where useful.

Do not require publishing private filenames, source lines, commit history or repository URLs to make the public artifact usable.

Extraction pipeline

Target bounded workflow:

reference corpus
   ↓
segment / retrieve relevant semantic unit
   ↓
identify behavior / invariant / decision / transition
   ↓
normalize to typed candidate symbolic representation
   ↓
validate schema + safety/publication policy
   ↓
compare against behavioral evidence/tests
   ↓
review/accept
   ↓
publishable symbolic artifact
   ↓
compose into expert / plan / verifier / KB

Use deterministic extraction/parsing where possible. An LLM may assist semantic normalization, but model output is candidate data and must be validated before becoming trusted symbolic knowledge.

Write-once / append-oriented history

For accepted public symbolic knowledge, preserve append-oriented provenance/history rather than silently rewriting the meaning of an accepted rule.

When a semantic rule changes materially:

old rule/version remains historical
new rule/version is appended
supersession relation is explicit

Projection/runtime policy can choose the current active version.

This should integrate with the broader symbolic knowledge/memory direction rather than turn Git history into the only semantic provenance mechanism.

Behavioral parity, not source parity

The porting objective is:

same intended externally relevant behavior / decision semantics

not:

same implementation text / file layout / internal architecture

A public reimplementation may deliberately improve the architecture by translating opaque procedural behavior into explicit rules, constraints, expert contracts and verification predicates.

Conformance fixtures

Every migrated semantic family should have public/synthetic evidence proving behavior without private data.

Fixtures may encode:

  • input facts/state;
  • expected expert applicability;
  • expected plan/transition;
  • expected capability request;
  • expected deny/allow condition;
  • expected derived fact;
  • expected verification outcome;
  • expected failure/no-progress behavior.

Private production examples may inform fixture construction but must not leak target/secrets/private payloads into public test data.

Public projection gate

Before an artifact is classified publishable, verify at minimum:

  1. no secrets/credentials/private target data;
  2. no accidental verbatim private implementation block;
  3. public schema is self-contained;
  4. behavior can be explained from public facts/rules/contracts;
  5. synthetic/public conformance evidence exists where practical;
  6. artifact does not grant ambient authority merely because the private implementation had it;
  7. any model-generated content was validated;
  8. publication rights/authorization are present for the semantic port.

Return structured blocked/review_required rather than silently publishing questionable artifacts.

ZeroForge / Hackmode first consumer

For lost-rob0t/hackmode#190, this pipeline should support translating useful ZeroForge concepts into public representations such as:

  • Hackpert expert applicability rules;
  • objective/strategy rules;
  • attack/recon plan state machines;
  • evidence requirements;
  • failure/non-progress handling;
  • repair/alternate-path rules;
  • verification predicates;
  • reusable BBP/CTF symbolic knowledge.

Concrete cyber actions remain Hackmode capabilities and stay downstream.

Acceptance

  • authorized reference material can be transformed into typed symbolic candidates rather than only summarized prose;
  • accepted rules/facts/contracts carry versioned provenance;
  • public projection can omit private source locators/details;
  • publication policy detects obvious secret/private-data leakage;
  • verbatim-source publication is not the default migration mechanism;
  • synthetic conformance fixtures can validate semantic parity;
  • model-assisted normalization cannot directly create trusted executable Prolog without validation;
  • changed semantic rules append/supersede rather than silently rewrite historical knowledge;
  • exported symbolic artifacts compose with #376 expert routing and #389 Hackmode host integration;
  • first end-to-end fixture ports one private-reference behavior into a public symbolic expert/rule + public synthetic test without requiring the private repo at runtime.

Non-goals

  • No generic license bypass or permission inference.
  • No automatic publication of private repos.
  • No private credentials/data in public KBs.
  • No requirement to preserve original source layout or language.
  • No ZeroForge-specific runtime in core.
  • No unrestricted generated call/1 terms.

First slice

Implement a minimal semantic-port record + public projection + conformance fixture around a synthetic private-reference example. Then use the same contract for the first authorized ZeroForge-derived behavior selected by hackmode#190.

## Mission Add a reusable **semantic-port pipeline** to Prolog-RLM for translating authorized private/reference implementations into **public symbolic knowledge, expert contracts, rules, plans, verification predicates and synthetic conformance fixtures** without requiring publication of the original private source. Initial consumer: `lost-rob0t/hackmode#190` — public ZeroForge symbolic port into Hackmode/Hackpert. This epic is not about bundling ZeroForge or any private product into `prolog-rlm`. It is about making the reusable **private/reference semantics → typed public symbolic representation** workflow first-class. ## Authorization / publication model The operator has explicitly authorized using their private ZeroForge repository as reference material for a public symbolic reimplementation in Hackmode. The reusable Prolog-RLM mechanism should enforce a distinction between: ```text PRIVATE SOURCE / REFERENCE ↓ semantic extraction BEHAVIORAL / ARCHITECTURAL MODEL ↓ normalization PUBLIC SYMBOLIC REPRESENTATION ↓ validation PUBLIC EXPERTS / RULES / PLANS / TESTS / DOCS ``` Authorization to derive and publish the public symbolic implementation does **not** imply automatic publication of verbatim source, history, credentials, private target data or unrelated proprietary artifacts. ## Relationship to existing architecture Reuse: - #376 — first-class expert registry/routing/invocation; - #389 — generic cyber host/harness for Hackmode; - #335 — canonical reasoning modes; - project/source knowledge infrastructure; - Spec/Plan/Verify/repair; - proof/evidence acceptance; - structured outcomes/traces/provenance; - existing external-context/retrieval mechanisms. Do not create a second expert runtime, second parser/runtime authority, or a special ZeroForge execution engine. ## Core capability: semantic extraction Given authorized reference material such as source, design notes, logs, examples, transcripts, tests or behavioral observations, produce candidate symbolic artifacts such as: ```prolog fact(...). constraint(...). precondition(...). postcondition(...). expert_for(...). applicable_when(...). requires_evidence(...). proposes_action(...). transition(...). failure_condition(...). no_progress_condition(...). verify(...). repair_rule(...). ``` Exact schemas follow the expert/spec/plan systems being implemented under #376 and related issues. The important requirement is that the output represents **semantics**, not merely chunks of copied natural-language/source text. ## Public-port artifact classes Support explicit classifications equivalent to: ```text PUBLIC_FACT PUBLIC_RULE PUBLIC_CONSTRAINT PUBLIC_EXPERT_CONTRACT PUBLIC_PLAN_OR_STATE_MACHINE PUBLIC_VERIFICATION_RULE PUBLIC_KB_ENTRY PUBLIC_SYNTHETIC_FIXTURE PUBLIC_INTERFACE_CONTRACT PRIVATE_REFERENCE_ONLY REQUIRES_MANUAL_REVIEW DROP ``` Each artifact carries provenance sufficient to audit derivation while allowing private source locators/details to remain non-public when needed. ## Provenance boundary Internally, an authorized migration run may retain private references/digests/locators needed for review. A **public projection** must be able to strip/redact private-only provenance while retaining safe metadata such as: - port/migration run identity; - symbolic artifact version; - derivation method/version; - reviewer/acceptance state; - public conformance fixture references; - statement that the artifact was derived from an authorized private reference implementation where useful. Do not require publishing private filenames, source lines, commit history or repository URLs to make the public artifact usable. ## Extraction pipeline Target bounded workflow: ```text reference corpus ↓ segment / retrieve relevant semantic unit ↓ identify behavior / invariant / decision / transition ↓ normalize to typed candidate symbolic representation ↓ validate schema + safety/publication policy ↓ compare against behavioral evidence/tests ↓ review/accept ↓ publishable symbolic artifact ↓ compose into expert / plan / verifier / KB ``` Use deterministic extraction/parsing where possible. An LLM may assist semantic normalization, but model output is candidate data and must be validated before becoming trusted symbolic knowledge. ## Write-once / append-oriented history For accepted public symbolic knowledge, preserve append-oriented provenance/history rather than silently rewriting the meaning of an accepted rule. When a semantic rule changes materially: ```text old rule/version remains historical new rule/version is appended supersession relation is explicit ``` Projection/runtime policy can choose the current active version. This should integrate with the broader symbolic knowledge/memory direction rather than turn Git history into the only semantic provenance mechanism. ## Behavioral parity, not source parity The porting objective is: ```text same intended externally relevant behavior / decision semantics ``` not: ```text same implementation text / file layout / internal architecture ``` A public reimplementation may deliberately improve the architecture by translating opaque procedural behavior into explicit rules, constraints, expert contracts and verification predicates. ## Conformance fixtures Every migrated semantic family should have public/synthetic evidence proving behavior without private data. Fixtures may encode: - input facts/state; - expected expert applicability; - expected plan/transition; - expected capability request; - expected deny/allow condition; - expected derived fact; - expected verification outcome; - expected failure/no-progress behavior. Private production examples may inform fixture construction but must not leak target/secrets/private payloads into public test data. ## Public projection gate Before an artifact is classified publishable, verify at minimum: 1. no secrets/credentials/private target data; 2. no accidental verbatim private implementation block; 3. public schema is self-contained; 4. behavior can be explained from public facts/rules/contracts; 5. synthetic/public conformance evidence exists where practical; 6. artifact does not grant ambient authority merely because the private implementation had it; 7. any model-generated content was validated; 8. publication rights/authorization are present for the semantic port. Return structured `blocked/review_required` rather than silently publishing questionable artifacts. ## ZeroForge / Hackmode first consumer For `lost-rob0t/hackmode#190`, this pipeline should support translating useful ZeroForge concepts into public representations such as: - Hackpert expert applicability rules; - objective/strategy rules; - attack/recon plan state machines; - evidence requirements; - failure/non-progress handling; - repair/alternate-path rules; - verification predicates; - reusable BBP/CTF symbolic knowledge. Concrete cyber actions remain Hackmode capabilities and stay downstream. ## Acceptance - [ ] authorized reference material can be transformed into typed symbolic candidates rather than only summarized prose; - [ ] accepted rules/facts/contracts carry versioned provenance; - [ ] public projection can omit private source locators/details; - [ ] publication policy detects obvious secret/private-data leakage; - [ ] verbatim-source publication is not the default migration mechanism; - [ ] synthetic conformance fixtures can validate semantic parity; - [ ] model-assisted normalization cannot directly create trusted executable Prolog without validation; - [ ] changed semantic rules append/supersede rather than silently rewrite historical knowledge; - [ ] exported symbolic artifacts compose with #376 expert routing and #389 Hackmode host integration; - [ ] first end-to-end fixture ports one private-reference behavior into a public symbolic expert/rule + public synthetic test without requiring the private repo at runtime. ## Non-goals - No generic license bypass or permission inference. - No automatic publication of private repos. - No private credentials/data in public KBs. - No requirement to preserve original source layout or language. - No ZeroForge-specific runtime in core. - No unrestricted generated `call/1` terms. ## First slice Implement a minimal **semantic-port record + public projection + conformance fixture** around a synthetic private-reference example. Then use the same contract for the first authorized ZeroForge-derived behavior selected by `hackmode#190`.
Author
Owner

First concrete public-port consumer expanded

The ZeroForge migration now has an explicit private-source authorization record at lost-rob0t/zero-forge#147 and a public Hackmode artifact-generation epic at lost-rob0t/hackmode#191.

The semantic-port pipeline should therefore treat artifact-generation semantics as a first-class proving case, including applicability rules, artifact contracts/IR, validators, repair rules, and synthetic conformance fixtures for:

  • Metasploit modules;
  • ZAP active plugins/scripts;
  • ZAP passive plugins/scripts;
  • native Hackmode exploit modules;
  • native Hackmode detection modules.

Reusable typed artifact synthesis/validation/repair machinery is tracked in #391.

### First concrete public-port consumer expanded The ZeroForge migration now has an explicit private-source authorization record at `lost-rob0t/zero-forge#147` and a public Hackmode artifact-generation epic at `lost-rob0t/hackmode#191`. The semantic-port pipeline should therefore treat artifact-generation semantics as a first-class proving case, including applicability rules, artifact contracts/IR, validators, repair rules, and synthetic conformance fixtures for: - Metasploit modules; - ZAP active plugins/scripts; - ZAP passive plugins/scripts; - native Hackmode exploit modules; - native Hackmode detection modules. Reusable typed artifact synthesis/validation/repair machinery is tracked in #391.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/prolog-rlm#408
No description provided.