Fission-AI/OpenSpec · error
openspec/config.yaml is not a valid YAML object
Error message
openspec/config.yaml is not a valid YAML object
What it means
Error "openspec/config.yaml is not a valid YAML object" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/core/project-config.ts:278
* adding ~1-3ms total overhead. Caching would add complexity (mtime checks,
* invalidation logic) for negligible benefit. Direct reads also ensure config
* changes are reflected immediately without stale cache issues.
*
* @param projectRoot - The root directory of the project (where `openspec/` lives)
* @returns Parsed config or null if file doesn't exist
*/
export function readProjectConfig(projectRoot: string): ProjectConfig | null {
const configPath = resolveConfigFilePath(projectRoot);
if (configPath === null) {
return null; // No config is OK
}
try {
const content = readFileSync(configPath, 'utf-8');
const raw = parseYaml(content);
if (!raw || typeof raw !== 'object') {
console.warn(`openspec/config.yaml is not a valid YAML object`);
return null;
}
const config: Partial<ProjectConfig> = {};
// Parse schema field using Zod
const schemaField = z.string().min(1);
const schemaResult = schemaField.safeParse(raw.schema);
if (schemaResult.success) {
config.schema = schemaResult.data;
} else if (raw.schema !== undefined) {
console.warn(`Invalid 'schema' field in config (must be non-empty string)`);
}
// Parse context field with size limit
if (raw.context !== undefined) {
const contextField = z.string();
const contextResult = contextField.safeParse(raw.context);View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/core/project-config.ts:278 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/f92b7be068d1ad3e.
Report an issue: GitHub.