Skip to content

AIContext 0.6.0

Pre-release
Pre-release

Choose a tag to compare

@mortylen mortylen released this 09 Nov 19:28
· 28 commits to main since this release
48b973f

AIContext 0.6.0

AIContext 0.6.0 closes the gaps found while testing 0.5.0. The export is safer when a plan is applied later or a link points into another project, dropped targets no longer leave leftovers unnoticed, the rules of context.json are stated in the specification itself, and the documentation says what each tool really needs (Aider and Copilot in VS Code need a step of their own). The format does not change: specVersion stays 0.1.0, and no context.json that was valid before is rejected.

Highlights

  • A stale export plan is refused. ExportService.Apply used to write a previously prepared plan without looking at the disk again. A hand-written file created after planning was overwritten without --force, and a directory replaced by a junction after planning let the old plan write outside the project. Apply now verifies every file again before it writes anything (path still inside the project, file still in the state it was planned for) and creates new files exclusively. A problem is reported as AIC4103 (or AIC4102), nothing is written, and the CLI exits with 1. This matters most for editor integrations that show a plan before applying it; normal CLI use is unchanged.
  • A link can no longer carry an export into a separate project. A junction or symlink in a parent project that pointed into a nested project (a directory with its own .aicontext/) bypassed the project boundary, and the parent export created files there. The boundary is now checked on the real location as well (AIC4104), for every target and for deletions.
  • A warning for leftovers of a dropped target. After a target is removed from exports.targets, its generated files stay on disk, and a tool can keep loading them. export --target all (also with --check) and status now print one warning per such target (AIC4201) with the leftover files and the tools that also read them. It never blocks and never changes an exit code; nothing is deleted automatically.
  • The rules of context.json are in the specification. New SPEC 5.1 (every property with its rule) and 5.2 (the two rules a JSON Schema evaluator does not enforce by default: defaultTarget must be listed in targets, and lastReviewed must be a real date). The conformance suite now names the SPEC section of every case, and a test checks that SPEC 5.1 describes every property of the schema.
  • Better help for existing projects and for tool setup. aicontext init also finds hand-written rule files and nested AGENTS.md, and says that they stay active next to the generated ones. The user manual has a new section "Does my tool read the generated file?": Aider needs aider --read CONVENTIONS.md (or read: CONVENTIONS.md in .aider.conf.yml), Copilot in VS Code depends on the selected agent and its settings, and Claude Code, Cursor, Windsurf/Devin and tools that read AGENTS.md are summarized.

New

  • AIC4103 (stale export plan), AIC4104 (a link leads into a separate project) and AIC4201 (generated files of a target that is not exported any more); all are listed in the user manual.
  • Library: ExportResult.Diagnostics / HasErrors, ExportFilePlan.ExistingHash / ReasonCode, StaleExportPlanException, SchemaIssue.Keyword.
  • Conformance suite: 24 cases (6 valid, 18 invalid), each with the SPEC section it follows from.
  • Earlier unreleased work is included: aicontext status shows the overlap between exported files, validate reports obvious placeholder text (AIC1107), validate --strict fails for starter placeholders, and the README and the website were reworked around the problem, the result and safe adoption.

Changed

  • SPEC 5.1 and 5.2 are new; SPEC 6.3 (verify a plan again before writing) and 6.4 (separate projects also behind links) are clarified. The schema now requires a non-whitespace character in project.name (the reference implementation rejected such names before, as AIC1005, which is still the code reported).
  • validate --strict fails for a project that still contains starter placeholders; a plain validate still passes.

Upgrade notes

dotnet tool update --global AIContext.CLI
aicontext --version
  • If your CI runs aicontext validate --strict on a project created with aicontext init --profile extended, it fails until the TODO placeholders are replaced (as already announced for the unreleased changes).
  • If export now warns that a target "is not exported (exports.targets), but its generated files are still on disk", delete the listed files or add the target back. The warning does not change the exit code.
  • If you use Aider, start it with aider --read CONVENTIONS.md or add read: CONVENTIONS.md to .aider.conf.yml.
  • Library users: recompile your program. ExportFilePlan, SchemaIssue and ExportResult gained members, and ExportService.Apply can return a result with errors (check HasErrors). Plans built by hand without ExistingHash are treated as stale when the file exists.

Known limitations

  • The new link checks were verified with junctions on Windows; the Linux/macOS symlink case uses the same code path and runs in CI. The gap between the last check and the write of an existing file is not closed (it would need handle-based opening that .NET does not offer portably); see D12.
  • The tool table in the user manual follows the vendors' documentation as of November 2026. Tools change quickly, so check their documentation when a file is not picked up.
  • Detection of existing instruction files covers the main files, the tools' rule directories and nested AGENTS.md; older formats (for example .cursorrules) are not searched.
  • Secret detection and placeholder detection are heuristics; neither says whether the content is useful or up to date.