跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

ds-spec-loop

Run a strict repository-native Spec programming loop that keeps requirements, owning decisions, implementation, tests, and current documentation consistent in one bounded change. Use when explicitly invoked; when repository instructions require a Spec, RFC, ADR, proposal, design doc, or decision record for non-mechanical changes; when implementing, revising, rejecting, replacing, retiring, simplifying, or verifying such a decision; or when auditing Spec-to-code drift. Do not use for a purely mechanical or local edit that changes no behavior, contract, structure, process, test strategy, durable format, or rationale.

songyang0603 · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add songyang0603/ds-spec-loop --skill ds-spec-loop

技能说明


name: ds-spec-loop description: Run a strict repository-native Spec programming loop that keeps requirements, owning decisions, implementation, tests, and current documentation consistent in one bounded change. Use when explicitly invoked; when repository instructions require a Spec, RFC, ADR, proposal, design doc, or decision record for non-mechanical changes; when implementing, revising, rejecting, replacing, retiring, simplifying, or verifying such a decision; or when auditing Spec-to-code drift. Do not use for a purely mechanical or local edit that changes no behavior, contract, structure, process, test strategy, durable format, or rationale.

Repository-native Spec loop

Treat the Spec as a distributed repository authority system, not one planning document. Keep these responsibilities coherent:

  • repository instructions and architecture invariants;
  • working proposals and stable decision rationale;
  • current documentation and public contracts;
  • source, types, configuration, package topology, and generated artifacts;
  • executable evidence such as unit, integration, replay, snapshot, and end-to-end tests;
  • repository checks and CI for facts a program can decide;
  • Git and change-review history for chronology.

Preserve the user's requested boundary. specify only, verify only, review, implement, and simplify are different assignments. Do not silently turn one into another.

Preserve the strict loop across repositories. Adapt names, paths, commands, and mechanical checks to the host repository; do not weaken the rule that every non-mechanical change creates or updates one owning decision record.

Load the relevant reference

  • Read system-of-authority.md before deciding which artifact owns a fact or changing a repository's Spec system.
  • Read decision-record-lifecycle.md when creating, accepting, rejecting, replacing, consolidating, retiring, or archiving a decision.
  • Read requirement-change.md when a user correction, review finding, failed premise, measurement, or implementation discovery changes the accepted direction.
  • Read decision-classes.md for class-specific investigation and evidence.
  • Read acceptance-and-evidence.md before writing acceptance criteria, implementing a proposal, or verifying completion.
  • Read simplification.md for removal, consolidation, replacement, or cleanup work.
  • Read documentation-discipline.md when adding or restructuring instructions, current docs, references, generated docs, or historical records.
  • Read adoption.md when a repository has no equivalent conventions or wants this loop as a standing rule.
  • Use templates.md only when the repository has no equivalent templates.

Reconstruct repository authority first

  1. Read the root repository instructions, then every more-specific instruction file governing the target subtree.
  2. Reconstruct the requested outcome, explicit non-goals, and unresolved product or architecture choices. Ask before freezing a direction when a missing choice materially changes the result.
  3. Map the relevant working proposals, stable decisions, current docs, public contracts, source entry points, real composition path, tests, generated outputs, and repository checks.
  4. Search existing Spec, RFC, proposal, design-doc, ADR, and decision-record conventions before creating anything. Reuse the repository's names and lifecycle.
  5. Find the record that already owns the decision. Update it instead of creating a parallel record.
  6. Assign one canonical home to every mutable fact. Other surfaces may summarize or link; they do not become independent detailed copies.
  7. Treat historical records and Git history as context, not present authority.
  8. State unresolved contradictions before building on them. Prefer direct repository evidence over stale plans or issue prose.

Do not begin from a preferred implementation. First state a problem that remains true if the preferred solution is removed.

Cover every non-mechanical change

Create or update one owning decision record in the same PR or bounded change whenever work alters behavior, architecture, a contract shared across files or packages, tooling/process, test strategy, durable/on-disk/wire/configuration format, or another decision a maintainer may reasonably revisit.

Exempt only a purely mechanical or local edit with no change to behavior, contract, structure, process, test strategy, durable format, or rationale. Do not use effort, diff size, elapsed time, or file count as the discriminator.

Use the host repository's established decision classes. If none exist, choose one primary class from decision-classes.md. Classification identifies the decision and likely failure surfaces; it does not require a particular directory tree.

Before creating a new record, prove that no active record already owns the decision. When an owner exists, create a separate record only for an independently revisitable problem with its own real alternatives, consequences, or stable contract. When no record or equivalent contract artifact owns a non-mechanical correction, create a narrowly scoped bug-fix decision owner. A changed file, module, implementation phase, test layer, follow-up fix, or release step is not automatically a separate decision.

Establish the owning proposal or decision

For substantial future work, create or repair a working proposal before implementation. Record:

  • a solution-independent problem;
  • the proposed direction and affected ownership boundaries;
  • genuine alternatives and why they lose;
  • observable acceptance criteria;
  • risks, trade-offs, and intentionally surrendered capability.

For a small de

阅读完整来源 ↗