refactor(core): run engine decomposition + context helpers [v0.3.0 — 1/7]#731
Merged
kokevidaurre merged 5 commits intodevelopfrom Apr 13, 2026
Merged
refactor(core): run engine decomposition + context helpers [v0.3.0 — 1/7]#731kokevidaurre merged 5 commits intodevelopfrom
kokevidaurre merged 5 commits intodevelopfrom
Conversation
…er 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>
This was referenced Apr 13, 2026
There was a problem hiding this comment.
Code Review
This pull request introduces several enhancements to the agent execution and context management system, including a more robust squad directory discovery mechanism that is git-aware, the ability to inject GCP credentials and guardrail settings into agent sessions, and a reorganized context injection order that prioritizes actionable feedback. It also moves several large prompt blocks (evaluation, lead mode, and verification protocols) into external markdown files for better maintainability. Feedback is provided regarding the hardcoded GCP credential path, the fragile regex-based model resolution from agent frontmatter, and the use of magic numbers in staleness calculations.
…ontmatter, 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>
Typecheck failed because parseAgentFrontmatter() returns AgentFrontmatter which didn't include the model property. Co-Authored-By: Claude <noreply@anthropic.com>
…O, preflightExecutorCheck, pushCognitionSignal, findMemoryDir, timeoutMins Co-Authored-By: Claude <noreply@anthropic.com>
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>
This was referenced Apr 14, 2026
This was referenced Apr 14, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary — PR 1 of 7 for v0.3.0 release
Core runtime refactoring. Foundation for all subsequent PRs.
Changes (7 files)
conversation_agentsfield typefindProjectRoot, skills loading, dynamic discoveryMerge order
Merge this first. Subsequent PRs build on these changes:
Test plan
npm run buildpassesReorganized from 219-commit develop branch for proper review.
Backup tag:
pre-v0.3.0-backup