Skip to content

feat(bootstrap): add --mode lean for fast, install-safe onboarding#180

Merged
stackbilt-admin merged 4 commits into
mainfrom
feat/squad2-lean-bootstrap
May 23, 2026
Merged

feat(bootstrap): add --mode lean for fast, install-safe onboarding#180
stackbilt-admin merged 4 commits into
mainfrom
feat/squad2-lean-bootstrap

Conversation

@stackbilt-admin
Copy link
Copy Markdown
Member

Summary

Closes #139.

  • bootstrap --mode lean runs only detect → setup → adf-init → doctor, skipping migrate, install, and populate
  • Install failure can no longer flip the result to partial — lean mode emits a deterministic install command (auto-detected: pnpm/npm/yarn) as the first required next step
  • Fully compatible with --yes, --ci github, --force, --security-sensitive, and --skip-install (passing both --mode lean and --skip-install is a no-op)

Test plan

  • --mode lean skips migrate, install, populate (status: skip)
  • Final status is success when the 4 retained phases pass
  • First required next step is the correct install command for the detected package manager
  • --mode lean --skip-install does not error
  • 14/14 bootstrap tests pass

🤖 Generated with Claude Code

…rding (#139)

Skips migrate, install, and populate phases. Install failure can no longer
produce a `partial` status — lean mode emits a deterministic install command
as the first required next step instead. Fully compatible with --yes, --ci,
--force, and --security-sensitive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@stackbilt-admin
Copy link
Copy Markdown
Member Author

Blocking issue found:

  1. --mode lean emits git-hook next steps even when not in a git repo.
  • In packages/cli/src/commands/bootstrap.ts (leanMode branch around lines 338-359), nextSteps always includes:
    • charter hook install --commit-msg
    • charter hook install --pre-commit
  • But the non-lean path correctly gates hook steps behind inGitRepo.

Why this blocks:

  • In non-git directories, lean mode currently recommends commands that are guaranteed to fail, despite detection already warning that hooks cannot be installed outside a git repo.
  • This is a behavior regression vs non-lean mode.

Requested fix:

  • Apply the same inGitRepo gate to lean-mode hook steps (or mark them conditional/skipped with a clear reason in the output).

Once this is fixed, I’m comfortable with merge.

stackbilt-admin and others added 3 commits May 23, 2026 07:29
)

Extracts backtick template strings from .ts/.tsx/.js/.mjs files and scans
their bodies against drift patterns, attributing violations to virtual
filenames (e.g. src/foo.ts[template:0]). Catches security anti-patterns
inside code-factory functions that emit string templates. No signature
changes to scanForDrift.

Co-authored-by: Kurt Overmier <kurt@stackbilt.dev>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…hots (#138) (#182)

New --sources repo-intel pulls open/closed issues, PRs, and release cadence
via gh CLI and writes .charter/repo-intel/snapshot.json. Computes a summary
(openIssueCount, stalledIssues, recurringLabels, mergeVelocity, releaseCadence)
contributed to context.adf openWork/recentActivity sections. Fails gracefully
when gh is unavailable or repo has no GitHub remote — emits a warning, not
an error.

Co-authored-by: Kurt Overmier <kurt@stackbilt.dev>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Hooks cannot be installed outside a git repo. The non-lean path already
gated these steps on inGitRepo; lean mode was missing the same guard.
Tests updated to mock isGitRepo via git-helpers module mock (runGit uses
execFileSync, not execSync, so the existing execSync override couldn't
cover it).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@stackbilt-admin
Copy link
Copy Markdown
Member Author

Re-review complete for #180.

The previously reported blocker is resolved:

  • Lean-mode hook next steps are now gated by inGitRepo, matching non-lean behavior and avoiding invalid recommendations outside git repos.
  • CI/checks are green.

From my side this is merge-ready.

@stackbilt-admin stackbilt-admin merged commit 246b29d into main May 23, 2026
5 checks passed
@stackbilt-admin stackbilt-admin deleted the feat/squad2-lean-bootstrap branch May 23, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feedback: reduce setup and daily governance overhead with lean bootstrap + risk-aware suggestions

1 participant