Skip to content

release: v0.3.0 — run engine rewrite, conversation mode, new commands, security, telemetry, UX#743

Merged
kokevidaurre merged 15 commits intomainfrom
develop
Apr 23, 2026
Merged

release: v0.3.0 — run engine rewrite, conversation mode, new commands, security, telemetry, UX#743
kokevidaurre merged 15 commits intomainfrom
develop

Conversation

@agents-squads
Copy link
Copy Markdown
Contributor

@agents-squads agents-squads Bot commented Apr 14, 2026

v0.3.0 — Release Summary

CI: ✅ passing (CI + CodeQL green on develop as of 2026-04-14)

10 PRs merged to develop

PR Change
#731 refactor(core): run engine decomposition + context helpers
#732 feat(run): workflow rewrite — smart skip, org cycle, wave execution
#733 feat(conversation): agents talk + use tools (tool-use in agent sessions)
#734 feat(commands): review, credentials, goals, log commands
#735 feat(init): demo agent scaffold, what's next guidance
#736 feat(security): PreToolUse guardrail hooks for spawned agent sessions
#737 test+docs: 213 new tests, version bump to 0.3.0
#738 fix(services): remove hardcoded paths — fully agnostic
#739 fix(telemetry): restore write-only API key (broken since March 14)
#740 fix(ux): prerequisites check, no-args squad list, schedule hint

Key highlights

Notes

  • CHANGELOG.md not present on develop — v0.3.0 release notes captured in this PR description and individual PR descriptions.
  • After merge: npm publish required to complete Goal [Code]: Refactor dashboardCommand function - exceeds 190 lines #4 (v0.3.0 release coordination, deadline 2026-04-18).
  • First real agent_executions data in Postgres expected after tonight's org run post-publish.

Unblocks

Tagging for founder review — ready to merge.

