一键导入
dev-pipeline
Development Pipeline guidance for Fortress Rollback. Use when Planning features, structuring development work, end-to-end development process.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Development Pipeline guidance for Fortress Rollback. Use when Planning features, structuring development work, end-to-end development process.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Crate Publishing guidance for Fortress Rollback. Use when Publishing to crates.io, version bumps, release checklist.
Changelog Practices guidance for Fortress Rollback. Use when Writing CHANGELOG entries, deciding what to document.
Design Decision Log Pattern guidance for Fortress Rollback. Use when Architectural decisions, design alternatives, superseding prior choices.
Repository-wide engineering policy and project context for Fortress Rollback. Use when implementing, diagnosing, reviewing, testing, documenting, or releasing changes in this repository.
GitHub Actions Best Practices guidance for Fortress Rollback. Use when Writing GitHub Actions workflows, CI debugging, actionlint, caching.
Workspace Organization guidance for Fortress Rollback. Use when Organizing workspace, splitting crates, module structure decisions.
| name | dev-pipeline |
| description | Development Pipeline guidance for Fortress Rollback. Use when Planning features, structuring development work, end-to-end development process. |
Structured workflow from planning through shipping for fortress-rollback. Each phase has defined inputs, outputs, and quality gates. Skip phases only when explicitly noted.
Input: Feature request, bug report, or improvement idea. Output: Written scope document (can be a PR description or issue comment).
## What
[One sentence: what changes and why]
## Why
[What problem does this solve? Who benefits?]
## Affected Components
- [ ] src/sync_layer/ (SyncLayer, SavedStates, GameStateCell)
- [ ] src/input_queue/ (InputQueue, prediction)
- [ ] src/sessions/ (P2PSession, SpectatorSession, SyncTestSession, SessionBuilder)
- [ ] src/network/ (protocol, codec, compression, messages)
- [ ] src/error.rs (FortressError, structured error types)
- [ ] Public API (new pub items, changed signatures)
- [ ] Wire protocol (message format, serialization)
## Determinism Impact
[Does this touch simulation code? Could it affect determinism?]
## Breaking Changes
[Any pub API changes? Wire protocol changes? Default value changes?]
## Size Estimate
- [ ] Small (1-2 files, <100 lines)
- [ ] Medium (3-5 files, 100-500 lines)
- [ ] Large (>5 files or >500 lines) -- consider splitting
| Change Type | Needs Scope Doc? | Needs CHANGELOG? |
|---|---|---|
| Bug fix (pub-visible) | Yes | Yes |
| Bug fix (internal) | Yes | No |
| New public API | Yes | Yes |
| Refactoring | Brief | No |
| Dependency update | No | If user-visible |
| CI/tooling | No | No |
| Kani proof | Brief | No |
Before running verification/debugging commands in this workflow, confirm:
rg available for scan commandscargo-nextest available for cargo nextest commandsInput: Scope document. Output: Design decisions documented in code comments or PR description. Skip if: Change is <100 lines and touches only one module.
std::time, no threads)no_std compatibility if applicable| When You Need | Use This Pattern | Example in Codebase |
|---|---|---|
| Configurable construction | Builder | SessionBuilder |
| Protocol state machine | Type-state or enum | SessionState, protocol states |
| Input prediction | Strategy | PredictionStrategy trait |
| Bounded collections | Circular buffer | SavedStates |
| Request/response | Request enum | FortressRequest |
| Error context | Structured enum | InternalErrorKind, InvalidRequestKind |
Before moving to implementation, verify these project-specific checks:
Result, structured errors, no panic shortcuts)If any check fails, refine scope/design before writing code.
If the change introduces a meaningful architecture or behavior choice, add a one-line record using the design-decisions skill.
Input: Design decisions. Output: Working code with tests.
# Check frequently (after every logical change)
cargo check
cargo clippy --workspace --all-targets --features tokio,json
# Run affected tests
cargo nextest run module_name --no-capture
| Good Commit | Bad Commit |
|---|---|
"Add InputDelayTooLarge variant to InvalidRequestKind" | "Various changes" |
"Validate input delay in SessionBuilder::with_input_delay" | "Fix stuff" |
| "Add regression test for issue #42" | "WIP" |
Each commit should pass cargo c && cargo t independently.
Input: Complete implementation. Output: Reviewed diff ready for external review. Do this BEFORE opening a PR.
Run the readiness gate from review-readiness.md, then perform targeted checks from code-review.md:
# Zero-panic scan
rg '\.unwrap\(\)|\.expect\(|panic!\(|todo!\(' --type rust src/
# Determinism scan
rg 'HashMap|HashSet|Instant::now|thread_rng' --type rust src/
# Agent preflight (catches version sync, Agent Skills, and workflow issues early)
python3 scripts/ci/agent-preflight.py --auto-fix
# Full quality gate (see context.md "Mandatory Linting" for details)
cargo c && cargo t
cargo doc --no-deps
typos
All readiness checks should pass before opening a PR.
Input: Self-reviewed code. Output: All verification passes.
# Level 1: Format + lint + unit tests (always)
cargo c && cargo t
# Level 2: Doc tests (if docs changed)
cargo test --doc -- --nocapture
# Level 3: Kani proofs (if affected module has proofs; see [kani.md](../kani/SKILL.md) for setup)
./scripts/verification/verify-kani.sh --tier 1 --quick
# Level 4: Z3 proofs (if math/bounds changed)
cargo test --features z3-verification -- --nocapture
# Level 5: Miri (if unsafe-adjacent patterns changed)
# Runs in CI automatically
# Level 6: Full CI (let CI run it)
# Cross-compilation, mutation testing, chaos testing
If your change affects code covered by a Kani proof:
cargo kani --harness proof_namescripts/verification/verify-kani.shInput: Passing CI, approved review. Output: Merged PR.
For production-blocking bugs, compress the pipeline:
cargo c && cargo t only| Anti-Pattern | Why It Hurts | Do Instead |
|---|---|---|
| Code first, think later | Rework, wrong abstraction | Scope and design first |
| Skip tests | Bugs ship, regression debt | Write tests before code |
| Mega-PR (>500 lines) | Hard to review, risky merge | Split into stacked PRs |
| Fix + refactor in one PR | Hard to review, bisect-breaking | Separate commits/PRs |
| Skip self-review | Obvious issues waste reviewer time | Review your own diff first |