/ekosistem-edho-ferdian:spec-mining-edho-ferdianfrom ekosistem-edho-ferdian
Extracts behavioral specs (WHEN/THEN requirements and invariants) from undocumented codebases by reading code as ground truth. Useful for reverse-engineering specs or documenting existing behavior.
Ships in ekosistem-edho-ferdian. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are mining behavior out of code that was never written down. The code is ground truth for what it does; it is not ground truth for what it should do — that distinction matters every time you're tempted to write a confident Requirement from a guess. A spec that invents behavior is worse than no spec: it becomes a lie the next engineer trusts.
Core philosophy: a spec is a flat list of behavioral
assertions, not a document organized by type. Every behavior is either a
Requirement (triggered: WHEN → THEN) or an Invariant (always true).
No type-classification chapters. Machine-readable metadata lives in HTML
comments. Full format spec: references/spec-format.md.
Note: this skill does not depend on or
write to OpenSpec. A tool-agnostic alternative approach would write
openspec/specs/<capability>/spec.md in OpenSpec's delta-tooling format
instead. This skill writes to
/project-memory/mined-specs/<capability>.md — landing inside the memory
structure dev-kickoff-edho-ferdian already owns, so a mined spec is
discoverable the same way 01-decision-register.md or 03-progress.md are.
The block format itself (flat ### Requirement:/### Invariant: with HTML
comment metadata) is tool-agnostic and kept as-is — OpenSpec export is
mentioned as an optional target, never a dependency (see
references/spec-format.md §OpenSpec compatibility).
dev-kickoff-edho-ferdian Phase 0 reports BEHAVIOR_SPEC as a missing,
non-mandatory role on a brownfield repo — invoke this skill before
falling back to a manually-derived Provisional Task Plan for behavior that
the existing code already expresses. A [DERIVED] plan guesses forward;
mined specs read backward from what's actually there — prefer ground truth
over a guess whenever the code to mine exists.Phase 1 Scope discovery — group into capabilities, ask the user which to mine
Phase 2 Sample-and-expand mining — bounded reads, never a whole module blind
Phase 3 Emit output — flat Requirement/Invariant blocks to /project-memory/mined-specs/
Full mechanics for Phase 1 (capability grouping, Salak clustering fallback)
and Phase 2 (the sample→expand→defer read budget, the mining-source
checklist, metadata extraction, Salak-verified depends_on) live in
references/mining-protocol.md. Full output format, the
Requirement-vs-Invariant distinction table, and the metadata field reference
live in references/spec-format.md.
This skill does not depend on any prior onboarding step. It reads the repo cold.
orders, payments, user-auth).references/mining-protocol.md §Salak integration.When more than one capability was selected, fan out on a harness with
sub-agent delegation: delegate spec-mining-worker-edho-ferdian once
per capability, in parallel, rather than mining each one sequentially
in this context — capabilities read different modules and each writes its
own independent output file, so there's nothing to lose by parallelizing
and no aggregation step needed afterward (each worker's file stands on
its own). On a harness with no delegation primitive, or for a single
selected capability, mine inline per the steps below. When a worker's
requirement is anchored to a location that doesn't enforce it, re-run that
capability one tier up rather than every worker —
config-hygiene-edho-ferdian's references/harness-operation.md §4.2.
For each selected capability:
<!-- deferred: <reason> --> marker at the bottom of the
spec file, never silently omitted.Full mining-source checklist (what counts as a behavioral assertion) and
metadata extraction rules: references/mining-protocol.md.
Write one file per mined capability to
/project-memory/mined-specs/<capability>.md, using the exact block format
in references/spec-format.md: flat ### Requirement: <name> and
### Invariant: <name> blocks, each with an HTML-comment metadata block
(id, entities, enforced, test, depends_on, triggers). Record a
Last verified: <commit-hash>, <date> line per file.
If /project-memory/ does not exist yet in this repo, create just the
mined-specs/ subdirectory — do not scaffold the rest of
dev-kickoff-edho-ferdian's memory structure; that's its own skill's job.
references/worked-mining.md — one capability mined into anchored WHEN/THEN requirements, invariants and uncertainties, plus a characterisation test. Read it when doing the work, not before routing.
| You say | What it does | Parameters |
|---|---|---|
| "repo ini tidak ada dokumentasi, ekstrak spec-nya" | Phase 1 lists capabilities, asks which to mine | capabilities (required, you choose) |
| "buat spec dari modul pembayaran saja" | mines only payments | capabilities = payments |
| "reverse-engineer the spec for orders and user-auth" | one worker per capability, in parallel if the harness can | capabilities = two |
"BEHAVIOR_SPEC belum ada" (from dev-kickoff) | mines before a provisional plan | capabilities |
| Parameter | Required | Allowed values | Default |
|---|---|---|---|
capabilities | yes | kebab-case names from the Phase 1 list, or "all" said explicitly | none: it asks, never mines everything unasked |
Reading is bounded per capability: stop at an external boundary, 3 barren
files in a row, or 15 files; the rest is marked deferred. Output: one
project-memory/mined-specs/<capability>.md per capability, flat
Requirement / Invariant blocks each anchored to code, with a Last verified
commit line. Worked example: references/worked-mining.md.
When the work reaches one of these, load that skill with the Skill tool and follow it — don't write its part from memory.
dev-kickoff-edho-ferdiantest-authoring-edho-ferdiansystem-design-edho-ferdianPresenting the mined capability list to the user (Phase 1) → Bahasa
Indonesia. The mined spec files themselves (Requirement/Invariant
blocks, metadata, entity names) → English, since they are machine-facing
artifacts read by references/spec-format.md-consuming tooling. Full
contract: skill-authoring-edho-ferdian §7.
<!-- uncertainty: <what's unclear> --> instead of a
confident-sounding Requirement.User | null but every caller null-checks, the Requirement reflects what
callers rely on, not what the docstring claims.entities metadata.entities and enforced at minimum, or it isn't searchable — but
an unknown field is omitted, not filled with a guess.Last verified line carries the current git
commit hash — the anchor for future freshness checks.depends_on/triggers sourced
from Salak's graph (via salak query) are marked [Salak-verified]; anything from
call-chain inference is marked [inferred, unverified]. Never blend the
two without the label — see references/mining-protocol.md §Salak
integration for exactly how and when each applies.CATATAN REFLEKSI — SPEC MINING
Gate 1 (Traceability): Does every Requirement have a traceable
`enforced` location? [PASS/FAIL + reason]
Gate 2 (Docstring cross-validation): Any Requirement derived from a
docstring/comment claim without checking its actual
callers? [.]
Gate 3 (No invention): Any behavior recorded as a confident
Requirement that should have been `<!-- uncertainty: -->`
instead? [.]
Gate 4 (Provenance): Is the commit hash recorded in `Last verified`
for this file? [.]
Gate 5 (Salak labeling): Is every Salak-sourced `depends_on`/
`triggers` marked `[Salak-verified]`, and every inferred one
marked `[inferred, unverified]` — no unlabeled claim? [.]
Any FAIL → fix before presenting the mined spec file. Show this block to the user; it's the trust mechanism for a spec nobody asked you to write.
Done criteria: capability list presented and confirmed · read budget per
capability respected (sample → expand → defer, never a blind full read) ·
output file(s) written to /project-memory/mined-specs/ in the exact block
format · Reflection all-PASS.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub edhoferdian/eef --plugin ekosistem-edho-ferdian43 skills in this plugin
/api-design-edho-ferdianDesign and evolve API contracts: REST resource naming, status codes, pagination, versioning, and one authoritative OpenAPI/schema so client and server never drift. Use for "desain API untuk fitur ini", "struktur endpoint yang baik", "API contract berubah", "REST vs apa", or a new API surface./ask-eefEntry point to the EEF skills: reads the request and the project, then loads the right skill or sequence (dev-kickoff, design-engineering, build-fix, code-review...). Use at the start of a task when no skill is obviously right, or for "ask-eef", "pakai skill apa", "mulai dari mana", "bantu kerjakan ini", "aku mau bikin", "gimana caranya"./backend-engineering-edho-ferdianServer-side code: service layering and ports/adapters, typed errors, retry and circuit breakers, background jobs and queues, structured logging, new integrations; NestJS and Rails guides. Use for "struktur service layer", "error handling di backend", "retry/circuit breaker", "background job", "tambah integrasi baru", "bikin app Rails"./billing-ops-edho-ferdianDiagnose billing incidents (duplicate subscriptions, failed checkout, double charges, broken portal) and verify pricing/entitlement claims against code. Refunds, credits, cancellations need an explicit go-ahead. Use for "pelanggan minta refund", "subscription ganda", "checkout gagal", "kena tagih dua kali", "billing portal rusak"./build-fix-edho-ferdianFix build, compile, dependency and startup failures with a minimal verified diff, never a cast, ts-ignore or disabled check that hides the error; lenses for ~20 stacks. Load it even for one pasted error. Use for "build error", "gagal build", "compile error", "tidak bisa jalan", "fix the build", "dependency conflict", "migration error", or a stack trace./click-path-audit-edho-ferdianTrace each button, toggle or form submit through its full state changes to find handlers that undo each other, async races, stale closures and effects that reset state. Use for "tombolnya gak jalan", "diklik tapi gak ada yang terjadi", "the button does nothing", "state-nya balik lagi", or after refactoring a shared store.Other plugins' skills for the same job