← 返回
未分类

plan-before-code

Use when the user asks for an implementation or development plan before coding, wants to avoid direct implementation, or requires explicit approval before edits. Trigger on phrases like "先确定开发方案,别直接开发", "先给开发方案", "先设计实现方案", "参考项目的 harness engineering", "看下是否可以分多 agent", "plan before coding", or "implementation plan first". Also use when the user says "按你的推荐方案执行" only if a concrete plan has already been presented in the current thread. Enforces a three-stage workflow: plan first without edits, as
面向 iOS 项目的受控开发工作流:当用户意图是先规划、暂缓改代码、遵循项目 harness、评估是否多 agent 分工,或要求修改前获得批准时使用。它要求代理先只读检查 AGENTS.md、iOS 架构、Xcode scheme、Maestro/验证脚本等上下文,输出具体方案、影响范围、文件归属、验证命令、风险和 agent 拆分建议;只有在当前方案得到明确执行授权后才实现,并遵守 XcodeBuildMCP/xcodebuild、模拟器串行验证和验证产物管理规则。
Bin
未分类 community v1.0.3 4 版本 100000 Key: 无需
★ 0
Stars
📥 60
下载
💾 0
安装
4
版本
#latest

概述

Plan Before Code

Use this workflow for controlled iOS development instead of direct

implementation. Keep the work grounded in the repository's real iOS architecture,

Xcode schemes, simulator/device constraints, and documented harness. Apply the

workflow as three distinct intents:

  1. Establish an implementation plan without editing files.
  2. Assess whether iOS work can be split safely across agents.
  3. Execute only after the user gives explicit approval for the current plan.

Stage 1: Plan Only

When the user asks to determine the development plan first:

  • Do not create, modify, or delete files; run migrations; create commits; or

start implementation.

  • Read the repo's local rules first: AGENTS.md, iOS architecture docs,

reliability or harness docs, relevant execution plans, Xcode scheme notes,

Maestro flows, and verification scripts.

  • Use read-only inspection only: rg, find, sed, git status, `git diff

--stat, xcodebuild -list`, XcodeBuildMCP discovery, and file reads are OK.

Do not run formatters, generators, migrations, app-changing scripts, or

commands that mutate DerivedData/results unless the user has approved

execution.

  • Inspect only the code needed to understand the requested change.
  • Explain the recommended implementation approach, affected areas, expected

file ownership, harness/verification commands, risks, and open questions.

  • If the repo requires an execution plan for non-trivial work, say where it

should be created or updated during execution.

  • Ask at most one blocking question if the plan cannot be made safely from local

context. Otherwise make a reasonable recommendation.

The output should be a concrete plan, not a proposal to start coding. Use this

shape unless the user asks for something shorter:

Recommended approach:
Affected iOS areas:
File ownership:
Harness and verification:
Risks:
Open questions:
Agent split recommendation:

Mention exact commands when known, such as the relevant xcodebuild command,

XcodeBuildMCP build/test action, Maestro flow, snapshot/visual review command,

or project-specific harness script. If the command is unknown, name the file or

directory to inspect during execution instead of inventing one.

Stage 2: Agent Split Assessment

When the user asks whether the work can be split across multiple agents:

  • Assess coupling, shared files, dependency order, and verification bottlenecks.
  • Recommend one agent when the work is tightly coupled, has one critical file

cluster, or would create merge conflicts.

  • Recommend multiple agents only when tasks have clear, disjoint ownership and

can run in parallel without blocking each other.

  • If recommending multiple agents, define each agent's responsibility, write

scope, expected output, integration order, and what must stay serial.

  • Respect repo harness constraints. For example, if flows share one simulator,

verification must remain serial even if implementation work is parallel.

  • Use this iOS split checklist:
  • Shared files: view controller, SwiftUI view, coordinator, model, project

file, asset catalog, localization, build settings, and generated files.

  • Dependency order: API/model changes before UI, routing before screen flows,

