Community编程与开发github.com

临时实现计划

将粗略计划转化为可供实现-提交的制品。在实现过程中允许严格审查。

临时实现计划 是什么?

该技能旨在加速从粗略想法到可执行实现计划的流程,特别适用于那些已经过用户讨论、但无需完整设计迭代的功能。它通过生成最小化的设计文档、测试计划和实现计划,将传统的“提案-设计-测试-实现”链条压缩为快速路径。技能支持Cursive、Claude Code等智能体平台,由编排器(Mechanical Router)负责收集必要信息、创建目录结构、按阶段生成子智能体并验证交叉引用。生成的三件制品(design.md、test-plan.md、implementation-plan.toml)可直接供implement-commit技能执行TDD验证。适合需要快速原型或已有清晰共识的场景,强调速度而非文档完备性。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cbgbt/bottlerocket-forest/tree/main/skills/ad-hoc-implementation-plan

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

临时实现计划 是做什么的?

从粗略想法到可供实现-提交的制品的快速路径。以牺牲文档完备性换取速度。

何时使用

  • 你已与用户讨论过某个粗略计划或想法
  • 你希望实现-提交的TDD验证功能,而无需完整的提案链条
  • 功能足够明确,无需进行广泛的设计迭代

前置条件

  • 用户已批准的粗略计划(可以是对话、Markdown或思维模型形式)
  • 已知的工作空间路径
  • 已知的要修改的文件

编排器角色

你是机械路由(MECHANICAL ROUTER)。你不负责思考功能细节。 你的工作:

  1. 从用户处收集最小必要信息
  2. 创建功能目录结构
  3. 以适当的技能上下文生成子智能体
  4. 在各阶段之间传递输出
  5. 验证交叉引用

设置

from pydantic import BaseModel
from pathlib import Path
import os

class GatherResult(BaseModel):
    feature_name: str
    feature_id: str  # NNNN格式
    workspace: str
    files_to_modify: list[str]
    constraints: list[str]
    test_names: list[str]
    rough_plan_summary: str

class PhaseResult(BaseModel):
    success: bool
    artifact_path: str
    errors: list[str]

# 子智能体上下文的技能路径
skills = {
    "design": "skills/propose-feature-design/SKILL.md",
    "test_plan": "skills/propose-feature-test-plan/SKILL.md",
    "impl_plan": "skills/propose-implementation-plan/SKILL.md",
}

# 风格指南(如果可用)
style_guides = [
    "docs/style/rust-design.md",
    "docs/style/rust-test.md",
    "docs/style/rust-impl.md",
]

阶段0:收集

从粗略计划中交互式收集或推断信息:

# 如果尚不清楚,请询问用户:
# 1. 功能名称 → 创建 docs/features/NNNN-name/
# 2. 要修改的文件 → commits[].files
# 3. 关键约束 → CC表格条目
# 4. 测试名称 → test-plan + commits[].tests

# 确定下一个功能ID
existing = list(Path("docs/features").glob("[0-9][0-9][0-9][0-9]-*"))
next_id = f"{len(existing):04d}"

feature_dir = f"docs/features/{next_id}-{feature_name}"
os.makedirs(feature_dir, exist_ok=True)

阶段1:最小化设计

使用propose-feature-design技能生成子智能体,但要求最小化输出。

result = spawn(
    prompt=draft_spawn_prompt(SkillDefined(
        "按照技能流程创建最小化design.md。"
        "仅生成:概述(1段)、关键约束表格、模块结构。"
        "跳过:架构图、解决方案机制文字、设计模式、设计决策。"
    )),
    context_files=[
        skills["design"],
        *[g for g in style_guides if exists(g)],
    ],
    context_data={
        "feature_dir": feature_dir,
        "feature_name": gathered.feature_name,
        "constraints": gathered.constraints,
        "files": gathered.files_to_modify,
        "rough_plan": gathered.rough_plan_summary,
        "minimal_mode": True,
    },
    response_model=PhaseResult,
    isolate_to=Cwd(gathered.workspace)
)

阶段2:最小化测试计划

使用propose-feature-test-plan技能生成子智能体。

