From e456e10765193767666724254fea04a57969ec0f Mon Sep 17 00:00:00 2001 From: bradygaster Date: Sat, 14 Feb 2026 19:30:42 -0800 Subject: [PATCH 1/2] fix: resolve 'too many arguments' CLI error (#59) Remove unsupported 'version' field from YAML frontmatter in squad.agent.md. The 'version' property is not supported in GitHub Copilot CLI agent manifests and was causing the Copilot CLI parser to display 'error: too many arguments' above the textbox. Changes: - Moved version tracking from YAML frontmatter to HTML comment - Updated stampVersion() to replace HTML comment and Version line - Updated readInstalledVersion() to read from HTML comment (with fallback) - Removed version from name field (was 'Squad (v0.0.0-source)', now 'Squad') The version is still tracked and stamped during install/upgrade, but no longer conflicts with the Copilot CLI's YAML parser. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/agents/squad.agent.md | 7 ++++--- index.js | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/agents/squad.agent.md b/.github/agents/squad.agent.md index 80c4e7af2..f80c4c3db 100644 --- a/.github/agents/squad.agent.md +++ b/.github/agents/squad.agent.md @@ -1,15 +1,16 @@ --- -name: Squad (v0.0.0-source) +name: Squad description: "Your AI team. Describe what you're building, get a team of specialists that live in your repo." -version: "0.0.0-source" --- + + You are **Squad (Coordinator)** — the orchestrator for this project's AI team. ### Coordinator Identity - **Name:** Squad (Coordinator) -- **Version:** Read the `version` field from the YAML frontmatter at the top of this file. Include it as `Squad v{version}` in your first response of each session (e.g., in the acknowledgment or greeting). +- **Version:** 0.0.0-source (see HTML comment above — this value is stamped during install/upgrade). Include it as `Squad v{version}` in your first response of each session (e.g., in the acknowledgment or greeting). - **Role:** Agent orchestration, handoff enforcement, reviewer gating - **Inputs:** User request, repository state, `.ai-team/decisions.md` - **Outputs owned:** Final assembled artifacts, orchestration log (via Scribe) diff --git a/index.js b/index.js index 27132b0b5..5f13e880d 100644 --- a/index.js +++ b/index.js @@ -590,21 +590,24 @@ const isUpgrade = cmd === 'upgrade'; // Stamp version into squad.agent.md after copying function stampVersion(filePath) { let content = fs.readFileSync(filePath, 'utf8'); - // Replace version field - content = content.replace(/^version:\s*"[^"]*"/m, `version: "${pkg.version}"`); - // Replace version in name field to show in agent picker UI - // Handles both "Squad" and "Squad (vX.Y.Z)" formats - content = content.replace(/^name:\s*Squad(?:\s*\([^)]*\))?$/m, `name: Squad (v${pkg.version})`); + // Replace version in HTML comment (must come immediately after frontmatter closing ---) + content = content.replace(//m, ``); + // Replace version in the Identity section's Version line + content = content.replace(/- \*\*Version:\*\* [0-9.]+(?:-[a-z]+)?/m, `- **Version:** ${pkg.version}`); fs.writeFileSync(filePath, content); } -// Read version from squad.agent.md frontmatter +// Read version from squad.agent.md HTML comment function readInstalledVersion(filePath) { try { if (!fs.existsSync(filePath)) return null; const content = fs.readFileSync(filePath, 'utf8'); - const match = content.match(/^version:\s*"([^"]+)"/m); - return match ? match[1] : '0.0.0'; + // Try to read from HTML comment first (new format) + const commentMatch = content.match(//); + if (commentMatch) return commentMatch[1]; + // Fallback: try old frontmatter format for backward compatibility during upgrade + const frontmatterMatch = content.match(/^version:\s*"([^"]+)"/m); + return frontmatterMatch ? frontmatterMatch[1] : '0.0.0'; } catch { return '0.0.0'; } From 274b8bf2ba1e9370a33095511a109e3ddeefebb7 Mon Sep 17 00:00:00 2001 From: bradygaster Date: Sat, 14 Feb 2026 19:31:44 -0800 Subject: [PATCH 2/2] docs(ai-team): document YAML frontmatter validation learnings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .ai-team/agents/fenster/history.md | 2 ++ .../inbox/fenster-yaml-frontmatter-validation.md | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 .ai-team/decisions/inbox/fenster-yaml-frontmatter-validation.md diff --git a/.ai-team/agents/fenster/history.md b/.ai-team/agents/fenster/history.md index cc813a712..617894422 100644 --- a/.ai-team/agents/fenster/history.md +++ b/.ai-team/agents/fenster/history.md @@ -121,3 +121,5 @@ _Summarized from initial architecture review (2026-02-07). Full entries in `hist - **MCP integration shipped (#11).** Added MCP Integration section to squad.agent.md (after Client Compatibility, before Eager Execution): detection via tool prefix scanning, routing rules (coordinator direct vs spawn with context), graceful degradation (CLI fallback → inform user → continue without), config file locations, Trello sample config. References the existing MCP skill at `.ai-team/skills/mcp-tool-discovery/SKILL.md` instead of duplicating it. Updated spawn template with optional MCP TOOLS AVAILABLE block. Added MCP config generation to `squad init` (creates `.copilot/mcp-config.json` sample with `EXAMPLE-trello` prefix pattern). Added 0.4.0 upgrade migration so existing installs get the sample config on `squad upgrade`. Both init and migration are idempotent (skip if file exists). - **Docs template extraction — inline→external files.** Refactored `docs/build.js` to read HTML template, CSS, and JS from external files instead of generating them inline via `getCSS()`, `getJS()`, and `getTemplate()` string-building functions. Created `docs/assets/template.html` (HTML shell with `{{title}}`, `{{nav}}`, `{{content}}`, `{{searchIndex}}`, `{{basePath}}` placeholders), `docs/assets/style.css`, and `docs/assets/script.js`. Build reads template once at startup, does placeholder replacement per page. CSS/JS are linked externally (`` / `