Dissolve form

From pjt222/agent-almanac · View interactive version

Dissolve form is an AI agent skill from the GitHub repository pjt222/agent-almanac. Perform controlled dismantling of rigid system structures while preserving essential capabilities (imaginal discs). Covers rigidity mapping, dissolution sequencing, knowledge extraction, interface archaeology, and safe decomposition of technical debt and organizational calcification. Use when assess

How to use this skill

Skill file

Dissolve Form

Perform controlled dismantling of rigid system structures — dissolving calcified architecture, accumulated technical debt, and organizational rigidity while preserving the essential capabilities ("imaginal discs") that will seed the new form.

When to Use

Inputs

Procedure

Step 1: Identify Imaginal Discs

In biological metamorphosis, imaginal discs are clusters of cells within the caterpillar that survive dissolution and become the butterfly's organs. Identify the essential capabilities that must survive.

  1. Catalog every capability the current system provides:
  1. Classify each capability:
  1. Extract imaginal discs into portable form:

Got: A clear inventory of capabilities classified as essential (preserve), replaceable (rebuild), or dead (discard). Essential capabilities are extracted into portable form before dissolution begins.

If fail: If imaginal disc identification is uncertain (stakeholders disagree on what's essential), err on the side of preservation. Extract more capabilities than you think you'll need — discarding after dissolution is easy; recovering lost knowledge is often impossible.

Step 2: Map Dissolution Sequence

Determine the order in which structural elements will be dissolved — outer layers first, core last.

  1. Order by dependency depth:
  1. For each layer, define:
  1. Create dissolution checkpoints:
Dissolution Sequence (outside in):
┌─────────────────────────────────────────────────────────────────┐
│ Layer 1: Dead features, unused integrations, orphaned code      │
│          → Remove. Nothing depends on these.                    │
│                                                                 │
│ Layer 2: Replaceable UI, standard infrastructure                │
│          → Replace with modern equivalents or stubs             │
│                                                                 │
│ Layer 3: Business logic wrappers, data access layers            │
│          → Extract imaginal discs, then dissolve                │
│                                                                 │
│ Layer 4 (core): Load-bearing structures, data stores            │
│          → Dissolve last, with full replacement ready           │
└─────────────────────────────────────────────────────────────────┘

Got: A layer-ordered dissolution sequence where each step is safe (checkpoint verified) and reversible (previous checkpoint is restorable). The most critical components are dissolved last when the team has the most experience and confidence.

If fail: If dependency mapping reveals circular dependencies (A depends on B depends on A), these cycles must be broken before sequenced dissolution is possible. Introduce an interface between A and B, break the cycle, then proceed with the sequence.

Step 3: Perform Interface Archaeology

Before dissolving rigid structures, excavate and document their actual interfaces — not what's documented, but what's in use.

  1. Instrument current interfaces:
  1. Compare actual vs. documented behavior:
  1. Build an interface contract from actual behavior:

Got: An empirically-derived interface contract that accurately represents how the system communicates, including undocumented behaviors and hidden dependencies.

If fail: If instrumentation is too invasive (impacts performance or requires code changes), sample traffic instead of capturing everything. If the business cycle is too long to wait, use the available data supplemented by stakeholder interviews about "what calls what in which situations."

Step 4: Execute Controlled Dissolution

Systematically remove structural elements while maintaining imaginal disc viability.

  1. Begin with Layer 1 (outermost, no dependents):
  1. Progress through each layer:

a. Verify imaginal discs have been extracted (Step 1)

b. Install replacement or stub (if dependents remain)

c. Remove the component

d. Run validation suite

e. Monitor for unexpected side effects

  1. Handle dissolution resistance:

a. Restore from checkpoint

b. Investigate the hidden dependency

c. Add it to the interface archaeology (Step 3)

d. Create an explicit stub for the dependency

e. Re-attempt dissolution

  1. Track dissolution progress:

Got: Systematic, verified dissolution of non-essential structure. After each layer, the remaining system is smaller, simpler, and still operational. Imaginal discs are preserved in portable form.

If fail: If dissolution causes cascading failures, the layer ordering is wrong — there are hidden dependencies deeper than expected. Stop, restore, remap dependencies, and re-sequence. If dissolution reveals that an "imaginal disc" is more complex than expected, allocate more extraction time for that capability.

Step 5: Prepare the Foundation for Reconstruction

After dissolution, the remaining system should be a minimal viable core plus extracted imaginal discs ready for reconstruction.

  1. Assess the post-dissolution state:
  1. Create the reconstruction manifest:
  1. Handoff to reconstruction:

Got: A minimal, maintainable system with clearly documented extracted capabilities. The foundation is clean and ready for reconstruction in whatever form is chosen.

If fail: If the post-dissolution system is less maintainable than expected, some essential structure was dissolved that should have been preserved. Check the imaginal disc inventory — if a critical capability is missing, it may still be recoverable from the archive. If the minimal core is too minimal to operate, some "replaceable tissue" was essential — restore it from the checkpoint.

Validation

Pitfalls

Related Skills

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.