Files
oh-my-pi/packages/coding-agent/src/capability/instruction.ts
T
can1357 779ca4872b style(deps): migrated from Prettier to Biome and updated formatting rules
- Removed Prettier configuration files (.prettierignore and .prettierrc) and migrated formatting to Biome.
- Updated Biome configuration from version 2.3.11 to 2.3.12 and changed arrowParentheses rule from 'always' to 'asNeeded'.
- Pinned @biomejs/biome dependency to exact version 2.3.12 in package.json and bun.lock.
- Applied consistent arrow function formatting across 489 files by removing unnecessary parentheses around single parameters.
- Removed blank lines after comment blocks and reorganized imports for consistency across the codebase.
2026-01-24 04:20:19 +01:00

37 lines
1012 B
TypeScript

/**
* Instructions Capability
*
* GitHub Copilot-style instructions with optional file pattern matching.
*/
import { defineCapability } from ".";
import type { SourceMeta } from "./types";
/**
* An instruction with optional file pattern matching.
*/
export interface Instruction {
/** Instruction name (derived from filename) */
name: string;
/** Absolute path to instruction file */
path: string;
/** Instruction content (markdown) */
content: string;
/** Glob pattern for files this applies to */
applyTo?: string;
/** Source metadata */
_source: SourceMeta;
}
export const instructionCapability = defineCapability<Instruction>({
id: "instructions",
displayName: "Instructions",
description: "File-specific instructions with glob pattern matching (GitHub Copilot format)",
key: inst => inst.name,
validate: inst => {
if (!inst.name) return "Missing name";
if (!inst.path) return "Missing path";
if (inst.content === undefined) return "Missing content";
return undefined;
},
});