Skip to content

refactor(cli): narrow arkenv check and drop custom dotenv AST formatting parser #1717

Description

@yamcodes

Summary

Narrow arkenv check to its core mandate: validating runtime environment variables (process.env + overlays) against the declared TypeScript schema.

Remove internal .env AST formatting and syntax lint checks from packages/arkenv/src/features/check. File-level formatting, unquoted space detection, and syntax linting belong in dedicated ecosystem tools (e.g. dotenv-linter).

This supersedes ADR 0017 and aligns with the archived arkenv lint RFC in Discussion #1710.

Proposed Changes

  1. Simplify Dotenv Loading in features/check:
    • Strip custom AST coordinate tracking and formatting/syntax lint diagnostics.
    • Use standard key-value dotenv parsing solely to populate values for schema validation.
  2. Lock arkenv check Mandate:
    • arkenv check reports errors only when runtime values fail schema validation or required keys are missing.
  3. Update ADR 0017:
    • Mark docs/adr/0017-dotenv-linter-custom-parser-strategy.md as Superseded / Rejected in favor of focused runtime validation.
  4. Changeset:
    • Add a changeset for arkenv.

Acceptance Criteria

  • arkenv check runs schema validation on resolved environment variables without running custom AST formatting checks.
  • ADR 0017 status is updated to Superseded.
  • All arkenv check tests pass (pnpm test).
  • Changeset is included for arkenv.

Out of Scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    arkenvChanges to the `arkenv` npm package.enhancementNew feature or improvementready for agentFully specified, ready for immediate implementation

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions