Skip to content

fix(init): squads init works in clean environment#611

Closed
agents-squads[bot] wants to merge 5 commits intodevelopfrom
solve/issue-610
Closed

fix(init): squads init works in clean environment#611
agents-squads[bot] wants to merge 5 commits intodevelopfrom
solve/issue-610

Conversation

@agents-squads
Copy link
Contributor

@agents-squads agents-squads bot commented Mar 24, 2026

Summary

  • squads init was blocking on missing provider CLI (status: missinghasErrors = true) — now treated as a warning so users can scaffold first and install later
  • squads list was removed (exit 1) — restored as alias for squads status
  • Dockerfile.fresh-user was installing from npm registry (old version) — now builds from local source via npm pack so tests exercise current codebase
  • Added .dockerignore to exclude node_modules/dist for fast Docker builds

Testing

  • All 9 steps in test/docker/test-fresh-user.sh --auto now pass (was 4/9)
PASS  version
PASS  help
PASS  init
PASS  agents-dir
PASS  status
PASS  list
PASS  catalog-list
PASS  doctor
PASS  unknown-cmd
=== Results: 9 passed, 0 failed ===

Closes #610

Jorge Vidaurre and others added 5 commits March 23, 2026 23:08
Context loading changes:
- Removed L2 (SQUAD.md body injection) — SQUAD.md is now metadata
  only for CLI routing (repo, agents, config). Not injected into prompt.
- Split old L3 (priorities OR goals) into L2 (priorities.md) and
  L3 (goals.md) as separate layers loaded independently.
- Removed L7 (active-work.md) and L8 (briefs/) from context loading.
  These files still exist but no longer consume context budget.
- Renumbered: L6=feedback, L7=daily-briefing, L8=cross-squad learnings.

Role-based access updated:
- scanner: L1-L5 (company, priorities, goals, agent, state)
- worker/verifier: L1-L6 (+ feedback)
- lead/coo: L1-L8 (+ daily briefing + cross-squad)

Role resolution:
- Direct match for new schema (role: "lead" → lead, no scoring needed)
- Falls back to token scoring for legacy free-text roles

Agent prompt updated to reflect new layer names.

Co-Authored-By: Claude <noreply@anthropic.com>
company.md, priorities.md, goals.md, state.md all have YAML
frontmatter for CLI metadata. LLMs don't need it — strip before
injecting into prompt. Saves ~80 tokens per run.

Also: DRYRUN_CONTEXT_MAX_CHARS now configurable via env var
SQUADS_DRYRUN_MAX_CHARS for debugging full context output.

Co-Authored-By: Claude <noreply@anthropic.com>
New commands:
- squads catalog list — show all services grouped by type
- squads catalog show <service> — detailed service view
- squads catalog check [service] — run scorecard checks (all or one)
- squads release pre-check <service> — validate dependencies before deploy

New lib modules:
- lib/idp/types.ts — TypeScript interfaces matching IDP YAML schema
- lib/idp/resolver.ts — find IDP directory (env var → co-located → sibling → absolute)
- lib/idp/catalog-loader.ts — parse YAML catalog entries via gray-matter
- lib/idp/scorecard-engine.ts — evaluate services against quality checks

Scorecard sources: local filesystem, gh CLI, git log. Graceful
degradation when gh is unavailable (shows "unknown" vs failing).

No new dependencies — YAML parsed via gray-matter's engine.

Co-Authored-By: Claude <noreply@anthropic.com>
Dockerfile.fresh-user: clean Node 22 container, npm install -g
squads-cli, empty git repo. No config, no .agents, nothing.

test-fresh-user.sh: 9-step automated test suite covering the
complete first-run flow (version, help, init, status, list,
catalog, doctor, unknown command).

Current results: 4/9 pass. squads init is broken (#610).

Usage:
  ./test/docker/test-fresh-user.sh --auto    # automated
  ./test/docker/test-fresh-user.sh           # interactive

Co-Authored-By: Claude <noreply@anthropic.com>
…steps pass

- setup-checks.ts: provider CLI missing is now a warning, not a blocking error;
  users can scaffold first and install the provider CLI later
- cli.ts: restore squads list as alias for squads status (was removed/exit-1)
- Dockerfile.fresh-user: build from local source (npm pack + install) instead
  of npm registry, so tests exercise the current codebase
- .dockerignore: exclude node_modules/dist to speed up Docker builds

Closes #610
@kokevidaurre
Copy link
Contributor

PR #609 (context system + IDP) is now merged to develop. This PR needs a rebase onto develop to pick up the CatalogEntry type. Rebase and re-push to fix the build.

@kokevidaurre
Copy link
Contributor

Superseded by clean rebase on solve/issue-610-v2

auto-merge was automatically disabled March 24, 2026 23:29

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant