Hierarchical skill repr

From curiositech/windags-skills · View interactive version

Hierarchical skill repr is an AI agent skill from the GitHub repository curiositech/windags-skills. Representations for hierarchical skill structures including knowledge graphs and ontological decomposition

How to use this skill

Skill file

Hierarchical Skills and Affordance-Based Representation

When to Use This Skill

Load this skill when facing problems involving autonomous skill acquisition, sensorimotor grounding, hierarchical control composition, or bridging symbolic reasoning with continuous control. Particularly effective when agents must learn domain-general capabilities without task supervision.

Decision Points

Schema Selection for Ambiguous Objects

IF object_uncertainty > convergence_threshold:
    IF low-cost_visual_exploration available:
        → Execute visual inspection from multiple angles
        → Update Bayesian belief over object affordances
    ELSE IF tactile_exploration safe:
        → Execute gentle contact with surface normals
        → Track force convergence patterns
    ELSE:
        → Default to most probable schema based on priors

IF object_uncertainty ≤ convergence_threshold:
    IF goal_affordance_confidence > action_threshold:
        → Execute goal schema (grasp, manipulate)
    ELSE:
        → Select schema maximizing I(action; goal_affordance)

Curriculum Progression Logic

IF schema_convergence_rate < stability_threshold:
    → Check prerequisite schemas are stable
    → Reduce DOF constraints further
    → Increase practice iterations before advancement

IF schema_convergence_rate ≥ stability_threshold:
    IF subordinate_schemas available AND superior_schema stable:
        → Attempt nullspace composition: subordinate ⊳ superior
    ELSE IF next_complexity_level unlocked:
        → Add sensorimotor resource (additional DOF, sensor modality)
        → Initialize new schema learning

Hierarchical Control Composition

IF multiple_control_objectives active:
    Rank by criticality:
    IF safety_constraint violated:
        → All controllers ⊳ collision_avoidance
    ELSE IF visual_track required for task:
        → force_control ⊳ visual_track
        → orientation_adjust ⊳ (force_control ⊳ visual_track)
    ELSE:
        → Apply standard priority hierarchy from training

Calculate: a_combined = a_superior + (I - J_superior†J_superior) * a_subordinate

Failure Modes

**Schema Interference Cascade**

Detection Rule: If subordinate controller performance degrades when superior controller activates, or if combined error increases monotonically

**Premature Convergence Lock**

Detection Rule: If schema reports "converged" but goal affordance uncertainty remains high (H(g) > threshold)

**Resource Scaffolding Collapse**

Detection Rule: If complex schema learning fails repeatedly and prerequisite schemas show instability

**Affordance Model Drift**

Detection Rule: If object recognition confidence decreases over time despite consistent sensory input

**Exploration-Exploitation Deadlock**

Detection Rule: If mutual information I(a; g) never decreases below action threshold despite multiple exploratory actions

Worked Examples

Example 1: Learning Cup Grasping with Resource Progression

Initial State: Robot with 7-DOF arm, RGB camera, force sensors. No prior cup knowledge.

Phase 1 - Visual Tracking (L1)

Phase 2 - Reach Coordination (L2)

Phase 3 - Force Integration (L3)

Final affordance model: Cup = {rim_visual_tracking: [x,y,θ] distribution, surface_force_tracking: normal directions, grasp_points: force + visual intersection}

Example 2: Object Recognition Under Uncertainty

Scenario: Ambiguous cylindrical object (cup vs. can vs. bottle) partially occluded.

Decision trace:

  1. Initial observation → P(cup)=0.4, P(can)=0.3, P(bottle)=0.3, H(object)=1.58 bits
  2. Goal: grasp handle (only cups have handles)
  3. Handle uncertainty: H(handle_affordance)=1.2 bits > threshold=0.5 bits
  4. Information gain calculation:
  1. Execute: rotate view 45°
  2. Updated belief: P(cup)=0.8, handle visible with confidence 0.9
  3. H(handle_affordance)=0.3 bits < threshold → execute grasp schema
  4. Expert insight: Information-theoretic action selection prevented failed grasp attempt

Quality Gates

NOT-FOR Boundaries

Do NOT use for:

Delegate when:

Resource requirements:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.