project settings before build validation, fixture updates before Maestro.

  • Verification bottlenecks: one simulator, one physical device, single Xcode

scheme, shared DerivedData, or long-running UI flows.

  • Merge risk: .pbxproj, shared snapshots, storyboard/xib, package files,

generated screenshots, and global test fixtures.

Do not spawn subagents during this assessment unless the user has explicitly

asked for delegation or parallel agent work and approved execution.

Recommending multiple agents is only an assessment; actual subagent spawning

waits until the user approves execution.

Stage 3: Execute After Approval

When the user explicitly approves executing the recommended plan:

  • If no concrete plan has been presented in the current thread, first summarize

or rebuild the intended plan and ask for confirmation before editing files.

  • Treat approval as sufficient only when the user clearly instructs you to begin

implementing the current plan or a named option.

  • Do not treat status checks, feasibility questions, requests for reassurance,

or requests for your opinion as approval. Answer them directly and continue

planning unless the user then gives a clear execution instruction.

  • Implement according to the approved plan and the repo's local rules.
  • Use subagents only if the user explicitly asked for multi-agent/delegated work

and the approved plan recommended it.

  • Give each subagent a concrete, bounded task with disjoint write ownership.
  • Keep urgent, tightly coupled, or integration-critical work in the main agent.
  • Run the repo's relevant verification gates and record any blocker with exact

commands and artifacts.

  • If behavior changes and tests or flows are missing, update the appropriate

tracker or execution plan according to repo rules.

Harness Engineering

"参考项目的 harness engineering" means:

  • Treat the repository's documented harness as the source of truth.
  • Prefer existing verification scripts over ad hoc commands.
  • Do not add fake app states, private launch routes, fake stores, or test-only

runtime paths just to make implementation or visual review easier.

  • Prefer XcodeBuildMCP or the repo's documented xcodebuild wrapper for build,

test, install, launch, screenshots, and simulator logs. Check session defaults

before the first XcodeBuildMCP build/run/test call.

  • For iOS Maestro flows, prefer launchApp.permissions or setPermissions to

preconfigure system permissions instead of making smoke flows tap permission

alerts. Keep ATT/usertracking prompt taps optional when the local

Maestro/Xcode/iOS Simulator stack still shows the alert after

usertracking: allow.

  • Follow the repo's harness rules for generated verification artifacts such as

screenshots, visual review captures, build logs, DerivedData, result bundles,

and simulator output; keep them local, ignored, or cleaned up unless the repo

explicitly requires preserving them.

Behavior Checks

Use these examples to keep the skill honest:

  • User intent: requests an iOS implementation plan and says not to edit yet.

Expected: read only the relevant iOS files and harness docs, then return a

plan with affected areas, verification commands, risks, and agent split. Make

no edits.

  • User intent: asks whether the iOS work can be split across multiple agents.

Expected: assess file ownership, simulator bottlenecks, .pbxproj risk, and

UI flow verification. Do not spawn subagents unless execution is approved.

  • User intent: asks you to execute the current recommendation.

Expected: execute only if a concrete plan exists in the current thread. If the

plan is missing or stale, restate it and ask for confirmation before editing.

版本历史

共 4 个版本

  • v1.0.3 1.0.3:将触发规则从固定话术改为语义判断;强化 iOS 专项边界、只读计划阶段、Xcode/Maestro/harness 验证要求;补充多 agent 拆分检查表、执行批准语义和行为检查。 当前
    2026-06-15 20:42 安全 安全
  • v1.0.2 Initial release
    2026-06-12 19:00 安全 安全
  • v1.0.1 Initial release
    2026-05-22 10:39 安全 安全
  • v1.0.0 Initial release
    2026-05-22 10:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 871 📥 349,774
design-media

figma-ios-asset-export

user_104630ff
Export real Figma design nodes through the Figma REST images API into iOS-ready assets. Use whenever the user provides a
★ 0 📥 197
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,173 📥 944,131