kokevidaurre and others added 10 commits April 13, 2026 18:01
…1/7] (#731)

* refactor(core): run engine decomposition, context helpers, squad parser improvements

Core runtime refactoring from v0.3.0 development cycle:

- run-context.ts: expanded context helpers for goal injection, feedback, state
- run-modes.ts: simplified run modes, removed per-squad limits
- run-types.ts: added conversation_agents field type
- execution-engine.ts: phase-ordered execution, role-based context
- agent-runner.ts: bot identity injection, guardrail hooks, tool sets
- squad-parser.ts: findProjectRoot, skills loading, dynamic discovery
- env-config.ts: environment URL resolution additions

Original commits: ~25 from develop (refactors, type fixes, context system updates)
Backup tag: pre-v0.3.0-backup

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

* fix: address Gemini review — configurable cred path, use parseAgentFrontmatter, fix staleness calc

- execution-engine.ts: GCP credential path now configurable via
  SQUADS_GCP_CREDENTIALS_DIR env var (was hardcoded ~/.squads/secrets/).
  Use parseAgentFrontmatter() instead of fragile regex for model detection.
- run-context.ts: Replace magic number 86400000 with MS_PER_DAY constant,
  use Math.floor instead of Math.round for staleness calculation.

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

* fix(types): add model field to AgentFrontmatter interface

Typecheck failed because parseAgentFrontmatter() returns AgentFrontmatter
which didn't include the model property.

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

* fix(lint): remove unused imports in agent-runner — SOFT_DEADLINE_RATIO, preflightExecutorCheck, pushCognitionSignal, findMemoryDir, timeoutMins

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

* fix(lint): remove all 20 unused variable warnings across 9 files

Cleaned up unused imports and variables flagged by eslint:
- agent-runner.ts: DEFAULT_TIMEOUT_MINUTES, bold, gradient
- scorecard-engine.ts: readFileSync
- org-cycle.ts: logObservability, ObservabilityRecord
- outcomes.ts: prefixed unmergedPRs with _
- repo-enforcement.ts: resolve
- run-context.ts: removed unused readDirMd function + readdirSync
- run-modes.ts: spawn, getProjectRoot, checkLocalCooldown,
  DEFAULT_SCHEDULED_COOLDOWN_MS, saveTranscript, reportExecutionStart,
  reportConversationResult, getBridgeUrl, ora
- run-utils.ts: findMemoryDir
- squad-loop.ts: Squad type

Zero warnings remaining. Zero type errors.

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
…v0.3.0 — 2/7] (#732)

* feat(run): workflow rewrite — smart skip, org cycle, wave execution, focus/resume

Run engine and workflow rewrite from v0.3.0 development cycle.

Fixes applied from Gemini Code Assist review:
- HIGH: task directive now includes planPrompt context (was bypassed)
- HIGH: converged reflects actual status (was forced true)
- MEDIUM: setTimeout cleared on close/error (resource leak)
- MEDIUM: skip logic query limit bumped to 500
- MEDIUM: fallback assigns ALL workers, not just first
- Added CLI_RUN_COMPLETE telemetry event
- Removed unused imports (dirname, homedir, bold)

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

* fix(test): add findProjectRoot to squad-parser mock in workflow tests

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

* fix(test): findProjectRoot mock should use mockReturnValue (sync, not async)

findProjectRoot() returns string|null, not a Promise.

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

* fix(test): update workflow tests for spawn-based agent execution

workflow.ts now uses spawn instead of execSync. Updated test mocks:
- Added createMockChild helper for spawn-based child processes
- Added appendFileSync to fs mock
- Added observability mock (snapshotGoals, diffGoals, logObservability)
- All 16 tests pass

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

* fix: remove hardcoded squad names from org cycle waves

Wave definitions had our internal squad names (research, intelligence,
cli, marketing, etc.) hardcoded. A user's squads would never match.

Now: all planned squads run in a single parallel wave. Custom wave
ordering can be added later via SQUAD.md `wave:` field.

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

* fix: remove hardcoded git commit of .agents/memory/ between waves

Auto-committing hq memory between waves was our internal pattern,
not a product feature. Users won't have .agents/memory/ in their
project root. Removed.

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

* refactor: extract plan prompt to templates/prompts/plan.md

"No prompts in code" — behavioral instructions live in markdown.
Extracted the inline planPrompt template string to a markdown file
with {{VARIABLE}} placeholders. TypeScript loads and substitutes.

Also: squadContext is now included in the template (was passed as
empty string, losing goals/priorities context).

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

* fix(lint): remove unused execSync import from run.ts

No longer needed after removing hardcoded git commit between waves.

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
* feat(conversation): agents talk + use tools, cognition engine, convergence

Conversation mode rewrite and cognition engine from v0.3.0 cycle:

- conversation.ts: Rewritten so agents talk AND use tools (was text-only).
  Parallel same-role agents within cycles. Hard-stop on lead completion.
  Squad cwd resolution for all agent turns. Transcript serialization fixes.
  Agent classification by name first, then role description.
- cognition.ts: Local-first intelligence engine. Quality grading.
  Escalation pause for daemon. Signal synthesis via Claude CLI.
  Push memory signals after daemon cycles.

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

* refactor: remove cognition.ts changes from this PR

Cognition engine is not actively used (post-pivot, daemon is stopped).
Changes parked in future/cognition-t2 branch for Tier 2 reactivation.
This PR now only contains conversation.ts changes.

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
… — 4/7] (#734)

* feat(commands): add review, credentials, goals, log commands + minor fixes

New commands:
- credentials.ts: per-squad GCP service account management
- goals.ts: goals dashboard with status tracking
- log.ts: run history with timestamps, duration, status
- review.ts: post-cycle evaluation dashboard

Fixes applied:
- Added CLI_LOG telemetry event
- Removed unused imports (writeFileSync, formatRelativeTime)
- Removed unused variables (blockedStr, achievedStr)
- Fixed hardcoded org name in review.ts issue URL resolution

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

* fix: address Gemini review on credentials.ts

- Use static renameSync import instead of dynamic import('fs')
- Remove redundant --all handling (dedicated create-all command exists)

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

* refactor(credentials): remove hardcoded squad names, read config from SQUAD.md

credentials.ts had our internal squad names and GCP roles hardcoded.
Now fully agnostic:

- Permissions read from SQUAD.md `credentials.gcp.roles/apis` fields
- Squads discovered dynamically from squads directory
- No hardcoded squad names, org names, or internal structure
- Helpful error message shows users how to configure their SQUAD.md
- create-all discovers squads with GCP config automatically

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

* test(credentials): add 8 tests for SQUAD.md GCP credentials parser

Extracted parseGcpCredentials() as pure function for testability.
Tests cover: inline YAML, quoted values, multiple APIs, missing config,
empty content, roles without apis, mixed SQUAD.md content.

All 8 pass.

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
…735)

