# agent-creation

> Every algorithm contract in this domain is listed with its position on the derivation loop, its intent and invariant, the flow it walks, its productions as a…

Page: Ontology · Algorithms
Canonical: https://banes-lab.com/ontology/algorithms#algo-domain-agent-creation

Every algorithm contract in this domain is listed with its position on the derivation loop, its intent and invariant, the flow it walks, its productions as a grammar, what it composes and is composed by, which forces and principles it answers to, what grounds it and what it grounds, and an exemplar where the record carries one. The diagram shows what composes what inside the domain.

Relations diagram

What composes what inside this domain.

```mermaid
flowchart LR
n_evidence_before_generation["Evidence-Before-Generation"]
n_semantic_operation_boundary["Semantic Operation Boundary"]
n_capability_profile["Capability Profile"]
n_creation_history_collision["Creation History Collision"]
n_domain_cache_validation["Domain Cache Validation"]
n_scope_extraction["Scope Extraction"]
n_non_destructive_domain_investigation["Non-Destructive Domain Investigation"]
n_domain_knowledge_base["Domain Knowledge Base"]
n_risk_complexity_reversibility["Risk Complexity Reversibility"]
n_existing_pattern_extraction["Existing Pattern Extraction"]
n_knowledge_documentation_relevance["Knowledge Documentation Relevance"]
n_principle_extraction["Principle Extraction"]
n_adaptive_phase_boundary["Adaptive Phase Boundary"]
n_phase_validation_requirement["Phase Validation Requirement"]
n_portable_contract_composition["Portable Contract Composition"]
n_validation_strategy_composition["Validation Strategy Composition"]
n_replacement_safety["Replacement Safety"]
n_adapter_rendering["Adapter Rendering"]
n_audit_artifact["Audit Artifact"]
n_semantic_compliance_validation["Semantic Compliance Validation"]
n_evidence_grounding_validation["Evidence Grounding Validation"]
n_algorithmic_embodiment_validation["Algorithmic Embodiment Validation"]
n_final_generation_report["Final Generation Report"]
n_agent_generation_completion["Agent Generation Completion"]
n_agent_creator_kernel["Agent Creator Kernel"]
n_agent_generation_concern["<Agent Generation Concern>"]
n_audit_artifact --> n_capability_profile
n_agent_creator_kernel --> n_capability_profile
n_agent_creator_kernel --> n_scope_extraction
n_agent_creator_kernel --> n_domain_knowledge_base
n_agent_creator_kernel --> n_principle_extraction
n_agent_creator_kernel --> n_adapter_rendering
n_agent_creator_kernel --> n_final_generation_report
n_agent_creator_kernel --> n_agent_generation_completion
n_agent_creator_kernel --> n_evidence_before_generation
n_agent_creator_kernel --> n_risk_complexity_reversibility
n_agent_creator_kernel --> n_adaptive_phase_boundary
n_agent_creator_kernel --> n_creation_history_collision
n_agent_creator_kernel --> n_phase_validation_requirement
n_agent_creator_kernel --> n_evidence_grounding_validation
```

### Evidence-Before-Generation

