Skip to content

Doctor: Port agent-neutral check to TypeScript #78

@normenmueller

Description

@normenmueller

Context

Migrate the scaffold check cli/src/lib/doctor/_scaffold/checks/agent-neutral.sh to a native TypeScript module at cli/src/lib/doctor/checks/agent-neutral.ts.

Acceptance Criteria

  • cli/src/lib/doctor/checks/agent-neutral.ts exports validate(corpusRoot: string): DiagnosticResult[]
  • Check verifies that no capability artifact (.md or .meta.yaml) references a specific agent name
  • Pattern matching replicates the shell script's grep logic in TypeScript
  • ai4x doctor invokes the new check (replaces scaffold invocation)
  • Scaffold counterpart (agent-neutral.sh) deleted after port
  • Tests cover: clean capability (pass), capability mentioning agent name (fail), edge cases (agent name in distinguish_from context)

Technical Notes

  • Pure function: corpus path in, diagnostics out
  • DiagnosticResult schema as defined in the doctor module
  • The shell script uses grep/find; TypeScript port must replicate the same glob + pattern logic
  • Reference implementation: cli/src/lib/doctor/_scaffold/checks/agent-neutral.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    storyStory: implementable unit of work within an Epic

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions