Skip to content

feat: add L2 constructs (Agent, Skill, Prompt, BuiltInTool, Shell)#3

Merged
alxbello merged 7 commits into
mainfrom
feat/l2-tool-config
Apr 23, 2026
Merged

feat: add L2 constructs (Agent, Skill, Prompt, BuiltInTool, Shell)#3
alxbello merged 7 commits into
mainfrom
feat/l2-tool-config

Conversation

@alxbello
Copy link
Copy Markdown
Member

Summary

Adds an opinionated L2 layer on top of the existing L1 constructs with builder-style APIs, sensible defaults, and composition patterns.

What's new

  • Agent — wraps CfgAgent, accepts ToolConfig objects and decomposes them into tools/allowedTools/toolsSettings. Builder methods: addTool, addSkill, addPrompt, addMcpServer, addHook, addResource.
  • Skill — synthesizes skills/{name}/SKILL.md with YAML frontmatter + assets. Static factory: Skill.fromDirectory().
  • Prompt — wraps CfgPrompt with appendContent() and Prompt.fromFile() factory.
  • BuiltInTool — typed factories for all 9 Kiro built-in tools.
  • Shell — permission helpers (git.readonly(), npm.scripts(), etc.) that expand to regex patterns.
  • Agent + Skill/Prompt wiring — addSkill() registers skill:// resource URI, addPrompt() registers file:// resource URI per the Kiro CLI config reference.

Tests

29 passing — tool factories, agent decomposition, skill synthesis, prompt synthesis, skill/prompt registration.

alxbello and others added 7 commits April 23, 2026 01:16
…issions

Co-authored-by: Kiro Agent <244629292+kiro-agent@users.noreply.github.com>
- Agent L2 wraps CfgAgent with builder-style composition
- ToolConfig interface + BuiltInTool factories for all 9 built-in tools
- Shell permission helpers (git, npm, files) with regex patterns
- Agent decomposes ToolConfig into tools/allowedTools/toolsSettings
- Builder methods: addTool, addMcpServer, addHook, addResource
- Lazy deferred rendering, deep-merge with array concat, deduplication

Co-authored-by: Kiro Agent <244629292+kiro-agent@users.noreply.github.com>
Co-authored-by: Kiro Agent <244629292+kiro-agent@users.noreply.github.com>
@alxbello alxbello merged commit d969ecf into main Apr 23, 2026
5 checks passed
@alxbello alxbello deleted the feat/l2-tool-config branch April 23, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant