The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.
Follows the import procedure in README.md.
source/ the originating repository verbatim — 78 documents, 28 SVGs,
8 manifests, plus .source-revision recording the commit
final/ the SSOT
document.md 729 lines written from the 29 experiment documents, not
concatenated: what was predicted, what was measured, and
where the measurement itself was wrong
evidence/raw 125 outputs, flattened to <experiment>__<file> because
the originals collided (01-baseline.txt appeared three
times) and the audit only globs the top level
evidence/meta one per raw file; command and exitCode are null and the
README says why rather than inventing them
evidence/browser 22 captures
assets/ three diagrams through techviz
.techviz/ their VizSpecs
A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.
Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.
verify-pipeline.py passes. audit-records.py reports no issues.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
69 lines
3.0 KiB
Markdown
69 lines
3.0 KiB
Markdown
# Refactoring From Analysis Implementation Plan
|
|
|
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [x]`) syntax for tracking.
|
|
|
|
**Goal:** Add a durable, type-directed refactoring workspace whose performance items require retained baseline and after evidence.
|
|
|
|
**Architecture:** `refactor-queue.yaml` orders bounded items, while `/shared/refactor-detail/<project>/<item>/work-item.json` owns detailed item metadata and evidence references. A dedicated verifier enforces type-specific hard gates, especially the performance baseline/after contract.
|
|
|
|
**Tech Stack:** Markdown/YAML/JSON, Python unittest, existing `/shared` workspace.
|
|
|
|
**Spec:** `docs/superpowers/specs/2026-08-28-refactoring-from-analysis-design.md`
|
|
|
|
## Global Constraints
|
|
|
|
- Application source remains read-only during documentation/refactor planning.
|
|
- Performance claims require retained raw baseline and after evidence under equivalent conditions.
|
|
- Existing documentation and user files must not be deleted or reset.
|
|
- No legacy workspace dependency may be introduced.
|
|
|
|
---
|
|
|
|
### Task 1: WorkItem evidence verifier
|
|
|
|
**Files:**
|
|
- Create: `tools/verify_refactor_work_item.py`
|
|
- Test: `tools/tests/test_verify_refactor_work_item.py`
|
|
|
|
- [x] **Step 1: Write failing tests for type validation and performance evidence gates**
|
|
- [x] **Step 2: Run tests and observe missing verifier failure**
|
|
- [x] **Step 3: Implement the verifier**
|
|
- [x] **Step 4: Run verifier tests green**
|
|
|
|
### Task 2: Refactoring skill and contracts
|
|
|
|
**Files:**
|
|
- Create: `.agents/skills/refactoring-from-analysis/SKILL.md`
|
|
- Create: `.agents/skills/refactoring-from-analysis/references/work-item-contract.md`
|
|
- Create: `.agents/skills/refactoring-from-analysis/references/type-strategies.md`
|
|
- Create: `.agents/skills/refactoring-from-analysis/references/performance-evidence-contract.md`
|
|
- Create: `.agents/skills/refactoring-from-analysis/references/evidence-contract.md`
|
|
|
|
- [x] **Step 1: Encode queue eligibility and one-bounded-item rule**
|
|
- [x] **Step 2: Encode type-directed execution and verification**
|
|
- [x] **Step 3: Encode performance evidence hard gate**
|
|
|
|
### Task 3: Durable queue/detail templates
|
|
|
|
**Files:**
|
|
- Create: `/shared/codebase/refactor-queue.yaml`
|
|
- Create: `/shared/refactor-detail/README.md`
|
|
- Create: `/shared/refactor-detail/_templates/work-item.json`
|
|
- Create: `/shared/refactor-detail/_templates/plan.md`
|
|
- Create: evidence and verification template directories
|
|
|
|
- [x] **Step 1: Create queue SSOT**
|
|
- [x] **Step 2: Create WorkItem/evidence templates**
|
|
|
|
### Task 4: Pipeline integration and verification
|
|
|
|
**Files:**
|
|
- Modify: `AGENTS.md`
|
|
- Modify: `tools/verify_pipeline.py`
|
|
- Modify: `tools/tests/test_verify_pipeline.py`
|
|
|
|
- [x] **Step 1: Add refactor paths to pipeline verification**
|
|
- [x] **Step 2: Add instructions for the new stage**
|
|
- [x] **Step 3: Run all verifier and terminal renderer tests**
|
|
- [x] **Step 4: Run live workspace verification**
|