Description
I'm still seeing the "pattern" filename bug in 0.11.1 when importing/adding Claude agents from .claude/agents/*.md.
A Claude agent like:
.claude/agents/monorepo-navigator.md
gets added to the package as:
instead of something like:
agents/monorepo-navigator.md
Root cause (my take)
In platforms.jsonc, Claude import flow for agents is defined as an object with pattern + schema:
{
"from": {
"pattern": ".claude/agents/**/*.md",
"schema": "./schemas/formats/claude-agent.schema.json"
},
"to": {
"pattern": "agents/**/*.md",
"schema": "./schemas/formats/universal-agent.schema.json"
}
}
But in:
packages/core/src/core/platform/platform-mapper.ts
there is code that resolves flow.to like this:
} else if (typeof flow.to === 'object' && flow.to !== null) {
toPattern = Object.keys(flow.to)[0];
}
For a to object like:
{ pattern: "agents/**/*.md", schema: "..." }
Object.keys(flow.to)[0] becomes:
So OpenPackage ends up using "pattern" as the target path, which explains the generated file name.
Description
I'm still seeing the
"pattern"filename bug in0.11.1when importing/adding Claude agents from.claude/agents/*.md.A Claude agent like:
gets added to the package as:
instead of something like:
Root cause (my take)
In platforms.jsonc, Claude import flow for agents is defined as an object with pattern + schema:
{ "from": { "pattern": ".claude/agents/**/*.md", "schema": "./schemas/formats/claude-agent.schema.json" }, "to": { "pattern": "agents/**/*.md", "schema": "./schemas/formats/universal-agent.schema.json" } }But in:
there is code that resolves flow.to like this:
For a to object like:
Object.keys(flow.to)[0] becomes:
So OpenPackage ends up using "pattern" as the target path, which explains the generated file name.