Skip to content

Portable Skills Library — extract remaining tacit patterns #133

@dackclup

Description

@dackclup

Follow-up to PR #132 (Task C — portable skills library). Cross-reference: epic #125.

Context

PR #132 shipped 4 portable skills under .claude/skills/portable-*/:

  • portable-scout-then-integrate (2-phase library vendoring)
  • portable-drift-detector-manifest (external API surface lock)
  • portable-schema-triple-lockstep (Python/TS JSON contract integrity)
  • portable-observability-before-wiring (gate-diagnostic surface before production wiring)

The audit step that selected those 4 also identified candidates deferred to this issue. The goal: continue extracting tacit patterns from QuantRank's PR history into project-agnostic skill files that drop into any project.

Deferred candidates

1. portable-annotate-before-veto

Pattern: Progressive rule rollout. A new rule (lint, defense, validation, gate) lands first as annotate (informational, no effect on downstream consumers), accumulates production telemetry for ≥ N runs, THEN promotes to veto (blocking) only after the FP rate is validated against the cohort.

Source: SKILL.md Rule 16 + the Phase 4.5a-d wave (Beneish / Dechow / restatement / loss-avoidance defenses).

Estimated effort: ~80 LOC (1-2 hour skill write).

Why deferred: Lower value vs the 4 shipped because the pattern is QR-specific in its "Top-5 rotation" framing — needs more abstraction to be truly portable. The abstract version is "shadow mode → enforce mode after N-run validation".

2. portable-graceful-degradation-try-except

Pattern: External-fetch failure should degrade the output schema (set field to None), never block the pipeline. Wrapped in try/except with a logged warning; the schema's nullable types absorb the failure.

Source: compute/main.py OSAP try/except wrapper + the universe-gap policy.

Estimated effort: ~50 LOC (the wrapper is genuinely 1-line of code, but the surrounding "when to use" guidance + nullable-schema preconditions need careful documentation).

Why deferred: The implementation is small enough that contributors learn it from the existing code by example. A dedicated skill may add noise without adding clarity.

3. portable-pre-plan-investigations (as standalone)

Currently subsumed inside portable-scout-then-integrate § Phase 1. Could be split out as a standalone skill if the 5-question checklist (PyPI name, license, API surface, data req, install footprint) needs to be invoked for non-library work (e.g., evaluating a new data source).

Estimated effort: ~60 LOC.

Why deferred: Subsumption is currently clean. Promote only if a real use case emerges that doesn't fit portable-scout-then-integrate.

4. Open call for new patterns

Future PR descriptions may surface patterns worth codifying. Add to this issue as bullets and triage in batches.

Acceptance criteria for each new portable skill

  • Lives at .claude/skills/portable-<name>/SKILL.md (flat naming per Claude Code's no-recurse convention)
  • YAML frontmatter with name, description, TRIGGER conditions, SKIP conditions
  • ## Pattern section is project-agnostic — QR references confined to a labeled "## QuantRank precedent" section at the bottom
  • Each skill ≤ ~110 LOC (the practical target after PR docs(skills): SKILL.md schema bump + worker-session-handoff + 3-5 portable skills #132's audit)
  • Skill registry pickup verified via session reload

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions