完成原型会触发持久的 Git 和议题记录更改
原文依据:3 处该 Skill 不只生成临时文件,还要求提交一个临时分支,并在实现议题或提交中记录分支指针、结论和所解决的问题。这些是持久的仓库及项目记录变更,不只是本地预览。
若用户只授权制作或查看原型,代理仍可能创建提交、改变分支状态或使用用户账户修改共享议题,留下不需要的历史和通知。
该 Skill 明确要求在完成后创建提交到临时分支,并在实现议题或提交中保存分支指针、结论和问题。这些操作会持久修改 Git 历史及可能的项目托管账户记录,超出仅生成本地临时预览的范围。它要求分支位于 main 之外并清理主分支,降低了生产污染风险,但未说明在提交或修改议题前必须取得单独授权。用户可限制 Skill 只生成本地文件,并要求任何提交、建分支或议题更新先确认。
5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too (the verdict and the question it settled) in the issue or a commit. The main branch keeps only the validated decision.查看另外 2 个位置
### 6. Capture the answer and clean upOnce a variant has won, capture the answer (which variant and why), then capture the prototype the way the [SKILL](SKILL.md) describes. Fold the winner into the real code and move the rest onto the throwaway branch, not into main:- **Sub-shape A**: fold the winner into the existing page; drop the losing variants and the switcher from main.- **Sub-shape B**: promote the winning variant to a real route; drop the throwaway route and the switcher from main.The full set of variants is the primary source, so it lands on the throwaway branch, not the bin, since variant components and the switcher left in the main branch rot fast and confuse the next reader.1. **Throwaway from day one, and clearly marked as such.** Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious, but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.2. **Trivial to run.** A UI prototype starts from one command in the project's task runner: `pnpm <name>`, `python <path>`, `bun <path>`, etc. A logic demo is a single HTML file the user double-clicks. Either way, no thinking required to start it.3. **No persistence by default.** State lives in memory. Persistence is the thing the prototype is _checking_, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE, wipe me" name.4. **Skip the polish.** No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast.5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too (the verdict and the question it settled) in the issue or a commit. The main branch keeps only the validated decision.