/land — Land the Plane
┌─ THE FLYWHEEL ──────────────────────────────────────────────────────────┐
│ SHAPE → PLAN → REVIEW×N → DECOMPOSE → SPRINT PLAN → EXECUTE → ★CLOSE │
│ ★ YOU ARE HERE: Final step. Quality gates → commit → push. │
│ See FLYWHEEL.md for the full development lifecycle. │
└─────────────────────────────────────────────────────────────────────────┘
Run the full pre-push checklist, commit, and push. Work is NOT done until
git push succeeds.
Process
Check what changed
git status
git diff --stat
If there are no changes to commit, say so and stop.
Artifact check — Scan for files that should never be committed:
*.tsbuildinfo, .beads/.local_version, *.log,
.next/, node_modules/, __pycache__/, .env* (except .env.example),
.DS_Store, *.sqlite3
If found: add to .gitignore, unstage, and warn.
CI preflight — Run /hs-sw-ci-preflight to execute all tests and linters
matching the exact commands GitHub Actions will run. This is a hard gate:
if preflight fails, STOP and report the failures. Do not proceed to commit.
Pass --fix if you want lint/format issues auto-corrected first.
Beads preflight (if .beads/ directory exists)
bd preflight --check
This runs automated checks: tests run locally, lint errors, formatting,
version mismatches. If preflight fails, report the issues. Fix what you
can (lint/format auto-fix), warn on the rest.
Note: beads state lives on Railway Dolt (remote). Every bd write lands
immediately — no local export or sync step needed.
4.5 Docs graduation — Check whether any docs/projects/features/<name>/ directory
appears in the changeset (from git status). If so, this is a feature close:
git mv docs/projects/features/<name>/ docs/resources/features/<name>/
This is its own commit: "docs: graduate <name> from projects to resources".
Commit it before proceeding to the remaining changes.
Commit — Create a series of logically connected commits, NOT one giant
commit. Analyze all changed files and group them by coherent change:
- Feature + its tests = one commit
- Refactor = one commit
- Config/infra changes = one commit
- Docs/beads = one commit
Each commit message should be detailed: subject line (what), body (why and
what's in this group). If
$ARGUMENTS provided, use it as the overall theme.
Do NOT edit any code at this stage. Do NOT commit ephemeral files.
Push + PR
First, check the current branch:
git branch --show-current
If on a protected branch (main, production):
STOP. Do NOT push directly. Tell the user:
"You're on <branch> which is protected. Create a feature branch first:
git checkout -b feature/<name>, then re-run /land."
If on a feature/fix branch:
git pull --rebase origin <branch>
If rebase conflicts occur, STOP and report them — do not auto-resolve.
git push -u origin <branch>
Then create or find the PR:
# Check for existing PR first
gh pr view --json url 2>/dev/null || gh pr create --base main --title "<summary>" --body "<description>"
Report the PR URL to the user.
If gh is not available or PR creation fails: push succeeds, tell the
user to create the PR manually. The push is the critical path, PR is best-effort.
Branch strategy: feature/<name> or fix/<name> → PR → main → production.
No development branch.
Monitor CI — After the PR is open, watch GitHub Actions:
gh pr checks --watch
Wait for all checks to complete. Report final status:
Do not exit until CI completes or the user interrupts. CI failures after a
clean preflight are usually environment or secrets issues — flag that distinction.
Rules
- If quality gates fail, STOP. Report the failures. Do not push broken code.
- Never push directly to protected branches (
main, production).
Always go through a PR, even for urgent hotfixes.
- If push fails, resolve and retry until it succeeds.
- Don't skip checks. Don't guess. Always verify.
- Every push costs real money (CI, deployments). Treat it accordingly.
1---2name: hs-sw-land-the-plane3description: Run quality gates, commit changes in logical groups, sync beads, and push to remote4---56# /land — Land the Plane78```9┌─ THE FLYWHEEL ──────────────────────────────────────────────────────────┐10│ SHAPE → PLAN → REVIEW×N → DECOMPOSE → SPRINT PLAN → EXECUTE → ★CLOSE │11│ ★ YOU ARE HERE: Final step. Quality gates → commit → push. │12│ See FLYWHEEL.md for the full development lifecycle. │13└─────────────────────────────────────────────────────────────────────────┘14```1516Run the full pre-push checklist, commit, and push. Work is NOT done until17`git push` succeeds.1819## Process20211. **Check what changed**22 ```23 git status24 git diff --stat25 ```26 If there are no changes to commit, say so and stop.27282. **Artifact check** — Scan for files that should never be committed:29 `*.tsbuildinfo`, `.beads/.local_version`, `*.log`,30 `.next/`, `node_modules/`, `__pycache__/`, `.env*` (except `.env.example`),31 `.DS_Store`, `*.sqlite3`32 If found: add to `.gitignore`, unstage, and warn.33343. **CI preflight** — Run `/hs-sw-ci-preflight` to execute all tests and linters35 matching the exact commands GitHub Actions will run. This is a hard gate:36 if preflight fails, STOP and report the failures. Do not proceed to commit.37 Pass `--fix` if you want lint/format issues auto-corrected first.38394. **Beads preflight** (if `.beads/` directory exists)40 ```41 bd preflight --check42 ```43 This runs automated checks: tests run locally, lint errors, formatting,44 version mismatches. If preflight fails, report the issues. Fix what you45 can (lint/format auto-fix), warn on the rest.4647 Note: beads state lives on Railway Dolt (remote). Every `bd` write lands48 immediately — no local export or sync step needed.49504.5 **Docs graduation** — Check whether any `docs/projects/features/<name>/` directory51 appears in the changeset (from `git status`). If so, this is a feature close:52 ```53 git mv docs/projects/features/<name>/ docs/resources/features/<name>/54 ```55 This is its own commit: `"docs: graduate <name> from projects to resources"`.56 Commit it before proceeding to the remaining changes.57585. **Commit** — Create a series of logically connected commits, NOT one giant59 commit. Analyze all changed files and group them by coherent change:60 - Feature + its tests = one commit61 - Refactor = one commit62 - Config/infra changes = one commit63 - Docs/beads = one commit64 Each commit message should be detailed: subject line (what), body (why and65 what's in this group). If `$ARGUMENTS` provided, use it as the overall theme.66 Do NOT edit any code at this stage. Do NOT commit ephemeral files.67686. **Push + PR**6970 First, check the current branch:71 ```72 git branch --show-current73 ```7475 **If on a protected branch** (`main`, `production`):76 STOP. Do NOT push directly. Tell the user:77 "You're on `<branch>` which is protected. Create a feature branch first:78 `git checkout -b feature/<name>`, then re-run `/land`."7980 **If on a feature/fix branch:**81 ```82 git pull --rebase origin <branch>83 ```84 If rebase conflicts occur, STOP and report them — do not auto-resolve.85 ```86 git push -u origin <branch>87 ```88 Then create or find the PR:89 ```90 # Check for existing PR first91 gh pr view --json url 2>/dev/null || gh pr create --base main --title "<summary>" --body "<description>"92 ```93 Report the PR URL to the user.9495 **If `gh` is not available or PR creation fails:** push succeeds, tell the96 user to create the PR manually. The push is the critical path, PR is best-effort.9798 **Branch strategy:** `feature/<name>` or `fix/<name>` → PR → `main` → `production`.99 No `development` branch.1001017. **Monitor CI** — After the PR is open, watch GitHub Actions:102 ```bash103 gh pr checks --watch104 ```105 Wait for all checks to complete. Report final status:106 - All green → done. Report PR URL and "CI passed."107 - Any red → report which jobs failed with their log URLs:108 ```bash109 gh run view <run-id> --log-failed110 ```111 Do not exit until CI completes or the user interrupts. CI failures after a112 clean preflight are usually environment or secrets issues — flag that distinction.113114## Rules115116- If quality gates fail, STOP. Report the failures. Do not push broken code.117- **Never push directly to protected branches** (`main`, `production`).118 Always go through a PR, even for urgent hotfixes.119- If push fails, resolve and retry until it succeeds.120- Don't skip checks. Don't guess. Always verify.121- Every push costs real money (CI, deployments). Treat it accordingly.