fsl-from-codelisted
Install: claude install-skill fuwasegu/fleet
# FSL From Code — extracting a design spec from an implementation
Use this skill when the input is **existing code** and the deliverable is an FSL
**design-layer** spec. The direction is the reverse of `fsl-design`: there is no
upper requirements contract to refine to, so the spec is anchored **downward** —
its faithfulness is proved by replaying the generated conformance harness against
the very code it was read from. That conformance harness is this skill's **seam**:
the downward analogue of a refinement seam, a contract checked against real code
rather than against an upper spec. If the user later wants an upper requirements
contract, building that *upward* refinement seam is `fsl-design`'s job, not this
skill's.
Before writing syntax, read `../fsl/SKILL.md` and `../fsl/reference.md` for the
shared language rules, verifier workflow, and repair protocol. Inside this
repository, study the canonical triple **in reverse**: `examples/e2e/impl/expense.py`
(plain code) → `examples/e2e/3_design.fsl` (the spec) → `examples/e2e/impl/test_conformance.py`
(the generated Adapter + random-walk Monitor). That triple is exactly the artifact
this skill produces, read backwards.
## Boundary
Produce only:
- A design-layer kernel `spec` whose state/actions/guards/effects are read from the
code, each tagged with a `// SRC: file:line` witness
- Invariants and forbidden flows that the human **confirmed**, tagged with
`// ASSUME-n:` ledger comments
- The `fslc testgen` conformance harnes