Skip to content

Add section-aware splitting to archcore import #16

Description

@ivklgn

Problem

Importing a source file as one large document loses structure. Ideally an import splits by heading into multiple correctly-typed documents (e.g. "Build commands" → a doc, "Architecture decision" → an adr). This needs a design decision on heuristic vs. LLM-assisted classification.

Expected result

archcore import can split a multi-section source into several typed documents, shown as a multi-document preview and created on confirm.

Impact

Produces a well-structured .archcore/ on import instead of one monolithic blob, so the imported context is immediately useful.

Scope

  • Agree the splitting strategy (start heuristic: split on ## headings; classify by keyword) — note classification may be better delegated to the agent via MCP than implemented in Go.
  • Emit a multi-document preview and create the set on confirm.
  • Document the mapping rules; add fixtures + tests.

Files: cmd/import.go (+ tests)

Acceptance: a multi-section source imports into several correctly-typed documents.

Status: needs design. Depends on the initial archcore import command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLI command surfaceenhancementNew feature or requestneeds-designRequires an RFC/design decision first

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions