Fission-AI/OpenSpec · error
Some rules for ' ' are empty strings, ignoring them
Error message
Some rules for '${artifactId}' are empty strings, ignoring them What it means
Warning from readProjectConfig while parsing config rules: an artifact's rules array contained empty strings, which are dropped. Remaining valid rules are kept, so this reports partial cleanup of the rules.<artifactId> list rather than rejecting the artifact's rules entirely.
Solutions
- Delete blank entries from the artifact's rules list
- Replace empty strings with real rule text
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/core/project-config.ts:337 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/74d20bb032b02698.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/project-config.ts:337
// Artifact ids are intentionally not restricted to the built-in naming
// convention, so keys such as "constructor" remain valid for custom
// schemas. A null-prototype map preserves those keys as data without
// letting "__proto__" mutate the lookup object's prototype.
const parsedRules: Record<string, string[]> = Object.create(null);
let hasValidRules = false;
for (const [artifactId, rules] of Object.entries(raw.rules)) {
const rulesArrayResult = z.array(z.string()).safeParse(rules);
if (rulesArrayResult.success) {
// Filter out empty strings
const validRules = rulesArrayResult.data.filter((r) => r.length > 0);
if (validRules.length > 0) {
parsedRules[artifactId] = validRules;
hasValidRules = true;
}
if (validRules.length < rulesArrayResult.data.length) {
console.warn(
`Some rules for '${artifactId}' are empty strings, ignoring them`
);
}
} else {
console.warn(
`Rules for '${artifactId}' must be an array of strings, ignoring this artifact's rules`
);
}
}
if (hasValidRules) {
config.rules = parsedRules;
}
} else {
console.warn(`Invalid 'rules' field in config (must be object)`);
}
}
View on GitHub (pinned to 6926ccb18a)