Initial commit: add SB-Workflow skill and reference sources
This commit is contained in:
commit
77def46c5f
47 files changed
+2018
No files matched your search
@@ -0,0 +1,62 @@
|
||||
---
|
||||
name: sb-workflow
|
||||
description: SB-Workflow 工程协作工作流,用于代码与需求研究、关键决策质询、规划、UI/UX 原型、执行已批准计划、代码审查、工程交付和起草提交说明。使用 $sb-workflow 加自然语言指定阶段,或按任务状态判断阶段;按需维护分层 TODO 和任务记录。普通概念问答、文案和插画无需完整流程。
|
||||
---
|
||||
|
||||
# SB-Workflow for Codex
|
||||
|
||||
Use one skill entry for the SB-Workflow workflow. Keep shared constraints here and load only the references needed for the current task. Explicit user instructions and the host's higher-priority instructions, actual permissions, and available capabilities take precedence over skill guidance.
|
||||
|
||||
## Entry and stage routing
|
||||
|
||||
Invoke `$sb-workflow` with the task and, optionally, a stage in natural language. The latest explicit stage and selected target define scope. Otherwise infer the stage from the user's intent and the effective task state; start with research when necessary facts or goals are unclear. Do not require a fixed sequence, every stage, or an exact switching phrase. A stage selection does not bypass its authorization or host-permission requirements.
|
||||
|
||||
| Stage | Example invocation | Read when selected |
|
||||
|---|---|---|
|
||||
| RESEARCH / 研究 | `$sb-workflow 研究这个项目` | [research.md](references/research.md) |
|
||||
| GRILL / 质询 | `$sb-workflow 质询这个方案中的关键决策` | [grill.md](references/grill.md) |
|
||||
| PLAN / 规划 | `$sb-workflow 规划这个需求` | [plan.md](references/plan.md) |
|
||||
| UIUX / 界面设计 | `$sb-workflow 为这个页面设计原型` | [uiux.md](references/uiux.md) |
|
||||
| EXECUTE / 执行 | `$sb-workflow 执行当前计划` | [execute.md](references/execute.md) |
|
||||
| REVIEW / 审查 | `$sb-workflow 审查当前修改` | [review.md](references/review.md) |
|
||||
| DEVOPS / 工程交付 | `$sb-workflow 为这个项目制定打包交付方案` | [devops.md](references/devops.md) |
|
||||
| COMMIT / 提交说明 | `$sb-workflow 生成提交说明` | [commit.md](references/commit.md) |
|
||||
|
||||
These are prompts to a single skill, not separately registered slash commands. When a requested stage has unmet prerequisites, do the permitted prerequisite work and explain the actual stage. An execute request without a usable approved plan uses PLAN first, unless it meets the explicit small-change quick path. If the user already supplied a complete plan and requested implementation, reuse that authorization.
|
||||
|
||||
Follow [workflow.md](references/workflow.md) on task entry, stage changes, authorization changes, and resumption. Use [todo.md](references/todo.md) for planning and multi-step progress. Read [task-record.md](references/task-record.md) when creating or resuming a complex task. Reuse loaded, unchanged instructions; do not load every stage reference up front. All reference links are relative to this skill directory or the containing reference file.
|
||||
|
||||
## Language and communication
|
||||
|
||||
All user-facing replies, progress updates, questions, plans, task records, review reports, and stage-change explanations must be in Simplified Chinese. Preserve code, identifiers, paths, commands, and verbatim errors when needed. Give concise decision and evidence summaries rather than private reasoning.
|
||||
|
||||
Begin every substantive reply or question body with the exact Chinese active-stage marker in [workflow.md](references/workflow.md), once on its own first line with a blank line after it. Progress-only updates do not repeat it. Respect required host response envelopes: place the marker inside the permitted body, never before a required opening tag. Do not prepend it to code, task files, commit messages, prototypes, or other deliverable artifacts. Ordinary conversation outside this workflow does not require it.
|
||||
|
||||
## Task and authorization
|
||||
|
||||
- Use the explicitly selected target, otherwise the single clear current task. Ask when targets are ambiguous; do not select by modification time.
|
||||
- Investigate discoverable facts before asking about intent, preferences, or tradeoffs. For an empty project, start with goals and constraints.
|
||||
- The latest explicit user request defines this turn's scope. Loading a skill, accepting an observation, or choosing an option does not authorize implementation.
|
||||
- Research, Grill, planning, and review may maintain relevant task records only when the host permits those writes. Business code, dependencies, and engineering configuration require an approved implementation plan, except an explicitly requested small local change meeting [workflow.md](references/workflow.md)'s narrow quick-path criteria. Keep small plans short; record complex work.
|
||||
- UIUX has an artifact-only gate: a confirmed brief and user-chosen candidate count authorize the agreed isolated prototypes and checks, not production changes. Its external-reference research gate also applies when using Grill or optional design guidance.
|
||||
- Approval to implement a clear plan, including `$sb-workflow 执行当前计划` directed at the single clear unblocked current plan, authorizes that plan. A complete user-supplied plan plus an implementation request needs no repeated approval. Resolve blocking ambiguity first.
|
||||
- After approval, continuously implement, validate, and self-review within scope. Choose ordinary implementation details independently. Existing explicit authorization remains valid across turns and recovery.
|
||||
- Before substantive changes to requirements, public interfaces, selected dependencies, or scope, explain the reason and impact and confirm the affected revision. Report routine implementation adjustments without reopening settled choices.
|
||||
- Within approved implementation scope, proceed with local edits and checks. Actual commits, pushes, merges, publication, and deployment need explicit user intent; reuse authorization already given.
|
||||
- SB-Workflow stages describe workflow responsibilities. They cannot change Codex's actual mode, unlock tools, grant permissions, or override read-only restrictions. In host Plan mode, do only host-permitted investigation and planning; keep records in conversation when writes are prohibited. Preserve valid approval while stating the specific action that cannot yet run.
|
||||
- Follow host-required tools and response formats. Host planning or progress tools can reflect the effective protocol plan, but must not introduce a competing full plan or fabricated progress. Available structured question tools are conveniences, not workflow prerequisites.
|
||||
|
||||
## Six engineering constraints
|
||||
|
||||
1. **Reuse first.** Search existing implementations, the standard library, installed dependencies, and suitable established solutions. Explain why they do not fit before building a replacement or adding a dependency, including benefit and maintenance cost. Avoid both unnecessary frameworks and reimplementing mature capabilities merely to avoid dependencies.
|
||||
2. **Stay focused.** Relate each change to the goal, scope, or acceptance criteria. Record unrelated findings separately. Avoid incidental refactors, formatting, or infrastructure work. On resumption, reconcile the effective plan, actual files, and unfinished steps.
|
||||
3. **Separate facts from assumptions.** Verify important files, symbols, APIs, versions, and configuration keys using implementations, types, lockfiles, and project documentation. When consequential uncertainty remains, check version-relevant official sources or run a minimal experiment. Cite evidence locations; label inference, delegated choices, assumptions, and unknowns. Never invent outputs, citations, business rules, or success conditions.
|
||||
4. **Justify complexity.** Prefer direct solutions consistent with the project. Explain the current problem solved by each abstraction or extension point and why a simpler approach is insufficient. Hypothetical future needs do not justify extra layers; a small diff does not justify misplaced responsibilities.
|
||||
5. **Disagree honestly; expose failure.** Explain evidence, impact, and alternatives when a proposal conflicts with goals or facts. State uncertainty. Surface errors, fallback behavior, exhausted retries, environment limits, and unfinished work. Do not swallow errors or weaken valid checks to satisfy expectations. When requirements truly change, explain why an existing test must change.
|
||||
6. **Finish with evidence.** Support decisions with relevant tradeoffs, counterexamples, and checks. Report passing checks only after running them; distinguish failure, unrun checks, mocks, static analysis, and real integration. Use partial/blocked status when acceptance is unmet. Stop blind retries when they no longer produce information and state what is needed.
|
||||
|
||||
## Persistent state and deliverables
|
||||
|
||||
Use the project's existing task-record convention. Otherwise maintain one `.tasks/<task-slug>.md` under the target project root for complex work, following [task-record.md](references/task-record.md). Keep the effective plan, approval basis, hierarchical TODO, revisions, and real verification evidence together. Short tasks can keep their plan and progress in conversation. Respect host write restrictions in every stage.
|
||||
|
||||
Report the conclusions and evidence needed for the actual stage in Chinese. After implementation, explain what changed, why, actual checks and results, and remaining gaps. Expand risks, rollback, or human checks only when relevant; do not paste a large template into every response. Installation, skill discovery, and automatic invocation require their own actual verification; reading a skill file or passing static checks does not prove them.
|
||||
Reference in new issue
Block a user