Skip to content

Latest commit

 

History

History
555 lines (391 loc) · 17.2 KB

File metadata and controls

555 lines (391 loc) · 17.2 KB

HCA Conformance Criteria

Holonic Compound Architecture (HCA) v0.1 - Certification Requirements

This document provides detailed conformance criteria for HCA implementations. Engineering teams can use this to certify their systems at various HCA conformance levels.


Table of Contents

  1. Conformance Overview
  2. Level 1: Minimal HCA
  3. Level 2: Standard HCA
  4. Level 3: Full HCA
  5. Test Scenarios
  6. Certification Process
  7. Conformance Badges

1. Conformance Overview

Purpose

HCA conformance levels allow:

  • Incremental adoption: Start with Level 1, evolve to Level 3
  • Interoperability claims: Systems at same level can integrate
  • Quality assurance: Verified behavior expectations
  • Clear communication: Teams understand implementation completeness

Level Summary

Level Name Key Requirement Typical Use Case
1 Minimal Holons + Delegation + Review Proof of concept
2 Standard + Full compound loop + Negotiation Production pilot
3 Full + Knowledge base + Cross-task learning Production system

Conformance Inheritance

Each level includes all requirements from previous levels:

Level 3: Full HCA
    │
    ├── Includes all Level 2 requirements
    │
    └── Level 2: Standard HCA
            │
            ├── Includes all Level 1 requirements
            │
            └── Level 1: Minimal HCA

2. Level 1: Minimal HCA

Summary

Level 1 establishes the foundational holonic structure with basic task flow.

Requirements Checklist

2.1 Holon Identity (REQUIRED)

ID Requirement Verification
L1-ID-01 Each holon MUST have a unique identifier Check: No duplicate IDs in system
L1-ID-02 Holon ID MUST be stable across restarts Check: ID persists after holon restart
L1-ID-03 Holon ID MUST be addressable Check: Messages can be routed by ID

Test: Create two holons, verify unique IDs. Restart holon, verify same ID.

2.2 Holon State (REQUIRED)

ID Requirement Verification
L1-ST-01 Holons MUST maintain internal state Check: State persists across messages
L1-ST-02 State MUST include current lifecycle phase Check: State reflects Ready/Working/etc.
L1-ST-03 State MUST be queryable Check: Status endpoint returns state

Test: Assign task, query state during execution, verify Working state.

2.3 Holon Capabilities (REQUIRED)

ID Requirement Verification
L1-CAP-01 Holons MUST declare capabilities via Holon Card Check: Card endpoint exists
L1-CAP-02 Capabilities MUST include supported tools Check: tools array populated
L1-CAP-03 Capabilities MUST include can_delegate flag Check: Delegation status declared

Test: Retrieve Holon Card, verify required fields present.

2.4 Holarchy Structure (REQUIRED)

ID Requirement Verification
L1-HIE-01 System MUST have exactly one root holon Check: Single root exists
L1-HIE-02 Non-root holons MUST have parent reference Check: parent field non-null
L1-HIE-03 Authority relationships MUST NOT cycle Check: No A→B→A authority

Test: Traverse holarchy from leaves to root, verify tree structure.

2.5 Task Delegation (REQUIRED)

ID Requirement Verification
L1-DEL-01 Parent MUST be able to delegate to child Check: Delegation succeeds
L1-DEL-02 Delegation MUST include task specification Check: goal field present
L1-DEL-03 Delegation MUST include constraints Check: budget field present
L1-DEL-04 Child MUST acknowledge delegation Check: Response received

Test: Root delegates to domain, domain delegates to leaf, verify flow.

2.6 Artifact Production (REQUIRED)

ID Requirement Verification
L1-ART-01 Work MUST produce versioned artifacts Check: Artifact has version
L1-ART-02 Artifacts MUST be addressable Check: Artifact retrievable by ID
L1-ART-03 Artifacts MUST include metadata Check: task_id, holon_id present

Test: Execute task, retrieve artifact, verify structure.

