360 Secure SkillHub
360 安全技能中心

specadia-plan

该 Skill 通过已安装的 Specadia CLI 读取已批准的需求 Markdown 和可选设计文档,按 generic、codex 或 claude 选择生成 AGENT_CONTRACT.md、AGENTS.md 或 CLAUDE.md;若目标文件已存在会先询问用户,不自动覆盖,也不负责安装 CLI。

分类:开发
mtibebu
mtibebu
热度 40.86
最近更新 2026-12-04 07:46:45

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add mtibebu/specadia-plan
兼容性
通用兼容
联网要求
联网要求未确认
数据出网
数据出网未确认
Metadata
name
specadia-plan
description
Convert approved requirements and design artifacts into a traceable Cline contract with the installed Specadia CLI.

Specadia Contract Handoff

1. Confirm the tool exists

Run:

specadia-contract --version

The executable is specadia-contract. Do not invoke specadia contract unless specadia-contract is genuinely absent — the latter is a retained alias. Do not assume import specadia works: the tool may be installed in an isolated environment or via uvx.

If the command is missing, stop and tell the user exactly one install hint:

Specadia is not installed. Install it with: uv tool install specadia
(or: python -m pip install specadia)

Do not attempt to install it yourself.

2. Resolve inputs

Identify an approved requirements Markdown file and, optionally, a design Markdown file. Prefer paths the user supplied. Do not invent, summarize, or rewrite them.

If the user has only a product idea and no approved artifacts, offer specadia-contract from-intent only when the specadia[full] extras and an interactive, model-backed session are both available; otherwise ask for the approved SRS/design. Never fabricate requirement IDs — traceability depends on IDs the documents already carry (FR-*, NFR-*, REQ-*, AC-*).

3. Choose the harness deliberately

Cline is not Codex or Claude Code, so the default here is --harness generic → AGENT_CONTRACT.md. Switch only on evidence:

Situation Flag File produced
Cline, or another non-Codex/non-Claude harness --harness generic AGENT_CONTRACT.md
User is on Codex, or the repo already has AGENTS.md --harness codex AGENTS.md
User is on Claude Code, or the repo already has CLAUDE.md --harness claude CLAUDE.md

State the choice in one line before running anything. Never emit all three by default.

4. Check before writing

If a matching file already exists at the repository root, stop and ask the user whether to merge the generated instructions, keep both, or pick another harness or output directory. Do not pass --force and do not copy over an existing file without explicit permission.

5. Generate

Prefer a dedicated output directory so nothing is silently moved into place:

specadia-contract generate "<requirements-path>" \
  --design "<design-path>" \
  --harness generic \
  --output-dir .specadia/contracts

Omit --design when the user supplied none. Quote every path.

6. Verify and report

Optionally confirm the artifacts still match their recorded sources:

specadia-contract verify .specadia/contracts/contract-manifest.json

Exit codes: 0 fresh, 1 stale, 3 missing artifact, 4 malformed manifest. If verify is unavailable in the installed version, say so and skip it.

Report the harness chosen and why, the exact files written, a short excerpt proving requirement IDs were preserved, and any validation or verify failure unchanged. Then stop: the contract is a reviewed handoff artifact, not permission to start implementing.