The mission-control (Flight Control) project is being closed upstream. This embeds the project files directly in the repo under container/mission-control/, bakes them into the Docker image at /opt/mission-control, and copies them into place at container startup instead of git cloning from GitHub. Also adds missing osc52-clipboard, audio-shim, and triple-c-sso-refresh to the programmatic Docker build context in image.rs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5.3 KiB
name, description
| name | description |
|---|---|
| leg | Generate detailed implementation guidance for LLM execution. Use when creating atomic implementation steps from a flight. |
Leg Implementation Guidance
Generate detailed implementation guidance for LLM execution.
Prerequisites
- Project must be initialized with
/init-project(.flightops/ARTIFACTS.mdmust exist) - A flight must exist before creating legs
Workflow
Phase 1: Context Loading
-
Identify the target project
- Read
projects.mdto find the project's path
- Read
-
Verify project is initialized
- Check if
{target-project}/.flightops/ARTIFACTS.mdexists - If missing: STOP and tell the user to run
/init-projectfirst - Do not proceed without the artifact configuration
- Check if
-
Read the artifact configuration
- Read
{target-project}/.flightops/ARTIFACTS.mdfor artifact locations and formats
- Read
-
Read the parent flight
- Understand the objective being achieved
- Review design decisions and constraints
- Note the technical approach defined
-
Read the flight log in detail (critical)
The flight log captures ground truth from actual implementation. Read it fully and extract:
- Actual outcomes from completed legs
- Deviations from the original plan
- Anomalies discovered during execution
- Environment details (versions, configurations)
- Decisions made during implementation
- Workarounds for issues encountered
-
Identify this leg's scope
- Which leg from the flight's leg list?
- What comes before and after?
- Dependencies on other legs?
- How do prior leg outcomes affect this leg?
-
Identify environment constraints
- Execution environment (devcontainer, WSL, cloud)?
- User context (root, specific user)?
- Environment variables or shell setup needed?
- Commands inside vs outside containers?
Phase 2: Implementation Analysis
Deep dive into the specific implementation:
-
Identify exact files to modify
- Read existing files that will be changed
- Understand current code structure
- Note imports, dependencies, patterns
-
Understand existing patterns
- How is similar functionality implemented?
- What conventions does the codebase follow?
- What testing patterns are used?
-
Determine inputs and outputs
- What state exists before this leg?
- What state must exist after completion?
- What can the implementing agent assume?
-
Identify edge cases
- What could go wrong?
- What validation is needed?
- What error handling is required?
- If this leg modifies database schemas: does it include migration creation AND execution? Both must happen in the same leg — a schema defined but never migrated is a gap.
-
Identify dependent code (for interface changes)
- Does this leg modify shared interfaces?
- What files consume these interfaces?
- Should updating consumers be part of this leg?
-
Identify platform considerations
- Does this leg touch OS-specific features?
- What platform differences might affect implementation?
Phase 3: Guidance Generation
Create the leg artifact using the format defined in .flightops/ARTIFACTS.md.
Guidelines
Writing Effective Objectives
State exactly what the leg accomplishes:
Weak: "Set up the database stuff"
Strong: "Create the User model with email, password_hash, and timestamp fields"
Acceptance Criteria
Criteria must be:
- Binary: Either met or not met
- Observable: Can be verified by inspection or test
- Complete: Nothing else needed for "done"
Weak: "Code is clean" (subjective)
Strong: "User model exists in prisma/schema.prisma"
Verification Steps
Tell the agent exactly how to confirm each criterion:
Weak: "Make sure it works"
Strong:
## Verification Steps
- Run `npx prisma migrate status` — should show no pending migrations
- Run `npm test` — all tests pass
- Tab through form fields — focus order matches visual order
For accessibility work, include specific checks:
- Keyboard navigation sequences
- Screen reader commands to test
- Automated tool commands (Lighthouse, axe-core)
Implementation Guidance
Be explicit, not implicit:
Implicit: "Add validation to the email field"
Explicit: "Add email validation using the validator library's isEmail function. Return HTTP 400 with { "error": "Invalid email format" } on validation failure."
Code Examples
Provide examples when:
- The codebase has specific patterns to follow
- There are multiple valid approaches
- The implementation isn't obvious from context
Leg Sizing
A well-sized leg:
- Takes minutes to a few hours
- Is atomic (can be completed independently)
- Has clear, verifiable acceptance criteria
- Produces a working increment
Too small: Single-line change with no meaningful criteria Too large: Would benefit from intermediate checkpoints
Documenting Workarounds
When implementing a workaround, document:
- What: The workaround clearly
- Why: Why the ideal solution wasn't feasible
- When to remove: Condition for replacement
Immutability
Once a leg is in-flight:
- Do NOT modify the leg document
- If requirements change, mark it
aborted(changes rolled back) - Create a new leg with updated requirements
Output
Create the leg artifact using the location and format defined in .flightops/ARTIFACTS.md.