From e173086bf5c99faee294df7f18f5ba79b42ce0b3 Mon Sep 17 00:00:00 2001 From: phravins Date: Tue, 16 Jun 2026 14:11:17 +0530 Subject: [PATCH] add(skill): added the debug,architect,deep-research mode --- .../agent-core/src/skill/builtin/architect.md | 15 +++++++++++++ .../agent-core/src/skill/builtin/architect.ts | 22 +++++++++++++++++++ .../agent-core/src/skill/builtin/debug.md | 15 +++++++++++++ .../agent-core/src/skill/builtin/debug.ts | 22 +++++++++++++++++++ .../src/skill/builtin/deep-research.md | 15 +++++++++++++ .../src/skill/builtin/deep-research.ts | 22 +++++++++++++++++++ .../agent-core/src/skill/builtin/index.ts | 9 ++++++++ 7 files changed, 120 insertions(+) create mode 100644 packages/agent-core/src/skill/builtin/architect.md create mode 100644 packages/agent-core/src/skill/builtin/architect.ts create mode 100644 packages/agent-core/src/skill/builtin/debug.md create mode 100644 packages/agent-core/src/skill/builtin/debug.ts create mode 100644 packages/agent-core/src/skill/builtin/deep-research.md create mode 100644 packages/agent-core/src/skill/builtin/deep-research.ts diff --git a/packages/agent-core/src/skill/builtin/architect.md b/packages/agent-core/src/skill/builtin/architect.md new file mode 100644 index 000000000..d96f14c86 --- /dev/null +++ b/packages/agent-core/src/skill/builtin/architect.md @@ -0,0 +1,15 @@ +--- +name: architect +description: Enter Architect mode. Use this command when you want the agent to design or explain the system architecture, design patterns, and structural layout of the project without immediately implementing code. +type: inline +--- + +# Architect Mode + +You are now in **Architect** mode. + +Your primary objective is to design, explain, or review the project's architecture. Follow these rules: +1. Provide a high-level system architecture, design patterns, and structural layout for the project or the specific feature requested. +2. Focus on component interactions, data flow, interface definitions, and overall system boundaries. +3. Use mermaid diagrams, clear lists, and structural explanations to convey the architecture. +4. Do **not** write implementation-level code unless specifically requested as a small example. Keep the focus on design. diff --git a/packages/agent-core/src/skill/builtin/architect.ts b/packages/agent-core/src/skill/builtin/architect.ts new file mode 100644 index 000000000..01a125681 --- /dev/null +++ b/packages/agent-core/src/skill/builtin/architect.ts @@ -0,0 +1,22 @@ +import { parseSkillText } from '../parser'; +import type { SkillDefinition } from '../types'; +import ARCHITECT_BODY from './architect.md?raw'; + +const PSEUDO_PATH = 'builtin://architect'; + +const parsed = parseSkillText({ + skillMdPath: '/builtin/skills/architect.md', + skillDirName: 'architect', + source: 'builtin', + text: ARCHITECT_BODY, +}); + +export const ARCHITECT_SKILL: SkillDefinition = { + ...parsed, + path: PSEUDO_PATH, + dir: PSEUDO_PATH, + metadata: { + ...parsed.metadata, + type: parsed.metadata.type ?? 'inline', + }, +}; diff --git a/packages/agent-core/src/skill/builtin/debug.md b/packages/agent-core/src/skill/builtin/debug.md new file mode 100644 index 000000000..cd75bc9ed --- /dev/null +++ b/packages/agent-core/src/skill/builtin/debug.md @@ -0,0 +1,15 @@ +--- +name: debug +description: Enter Debug mode. Use this command when you want the agent to focus solely on debugging an issue, analyzing logs/errors, and proposing a specific fix without implementing new features. +type: inline +--- + +# Debug Mode + +You are now in **Debug** mode. + +Your primary objective is to debug the current issue. Follow these rules: +1. Analyze the provided code, logs, or error messages carefully to identify the root cause of the bug. +2. Formulate a specific, targeted fix for the problem. +3. Do **not** implement new features, refactor unrelated code, or make sweeping architectural changes unless strictly necessary to fix the bug. +4. Explain the root cause clearly before proposing the fix. diff --git a/packages/agent-core/src/skill/builtin/debug.ts b/packages/agent-core/src/skill/builtin/debug.ts new file mode 100644 index 000000000..5bf058a64 --- /dev/null +++ b/packages/agent-core/src/skill/builtin/debug.ts @@ -0,0 +1,22 @@ +import { parseSkillText } from '../parser'; +import type { SkillDefinition } from '../types'; +import DEBUG_BODY from './debug.md?raw'; + +const PSEUDO_PATH = 'builtin://debug'; + +const parsed = parseSkillText({ + skillMdPath: '/builtin/skills/debug.md', + skillDirName: 'debug', + source: 'builtin', + text: DEBUG_BODY, +}); + +export const DEBUG_SKILL: SkillDefinition = { + ...parsed, + path: PSEUDO_PATH, + dir: PSEUDO_PATH, + metadata: { + ...parsed.metadata, + type: parsed.metadata.type ?? 'inline', + }, +}; diff --git a/packages/agent-core/src/skill/builtin/deep-research.md b/packages/agent-core/src/skill/builtin/deep-research.md new file mode 100644 index 000000000..16e934e7e --- /dev/null +++ b/packages/agent-core/src/skill/builtin/deep-research.md @@ -0,0 +1,15 @@ +--- +name: deep-research +description: Enter Deep Research mode. Use this command when you want the agent to focus solely on deeply researching a topic and outputting the findings as a markdown (.md) file. +type: inline +--- + +# Deep Research Mode + +You are now in **Deep Research** mode. + +Your primary objective is to thoroughly research the user's topic. Follow these rules: +1. Focus entirely on researching the topic comprehensively. +2. Formulate your findings into a detailed and well-structured report. +3. Output the final research findings as a markdown (`.md`) file saved in the project or workspace. +4. Do not make unrelated code changes or deviate from the research objective. diff --git a/packages/agent-core/src/skill/builtin/deep-research.ts b/packages/agent-core/src/skill/builtin/deep-research.ts new file mode 100644 index 000000000..db2019c23 --- /dev/null +++ b/packages/agent-core/src/skill/builtin/deep-research.ts @@ -0,0 +1,22 @@ +import { parseSkillText } from '../parser'; +import type { SkillDefinition } from '../types'; +import DEEP_RESEARCH_BODY from './deep-research.md?raw'; + +const PSEUDO_PATH = 'builtin://deep-research'; + +const parsed = parseSkillText({ + skillMdPath: '/builtin/skills/deep-research.md', + skillDirName: 'deep-research', + source: 'builtin', + text: DEEP_RESEARCH_BODY, +}); + +export const DEEP_RESEARCH_SKILL: SkillDefinition = { + ...parsed, + path: PSEUDO_PATH, + dir: PSEUDO_PATH, + metadata: { + ...parsed.metadata, + type: parsed.metadata.type ?? 'inline', + }, +}; diff --git a/packages/agent-core/src/skill/builtin/index.ts b/packages/agent-core/src/skill/builtin/index.ts index af06bb1e4..acf3ef9ca 100644 --- a/packages/agent-core/src/skill/builtin/index.ts +++ b/packages/agent-core/src/skill/builtin/index.ts @@ -8,6 +8,9 @@ import { SUB_SKILL_REVIEW, } from './sub-skill'; import { UPDATE_CONFIG_SKILL } from './update-config'; +import { DEEP_RESEARCH_SKILL } from './deep-research'; +import { DEBUG_SKILL } from './debug'; +import { ARCHITECT_SKILL } from './architect'; export function registerBuiltinSkills(registry: SkillRegistry): void { registry.registerBuiltinSkill(MCP_CONFIG_SKILL); @@ -17,6 +20,9 @@ export function registerBuiltinSkills(registry: SkillRegistry): void { registry.registerBuiltinSkill(SUB_SKILL_PARENT); registry.registerBuiltinSkill(SUB_SKILL_REVIEW); registry.registerBuiltinSkill(SUB_SKILL_CONSOLIDATE); + registry.registerBuiltinSkill(DEEP_RESEARCH_SKILL); + registry.registerBuiltinSkill(DEBUG_SKILL); + registry.registerBuiltinSkill(ARCHITECT_SKILL); } export { @@ -27,4 +33,7 @@ export { SUB_SKILL_PARENT, SUB_SKILL_REVIEW, UPDATE_CONFIG_SKILL, + DEEP_RESEARCH_SKILL, + DEBUG_SKILL, + ARCHITECT_SKILL, };