Skip to content

fix(agents): replace broken relative protocol paths with Glob patterns#150

Open
xiaolai wants to merge 1 commit intotanweai:mainfrom
xiaolai:fix/nlpm-agent-protocol-paths
Open

fix(agents): replace broken relative protocol paths with Glob patterns#150
xiaolai wants to merge 1 commit intotanweai:mainfrom
xiaolai:fix/nlpm-agent-protocol-paths

Conversation

@xiaolai
Copy link
Copy Markdown

@xiaolai xiaolai commented Apr 26, 2026

Automated audit: This PR was generated by NLPM, a natural language programming linter, running via claude-code-action. Please evaluate the diff on its merits.

What's broken

agents/tech-lead-p9.md, agents/cto-p10.md, and agents/senior-engineer-p7.md all contain instructions like:

cat 同目录下的 references/p9-protocol.md

These paths assume the agent file's directory is the working directory. In practice, Claude agents are loaded from the plugin install path, not the repository's agents/ subdirectory — so 同目录下的 references/ resolves to a directory that does not contain the protocol files. The actual files live at:

skills/pua/references/p9-protocol.md
skills/pua/references/p10-protocol.md
skills/pua/references/p7-protocol.md

When the path fails, Claude silently skips the methodology load and proceeds without the P7/P9/P10 protocol — the core behavioral spec for each persona level. This is a silent failure: no error, just missing context.

Fix

Replace every cat 同目录下的 references/p{7,9,10}-protocol.md with the same Glob-search pattern already used correctly in senior-engineer-p7.md for SKILL.md loading:

用 Glob 搜索 **/pua/skills/pua/references/p9-protocol.md,找到后用 Read 读取

This is a five-word change per file, fully mechanical, and consistent with the existing loading convention in the codebase.

agents/tech-lead-p9.md, agents/cto-p10.md, and agents/senior-engineer-p7.md
all instructed Claude to `cat 同目录下的 references/p{7,9,10}-protocol.md`.
Agents run from a plugin context, not the `agents/` directory, so these
relative paths silently fail. The protocol files actually live at
`skills/pua/references/`. Replace every instance with the Glob search
pattern already used for SKILL.md loading in senior-engineer-p7.md.

Co-Authored-By: Claude Code <noreply@anthropic.com>
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.

2 participants