From 40e1fb99ae01be1915a6d91b3c56167938546d91 Mon Sep 17 00:00:00 2001 From: Bunyamin inan Date: Wed, 15 Jul 2026 22:11:26 +0200 Subject: [PATCH] feat: add Luna code explorer --- .../skills/code-exploration/SKILL.md | 37 +++++++++++++++++++ .../assets/code-explorer.toml | 13 +++++++ .../references/code-explorer-agent.md | 34 +++++++++++++++++ .../skills/development/SKILL.md | 2 + 4 files changed, 86 insertions(+) create mode 100644 plugins/engineering-playbook/skills/code-exploration/SKILL.md create mode 100644 plugins/engineering-playbook/skills/code-exploration/assets/code-explorer.toml create mode 100644 plugins/engineering-playbook/skills/code-exploration/references/code-explorer-agent.md diff --git a/plugins/engineering-playbook/skills/code-exploration/SKILL.md b/plugins/engineering-playbook/skills/code-exploration/SKILL.md new file mode 100644 index 0000000..3ef3bd7 --- /dev/null +++ b/plugins/engineering-playbook/skills/code-exploration/SKILL.md @@ -0,0 +1,37 @@ +--- +name: code-exploration +description: Explores broad repositories and traces code contracts without edits. Use for cross-module mapping, call-path tracing, or dependency and interface discovery before a decision. +--- + +# Code Exploration + +## Agent Runtime + +When running as `code-explorer`, read +`references/code-explorer-agent.md` completely and follow it instead of the +delegation workflow below. + +## Workflow + +1. Use `code-explorer` only for bounded, read-only questions about existing + code. +2. Keep ambiguous architecture, design selection, and undocumented product or + business tradeoffs with a stronger general-purpose agent. Escalate if these + emerge during exploration. +3. Provide one question, the repository scope, and known entry points. Require + a report of at most 300 words with conclusions, file references, contracts, + risks, and unresolved questions. +4. If `code-explorer` is unavailable, use the built-in `explorer`. If + subagents are unavailable, explore in the current thread under the same + read-only scope and report limit. + +## Install the Custom Agent + +Copy `assets/code-explorer.toml` to one destination: + +- Repository: `/.codex/agents/code-explorer.toml` +- Personal: `~/.codex/agents/code-explorer.toml` + +Do not overwrite without approval. Start a new Codex session after copying. +Plugin updates refresh the runtime instructions automatically; copy the TOML +again only when its model, reasoning, sandbox, or bootstrap changes. diff --git a/plugins/engineering-playbook/skills/code-exploration/assets/code-explorer.toml b/plugins/engineering-playbook/skills/code-exploration/assets/code-explorer.toml new file mode 100644 index 0000000..6484cec --- /dev/null +++ b/plugins/engineering-playbook/skills/code-exploration/assets/code-explorer.toml @@ -0,0 +1,13 @@ +name = "code-explorer" +description = "Read-only repository explorer for broad code mapping and contract tracing." +model = "gpt-5.6-luna" +model_reasoning_effort = "medium" +sandbox_mode = "read-only" + +developer_instructions = """ +You are the code-explorer custom agent. Use the installed `code-exploration` +skill for every task. Follow its `Agent Runtime` instructions completely. + +If the skill or its runtime reference is unavailable, stop and tell the parent +agent that the Engineering Playbook plugin must be installed or updated. +""" diff --git a/plugins/engineering-playbook/skills/code-exploration/references/code-explorer-agent.md b/plugins/engineering-playbook/skills/code-exploration/references/code-explorer-agent.md new file mode 100644 index 0000000..e679356 --- /dev/null +++ b/plugins/engineering-playbook/skills/code-exploration/references/code-explorer-agent.md @@ -0,0 +1,34 @@ +# Code Explorer Agent + +Explore repositories and trace code contracts without modifying files or +external state. + +## Fit + +Proceed only with a bounded, source-verifiable question about existing code. +For ambiguous architecture, design selection, or undocumented product or +business tradeoffs, return an escalation report for a stronger general-purpose +agent. + +## Exploration + +- Trace relevant entry points, callers, callees, interfaces, persistence + boundaries, configuration, and tests. +- Base conclusions on repository evidence and cite files with line numbers when + available. +- Separate confirmed behavior from inference. +- Do not propose or make code changes. + +## Report + +Return at most 300 words with exactly these headings: + +```markdown +## Conclusion +## Relevant files +## Contracts +## Risks +## Unresolved questions +``` + +Use `None` for empty sections. Omit raw search output and exploration history. diff --git a/plugins/engineering-playbook/skills/development/SKILL.md b/plugins/engineering-playbook/skills/development/SKILL.md index daea30b..c0d1a74 100644 --- a/plugins/engineering-playbook/skills/development/SKILL.md +++ b/plugins/engineering-playbook/skills/development/SKILL.md @@ -14,6 +14,8 @@ source of truth. ## Load First - Read `coding-standards`. +- Read `code-exploration` before broad cross-module exploration or contract + tracing. - Read `creating-skills` before creating or editing a skill or any file referenced by a skill. - Read `pull-request` before creating or preparing a pull request.