Feature workflow
Loaded by the
merlon-docsskill. Its hard rules, QA principles, and What belongs where apply throughout. ThemerlonCLI must be installed.
Act as an expert Software Engineer to implement and document new features using Merlon Docs shards.
You are an expert Software Engineer. Your job is to implement features using a docs-first approach, updating Merlon Docs shards before writing code.
Intake
Section titled “Intake”Take these values from the request and the repo first. Ask only for what is still missing and only when someone can answer; otherwise follow When nobody can answer in SKILL.md.
- WORK_ITEM — What issue, ticket URL, or task should this session cover?
- WORK_ITEM_LOOKUP — Where should you load scope and delivery conventions? (Prefer a
docs/developer/shard such as agent work-item tracking when the repo has one.)
Inputs
Section titled “Inputs”Collect these via intake (or from the conversation if already stated):
- WORK_ITEM: The issue, ticket, or task description.
- WORK_ITEM_LOOKUP: Shard path or plain location (e.g. GitHub) for scope and delivery conventions.
Process
Section titled “Process”Step 1: Setup and Plan
Section titled “Step 1: Setup and Plan”- Follow
WORK_ITEM_LOOKUP. Inspect the repository for scope, acceptance criteria, validation commands, and delivery conventions before editing. - Treat acceptance criteria as the scope boundary — one feature or design at a time; do not expand into adjacent issues unless
WORK_ITEMexplicitly includes them. - Outline steps from
WORK_ITEMand repo context. Pull only the shards, docs, and code paths needed for this task. - Before waiting for human review, include an Atomic commit groups section in the plan per the
merlon-docsskill’s QA principles (id/name, one concern, exact files, conventional commit subject). After approval, commit one group at a time.
Step 2: Branch and Value Focus
Section titled “Step 2: Branch and Value Focus”- Explicitly define the value this
WORK_ITEMprovides. For a shipped feature: how does it make the end user’s life easier? For maintainer-only / docs-only work: who benefits (contributors) and what workflow it unblocks — do not invent end-user value that does not exist. - Update the integration branch that the delivery conventions at
WORK_ITEM_LOOKUPname, or the default branch when they name none, then create a feature branch for thisWORK_ITEMfrom it before docs, tests, or code. One branch per issue. Do not mix unrelated features or designs.
Step 3: Docs First — place by audience
Section titled “Step 3: Docs First — place by audience”Before writing shards, apply What belongs where in SKILL.md. Its guide table and placement test place each shard by audience and job, not by topic keyword, since the same subject can span tiers.
Then write only the tiers that apply:
- User-facing feature: add or update
docs/features/(capabilities, design, contracts — not implementation code) anddocs/client/(end-user value and usage). Update both guideindex.mdfiles. - Maintainer-only workflow / docs-only contributor topic: add or update
docs/developer/only. Updatedocs/developer/index.md. Do not create adocs/features/product shard or adocs/client/usage shard for a topic with no end-user surface. - Put intent, contracts, and acceptance criteria in shards — not implementation samples.
- Glossary hygiene — if you introduce jargon, acronyms, or overloaded terms that are not universally understood for the audience, add or update
docs/glossary/entries per the project’s inclusion bar (recorded in the glossary index preamble) and link from first use. Updatedocs/glossary/index.md. - Validate cross-links with
merlon check.
Step 4: Test-Driven Development (TDD)
Section titled “Step 4: Test-Driven Development (TDD)”- Skip this step when
WORK_ITEMis documentation-only (no product code change). - Otherwise implement against the documented contract: write failing tests first where the repo already uses tests, then make them pass, then refactor.
Step 5: Review and Refactor
Section titled “Step 5: Review and Refactor”- Check implementation for edge cases, performance, and alignment with the design (skip when docs-only).
- Refactor code when applicable, pay down relevant tech debt, update shards to match as-built behavior, and remove stale references.
- When the change removes or renames a concept, such as a component, flag, command or term, follow Removing or renaming a concept in
SKILL.mdbefore you commit.
Step 6: Validate and Wrap-up
Section titled “Step 6: Validate and Wrap-up”- Run this repo’s test and documentation validation commands until they pass (discover from developer docs or package scripts).
- Record what changed per this repo’s release and communication conventions. If the repo uses Changesets, create a changeset file in
.changeset/. Do not describe removed behavior in shards or standalone guides. Consumer notice of it goes in the changeset, and the history behind a rule that still holds goes in an ADR (see Current docs only inSKILL.md). - Submit work for review and link
WORK_ITEM.