Replaces shell script (.git/hooks/pre-commit.legacy) with ecosystem-managed pre-commit framework: - gitleaks/gitleaks: secret scanning - jumanjihouse/pre-commit-hooks: shellcheck wrapper - pre-commit/pre-commit-hooks: JSON/YAML validation, end-of-file-fixer, trailing-whitespace - local hooks: SKILL.md frontmatter validation Uses pinned versions for reproducibility across environments. Includes auto-fixes from hook runs (formatting, trailing whitespace, JSON beautification). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
4.5 KiB
0019 — Factory skills: write-adr, write-issue-spec, write-workflow, upgrade-skill, validate-skill
Type: HITL
Parent PRD: docs/prd/chunk-3-skills-library.md
What to build
The remaining 5 factory meta-skills, authored using write-skill (0018). write-adr must be implemented first within this group — it is called by design/grill-me (issue 0020). All skills in this group are new.
Each skill follows the per-skill workflow from docs/notes/skill-implementation-workflow.md. write-adr must be verified before starting issue 0020.
Skills and trigger descriptions (from skills index):
| Flat name | Trigger description |
|---|---|
write-adr |
Write an ADR, document this architectural decision, record this decision |
write-issue-spec |
Write a spec for this issue, draft the issue description for X, create a Gitea issue spec |
write-workflow |
Write a workflow for X, chain these skills into a workflow, create a workflow document |
upgrade-skill |
This skill is wrong, fix this skill, update skill X, skill X is behaving incorrectly |
validate-skill |
Check this skill, does this skill meet the standard, review this SKILL.md, audit skill X |
Key constraints per skill:
write-adr: producesdocs/adr/NNN-title.md; increments ADR number from existing files; never edits an existing Accepted ADR — creates a superseding one insteadwrite-issue-spec: produces complete issue body (Why + EARS Requirements with ADDED/MODIFIED/REMOVED delta markers + Design notes + independently completable Task checklist); scale-adaptive; does not post — outputs body for human review; must work for both file-based issues (docs/issues/) and Gitea MCP when configured — the active backend is determined at runtime per ADR-0011 (provider-agnostic issue tracker)write-workflow: produces.agents/workflows/<name>.mdwith WorkflowContext schema (inputs/outputs per step), HITL gates before every irreversible action, failure paths documentedupgrade-skill: bumpsversionin frontmatter; always adds a new eval test capturing the correction; never reduces existing eval suitevalidate-skill: severity-rated findings — missing eval = critical; missing failure handling = high; weak trigger description = high
Implementation notes
Follow the per-skill workflow defined in docs/notes/skill-implementation-workflow.md (produced by issue 0016).
Known upstream sources to review for this category:
mattpocock/skills— check for any meta-skill or skill-authoring patterns; record SHAs for any adopted contentbmad-method/bmad-method— BMAD architect role and ADR-writing patterns; relevant forwrite-adrandwrite-issue-specgithub/spec-kitandFission-AI/OpenSpec— issue spec and workflow standards; relevant forwrite-issue-specandwrite-workflow- Search agentskills.io and GitHub for open-source validate-skill and upgrade-skill implementations before writing from scratch
For all skills in this group: these are meta-skills with no direct Pocock placeholder equivalent; expect to synthesize from multiple upstreams.
Acceptance criteria
- All 5 SKILL.md files exist at
.agents/skills/<skill-name>/SKILL.md;metadata.category: factory; authoring standard met for each write-adrimplemented and verified before the design skills issue (0020) begins- Each skill has a co-located eval at
.agents/evals/factory/<skill-name>/eval.yamlproduced viawrite-eval install.shdeploys all 5 to~/.agents/skills/- HITL: human runs behavioral test per skill; output format matches constraints
- HITL: human reviews each SKILL.md and eval before committing
- Per-skill process followed for all 5 skills: source discovery (sub-agent) → source review with licence/security check (sub-agent) → conflict check against constitution + factory principles (sub-agent) → synthesis grill → co-write iteratively
- Trigger description for each skill tested against explicit, implicit, and negative queries before body written
when:frontmatter field present in all SKILL.md filessource:andreferences:fields correctly populated or absent- eval.yaml for each skill contains all 5 required test types
- Body ≤500 lines for each skill
write-adrimplemented and passing behavioral test before design skills issue (0020) beginsdocs/spec/overview.mdupdated to reflect all 5 skills deployed
Blocked by
- 0016 (grill defines per-skill workflow)
- 0017 (
write-evalneeded to produce evals) - 0018 (
write-skillused to author these skills)