result = spawn(
    prompt=draft_spawn_prompt(SkillDefined(
        "按照技能流程创建最小化test-plan.md。"
        "仅生成:需求覆盖表格、关键约束验证表格。"
        "跳过:详细测试实现说明、集成测试文字。"
    )),
    context_files=[
        skills["test_plan"],
        f"{feature_dir}/design.md",  # 来自阶段1
        *[g for g in style_guides if exists(g)],
    ],
    context_data={
        "feature_dir": feature_dir,
        "test_names": gathered.test_names,
        "constraints": gathered.constraints,
        "minimal_mode": True,
    },
    response_model=PhaseResult,
    isolate_to=Cwd(gathered.workspace)
)

阶段3:实现计划

使用propose-implementation-plan技能生成子智能体。

result = spawn(
    prompt=draft_spawn_prompt(SkillDefined(
        "按照技能流程创建implementation-plan.toml。"
        "所有字段均需填写 - 无最小化模式。"
        "确保tests[]与test-plan.md中的测试名称完全匹配。"
    )),
    context_files=[
        skills["impl_plan"],
        f"{feature_dir}/design.md",
        f"{feature_dir}/test-plan.md",
        *[g for g in style_guides if exists(g)],
    ],
    context_data={
        "feature_dir": feature_dir,
        "workspace": gathered.workspace,
        "files": gathered.files_to_modify,
        "rough_plan": gathered.rough_plan_summary,
    },
    response_model=PhaseResult,
    isolate_to=Cwd(gathered.workspace)
)

阶段4:验证交叉引用

生成验证器检查测试覆盖率。

class VerifyResult(BaseModel):
    valid: bool
    missing_tests: list[str]  # 在test-plan中但不在impl-plan中
    orphan_tests: list[str]   # 在impl-plan中但不在test-plan中
    missing_constraints: list[str]  # CC-N未被覆盖

result = spawn(
    prompt=draft_spawn_prompt(AdHoc(
        intents=["验证implementation-plan.toml可用于实现-提交"],
        context=["检查所有制品之间的交叉引用"],
        goal=Verify(constraints=[
            "test-plan.md中的每个测试在commits[].tests中恰好出现一次",
            "design.md中的每个CC-N在test-plan.md中有验证",
            "所有commits[].files存在或将被创建",
            "TOML解析正确",
        ])
    )),
    context_files=[
        f"{feature_dir}/design.md",
        f"{feature_dir}/test-plan.md",
        f"{feature_dir}/implementation-plan.toml",
    ],
    response_model=VerifyResult,
    read_only=True
)

if not result.parsed.valid:
    # 返回阶段3,附带错误信息
    pass

交接

验证通过后,制品即可供实现-提交使用:

docs/features/NNNN-feature-name/
├── design.md              # 最小化:概述 + CC表格 + 模块结构
├── test-plan.md           # 最小化:仅覆盖表格
└── implementation-plan.toml  # 完整:所有必填字段

告知用户:

制品已就绪。运行 implement-commit 技能以执行TDD流水线。

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

build-kit-locally

Build a kit and publish it to a locally hosted registry for development testing

build-variant-from-local-kits

Build a variant using locally published kits for development validation

deep-research

Create educational documents that build understanding progressively with citations

edit-spec-file

Edit Bottlerocket RPM spec files following project style conventions

fact-find

Quick lookup of specific facts about Bottlerocket with citations

idea-honing

Clarify feature ideas through iterative Q&A, recording insights to guide concept development

implement-commit

Implement commits from an implementation plan using a TDD pipeline

local-registry

Start and manage a local OCI registry for Bottlerocket kit development

prepare-core-kit-release

Prepare bottlerocket-core-kit for release by bumping version and updating changelog

propose-feature-concept

Create a new feature concept document to pitch the idea and explain the problem/solution

propose-feature-design

Create or update feature technical design document with architecture and implementation guidance

propose-feature-requirements

Create or update feature requirements specification using EARS notation with examples and appendices

propose-feature-test-plan

Create a test plan mapping EARS requirements and Critical Constraints to specific tests

propose-implementation-plan

Create an implementation plan with atomic commits that build toward a complete feature

review-code

Deep code review generating PR comments via principled question-driven analysis

review-scope

Verify code changes match intended scope and requirements without exceeding boundaries

review-style

Verify code follows project style guides without providing improvement suggestions

test-local-twoliter

Build and test local changes to twoliter before releasing

update-twoliter

Update all Bottlerocket repositories to a new Twoliter version

相关技能