Skip to content

feat(spec): graph validator and ref resolution in spec package (#8)#40

Merged
leo-aa88 merged 1 commit into
mainfrom
issue/8-spec-validator
Apr 11, 2026
Merged

feat(spec): graph validator and ref resolution in spec package (#8)#40
leo-aa88 merged 1 commit into
mainfrom
issue/8-spec-validator

Conversation

@leo-aa88
Copy link
Copy Markdown
Member

  • Move RefIndex/BuildRefIndex, MissingRefError, and ResolveReferences into internal/spec (refindex.go, resolve.go); project delegates for compatibility
  • Add ValidateProjectGraph(g, projectRoot): §9 metadata keys, tool transports, policy budgets/approvals, agent constraints, env overrides, schema file existence via schema.ResolveSchemaPath+os.Stat, then ResolveReferences
  • Aggregate failures with errors.Join; document exit code 2 for CLI (§11.2)
  • Tests: key mismatch, negative policy, workflow step shape, missing tool, missing schema, duplicate approvals, happy schema path

Closes #8

Made-with: Cursor

- Move RefIndex/BuildRefIndex, MissingRefError, and ResolveReferences into
  internal/spec (refindex.go, resolve.go); project delegates for compatibility
- Add ValidateProjectGraph(g, projectRoot): §9 metadata keys, tool transports,
  policy budgets/approvals, agent constraints, env overrides, schema file
  existence via schema.ResolveSchemaPath+os.Stat, then ResolveReferences
- Aggregate failures with errors.Join; document exit code 2 for CLI (§11.2)
- Tests: key mismatch, negative policy, workflow step shape, missing tool,
  missing schema, duplicate approvals, happy schema path

Closes #8

Made-with: Cursor
@leo-aa88 leo-aa88 merged commit a4679ae into main Apr 11, 2026
4 checks passed
@leo-aa88 leo-aa88 deleted the issue/8-spec-validator branch April 11, 2026 08:19
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.

[MVP] Spec validator — global + per-kind rules (internal/spec/validator.go)

1 participant