- Stage: [orient](https://banes-lab.com/records/stage/orient.md)
- Axis: [ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Discover available context, inspect target-domain resources, extract concrete facts, construct a knowledge base, and generate only from verified evidence.

Invariant
Agent generation must be grounded in inspected domain structure, not assumptions.

Flow

```text
Request → Discover → Inspect → ExtractFacts → KnowledgeBase → Generate
```

Productions

```bnf
EvidenceBeforeGeneration ::= <UserRequest> "->" <ResourceDiscovery> "->" <DomainInspection> "->" <FactExtraction> "->" <KnowledgeBase> "->" <GeneratedAgent>
GeneratedAgent ::= "allowed_only_if_evidence_grounded"
```

Composes
none

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
An agent generated from the request text and prior model knowledge, never inspecting the target.
```

After

```text
request → discover resources → inspect domain → extract facts → knowledge base → generate only from verified evidence
```

### Semantic Operation Boundary

- Stage: [orient](https://banes-lab.com/records/stage/orient.md)
- Axis: [ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Define required work as semantic operations, defer runtime execution details to adapters, and reject runtime-specific primitives from the portable core contract.

Invariant
The core agent contract describes what must happen; the adapter decides how it happens.

Flow

```text
SemanticVerb → AdapterMapping → RuntimeAction → Result
```

Productions

```bnf
SemanticBoundary ::= <SemanticOperation> "->" <AdapterMapping> "->" <RuntimeExecution> "->" <EvidenceResult>
SemanticOperation ::= "DECLARE_RESOURCE" | "DISCOVER_RESOURCES" | "READ_RESOURCE" | "SEARCH_CONTENT" | "ANALYZE_CONTENT" | "EXTRACT_FACTS" | "CALCULATE_METRIC" | "COMPOSE_ARTIFACT" | "VALIDATE_ARTIFACT" | "PERSIST_ARTIFACT" | "REPORT_RESULT" | "REQUEST_DECISION"
CoreConstraint ::= "no_runtime_specific_paths_or_commands"
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md)

Grounds
none

Before

```text
The agent core hardcodes a specific search command and an absolute path, so it only runs on one runtime.
```

After

```text
semantic op{DISCOVER/READ/SEARCH/ANALYZE} → adapter maps to the runtime → the core carries no runtime path or command
```

### Capability Profile

- Stage: [orient](https://banes-lab.com/records/stage/orient.md)
- Axis: [ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Detect filesystem, search, execution, persistence, validation, and user-interaction capabilities; mark unsupported capabilities; substitute where safe; block where required capability is non-substitutable.

Invariant
Generated workflows must know what their runtime can do.

Flow

```text
CapabilitySet → Probe → Available|Unavailable|Substituted → RuntimeMode
```

Productions

```bnf
CapabilityProfile ::= <RequiredCapabilitySet> "->" <CapabilityProbeSet> "->" <CapabilityVerdict>
CapabilityVerdict ::= "full" | "degraded" | "blocked"
Capability ::= "filesystem" | "search" | "execution" | "persistence" | "validation" | "user_interaction"
```

Composes
none

Composed by
[Audit Artifact](https://banes-lab.com/records/algo/audit-artifact.md), [Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
The agent assumes it can execute and write, then fails when it cannot.
```

After

```text
required capabilities{filesystem, search, execution, persistence, validation} → probe each → mode{full | degraded | blocked}
```

### Creation History Collision

- Stage: [constrain](https://banes-lab.com/records/stage/constrain.md)
- Axis: [teleology](https://banes-lab.com/records/reason/axis-teleology.md)
- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Load existing agent and invocation registries, map existing identities, compare target name and domain, and require the developer's decision before refinement, renaming, replacement, or cancellation.

Invariant
Agent creation must not silently duplicate or overwrite prior work.

Flow

```text
TargetAgent → ExistingRegistry → NameCollision? → DomainCollision? → Decision
```

Productions

```bnf
CreationCollision ::= <TargetAgentName> "->" <ExistingAgentMap> "->" <CollisionCheck> "->" <AgentOperationMode>
AgentOperationMode ::= "CREATE" | "REFINE" | "RENAME" | "REPLACE" | "CANCEL"
CollisionCheck ::= "name_collision" | "domain_collision" | "none"
```

Composes
none

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
A new agent silently overwrites an existing one of the same name.
```

After

```text
target name → existing registry → name/domain collision? → developer decision{CREATE|REFINE|RENAME|REPLACE|CANCEL}
```

### Domain Cache Validation

- Stage: [orient](https://banes-lab.com/records/stage/orient.md)
- Axis: [ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Normalize the domain path, compute a domain hash, search cache entries, calculate cache age, and reuse cached knowledge only when cache identity and TTL are valid.

Invariant
Prior domain intelligence can be reused only when freshness and identity are verified.

Flow

```text
DomainPath → Normalize → Hash → CacheLookup → AgeCheck → UseCache|Investigate
```

Productions

```bnf
DomainCache ::= <DomainPath> "->" <DomainHash> "->" <CacheEntry> "->" <CacheAge> "->" <CacheDecision>
CacheDecision ::= "use_cached_domain" | "reject_stale_cache" | "no_cache_investigate"
```

Composes
none

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
Stale cached domain intelligence reused as if it were current.
```

After

```text
domain path → normalize + hash → cache lookup → age vs TTL → {use cached | reject stale | investigate}
```

### Scope Extraction

- Stage: [orient](https://banes-lab.com/records/stage/orient.md)
- Axis: [ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Determine whether the target is a resource, directory, module, repository, or unknown scope; then extract interfaces, declarations, dependencies, systems, or boundaries appropriate to that scope.

Invariant
Investigation depth must match target-domain shape.

Flow

```text
TargetPath → InvestigationType → ScopeModel → ResourceSet → InterfaceFacts
```

Productions

```bnf
ScopeExtraction ::= <TargetPath> "->" <InvestigationDepth> "->" <DomainScope>
InvestigationDepth ::= "single-resource" | "directory" | "module" | "repository" | "auto"
DomainScope ::= <ResourceScope> | <DirectoryScope> | <ModuleScope> | <RepositoryScope>
```

Composes
none

Composed by
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
A repository investigated at single-file depth, missing every boundary.
```

After

```text
target → investigation depth{single-resource|directory|module|repository} → scope-matched facts{interfaces, deps, boundaries}
```

### Non-Destructive Domain Investigation

- Stage: [see](https://banes-lab.com/records/stage/see.md)
- Axis: [analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- Math type: [analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- Yields: operation

Details

Intent
Prepare static investigation, optionally prepare safe executable analysis, prohibit source mutation, execute or emulate analysis, and merge observable outputs into domain intelligence.

Invariant
Domain discovery may inspect and analyze, but must not mutate the source domain.

Flow

```text
StaticPlan + OptionalExecutablePlan → Analyze → ExtractStructure → CacheResults
```

Productions

```bnf
DomainInvestigation ::= <InvestigationPlan> "->" <AnalysisExecution> "->" <DomainKnowledge>
InvestigationPlan ::= <StaticAnalysisPlan> "," <OptionalExecutableAnalysisPlan>
ExecutionConstraint ::= "non_destructive" "," "observable_output_required" "," "source_mutation_forbidden"
```

Composes
none

Forces
[runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [state_transaction](https://banes-lab.com/records/force/state-transaction.md), [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
Investigation runs a script that mutates the source it is inspecting.
```

After

```text
static plan (+ optional safe executable) → analyze, never mutate the source → observable output → domain knowledge
```

### Domain Knowledge Base

- Stage: [orient](https://banes-lab.com/records/stage/orient.md)
- Axis: [ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Store target scope, discovered structure, purposes, dependencies, interfaces, patterns, statistics, timestamp, and evidence sources in a reusable knowledge object.

Invariant
Agent generation needs an explicit evidence substrate.

Flow

```text
DomainFacts → Statistics → EvidenceSources → KnowledgeBase
```

Productions

```bnf
DomainKnowledgeBase ::= <DomainScope> "," <DomainStructure> "," <PurposeSet> "," <DependencyMap> "," <InterfaceSet> "," <PatternSet> "," <Statistics> "," <EvidenceSourceSet>
Statistics ::= "resource_count" "," "interface_count" "," "dependency_count" "," "resource_types" "," "architectural_patterns"
```

Composes
none

Composed by
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
Generation proceeds with no explicit evidence substrate to cite.
```

After

```text
domain facts + structure + purposes + deps + interfaces + patterns + statistics + evidence sources → reusable knowledge base
```

### Risk Complexity Reversibility

- Stage: [see](https://banes-lab.com/records/stage/see.md)
- Axis: [analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- Math type: [analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- Yields: operation

Details

Intent
Analyze domain dependencies, side effects, resource count, interface count, dependency patterns, and uncertainty factors to assign risk, complexity, reversibility, and uncertainty.

Invariant
Phase rigor should be proportional to domain risk and complexity.

Flow

```text
KnowledgeBase → RiskFactors → ComplexityScore → Reversibility → Uncertainty
```

Productions

```bnf
DomainCharacteristics ::= <RiskLevel> "," <ComplexityScore> "," <Reversibility> "," <UncertaintyLevel>
RiskLevel ::= "low" | "medium" | "high"
Reversibility ::= "reversible" | "partially-reversible" | "irreversible"
UncertaintyLevel ::= "low" | "medium" | "high"
```

Composes
none

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
Every agent given the same phase count regardless of how risky its domain is.
```

After

```text
knowledge base → risk{low|medium|high} + complexity + reversibility{reversible|partial|irreversible} + uncertainty
```

### Existing Pattern Extraction

- Stage: [see](https://banes-lab.com/records/stage/see.md)
- Axis: [analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Inspect existing agent specifications, count phase markers, validation gates, and semantic operations, extract reusable structures, and derive baseline design conventions.

Invariant
New agents should conform to proven local agent grammar where evidence exists.

Flow

```text
ExistingSpecs → PhaseCount → GateCount → OperationUsage → ReusablePatterns
```

Productions

```bnf
ExistingPatternExtraction ::= <ExistingAgentSpecSet> "->" <StructuralMetricSet> "->" <ReusablePatternSet>
StructuralMetricSet ::= "phase_count" "," "validation_gate_count" "," "semantic_operation_count"
```

Composes
none

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A new agent invented in a shape that ignores the local agent grammar.
```

After

```text
existing specs → count{phases, gates, semantic ops} → reusable structures → baseline conventions
```

### Knowledge Documentation Relevance

- Stage: [see](https://banes-lab.com/records/stage/see.md)
- Axis: [analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- Math type: [probability](https://banes-lab.com/records/reason/math-type-probability.md)
- Yields: number[0,1]

Details

Intent
Discover knowledge documents, read descriptions, compare them against domain characteristics, score relevance, and exclude irrelevant documents from core reasoning.

Invariant
Supporting documents should influence generation only when relevant to the target domain.

Flow

```text
KnowledgeDocs → RelevanceAnalysis → RelevantDocs → PrincipleInput
```

Productions

```bnf
KnowledgeRelevance ::= <KnowledgeDocumentSet> "->" <RelevanceScoreSet> "->" <RelevantKnowledgeSet>
RelevanceDecision ::= "include" | "exclude"
```

Composes
none

Forces
[runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
Every knowledge doc fed into reasoning, relevant or not.
```

After

```text
knowledge docs → read descriptions → score relevance vs domain → include relevant, exclude the rest
```

### Principle Extraction

- Stage: [derive](https://banes-lab.com/records/stage/derive.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Start from structural principles, test applicability against domain characteristics, add domain-specific principles from relevant documents, and exclude runtime-specific principles from the core.

Invariant
Generated agents should embody portable design principles selected from evidence.

Flow

```text
StructuralPrinciples + DomainDocs → Applicability → CorePrinciples
```

Productions

```bnf
PrincipleExtraction ::= <CandidatePrincipleSet> "->" <ApplicabilityAnalysis> "->" <CorePrincipleSet>
CorePrinciple ::= "phase_gated_execution" | "validation_boundaries" | "declaration_before_use" | "evidence_before_composition" | "adapter_separation" | "auditability"
```

Composes
none

Composed by
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
Runtime-specific principles baked into the portable core.
```

After

```text
structural candidates + domain docs → test applicability → core principles{phase-gated, validation-boundaries, declaration-before-use, evidence-before-composition, adapter-separation, auditability}; runtime-specific excluded
```

### Adaptive Phase Boundary

- Stage: [intent](https://banes-lab.com/records/stage/intent.md)
- Axis: [teleology](https://banes-lab.com/records/reason/axis-teleology.md)
- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Select phase count from risk and complexity, assign phase boundaries, and strengthen validation density for high-risk or high-complexity domains.

Invariant
Agent structure should scale with domain difficulty.

Flow

```text
Risk + Complexity + Uncertainty → PhaseCount → PhaseBoundaries
```

Productions

```bnf
PhaseBoundarySelection ::= <RiskLevel> "," <ComplexityScore> "," <UncertaintyLevel> "->" <PhaseStructure>
PhaseStructure ::= <ThreePhase> | <FivePhase> | <SevenPhase>
ThreePhase ::= "Discovery" "," "Generation" "," "Verification"
FivePhase ::= "Discovery" "," "Analysis" "," "Generation" "," "Verification" "," "Finalization"
SevenPhase ::= "Discovery" "," "Analysis" "," "Planning" "," "Validation" "," "Generation" "," "Verification" "," "Finalization"
```

Composes
none

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [performance_scaling](https://banes-lab.com/records/force/performance-scaling.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
[tel-priority](https://banes-lab.com/records/reason/node-tel-priority.md)

Before

```text
A high-risk irreversible domain given a 3-phase agent.
```

After

```text
risk + complexity + uncertainty → phase count{3 | 5 | 7} → validation density proportional to difficulty
```

### Phase Validation Requirement

- Stage: [project](https://banes-lab.com/records/stage/project.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
For every phase boundary, generate explicit validation requirements from the phase purpose, adapter-separation needs, evidence-grounding needs, and safety constraints.

Invariant
Every phase must end with verifiable exit conditions.

Flow

```text
PhaseSet → RequirementDerivation → ValidationGateSet
```

Productions

```bnf
PhaseValidation ::= <PhaseSet> "->" <ValidationRequirementSet> "->" <ValidationGateSet>
PhaseValidationGate ::= <PhaseName> ":" <RequirementSet>
RequirementSet ::= <Requirement> | <Requirement> "," <RequirementSet>
```

Composes
none

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
A phase ends with no verifiable exit condition.
```

After

```text
phase → derive requirements{purpose, adapter-separation, evidence-grounding, safety} → a validation gate per phase
```

### Portable Contract Composition

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Compose identity, purpose, methodology, domain scope, characteristics, capabilities, phases, validation strategy, constraints, and required outputs into a runtime-neutral agent contract.

Invariant
The portable contract is the canonical artifact; adapter outputs are renderings.

Flow

```text
KnowledgeBase + Principles + Phases → PortableContract
```

Productions

```bnf
PortableAgentContract ::= <Identity> "," <Purpose> "," <DomainModel> "," <CapabilityRequirements> "," <PhaseSpecifications> "," <ValidationStrategy> "," <SafetyConstraints> "," <OutputContract>
OutputContract ::= "portable_agent_contract" | "invocation_contract" | "audit_report" | "final_report"
```

Composes
none

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
The agent authored directly as a runtime artifact, welded to one runtime.
```

After

```text
knowledge base + principles + phases → runtime-neutral contract{identity, purpose, domain model, capabilities, phase specs, validation strategy, constraints, outputs} = the canonical artifact
```

### Validation Strategy Composition

- Stage: [project](https://banes-lab.com/records/stage/project.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Define pre-generation, during-generation, and post-generation checks that enforce capabilities, creation history, evidence grounding, adapter separation, schema validity, and absence of unsupported assumptions.

Invariant
Generated artifacts must be validated throughout composition, not only afterward.

Flow

```text
PreChecks → DuringChecks → PostChecks → ValidationStrategy
```

Productions

```bnf
GenerationValidationStrategy ::= <PreGenerationChecks> "," <DuringGenerationChecks> "," <PostGenerationChecks>
PreGenerationChecks ::= "capabilities_detected" "," "history_checked" "," "domain_knowledge_available"
DuringGenerationChecks ::= "phase_gates_enforced" "," "evidence_grounded_content" "," "adapter_separated"
PostGenerationChecks ::= "schema_valid" "," "audit_complete" "," "unsupported_assumptions_absent"
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
none

Before

```text
The artifact validated only after it is written, never during.
```

After

```text
pre{capabilities detected, history checked, knowledge available} + during{phase gates, evidence-grounded, adapter-separated} + post{schema valid, audit complete, no unsupported assumptions}
```

### Replacement Safety

- Stage: [constrain](https://banes-lab.com/records/stage/constrain.md)
- Axis: [teleology](https://banes-lab.com/records/reason/axis-teleology.md)
- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
If replacing an existing artifact, require prior approval, archive existing artifacts, verify archive persistence, and block new persistence if archival cannot be confirmed.

Invariant
Destructive generation requires recoverability before mutation.

Flow

```text
ReplaceIntent → Approval → ArchiveExisting → VerifyArchive → Persist|Block
```

Productions

```bnf
ReplacementSafety ::= <AgentOperationMode> "->" <ArchivePolicy> "->" <SafetyCheck> "->" <PersistenceDecision>
ArchivePolicy ::= "archive_required_if_replace" | "archive_not_required"
PersistenceDecision ::= "safe_to_persist" | "blocked"
```

Composes
none

Forces
[state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
An existing agent overwritten with no archive — the original is lost.
```

After

```text
REPLACE → require approval → archive existing → verify the archive → persist only if recoverable, else block
```

### Adapter Rendering

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Render the portable contract into runtime-specific agent specification, invocation contract, and audit artifacts only through adapter-defined schemas and destinations.

Invariant
Runtime-specific artifacts are projections of the portable contract, not replacements for it.

Flow

```text
PortableContract → AdapterSchema → RenderedArtifact → Validate → Persist
```

Productions

```bnf
AdapterRendering ::= <PortableContract> "->" <AdapterConfig> "->" <ArtifactSet> "->" <AdapterValidation> "->" <Persistence>
ArtifactSet ::= "agent_specification" "," "invocation_contract" "," "audit_report"
AdapterConstraint ::= "adapter_may_add_metadata_but_not_alter_core_intent"
```

Composes
none

Composed by
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md)

Grounds
none

Before

```text
The runtime artifact edited directly, diverging from the portable contract.
```

After

```text
portable contract → adapter schema → artifacts{agent spec, invocation contract, audit} → adapter may add metadata, never alter core intent
```

### Audit Artifact

- Stage: [commit](https://banes-lab.com/records/stage/commit.md)
- Axis: [representation](https://banes-lab.com/records/reason/axis-representation.md)
- Math type: [information-theory](https://banes-lab.com/records/reason/math-type-information-theory.md)
- Yields: hash | novelty-score

Details

Intent
Record agent name, domain, operation mode, runtime environment, risk, complexity, reversibility, uncertainty, phase count, validation gates, evidence sources, capability profile, adapter identity, portability status, and timestamp.

Invariant
Generated agents require an inspectable provenance trail.

Flow

```text
GenerationState → AuditFields → AuditReport
```

Productions

```bnf
AuditReport ::= <AgentIdentity> "," <DomainReference> "," <AgentOperationMode> "," <RuntimeEnvironment> "," <RiskMetrics> "," <ValidationGateSet> "," <EvidenceSourceSet> "," <CapabilityProfile> "," <AdapterIdentity> "," <PortabilityStatus>
```

Composes
[Capability Profile](https://banes-lab.com/records/algo/capability-profile.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
A generated agent with no provenance — no record of how or from what it was built.
```

After

```text
generation state → audit{identity, domain, mode, risk metrics, gates, evidence sources, capability profile, adapter identity, portability status}
```

### Semantic Compliance Validation

- Stage: [verify](https://banes-lab.com/records/stage/verify.md)
- Axis: [verification](https://banes-lab.com/records/reason/axis-verification.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Re-read the persisted agent specification, search for semantic operations, phase markers, validation gates, and runtime-specific leakage, then mark compliant only when required counts pass and leakage is absent.

Invariant
Persistence is not enough; the stored artifact must still satisfy semantic structure.

Flow

```text
PersistedSpec → MarkerSearch → CountMetrics → LeakageCheck → ComplianceVerdict
```

Productions

```bnf
SemanticCompliance ::= <PersistedArtifact> "->" <SemanticMarkerSet> "->" <MetricCheck> "->" <RuntimeLeakageCheck> "->" <ComplianceVerdict>
ComplianceVerdict ::= "compliant" | "non_compliant"
```

Composes
none

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
The in-memory plan judged compliant, but the stored artifact never re-checked.
```

After

```text
re-read persisted spec → search{semantic ops, phase markers, gates} + leakage check → compliant only if counts pass and zero runtime leakage
```

### Evidence Grounding Validation

- Stage: [verify](https://banes-lab.com/records/stage/verify.md)
- Axis: [verification](https://banes-lab.com/records/reason/axis-verification.md)
- Math type: [probability](https://banes-lab.com/records/reason/math-type-probability.md)
- Yields: number[0,1]

Details

Intent
Search generated output for unsupported claims and evidence references, compare generated claims against the knowledge base, calculate grounding score, and reject artifacts below threshold.

Invariant
Generated architecture claims must trace back to evidence.

Flow

```text
GeneratedSpec → UnsupportedClaimSearch → EvidenceReferenceCheck → GroundingScore → Accept|Reject
```

Productions

```bnf
EvidenceGrounding ::= <GeneratedArtifact> "->" <ClaimAnalysis> "->" <KnowledgeBaseComparison> "->" <GroundingVerdict>
GroundingVerdict ::= "grounded" | "unsupported_claims_present" | "insufficient_evidence_references"
```

Composes
none

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
[ver-evidence](https://banes-lab.com/records/reason/node-ver-evidence.md)

Before

```text
The generated agent asserts architecture claims that trace to nothing.
```

After

```text
generated spec → find claims → compare against the knowledge base → grounding score → reject below threshold
```

### Algorithmic Embodiment Validation

- Stage: [verify](https://banes-lab.com/records/stage/verify.md)
- Axis: [verification](https://banes-lab.com/records/reason/axis-verification.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Verify that generated agents contain phase gates, declaration-before-use structure, calculated metrics, exact thresholds or comparisons, and iterative discovery patterns.

Invariant
The generated agent must embody the intended reasoning architecture, not merely describe it.

Flow

```text
GeneratedSpec → EmbodimentMarkers → Score → Pass|Fail
```

Productions

```bnf
AlgorithmicEmbodiment ::= <GeneratedArtifact> "->" <EmbodimentMarkerSet> "->" <EmbodimentScore> "->" <EmbodimentVerdict>
EmbodimentMarkerSet ::= "phase_gates" "," "declaration_before_use" "," "calculated_metrics" "," "thresholds" "," "iterative_discovery"
EmbodimentVerdict ::= "embodied" | "insufficiently_embodied"
```

Composes
none

Forces
[runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
The agent describes phase gates in prose but does not embody them.
```

After

```text
generated spec → markers{phase gates, declaration-before-use, calculated metrics, thresholds, iterative discovery} → embodied | insufficiently-embodied
```

### Final Generation Report

- Stage: [commit](https://banes-lab.com/records/stage/commit.md)
- Axis: [representation](https://banes-lab.com/records/reason/axis-representation.md)
- Math type: [information-theory](https://banes-lab.com/records/reason/math-type-information-theory.md)
- Yields: hash | novelty-score

Details

Intent
Summarize generated agent, target domain, operation mode, adapter, risk, complexity, reversibility, uncertainty, phase count, validation-gate count, compliance results, artifact references, degraded mode, and unsupported capabilities.

Invariant
The final report must distinguish generated artifacts, validation status, and limitations.

Flow

```text
ValidationResults + ArtifactRefs + Limitations → FinalReport
```

Productions

```bnf
FinalGenerationReport ::= <GenerationSummary> "," <RiskSummary> "," <ComplianceSummary> "," <ArtifactReferences> "," <LimitationSet>
ComplianceSummary ::= "semantic_operations" "," "adapter" "," "evidence_grounding" "," "algorithmic_embodiment"
```

Composes
none

Composed by
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

Before

```text
A report that conflates the artifact, its validation status, and its limitations.
```

After

```text
validation results + artifact refs + limitations{degraded mode, unsupported capabilities} → report distinguishing all three
```

### Agent Generation Completion

- Stage: [terminate](https://banes-lab.com/records/stage/terminate.md)
- Axis: [termination](https://banes-lab.com/records/reason/axis-termination.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Accept the generated agent as complete only when semantic-compliance, evidence-grounding above threshold, and algorithmic-embodiment all pass and the audit trail is recorded; otherwise route to regeneration or a blocked report.

Invariant
Agent generation terminates as accepted only on a full validation pass — never a claim while any compliance, grounding, or embodiment gate is unmet.

Flow

```text
ValidationVerdicts → AuditPresence → Accept|Regenerate|Blocked
```

Productions

```bnf
AgentGenerationCompletion ::= <ValidationVerdictSet> "->" <AuditCheck> "->" <AcceptanceVerdict>
AcceptanceVerdict ::= "agent_accepted" | "regenerate_required" | "blocked"
```

Composes
none

Composed by
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Named in the derivation of
[Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md)

Grounds
[ter-stop](https://banes-lab.com/records/reason/node-ter-stop.md)

Before

```text
A generated agent declared ready while its evidence-grounding failed and its algorithmic embodiment was insufficient.
```

After

```text
semantic compliance passed + evidence grounded above threshold + algorithmically embodied + audit recorded → agent_accepted; else regenerate | blocked
```

### Agent Creator Kernel

- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Load configuration, detect capabilities, check creation history, validate cache, discover domain evidence, build knowledge base, analyze characteristics, extract principles, define phases, compose portable contract, render adapter artifacts, validate outputs, audit, and report.

Invariant
Agent creation is an evidence-gated compiler from target-domain structure into portable agent contracts.

Flow

```text
Config → Capabilities → History → Cache → Discovery → Knowledge → Analysis → Principles → Phases → Contract → AdapterRender → Validate → Audit → Report
```

Productions

```bnf
AgentCreatorKernel ::= <ConfigurationLoad> "->" <CapabilityProfile> "->" <CreationCollision> "->" <DomainCache> "->" <ScopeExtraction> "->" <DomainInvestigation> "->" <DomainKnowledgeBase> "->" <DomainCharacteristics> "->" <PrincipleExtraction> "->" <PhaseBoundarySelection> "->" <PortableAgentContract> "->" <AdapterRendering> "->" <SemanticCompliance> "->" <EvidenceGrounding> "->" <AlgorithmicEmbodiment> "->" <AuditReport> "->" <FinalGenerationReport>
```

Composes
[Capability Profile](https://banes-lab.com/records/algo/capability-profile.md), [Scope Extraction](https://banes-lab.com/records/algo/scope-extraction.md), [Domain Knowledge Base](https://banes-lab.com/records/algo/domain-knowledge-base.md), [Principle Extraction](https://banes-lab.com/records/algo/principle-extraction.md), [Adapter Rendering](https://banes-lab.com/records/algo/adapter-rendering.md), [Final Generation Report](https://banes-lab.com/records/algo/final-generation-report.md), [Agent Generation Completion](https://banes-lab.com/records/algo/agent-generation-completion.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
[derivation-loop](https://banes-lab.com/ontology/reasoning/reason-loop-derivation-loop.md)

Derivation map

orient
[Evidence-Before-Generation](https://banes-lab.com/records/algo/evidence-before-generation.md)

see
[Risk Complexity Reversibility](https://banes-lab.com/records/algo/risk-complexity-reversibility.md)

derive
[Principle Extraction](https://banes-lab.com/records/algo/principle-extraction.md)

intent
[Adaptive Phase Boundary](https://banes-lab.com/records/algo/adaptive-phase-boundary.md)

constrain
[Creation History Collision](https://banes-lab.com/records/algo/creation-history-collision.md)

project
[Phase Validation Requirement](https://banes-lab.com/records/algo/phase-validation-requirement.md)

act
[Adapter Rendering](https://banes-lab.com/records/algo/adapter-rendering.md)

verify
[Evidence Grounding Validation](https://banes-lab.com/records/algo/evidence-grounding-validation.md)

commit
[Final Generation Report](https://banes-lab.com/records/algo/final-generation-report.md)

terminate
[Agent Generation Completion](https://banes-lab.com/records/algo/agent-generation-completion.md)

Before

```text
A target domain turned straight into an agent by assumption, ungated.
```

After

```text
config → capabilities → history → cache → discover evidence → knowledge → risk analysis → principles → phases → portable contract → adapter render → validate{semantic/grounding/embodiment} → audit → report
```

### <Agent Generation Concern>

- Meta record

Details

Intent
<Load context> → <Detect capabilities> → <Check collisions> → <Discover domain evidence> → <Build knowledge> → <Analyze risk> → <Design phases> → <Compose portable contract> → <Render adapters> → <Validate grounding> → <Audit> → <Report>

Invariant
Any generated agent should be treated as a compiled artifact whose source is inspected domain evidence and whose target is a portable, adapter-renderable contract.

Flow

```text
Context → Capability → History → Evidence → Knowledge → Risk → Phases → Contract → Adapter → Validation → Audit → Report
```

Productions

```bnf
AgentGenerationConcern ::= <ContextContract> "->" <CapabilityContract> "->" <CollisionPolicy> "->" <EvidenceModel> "->" <KnowledgeBase> "->" <PhaseDesign> "->" <PortableContract> "->" <AdapterArtifactSet> "->" <ValidationSet> "->" <AuditTrail> "->" <FinalReport>
ValidationSet ::= "semantic_compliance" "," "adapter_compliance" "," "evidence_grounding" "," "algorithmic_embodiment" "," "runtime_specific_leakage_absent"
```

Composes
none

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [model_governance](https://banes-lab.com/records/force/model-governance.md), [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)

Grounds
none

## Links to

- [Orient](https://banes-lab.com/records/stage/orient.md)
- [Ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- [Set Theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- [Agent Creator Kernel](https://banes-lab.com/records/algo/agent-creator-kernel.md)
- [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md)
- [model_governance](https://banes-lab.com/records/force/model-governance.md)
- [domain_boundary](https://banes-lab.com/records/force/domain-boundary.md)
- [Logic](https://banes-lab.com/records/reason/math-type-logic.md)
- [modularity](https://banes-lab.com/records/force/modularity.md)
- [contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md)
- [semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md)
- [Audit Artifact](https://banes-lab.com/records/algo/audit-artifact.md)
- [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)
- [Constrain](https://banes-lab.com/records/stage/constrain.md)
- [Teleology](https://banes-lab.com/records/reason/axis-teleology.md)
- [Optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- [See](https://banes-lab.com/records/stage/see.md)
- [Analysis](https://banes-lab.com/records/reason/axis-analysis.md)
- [state_transaction](https://banes-lab.com/records/force/state-transaction.md)
- [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md)
- [Probability](https://banes-lab.com/records/reason/math-type-probability.md)
- [Derive](https://banes-lab.com/records/stage/derive.md)
- [Reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- [Intent](https://banes-lab.com/records/stage/intent.md)
- [performance_scaling](https://banes-lab.com/records/force/performance-scaling.md)
- [Tel Priority](https://banes-lab.com/records/reason/node-tel-priority.md)
- [Project](https://banes-lab.com/records/stage/project.md)
- [Act](https://banes-lab.com/records/stage/act.md)
- [Formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- [Computation](https://banes-lab.com/records/reason/math-type-computation.md)
- [Commit](https://banes-lab.com/records/stage/commit.md)
- [Representation](https://banes-lab.com/records/reason/axis-representation.md)
- [Information Theory](https://banes-lab.com/records/reason/math-type-information-theory.md)
- [Capability Profile](https://banes-lab.com/records/algo/capability-profile.md)
- [Verify](https://banes-lab.com/records/stage/verify.md)
- [Verification](https://banes-lab.com/records/reason/axis-verification.md)
- [Ver Evidence](https://banes-lab.com/records/reason/node-ver-evidence.md)
- [Terminate](https://banes-lab.com/records/stage/terminate.md)
- [Termination](https://banes-lab.com/records/reason/axis-termination.md)
- [Ter Stop](https://banes-lab.com/records/reason/node-ter-stop.md)
- [Scope Extraction](https://banes-lab.com/records/algo/scope-extraction.md)
- [Domain Knowledge Base](https://banes-lab.com/records/algo/domain-knowledge-base.md)
- [Principle Extraction](https://banes-lab.com/records/algo/principle-extraction.md)
- [Adapter Rendering](https://banes-lab.com/records/algo/adapter-rendering.md)
- [Final Generation Report](https://banes-lab.com/records/algo/final-generation-report.md)
- [Agent Generation Completion](https://banes-lab.com/records/algo/agent-generation-completion.md)
- [The derivation loop](https://banes-lab.com/ontology/reasoning/reason-loop-derivation-loop.md)
- [Evidence-Before-Generation](https://banes-lab.com/records/algo/evidence-before-generation.md)
- [Risk Complexity Reversibility](https://banes-lab.com/records/algo/risk-complexity-reversibility.md)
- [Adaptive Phase Boundary](https://banes-lab.com/records/algo/adaptive-phase-boundary.md)
- [Creation History Collision](https://banes-lab.com/records/algo/creation-history-collision.md)
- [Phase Validation Requirement](https://banes-lab.com/records/algo/phase-validation-requirement.md)
- [Evidence Grounding Validation](https://banes-lab.com/records/algo/evidence-grounding-validation.md)
