Skip to content

Commit 2b143c6

Browse files
committed
feat: add readonly tuple type and JSDoc for REQUIRED_KEYWORDS constant
Signed-off-by: leocavalcante <[email protected]>
1 parent d63d170 commit 2b143c6

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

src/paths.d.mts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@ export declare const AGENT_NAMES: string[]
1919
/** Minimum character count for valid agent files */
2020
export declare const MIN_CONTENT_LENGTH: number
2121

22-
/** Keywords that should appear in valid agent files (case-insensitive) */
23-
export declare const REQUIRED_KEYWORDS: string[]
22+
/**
23+
* Keywords that should appear in valid agent files (case-insensitive).
24+
*
25+
* These specific keywords were chosen because they indicate the file contains
26+
* agent-related content:
27+
* - "agent": Identifies the file as defining or describing an agent
28+
* - "task": Indicates the file contains task execution logic or instructions
29+
*
30+
* At least one of these keywords must be present for content validation to pass.
31+
*/
32+
export declare const REQUIRED_KEYWORDS: readonly ["agent", "task"]
2433

2534
/** Required fields in YAML frontmatter */
2635
export declare const REQUIRED_FRONTMATTER_FIELDS: string[]

src/paths.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ export const AGENT_NAMES = ["opencoder", "opencoder-planner", "opencoder-builder
2525
/** Minimum character count for valid agent files */
2626
export const MIN_CONTENT_LENGTH = 100
2727

28-
/** Keywords that should appear in valid agent files (case-insensitive) */
28+
/**
29+
* Keywords that should appear in valid agent files (case-insensitive).
30+
*
31+
* These specific keywords were chosen because they indicate the file contains
32+
* agent-related content:
33+
* - "agent": Identifies the file as defining or describing an agent
34+
* - "task": Indicates the file contains task execution logic or instructions
35+
*
36+
* At least one of these keywords must be present for content validation to pass.
37+
*/
2938
export const REQUIRED_KEYWORDS = ["agent", "task"]
3039

3140
/** Required fields in YAML frontmatter */

0 commit comments

Comments
 (0)