* feat(init): demo agent scaffold, what's next guidance, email capture

Init UX improvements from v0.3.0 cycle:

- "What's next" guidance after init with actionable next steps
- Opt-in email capture for product updates
- Demo squad scaffold with hello-world starter agent
- IDP catalog seeding for agent frontmatter schemas
- Competitor collection during init
- Hints for empty business description
- cli.run.complete telemetry event

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

* fix(test): update E2E to expect 5 squads (4 core + demo)

Init now creates a demo squad with hello-world agent.

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
… — 6/7] (#736)

* feat(security): PreToolUse guardrail hooks for spawned agent sessions

guardrail.json template injected into all spawned Claude sessions.
Prevents agents from running destructive commands, force-pushing,
publishing packages, or accessing secrets directly.

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

* fix(security): add npm/yarn/pnpm publish to guardrail blocked commands

Gemini review caught missing publish checks. Agents should never
publish packages — that requires founder approval.

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
…#737)

* test+docs: coverage + tier 2 docs + version bump to 0.3.0

Tests added (213 new tests):
- catalog.test.ts: catalog command tests
- dashboard.test.ts: dashboard engine, renderers, loader tests
- services.test.ts: services command tests
- first-run.e2e.test.ts: updated for demo squad scaffold
- guardrail.test.ts: guardrail hook tests
- init.test.ts: expanded init command tests
- telemetry.test.ts: telemetry event tests

Docs:
- docs/tier2.md: Tier 2 architecture documentation

Version:
- package.json: bump to 0.3.0

Note: cli.test.ts failures are pre-existing on develop (not introduced by this PR).

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

* docs: remove tier2.md — internal architecture, not product docs

Hardcoded our repo structure, ports, service names. Belongs in
private engineering repo, not the public CLI.

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

* test: replace mock-heavy tests with real integration tests

Before: 2,299 lines mocking fs, squad-parser, child_process, etc.
Testing mocks, not the product. False confidence.

After: 465 lines testing real files on real filesystem.
- catalog: real IDP directory with YAML files
- dashboard: zero mocks, real data structures into renderers
- services: real docker-compose.yml in temp dir
- init: real temp directory, verify actual files created

39 tests, all passing. 80% less code, 100% more real coverage.

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
* fix(services): make agnostic — remove hardcoded paths and internal assumptions

Before: searched for docker-compose.yml in ~/agents-squads/engineering/docker/
and hardcoded squads-postgres container name, internal DB table names.

Now:
- Discovers docker-compose.yml from project root, ./docker/, ./infra/,
  SQUADS_COMPOSE_FILE env var, or --file flag
- Uses docker compose ps against user's compose file
- Removed hardcoded port output and DB introspection
- --file option on all 3 subcommands (up/down/status)
- Health check verifies containers are actually running
- Updated tests to match new agnostic implementation

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

* test(services): update tests for agnostic services command

- Use SQUADS_COMPOSE_FILE env var instead of hardcoded engineering path
- Check --file option on all subcommands
- Fix health check mock to return 'running' state
- Updated status test for Docker not installed case

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
…0.3.0] (#739)

* fix(telemetry): restore write-only API key — telemetry broken since March 14

Commit 6261882 removed the telemetry key and replaced it with an env var
that no user has set. Result: zero telemetry events since ~March 14.

Write-only analytics keys are standard practice (Segment, PostHog,
Mixpanel all ship them in public code). The key can only write events;
it cannot read, delete, or access any data. Users can still opt out.

Closes #388 (GitHub Traffic API — this restores our primary data signal)

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

* fix: use plain string for telemetry key, drop base64 obfuscation

Gemini review: base64 encoding adds no security and reduces transparency.
Plain string is honest — it's a write-only key, nothing to hide.

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

* fix: lock telemetry key — no env var override

Telemetry goes to our infrastructure only. No reason to let users
redirect it. They can opt out, but not redirect.

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
….0] (#740)

* fix(run): UX improvements — prerequisites check, no-args squad list, schedule hint (#675, #694, #695)

- Add checkPrerequisites() validating Node >= 18 and Claude CLI before run
- Show available squads with missions when `squads run` invoked without args
- Display scheduling tip after first successful squad run (persisted in ~/.squads-cli/schedule-hint-shown)

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

* fix: skip prerequisites check in CI/test environments

checkPrerequisites() called process.exit(1) when Claude CLI not found,
killing the test runner. Now skips when CI or VITEST env vars are set.

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

* fix: address Gemini review — remove redundant CLI check, fix cron hint, cleanup

- Removed redundant Claude CLI check (preflightExecutorCheck handles it)
- Removed non-existent --cron flag from schedule hint
- Removed unused runAutopilot import (replaced by squad listing)
- Added VITEST to skip conditions

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

* fix(lint): remove unused execSync import

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
@agents-squads agents-squads Bot requested a review from kokevidaurre as a code owner April 14, 2026 04:52
@agents-squads agents-squads Bot changed the title release: v0.3.0 release: v0.3.0 — run engine rewrite, conversation mode, new commands, security, telemetry, UX Apr 14, 2026
Tags matching v<semver>-<suffix> (e.g., v0.3.0-rc.1) publish to @next
and mark the GitHub Release as pre-release. Clean semver tags (v0.3.0)
continue publishing to @latest.

Enables a burn-in channel for major releases — users opt in with
`npm i squads-cli@next` before we promote to @latest.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the ci label Apr 23, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 23, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 30.01475% with 949 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/commands/review.ts 0.00% 252 Missing ⚠️
src/commands/credentials.ts 7.14% 169 Missing ⚠️
src/commands/run.ts 14.37% 131 Missing ⚠️
src/commands/goals.ts 0.00% 78 Missing ⚠️
src/lib/workflow.ts 58.19% 74 Missing ⚠️
src/commands/log.ts 0.00% 71 Missing ⚠️
src/lib/run-modes.ts 13.88% 31 Missing ⚠️
src/lib/config.ts 50.00% 29 Missing ⚠️
src/commands/init.ts 66.66% 21 Missing ⚠️
src/commands/services.ts 68.85% 19 Missing ⚠️
... and 13 more

📢 Thoughts on this report? Let us know!

kokevidaurre and others added 4 commits April 23, 2026 12:42
)

* fix(workflow): role-based timeouts + anti-collision rules in plan prompt

Two root causes of poor org run quality:

1. Workers timed out at 8 minutes (hardcoded) — can't complete real
   work like creating PRs, running BQ queries, or writing reports.
   Now role-based: scanners 10min, verifiers 15min, leads+workers 30min.

2. Multiple squads created duplicate deliverables (e.g., both ops and
   cli tried to create the v0.3.0 release PR). Plan prompt now includes
   explicit rules: only work on YOUR goals, check depends_on before
   acting, verify before creating, no PII on public repos.

Closes #742 (partially — timeout portion)

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

* fix: use DEFAULT_TIMEOUT_MINUTES + SQUADS_AGENT_TIMEOUT_MINUTES env var

No hardcoded values. Timeout comes from:
1. SQUADS_AGENT_TIMEOUT_MINUTES env var (user override)
2. DEFAULT_TIMEOUT_MINUTES from run-types.ts (30 min)

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

* fix: address Gemini review — timeout declaration order + dependency check instructions

- workflow.ts: move timeout declaration before event handlers (no-use-before-define)
- plan.md: specify how to check depends_on (read goals.md status field, use gh CLI)

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
…nfig [v0.3.0] (#749)

* fix(audit): remove hardcoded values, extract prompts, parameterize config

5 audit findings remediated:
1. tier-detect.ts: use getApiUrl/getBridgeUrl from env-config
2. agent-runner/workflow/run-modes: replace company-lead string match with frontmatter role
3. cognition.ts: parameterize company name via SQUADS_COMPANY_NAME
4. run-modes.ts: extract lead prompt to templates/prompts/lead-mode.md
5. lead-orchestrator.ts: extract orchestrator prompt to templates/prompts/orchestrator.md

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

* fix: address Gemini review — use replaceAll for template tags

- lead-orchestrator.ts: {{WORKERS}} now uses regex for consistency
- run-modes.ts: all template tags use replaceAll() for multi-occurrence safety

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add project-level config system (.squads/config.yml)

Centralizes runtime settings (agent timeout, token budget, cost ceiling,
company name, compose file, telemetry) into a single project config file
with env var > config file > constant default resolution order.

- New: src/lib/config.ts — loader with minimal YAML parser, no deps
- New: templates/config.example.yml — ships with package
- Updated: workflow.ts reads token_budget + cost_ceiling from config
- Updated: cognition.ts reads company_name from config (was hardcoded)
- Updated: services.ts reads compose_file from config
- Updated: telemetry.ts checks config for telemetry opt-out
- Updated: init.ts generates .squads/config.yml + gitignore entry

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

* fix: address Gemini review — YAML parser, gitignore check, config resolution

- config.ts: allow uppercase YAML keys (normalized to lowercase), fix
  comment stripping for quoted values and comment-only values
- init.ts: exact line match for gitignore entry (not substring)
- services.ts: remove redundant env var check, use loadProjectConfig()
  as single config source

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

* test(services): reset config cache in beforeEach

Config cache held a stale null compose_file across tests, so the
env-var override case failed because earlier tests had already cached
the unset state.

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

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Co-authored-by: Claude <noreply@anthropic.com>
* feat(templates): evaluation-first goals + add growth squad

Every non-demo starter squad now ships with a first-run "Squad evaluation"
goal so `squads run <squad>` produces deliverable output on first invocation:
audit the domain against BUSINESS_BRIEF.md and output a baseline report
with top priorities.

Adds a new `growth` squad (4 agents — growth-lead, funnel-analyst,
experiment-runner, growth-critic) distinct from marketing: growth owns
AARRR funnel, experiments, and kills vanity metrics. Marketing creates
content, growth measures and distributes.

Growth exposed via:
- Use-case option in `squads init`
- `--pack growth` flag
- Included in `--pack all`
- Included in `full-company` use case

Closes #751

* fix: address Gemini review — marketing dep + use-case + state files

- growth use case now includes getMarketingSquad() (declared dependency)
- --pack processing updates selectedUseCase so getFirstRunCommand suggests the right first agent (e.g. growth-lead instead of always research/lead)
- --pack growth now also installs marketing (dependency)
- Added initial state.md for funnel-analyst, experiment-runner, growth-critic so their first-run Read() calls do not fail

---------

Co-authored-by: Jorge Vidaurre <jorge@agents-squads.com>
Copy link
Copy Markdown
Contributor

@kokevidaurre kokevidaurre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kokevidaurre kokevidaurre merged commit 03253f8 into main Apr 23, 2026
18 checks passed
kokevidaurre pushed a commit that referenced this pull request Apr 24, 2026
…0 + token)

Conflicts arose because:
- main shipped at 0.3.0 via #743
- develop bumped to 0.3.0-rc.1 for @next burn-in
- develop replaced release.yml NPM_TOKEN with OIDC trusted publishing

Resolution: take develop's side for all three files. Publishing 0.3.0-rc.1
to @next is the intended path, and OIDC replaces the stale NPM_TOKEN that
caused the original 404.
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.

2 participants