Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix: add command metadata frontmatter

Affaan Mustafa01d3743a8c44
diff --git a/commands/build-fix.md b/commands/build-fix.md
index ddd9e279c..568351bbc 100644
--- a/commands/build-fix.md
+++ b/commands/build-fix.md
@@ -1,3 +1,7 @@
+---
+description: Detect the project build system and incrementally fix build/type errors with minimal safe changes.
+---
+
# Build and Fix
Incrementally fix build and type errors with minimal, safe changes.
diff --git a/commands/checkpoint.md b/commands/checkpoint.md
index 06293c07c..68166cba1 100644
--- a/commands/checkpoint.md
+++ b/commands/checkpoint.md
@@ -1,3 +1,7 @@
+---
+description: Create, verify, or list workflow checkpoints after running verification checks.
+---
+
# Checkpoint Command
Create or verify a checkpoint in your workflow.
diff --git a/commands/gan-build.md b/commands/gan-build.md
index bfb3664b6..476b04b9d 100644
--- a/commands/gan-build.md
+++ b/commands/gan-build.md
@@ -1,3 +1,7 @@
+---
+description: Run a generator/evaluator build loop for implementation tasks with bounded iterations and scoring.
+---
+
Parse the following from $ARGUMENTS:
1. `brief` — the user's one-line description of what to build
2. `--max-iterations N` — (optional, default 15) maximum generator-evaluator cycles
diff --git a/commands/gan-design.md b/commands/gan-design.md
index a09444353..5826271cb 100644
--- a/commands/gan-design.md
+++ b/commands/gan-design.md
@@ -1,3 +1,7 @@
+---
+description: Run a generator/evaluator design loop for frontend or visual work with bounded iterations and scoring.
+---
+
Parse the following from $ARGUMENTS:
1. `brief` — the user's description of the design to create
2. `--max-iterations N` — (optional, default 10) maximum design-evaluate cycles
diff --git a/commands/harness-audit.md b/commands/harness-audit.md
index 69382af06..108042ce9 100644
--- a/commands/harness-audit.md
+++ b/commands/harness-audit.md
@@ -1,3 +1,7 @@
+---
+description: Run a deterministic repository harness audit and return a prioritized scorecard.
+---
+
# Harness Audit Command
Run a deterministic repository harness audit and return a prioritized scorecard.
diff --git a/commands/learn.md b/commands/learn.md
index 9899af13c..175316a79 100644
--- a/commands/learn.md
+++ b/commands/learn.md
@@ -1,3 +1,7 @@
+---
+description: Extract reusable patterns from the current session and save them as candidate skills or guidance.
+---
+
# /learn - Extract Reusable Patterns
Analyze the current session and extract any patterns worth saving as skills.
diff --git a/commands/loop-start.md b/commands/loop-start.md
index 4bed29edd..597f3ca4e 100644
--- a/commands/loop-start.md
+++ b/commands/loop-start.md
@@ -1,3 +1,7 @@
+---
+description: Start a managed autonomous loop pattern with safety defaults and explicit stop conditions.
+---
+
# Loop Start Command
Start a managed autonomous loop pattern with safety defaults.
diff --git a/commands/loop-status.md b/commands/loop-status.md
index 11bd321be..8ee3f376a 100644
--- a/commands/loop-status.md
+++ b/commands/loop-status.md
@@ -1,3 +1,7 @@
+---
+description: Inspect active loop state, progress, failure signals, and recommended intervention.
+---
+
# Loop Status Command
Inspect active loop state, progress, and failure signals.
diff --git a/commands/model-route.md b/commands/model-route.md
index 7f9b4e0b0..ef03b90c8 100644
--- a/commands/model-route.md
+++ b/commands/model-route.md
@@ -1,3 +1,7 @@
+---
+description: Recommend the best model tier for the current task based on complexity, risk, and budget.
+---
+
# Model Route Command
Recommend the best model tier for the current task by complexity and budget.
diff --git a/commands/multi-backend.md b/commands/multi-backend.md
index d9faf18fd..2eb72a6de 100644
--- a/commands/multi-backend.md
+++ b/commands/multi-backend.md
@@ -1,3 +1,7 @@
+---
+description: Run a backend-focused multi-model workflow for APIs, algorithms, data, and business logic.
+---
+
# Backend - Backend-Focused Development
Backend-focused workflow (Research → Ideation → Plan → Execute → Optimize → Review), Codex-led.
diff --git a/commands/multi-execute.md b/commands/multi-execute.md
index 45efb4cde..57ac4486e 100644
--- a/commands/multi-execute.md
+++ b/commands/multi-execute.md
@@ -1,3 +1,7 @@
+---
+description: Execute a multi-model implementation plan while preserving Claude as the only filesystem writer.
+---
+
# Execute - Multi-Model Collaborative Execution
Multi-model collaborative execution - Get prototype from plan → Claude refactors and implements → Multi-model audit and delivery.
diff --git a/commands/multi-frontend.md b/commands/multi-frontend.md
index cd74af44a..61f7c9a10 100644
--- a/commands/multi-frontend.md
+++ b/commands/multi-frontend.md
@@ -1,3 +1,7 @@
+---
+description: Run a frontend-focused multi-model workflow for components, layouts, animation, and UI polish.
+---
+
# Frontend - Frontend-Focused Development
Frontend-focused workflow (Research → Ideation → Plan → Execute → Optimize → Review), Gemini-led.
diff --git a/commands/multi-plan.md b/commands/multi-plan.md
index a899059fc..592ebff80 100644
--- a/commands/multi-plan.md
+++ b/commands/multi-plan.md
@@ -1,3 +1,7 @@
+---
+description: Create a multi-model implementation plan without modifying production code.
+---
+
# Plan - Multi-Model Collaborative Planning
Multi-model collaborative planning - Context retrieval + Dual-model analysis → Generate step-by-step implementation plan.
diff --git a/commands/multi-workflow.md b/commands/multi-workflow.md
index 52509d51c..32687ff98 100644
--- a/commands/multi-workflow.md
+++ b/commands/multi-workflow.md
@@ -1,3 +1,7 @@
+---
+description: Run a full multi-model development workflow with research, planning, execution, optimization, and review.
+---
+
# Workflow - Multi-Model Collaborative Development
Multi-model collaborative development workflow (Research → Ideation → Plan → Execute → Optimize → Review), with intelligent routing: Frontend → Gemini, Backend → Codex.
diff --git a/commands/pm2.md b/commands/pm2.md
index 27e614d71..5a9c35d7e 100644
--- a/commands/pm2.md
+++ b/commands/pm2.md
@@ -1,3 +1,7 @@
+---
+description: Analyze a project and generate PM2 service commands for detected frontend, backend, or database services.
+---
+
# PM2 Init
Auto-analyze project and generate PM2 service commands.
diff --git a/commands/quality-gate.md b/commands/quality-gate.md
index dd0e24d02..2cccb4cb2 100644
--- a/commands/quality-gate.md
+++ b/commands/quality-gate.md
@@ -1,3 +1,7 @@
+---
+description: Run the ECC quality pipeline for a file or project scope and report remediation steps.
+---
+
# Quality Gate Command
Run the ECC quality pipeline on demand for a file or project scope.
diff --git a/commands/refactor-clean.md b/commands/refactor-clean.md
index d336669f0..781a57853 100644
--- a/commands/refactor-clean.md
+++ b/commands/refactor-clean.md
@@ -1,3 +1,7 @@
+---
+description: Safely identify and remove dead code with verification after each change.
+---
+
# Refactor Clean
Safely identify and remove dead code with test verification at every step.
diff --git a/commands/test-coverage.md b/commands/test-coverage.md
index 41338160a..0af60e88b 100644
--- a/commands/test-coverage.md
+++ b/commands/test-coverage.md
@@ -1,3 +1,7 @@
+---
+description: Analyze coverage, identify gaps, and generate missing tests toward the target threshold.
+---
+
# Test Coverage
Analyze test coverage, identify gaps, and generate missing tests to reach 80%+ coverage.
diff --git a/commands/update-codemaps.md b/commands/update-codemaps.md
index 69a7993ce..a0670aed0 100644
--- a/commands/update-codemaps.md
+++ b/commands/update-codemaps.md
@@ -1,3 +1,7 @@
+---
+description: Scan project structure and generate token-lean architecture codemaps.
+---
+
# Update Codemaps
Analyze the codebase structure and generate token-lean architecture documentation.
diff --git a/commands/update-docs.md b/commands/update-docs.md
index 94fbfa875..a75f2332c 100644
--- a/commands/update-docs.md
+++ b/commands/update-docs.md
@@ -1,3 +1,7 @@
+---
+description: Sync documentation from source-of-truth files such as scripts, schemas, routes, and exports.
+---
+
# Update Documentation
Sync documentation with the codebase, generating from source-of-truth files.
diff --git a/tests/commands/command-frontmatter.test.js b/tests/commands/command-frontmatter.test.js
new file mode 100644
index 000000000..06666c717
--- /dev/null
+++ b/tests/commands/command-frontmatter.test.js
@@ -0,0 +1,64 @@
+'use strict';
+
+const assert = require('assert');
+const fs = require('fs');
+const path = require('path');
+
+const repoRoot = path.resolve(__dirname, '..', '..');
+const commandsDir = path.join(repoRoot, 'commands');
+
+let passed = 0;
+let failed = 0;
+
+function test(name, fn) {
+ try {
+ fn();
+ console.log(` PASS ${name}`);
+ passed++;
+ } catch (error) {
+ console.log(` FAIL ${name}`);
+ console.log(` Error: ${error.message}`);
+ failed++;
+ }
+}
+
+function getCommandFiles() {
+ return fs.readdirSync(commandsDir)
+ .filter(fileName => fileName.endsWith('.md'))
+ .sort();
+}
+
+function parseFrontmatter(content) {
+ if (!content.startsWith('---\n')) {
+ return null;
+ }
+
+ const endIndex = content.indexOf('\n---', 4);
+ if (endIndex === -1) {
+ return null;
+ }
+
+ return content.slice(4, endIndex);
+}
+
+console.log('\n=== Testing command frontmatter metadata ===\n');
+
+for (const fileName of getCommandFiles()) {
+ test(`${fileName} declares command metadata frontmatter`, () => {
+ const content = fs.readFileSync(path.join(commandsDir, fileName), 'utf8');
+ const frontmatter = parseFrontmatter(content);
+
+ assert.ok(frontmatter, 'Expected command file to start with YAML frontmatter');
+ assert.ok(
+ /^description:\s*\S/m.test(frontmatter),
+ 'Expected command frontmatter to include a non-empty description'
+ );
+ });
+}
+
+if (failed > 0) {
+ console.log(`\nFailed: ${failed}`);
+ process.exit(1);
+}
+
+console.log(`\nPassed: ${passed}`);