2.7 Single-Pass Review (REQUIRED)

ID Requirement Verification
L1-REV-01 Artifacts MUST be reviewed before acceptance Check: Review phase occurs
L1-REV-02 Review MUST produce a verdict Check: Verdict returned
L1-REV-03 Verdict MUST include pass/fail/partial Check: result field present

Test: Complete task, verify review occurred, verify verdict structure.

Level 1 Certification Test

level_1_test:
  name: "Basic Holonic Flow"
  steps:
    - action: "Create root holon"
      verify: "Unique ID assigned"

    - action: "Create domain holon with parent=root"
      verify: "Parent reference correct"

    - action: "Create leaf holon with parent=domain"
      verify: "Three-level holarchy exists"

    - action: "Submit task to root"
      verify: "Task accepted"

    - action: "Observe delegation to domain"
      verify: "Delegation message sent"

    - action: "Observe delegation to leaf"
      verify: "Delegation message sent"

    - action: "Leaf executes and produces artifact"
      verify: "Artifact has ID, version, metadata"

    - action: "Review occurs"
      verify: "Verdict returned"

    - action: "Result flows up to root"
      verify: "Root has final result"

  pass_criteria: "All 9 verifications pass"

3. Level 2: Standard HCA

Summary

Level 2 adds the complete compound loop with iteration and negotiation.

Requirements Checklist (in addition to Level 1)

3.1 PLAN Phase (REQUIRED)

ID Requirement Verification
L2-PLN-01 PLAN phase MUST precede WORK Check: State transition observed
L2-PLN-02 PLAN MUST analyze task specification Check: Plan references task goal
L2-PLN-03 PLAN MUST allocate budget Check: Budget allocation recorded

Test: Start task, verify Planning state before Working state.

3.2 Separate Evaluator (REQUIRED)

ID Requirement Verification
L2-EVL-01 Producer and reviewer MUST be different holons Check: Different IDs
L2-EVL-02 Evaluator MUST receive artifacts Check: Artifacts in review request
L2-EVL-03 Evaluator MUST check acceptance criteria Check: Criteria in verdict

Test: Execute task, verify producer_holon != evaluator_holon.

3.3 Bounded Iteration (REQUIRED)

ID Requirement Verification
L2-ITR-01 Failed review MUST trigger revision if retries remain Check: REVISE occurs
L2-ITR-02 Iteration count MUST be tracked Check: iteration field increments
L2-ITR-03 Max retries MUST be enforced Check: Escalation after limit
L2-ITR-04 Budget exhaustion MUST trigger escalation Check: Budget check enforced

Test: Provide task that fails review, verify retry occurs, verify escalation after limit.

3.4 Negotiation (REQUIRED)

ID Requirement Verification
L2-NEG-01 Child MUST be able to accept task Check: Accept response works
L2-NEG-02 Child MUST be able to reject task Check: Reject response works
L2-NEG-03 Child MUST be able to counter-propose Check: Counter response works
L2-NEG-04 Parent MUST respond to counter Check: Parent reply received
L2-NEG-05 Rejection MUST include reason Check: reason field present

Test: Delegate task with impossible constraints, verify counter-proposal flow.

3.5 Escalation (REQUIRED)

ID Requirement Verification
L2-ESC-01 Escalation MUST include attempted actions Check: attempts array present
L2-ESC-02 Escalation MUST include reason Check: reason field present
L2-ESC-03 Escalation MUST include evidence Check: Evidence attached
L2-ESC-04 Parent MUST receive and process escalation Check: Parent state updated

Test: Force escalation, verify payload contains required fields.

3.6 State Machine Compliance (REQUIRED)

ID Requirement Verification
L2-FSM-01 Task states MUST follow defined transitions Check: No invalid transitions
L2-FSM-02 Holon states MUST follow defined transitions Check: No invalid transitions
L2-FSM-03 State changes MUST be observable Check: Status endpoint reflects changes

Test: Execute complete task lifecycle, verify all state transitions valid.

Level 2 Certification Test

