Skip to content

Rework @scope42/data for Markdown frontmatter + workspace config #432

@erikhofer

Description

@erikhofer

Part of #430.

Convert packages/scope42-data from a YAML-whole-file parser into a format-agnostic frontmatter extractor driven by a workspace config.

Tasks

  • Write FORMAT.md spec: frontmatter fields per type, workspace config schema, extension agnosticism, wikilink semantics. See app/example for reference.
  • Define Zod schema for scope42.yaml (item types → paths + idPattern + optional description; global extensions list)
  • Trim item Zod schemas in packages/scope42-data/src/model/ to frontmatter fields only (drop description, context, drivers, options, outcome, deciders, comments from the schema)
  • Replace YAML-whole-file parser in packages/scope42-data/src/io/workspace.ts with a frontmatter extractor that works on any text file (e.g. gray-matter); do not hard-code Markdown
  • Workspace loader reads scope42.yaml, enumerates configured paths, filters by configured extensions, parses frontmatter, infers type from the source path
  • Expose parsed items as { id, type, frontmatter, body, filePath }body is returned as raw text, unparsed
  • Drop the current .yml-only assumption; ID derives from filename without extension
  • Migrate all app/example into a new directory example with the new format
  • Update @scope42/data README (see examples/data-processing for reference)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions