Setup
If ~/agentic-coding/ does not exist or is empty, read setup.md, ask a concise kickoff question, and keep any persistence explicitly opt-in.
Positioning
This skill is intentionally different from agentic-engineering and vibe-coding:
- -
agentic-engineering focuses on multi-agent operating patterns and team throughput. - INLINECODE5 focuses on prompt-led exploration and fast idea shipping.
- INLINECODE6 focuses on contract-first implementation, proof of fix, and reviewer-ready handoff.
When to Use
User needs merge-ready code from an AI agent with explicit quality gates. Use for production features, risky refactors, bug fixes with reproducible failures, and Xcode-centered work such as Swift feature delivery, iOS/macOS regressions, and release-branch hotfixes.
Architecture
Memory lives in ~/agentic-coding/. See memory-template.md for setup.
CODEBLOCK0
Quick Reference
Load these files on demand to keep context focused and execution fast.
| Topic | File |
|---|
| Setup process | INLINECODE9 |
| Memory template |
memory-template.md |
| PACT loop |
protocol.md |
| Contract prompts |
prompt-contracts.md |
| Merge handoff checklist |
handoff.md |
Core Rules
1. Lock a Contract Before Writing Code
Start every task with a compact contract:
- - Objective: exact outcome in one sentence
- Acceptance: checks that prove success
- Non-goals: what must stay untouched
- Constraints: stack, style, limits, deadlines
No contract, no code.
2. Run the PACT Loop
Use the same execution loop every time:
- 1. Problem framing: restate objective and assumptions
- Acceptance design: define checks before edits
- Change set: produce the smallest useful diff
- Trace and test: show evidence and residual risk
This skill is execution discipline, not brainstorming.
For Xcode workflows, tie acceptance to a concrete target, simulator/device, and test command before editing.
3. Keep Diffs Surgical
One user objective maps to one focused change set:
- - Prefer file-local edits over broad rewrites
- Separate behavior change from style cleanup
- Avoid hidden side effects outside declared scope
If scope grows, split into a second contract.
4. Prove Failure Then Prove Fix
For bugs and regressions:
- - Capture the failing condition first (test, log, or reproduction)
- Apply minimal fix
- Re-run the same check to prove resolution
Never claim fixed without before and after evidence.
5. Deliver Handoff-Grade Output
End each cycle with a delivery packet:
- - What changed and why
- Files touched and blast radius
- Validation run and results
- Known risks and rollback path
If handoff is unclear, the task is not finished.
6. Escalate With a Structured Fallback
When blocked after two failed attempts:
- - Stop editing
- State what was tried
- Propose two grounded alternatives
- Request a decision with tradeoffs
Do not keep guessing in loops.
Common Traps
- - Starting implementation without acceptance checks -> endless iteration and unclear done state.
- Asking the agent for full rewrites -> noisy diffs and avoidable regressions.
- Mixing feature work with architecture overhaul -> weak reviewability and hard rollback.
- Reporting success without reproducible evidence -> false confidence in production.
- Treating AI output as final draft -> quality debt moved to code review.
Security & Privacy
Data that leaves your machine:
- - None from this skill itself
Data that stays local:
- - Contracts, evidence notes, and handoff summaries in INLINECODE14
This skill does NOT:
- - Trigger undeclared network requests
- Access files outside its own memory path
- Write to global or platform memory stores
- Auto-approve risky code without explicit evidence
Scope
This skill ONLY:
- - Improves execution quality of AI-assisted coding
- Enforces contract driven implementation and verification
- Produces clear handoff packets for reviewers
This skill NEVER:
- - Replaces security review for high risk domains
- Encourages blind trust in generated code
- Overrides project specific contribution rules
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
agentic-engineering - Multi-agent collaboration and operating patterns. - INLINECODE17 - General coding support across stacks and tasks.
- INLINECODE18 - Broad code authoring and editing assistance.
- INLINECODE19 - Companion style IDE assistance patterns.
- INLINECODE20 - Structured task delegation to autonomous agents.
Feedback
- - If useful: INLINECODE21
- Stay updated: INLINECODE22
设置
如果 ~/agentic-coding/ 不存在或为空,请阅读 setup.md,提出一个简洁的启动问题,并确保任何持久化操作都明确选择加入。
定位
本技能刻意区别于 agentic-engineering 和 vibe-coding:
- - agentic-engineering 专注于多智能体操作模式和团队吞吐量。
- vibe-coding 专注于提示驱动的探索和快速创意交付。
- agentic-coding 专注于契约优先的实现、修复验证和可供审查的交接。
使用时机
用户需要来自 AI 智能体且带有明确质量关卡的可合并代码。适用于生产功能、高风险重构、可复现失败的 Bug 修复,以及以 Xcode 为中心的工作,例如 Swift 功能交付、iOS/macOS 回归问题修复和发布分支热修复。
架构
记忆存储在 ~/agentic-coding/ 中。参见 memory-template.md 了解设置方式。
text
~/agentic-coding/
|- memory.md # 持久化偏好和操作模式
|- contracts.md # 已接受的任务契约和非目标
|- evidence.md # 测试证据和验证快照
- - handoffs.md # 交付说明和回滚提示
快速参考
按需加载这些文件以保持上下文聚焦和执行高效。
memory-template.md |
| PACT 循环 | protocol.md |
| 契约提示 | prompt-contracts.md |
| 合并交接清单 | handoff.md |
核心规则
1. 编写代码前先锁定契约
每个任务都以一个紧凑的契约开始:
- - 目标:用一句话描述确切结果
- 验收标准:证明成功的检查项
- 非目标:必须保持不动的内容
- 约束条件:技术栈、风格、限制、截止日期
无契约,不写代码。
2. 运行 PACT 循环
每次使用相同的执行循环:
- 1. Problem framing(问题框架):重述目标和假设
- Acceptance design(验收设计):在编辑前定义检查项
- Change set(变更集):产生最小有用的差异
- Trace and test(追踪与测试):展示证据和剩余风险
本技能是执行纪律,而非头脑风暴。
对于 Xcode 工作流,在编辑前将验收标准与具体目标、模拟器/设备和测试命令绑定。
3. 保持差异最小化
一个用户目标对应一个聚焦的变更集:
- - 优先进行文件局部编辑,而非大规模重写
- 将行为变更与样式清理分开
- 避免在声明范围之外产生隐藏的副作用
如果范围扩大,拆分为第二个契约。
4. 先证明失败,再证明修复
对于 Bug 和回归问题:
- - 首先捕获失败条件(测试、日志或复现步骤)
- 应用最小修复
- 重新运行相同的检查以证明问题已解决
没有前后对比证据,绝不声称已修复。
5. 交付可供交接的输出
每个周期结束时提供一份交付包:
- - 变更内容及原因
- 涉及的文件和影响范围
- 验证运行及结果
- 已知风险和回滚路径
如果交接不清晰,任务尚未完成。
6. 使用结构化回退进行升级
当两次尝试失败后受阻时:
- - 停止编辑
- 说明已尝试的方法
- 提出两个有依据的替代方案
- 请求权衡决策
不要陷入无休止的猜测循环。
常见陷阱
- - 在没有验收检查的情况下开始实现 -> 无休止的迭代和模糊的完成状态。
- 要求智能体进行完全重写 -> 杂乱的差异和可避免的回归。
- 将功能工作与架构改造混为一谈 -> 可审查性差且难以回滚。
- 在没有可复现证据的情况下报告成功 -> 生产环境中的虚假信心。
- 将 AI 输出视为最终稿 -> 将质量债务转移到代码审查阶段。
安全与隐私
离开你机器的数据:
保留在本地的数据:
- - ~/agentic-coding/ 中的契约、证据记录和交接摘要
本技能不会:
- - 触发未声明的网络请求
- 访问其自身记忆路径之外的文件
- 写入全局或平台内存存储
- 在没有明确证据的情况下自动批准风险代码
范围
本技能仅:
- - 提升 AI 辅助编码的执行质量
- 强制执行契约驱动的实现和验证
- 为审查者生成清晰的交接包
本技能从不:
- - 替代高风险领域的安全审查
- 鼓励盲目信任生成的代码
- 覆盖项目特定的贡献规则
相关技能
如果用户确认,使用 clawhub install 安装:
- - agentic-engineering - 多智能体协作和操作模式。
- coding - 跨技术栈和任务的通用编码支持。
- code - 广泛的代码编写和编辑辅助。
- copilot - 伴侣式 IDE 辅助模式。
- delegate - 向自主智能体进行结构化任务委派。
反馈
- - 如果觉得有用:clawhub star agentic-coding
- 保持更新:clawhub sync