AGENT SKILL

coredoc-tdd

Implement a feature or bug fix test-first with a strict red-green-refactor loop. Use only when the user explicitly asks for TDD or strict test-first work.

License 许可
Apache-2.0
最近更新
2026-11-02
Stars
★ 1
Forks
0

01 前言 Front Matter

name
coredoc-tdd
description
Implement a feature or bug fix test-first with a strict red-green-refactor loop. Use only when the user explicitly asks for TDD or strict test-first work.

03 SKILL.md 正文

Test-driven implementation

Resolve <plugin-root> as two directories above this file. Stay inside the user's authorization boundary.

For a change whose best proof is not a new failing test (a deletion, behavior-preserving refactor, documentation, configuration, or generated output), use coredoc-implement unless the user explicitly requires TDD.

  1. Read the requested behavior and the real runtime path. Use Coredoc graph tools read-only for callers, dependents, and impact when available; treat their results as a lower bound and verify critical gaps against source.
  2. Before any edit, apply <plugin-root>/resources/methodology/branch-start.md unless the router already did so in this run.
  3. If a routed specification stage preceded this one, read the repository-local specification. Treat its acceptance criteria as the test list and its non-goals as the scope boundary.
  4. Apply the Over-scope gate before editing. Search for an existing implementation of each behavior. If a criterion or item has no current observer or consumer, protects an unreachable state, duplicates an authoritative implementation, or hardens a deprecated path outside its support window, stop and request a scope correction.
  5. Inspect existing tests and choose the smallest normal test surface that would catch the regression.
  6. Add one meaningful test and run it before implementation.
  7. If it is not RED for the expected missing behavior, correct the test before touching production code.
  8. Implement the smallest root-cause change that makes the test GREEN.
  9. Run the targeted test, then the relevant package or repository suite. When the suite comes back red beyond your own test, apply <plugin-root>/resources/methodology/test-failure-triage.md before deciding whether to stop; never weaken an assertion to reach green.
  10. Refactor only when the green implementation contains concrete duplication or obscures the changed behavior.

Escalate an under-scoped route. Routing happens before source inspection. If the change must alter a shared or cross-package contract, create a component or subsystem, or cannot be verified on one test surface, stop and name the affected contract and consumers. Offer to route again at --scale large so specification, design, approval, and review apply.

Before delegating an item, apply <plugin-root>/resources/methodology/subagent-dispatch.md.

Do not commit, publish, or deploy unless the user separately asks.

04 同仓库更多 Skills

yvp-core
yvp-core/coredoc-workflows

electron-qa

Control an opted-in Electron development app over loopback CDP. Use for QA or review of a real Electron surface where preload, IPC, and an app-owned session matter.

★ 1
yvp-core
yvp-core/coredoc-workflows

coredoc-workflows

Route engineering work through the smallest Coredoc workflow for investigation, planning, implementation, review, specification, browser QA, benchmarking, security review, learning, or retrospectives. Use when asked to route, orchestrate, or choose a workflow for a task.

★ 1
yvp-core
yvp-core/coredoc-workflows

coredoc-spec

Use whenever the user asks to write, draft, or update a spec, specification, ticket, issue, epic, or backlog item, or to "spec out" a change, whether the request is vague or already fully detailed. Produces a compact executable specification (scope, use cases, acceptance criteria, implementation plan) grounded in repository evidence and sized to the change.

★ 1
yvp-core
yvp-core/coredoc-workflows

coredoc-security-review

Read-only security audit of secrets, dependencies, CI/CD, LLM trust boundaries, and OWASP risks. Use for a security audit, threat model, supply-chain review, or pre-release security assessment.

★ 1
yvp-core
yvp-core/coredoc-workflows

coredoc-runtime-qa

Test a running web or desktop app, fix authorized defects with regression tests, and re-verify them. Use for QA with fixes.

★ 1
yvp-core
yvp-core/coredoc-workflows

coredoc-runtime-qa-report

Test a running web or desktop app and report bugs with evidence, changing no code. Use for report-only QA or when asked to find bugs but not fix them.

★ 1