level_2_test:
  name: "Complete Compound Loop"
  prerequisites: "Level 1 certified"
  steps:
    - action: "Delegate task with retry budget of 3"
      verify: "Task accepted with constraints"

    - action: "Observe PLAN phase"
      verify: "Planning state, knowledge query (optional)"

    - action: "Observe WORK phase"
      verify: "Working state, artifacts produced"

    - action: "Observe REVIEW phase"
      verify: "Different evaluator, verdict returned"

    - action: "Force review failure (first attempt)"
      verify: "REVISE triggered, iteration=2"

    - action: "Force review failure (second attempt)"
      verify: "REVISE triggered, iteration=3"

    - action: "Force review failure (third attempt)"
      verify: "ESCALATE triggered (retries exhausted)"

    - action: "Verify escalation payload"
      verify: "Contains attempts, reason, evidence"

    - action: "Test negotiation: reject task"
      verify: "Rejection with reason accepted"

    - action: "Test negotiation: counter-propose"
      verify: "Counter triggers parent response"

  pass_criteria: "All 10 verifications pass"

4. Level 3: Full HCA

Summary

Level 3 adds the knowledge base and cross-task learning.

Requirements Checklist (in addition to Level 2)

4.1 COMPOUND Phase (REQUIRED)

ID Requirement Verification
L3-CMP-01 COMPOUND phase MUST occur after task completion Check: State transition observed
L3-CMP-02 COMPOUND MUST extract lessons Check: Lesson generated
L3-CMP-03 COMPOUND MUST occur for both success and failure Check: Lessons from failed tasks

Test: Complete task (success), verify lesson extracted. Fail task, verify lesson extracted.

4.2 Lesson Structure (REQUIRED)

ID Requirement Verification
L3-LES-01 Lessons MUST have unique ID Check: ID present
L3-LES-02 Lessons MUST be classified (pattern/antipattern) Check: type field valid
L3-LES-03 Lessons MUST include source task reference Check: task_id present
L3-LES-04 Lessons MUST include searchable tags Check: tags array present

Test: Extract lesson, verify all required fields.

4.3 Knowledge Base Storage (REQUIRED)

ID Requirement Verification
L3-KBS-01 Lessons MUST be persisted Check: Lesson survives restart
L3-KBS-02 Knowledge base MUST be shared across holons Check: Any holon can query
L3-KBS-03 Knowledge base MUST support versioning Check: Lesson versions tracked

Test: Store lesson, restart system, verify lesson retrievable.

4.4 Knowledge Query (REQUIRED)

ID Requirement Verification
L3-KBQ-01 PLAN phase MUST query knowledge base Check: Query observed during PLAN
L3-KBQ-02 Queries MUST support domain filtering Check: Domain filter works
L3-KBQ-03 Queries MUST support tag filtering Check: Tag filter works
L3-KBQ-04 Results MUST be ranked by relevance Check: Ranking present

Test: Create lessons with tags, query with filter, verify filtered results.

4.5 Cross-Task Learning (REQUIRED)

ID Requirement Verification
L3-CTL-01 Lessons from Task A MUST be available to Task B Check: Query returns prior lessons
L3-CTL-02 Plans MUST incorporate relevant lessons Check: Plan references lessons
L3-CTL-03 System performance MUST improve over time Check: Metric improvement

Test: Execute similar tasks sequentially, verify second task references first task's lessons.

4.6 Knowledge Contribution (REQUIRED)

ID Requirement Verification
L3-KBC-01 All completed tasks MUST contribute lessons Check: Every task creates lesson
L3-KBC-02 Contributions MUST use hca/knowledge/contribute Check: Message observed
L3-KBC-03 Contributions MUST be acknowledged Check: ACK received

Test: Complete 5 tasks, verify 5 lessons created.

Level 3 Certification Test

