Skip to content

Commit cf6d3a2

Browse files
authored
Merge pull request xencon#1704 from sbadakhc/issue-1703/fix-opencode-agent-ids
Derive OpenCode agent ids from filenames (xencon#1703)
2 parents 1f23ee0 + 2b64a87 commit cf6d3a2

4 files changed

Lines changed: 8 additions & 20 deletions

File tree

.opencode/agents/README.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

.opencode/agents/agent-context.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
name: AIXCL Context Agent
32
description: Primary agent for AIXCL development with full project context, governance rules, and Issue-First workflow enforcement
43
mode: primary
54
---

.opencode/agents/reviewer.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
name: AIXCL Reviewer
32
description: Read-only pre-PR self-review. Invoke before opening any PR to catch convention violations, scope creep, and missed checks. Cannot edit files or change state.
43
mode: subagent
54
temperature: 0.1

scripts/checks/check-agents.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,14 @@ check_agents() {
5959
local frontmatter
6060
frontmatter=$(awk '/^---$/{flag=1; next} /^---$/{flag=0} flag' "$agent_file")
6161

62-
# Check required fields
63-
if ! echo "$frontmatter" | grep -q "^name:"; then
64-
error "$basename: Missing 'name' field in frontmatter"
62+
# Check required fields.
63+
# NOTE: 'name' must NOT be present -- OpenCode uses it to
64+
# override the filename-derived agent identifier, which breaks
65+
# every reference to the agent (command agent fields,
66+
# default_agent in opencode.json). Identifiers come from
67+
# filenames only. See issue #1703.
68+
if echo "$frontmatter" | grep -q "^name:"; then
69+
error "$basename: 'name' field present in frontmatter (overrides the filename-derived agent id; remove it)"
6570
fi
6671
if ! echo "$frontmatter" | grep -q "^description:"; then
6772
error "$basename: Missing 'description' field in frontmatter"

0 commit comments

Comments
 (0)