encode-lessons

Turn session lessons into durable lints, scripts, or skill guardrails after user approval.

SKILL.md

GitHub
<!-- Generated by mstack from Misbah's Build Like This workflow. Regenerate instead of editing. -->

encode-lessons

This skill is part of Misbah Khursheed's Build Like This workflow. Thinking, evidence, and explicit trade-offs come before generated output.

Project identity and sources of truth

The repository where this skill is installed is the host project being built. Build Like This is the method used to build it; mstack only installs and reconciles method resources. Do not assume mstack or Build Like This is the product unless project-owned sources explicitly identify this repository as mstack itself.

Use project-owned docs/, decisions, executable code, and tests as sources of truth. .mstack/templates/ are reference scaffolds to copy and adapt into project-owned documents, not product requirements and not a replacement for docs/.

Purpose

Improve the agent environment from lived failure modes: prefer mechanical checks for mechanical rules, and keep human judgment for standards that need taste.

Required inputs

  • Session notes, review findings, failed commands, and user corrections from this work.
  • Current skills, hooks, CI scripts, and AGENTS.md constraints.

If a missing input would materially change the result, state the gap and obtain or discover it before proceeding. Otherwise label the assumption and continue.

Process

  1. Mine the session with three lenses in parallel when subagents exist: repeated mistakes, missing automated checks, and instruction bloat.
  2. Propose Accepted / Rejected / Backlog changes; wait for user approval before editing skills, hooks, or CI.
  3. Prefer a lint, test, or script for mechanical rules; prefer a short skill guardrail when judgment is required.
  4. Avoid growing AGENTS.md with one-off narrative; encode structure instead.
  5. Apply approved changes narrowly and note how to verify them.

Output contract

  • Lesson ledger with proposed encodings and user decisions.
  • Applied check or skill edits when approved, plus verification commands.

Guardrails

  • Do not silently rewrite skills or CI without approval.
  • Do not encode taste preferences as hard lints.
  • Do not use this skill as a product retrospective substitute for continuous-improvement.

Delegation and parallel safety

  • Material lifecycle work must delegate at least one bounded specialist lane when subagents are available. Prefer two or more concurrent lanes only for independent evidence gathering, analysis, or non-overlapping file ownership.
  • The active lead owns integration and acceptance. Supporting agents do not recursively delegate unless explicitly promoted to lead a named lane.
  • Assign distinct outputs and ownership. Serialize shared docs, contracts, schemas, migrations, deployments, external writes, and overlapping file edits.
  • When subagents are unavailable, perform the same named specialist passes sequentially and state that constraint instead of implying parallel verification.
  • Delegation never grants permission for outreach, consequential external actions, destructive changes, paid resources, or production operations.

End with the evidence gathered, verification performed, and any residual risk or unresolved decision.