Skip to content

AIContext v0.3.0

Pre-release
Pre-release

Choose a tag to compare

@mortylen mortylen released this 02 Nov 18:32
· 82 commits to main since this release

AIContext 0.3.0

AIContext 0.3.0 makes the CLI safer to run, makes validate check what the specification promises, and lets you keep context small with scoped rules and a split export layout.

Highlights

  • Deterministic, safe exports. Generated headers no longer contain a timestamp (they carry a Source-hash instead), output always uses LF, and unchanged files are not rewritten. export never overwrites a file it did not generate unless you pass --force. New --dry-run and --check (exit code 1 when exports are out of date) make it CI-friendly.
  • Real validation. aicontext validate now evaluates context.json against the JSON Schema embedded in the tool, warns about missing or empty recommended files, reports the Core or Extended profile, and scans .aicontext/ for secrets (the value is never printed). --strict turns warnings into errors.
  • Scoped rules and split layout. Put guidance that only matters for part of the code in .aicontext/rules/*.md (paths / description frontmatter) and set exports.layout: "split". Always-on content stays in a small main file; scoped and on-demand content is exported as native rule files for Cursor, Copilot, Claude Code and Windsurf/Devin.
  • aicontext status. Shows how much context each tool loads (always on vs. scoped/on-demand, estimated tokens) and whether exports are in sync.
  • .NET 9 and .NET 10. All packages and the aicontext tool target net9.0;net10.0.

New

  • exports.layout (single | split) and export --layout.
  • .aicontext/rules/*.md rules with paths and description frontmatter (SPEC 4.4).
  • devin export target (.devin/rules/). Opt-in: not part of the default all set, and validate warns when windsurf and devin are both enabled because Devin also loads .windsurf/rules.
  • exports.nestedAgents (split layout): rules scoped to an exact directory are written to nested <directory>/AGENTS.md files, for tools that only read AGENTS.md. Other rules stay in the root file; status explains why.
  • export --dry-run, export --check, validate --strict, status.
  • Generated rule files are named aicontext-<name>; orphaned generated files are removed, your own files are never touched.
  • SPEC 6.3 (safe overwrite) and 6.4 (layouts), updated 6.1, 6.2, 7 and 10.

Changed

  • Generated headers: Generated: <timestamp> was replaced by Source-hash: sha256:<hex>. Existing generated files are refreshed once on the next export.
  • validate error messages now have the form context.json <json-pointer>: <message>.
  • The "local schema file not found" warning was removed (the schema is embedded).
  • Library API (AIContext package): ContextExporter.Build* no longer take a timestamp, ContextValidator.ValidateDirectory(basePath, canonicalSchemaUrl) has a simpler signature, and ContextValidationResult exposes ExtendedProfile instead of LocalSchemaPath.
  • Repository CI now runs aicontext validate --strict and aicontext export --target all --check; the PowerShell validation script was removed.

Fixed

  • Boolean CLI flags without a value (for example init --force) were treated as false.

Upgrade notes

dotnet tool update --global AIContext.CLI
aicontext export --target all   # refreshes headers (no more timestamp)
aicontext validate              # new warnings may appear for missing recommended files
  • If you used the generated timestamp for anything, switch to the Source-hash.
  • If CI compares generated files, replace custom checks with aicontext export --target all --check.
  • The tool installs on either .NET 9 or .NET 10 runtimes.

Known limitations

  • Per-tool rule formats were verified against vendor documentation, not yet against every tool in real projects.
  • Copilot and Claude keep on-demand (description-only) content in their main file; only path-scoped rules are split for them.
  • Tools that read AGENTS.md and their own rule files (Copilot, Cursor, Devin) can see content twice when agents is exported together with their native targets.
  • Secret detection is heuristic and does not replace a dedicated secret scanner.