level_3_test:
  name: "Compound Learning System"
  prerequisites: "Level 2 certified"
  steps:
    - action: "Execute Task A (authentication feature)"
      verify: "Task completes successfully"

    - action: "Observe COMPOUND phase for Task A"
      verify: "Lesson extracted and stored"

    - action: "Verify lesson structure"
      verify: "ID, type, source, tags present"

    - action: "Execute Task B (similar auth feature)"
      verify: "Task accepted"

    - action: "Observe PLAN phase for Task B"
      verify: "Knowledge query includes auth tags"

    - action: "Verify Task A lesson returned"
      verify: "Prior lesson in query results"

    - action: "Verify plan incorporates lesson"
      verify: "Plan references Task A lesson"

    - action: "Complete Task B"
      verify: "Task B lesson stored"

    - action: "Execute Task C (fails)"
      verify: "Task escalates"

    - action: "Verify antipattern lesson created"
      verify: "Lesson type = antipattern"

    - action: "Query knowledge base across holons"
      verify: "Any holon can retrieve lessons"

    - action: "Restart system, verify persistence"
      verify: "All lessons survive restart"

  pass_criteria: "All 12 verifications pass"

5. Test Scenarios

Scenario 1: Happy Path

Given: HCA system at target conformance level
When: Standard task is submitted
Then: Task flows through PLAN→WORK→REVIEW→ACCEPT→COMPOUND
And: All state transitions are valid
And: Artifacts are properly versioned
And: Lessons are extracted (Level 3)

Scenario 2: Iteration Path

Given: HCA system at Level 2+
When: Task fails review with retries remaining
Then: REVISE phase occurs
And: Iteration counter increments
And: PLAN phase re-executes with feedback

Scenario 3: Escalation Path

Given: HCA system at Level 2+
When: Task fails review with no retries
Then: Escalation triggered
And: Parent receives escalation with evidence
And: Parent takes appropriate action

Scenario 4: Negotiation Path

Given: HCA system at Level 2+
When: Child cannot accept constraints
Then: Counter-proposal sent
And: Parent responds (accept/reject/reassign)
And: Final resolution reached

Scenario 5: Learning Path

Given: HCA system at Level 3
When: Multiple similar tasks executed
Then: Later tasks query earlier lessons
And: Plans incorporate relevant learnings
And: Measurable improvement observed

6. Certification Process

Self-Certification

Organizations MAY self-certify by:

  1. Running all test scenarios for target level
  2. Documenting results with evidence
  3. Publishing conformance claim with level

Third-Party Certification

When available, third-party certification involves:

  1. Submitting implementation for testing
  2. Automated test suite execution
  3. Manual review of edge cases
  4. Certificate issuance upon pass

Conformance Claim Format

{
  "conformance_claim": {
    "system_name": "MyAgentSystem",
    "system_version": "1.2.3",
    "hca_spec_version": "0.1.0",
    "conformance_level": 2,
    "certification_type": "self",
    "certification_date": "2026-01-15",
    "test_results": {
      "level_1_tests": "23/23 passed",
      "level_2_tests": "18/18 passed"
    },
    "contact": "engineering@example.com"
  }
}

7. Conformance Badges

Badge Format

Systems MAY display conformance badges:

Level 1: Minimal HCA

[![HCA Level 1](https://img.shields.io/badge/HCA-Level_1_Minimal-blue.svg)]

Level 2: Standard HCA

[![HCA Level 2](https://img.shields.io/badge/HCA-Level_2_Standard-green.svg)]

Level 3: Full HCA

[![HCA Level 3](https://img.shields.io/badge/HCA-Level_3_Full-gold.svg)]

Badge Requirements

Badge Requirements
Level 1 All L1-* requirements pass
Level 2 All L1-* and L2-* requirements pass
Level 3 All L1-, L2-, and L3-* requirements pass

Conformance Evolution

v0.1 (Current)

  • Self-certification only
  • Test scenarios defined
  • No automated test suite

v0.3 (Planned)

  • Automated test suite
  • Reference implementation
  • Third-party certification program

v1.0 (Target)

  • Complete certification program
  • Accredited test labs
  • Annual recertification

This document is part of the Holonic Compound Architecture (HCA) Specification v0.1