mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-01 00:50:00 +08:00
fix: add command metadata frontmatter
This commit is contained in:
parent
a374eaf49d
commit
01d3743a8c
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
64
tests/commands/command-frontmatter.test.js
Normal file
64
tests/commands/command-frontmatter.test.js
Normal file
@ -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}`);
|
||||
Loading…
x
Reference in New Issue
Block a user