Skip to content

Releases

AIContext 0.7.0

Choose a tag to compare

@mortylen mortylen released this 12 Nov 19:11

AIContext 0.7.0

AIContext 0.7.0 makes export and init safe against links and ordinary I/O failures, gives the rule files in .aicontext/rules/ one exact grammar and one meaning of paths, refuses context sources that lead outside the project, and moves the release to a single verified workflow. It is not a drop-in update for every project: some input that was accepted before is an error now, and a few scopes mean something else. Read the upgrade notes first. The format of context.json does not change: specVersion stays 0.1.0, and no context.json that was valid before is rejected.

Highlights

  • Export and init can no longer be carried outside the project by a link. The path guard follows links one component at a time, so a link target such as alias/../x cannot make export write, overwrite or delete a file outside the project or inside a separate project. Two spellings that differ only by letter case count as one directory only when the directory listing shows one entry. init checks every destination before it writes the first file, creates new files exclusively, and --force never crosses the project boundary.
  • Sources outside the project are refused (AIC1008). A README.md, a section file, a rules/ directory or .aicontext/ itself that is a link leading outside the project used to be copied into AGENTS.md and the other generated files. It is now an error and the file is not read. Messages no longer repeat text that looks like a secret.
  • Ordinary I/O problems are diagnostics, and the output tells the truth. A directory where a generated file has to go (AIC4105) and a file that has to change but is locked or read-only (AIC4106) stop the run before the first write, also in --dry-run and --check (exit code 1), and status shows the target as blocked. A write that fails midway stops, and the output lists exactly what was written (Created/Updated/Removed) and what was not (Not written). An existing regular file is replaced through a temporary file, so a failed write does not leave it half-written. A file that is a symbolic link is the exception: it is overwritten in place and has no such protection. An export is not a transaction and nothing is rolled back.
  • Rule files have one exact grammar and one meaning. SPEC 4.4.1 defines the frontmatter subset: a header that cannot be read as written (an empty paths or description, a repeated key, a quote that is not closed) is an error instead of a silently broader, always-on rule. SPEC 4.4.2 defines paths: relative to the project root, *.ts is the root only, **/*.ts any depth, one level of {a,b}. A scope that a tool cannot be told (AIC4107) fails the export without writing anything instead of widening the rule.
  • A scoped Copilot rule is loaded only for its scope. The scoped .instructions.md file has applyTo alone; the description is a Description: line in the body, so it can no longer load the rule elsewhere in the Local harness.
  • A lone CR is a line break like LF and CRLF. A rule file with CR endings used to lose its header and become an always-on rule. LF and CRLF sources hash and export exactly as before.
  • One verified release. publish.yml, started from the release tag, checks the tag and versions, runs the checks of a pull request, packs the NuGet packages once, smoke-tests those exact files and the standalone binaries, and only then attaches the binaries to the release and pushes the packages. Nothing is replaced. See RELEASING.md.
  • Security model and SECURITY.md. The user manual states what the tool protects against and what it does not (not a sandbox, symbolic links and junctions only, an export is not a transaction, the secret lint is a heuristic), and SECURITY.md says how to report a vulnerability.

New

  • Diagnostic codes AIC1007, AIC1008, AIC2006, AIC2007, AIC2008, AIC4105, AIC4106 and AIC4107; all are listed in the user manual.
  • Library: ExportResult.Written, InitResult.Diagnostics / HasErrors, StaleExportPlanException.Reason, ExportOutput.Problem, TargetStatus.Problems, PortableGlob, ScopeTranslator, SecretScanner.Redact.
  • Conformance suite: language-neutral fixtures for rule files and for paths patterns (exact sets of matched files, and the patterns that are invalid).
  • The library README shows how to tell plan errors, Apply errors and the files that were really written apart.

Changed

  • SPEC 4.4.1 and 4.4.2 (rule files), 6.2 (line endings), 6.4 (a refused scope, and no description field where a tool documents it as a second trigger) and 10 (sources outside the project) are new or clarified. specVersion stays 0.1.0; rule files carry no version, so the change is recorded in SPEC 9.1 and in the changelog.
  • ExportResult.Unchanged counts only files that were already up to date. ExportService.Plan can return errors for blocked destinations, and ProjectInitializer.Initialize can return diagnostics instead of writing.

Upgrade notes

dotnet tool update --global AIContext.CLI
aicontext --version
aicontext validate
aicontext export --target all
  • A source behind a link that leaves the project is refused with AIC1008. Keep the sources inside the project (a link into the project is fine).
  • Rule headers. An empty paths or description, a repeated key, a quote that is not closed and paths: "a", "b" are errors now (AIC2003, AIC2004, AIC2007). A # after whitespace starts a comment, in description too: description: Fix #12 is Fix, so write "Fix #12".
  • paths patterns. A pattern without / means the project root only for every tool; for Claude *.md used to mean any depth, so write **/*.md. **, src/, ./src/** and app/[id]/** are errors (AIC2008); write **/*, src/**, src/** and app/*/**. A comma in a pattern (Copilot, Cursor, Windsurf, Devin), and several patterns or a pattern without / for Windsurf and Devin, fail the export for that tool with AIC4107: rewrite the pattern, split the rule, or export without that target.
  • Copilot. The first aicontext export rewrites .github/instructions/aicontext-*.instructions.md (the description moves into the body). Commit the result.
  • Links. A link target with .. after another link can be refused (AIC4102, AIC4104) when the two ways to read it differ and one of them leaves the project. Use a target without .. after a link.
  • Library users: recompile. Check plan.HasErrors, result.HasErrors and InitResult.HasErrors, and use result.Written for what was really written.

Known limitations

  • A file that is a symbolic link is overwritten in place, so an interrupted write to it can leave the file it points to incomplete. An export is not a transaction.
  • The removal of a generated file that is no longer produced and is read-only is not found by the plan; on Windows it fails when it is made (AIC4106).
  • The checks assume that the file system does not change while the tool runs; a short gap between the last check and the write remains. A hard link cannot be told from a regular file, so a hard-linked source is read like any file.
  • The translations of paths for each tool follow the vendors' documentation as of November 2026; the tools were not run.

AIContext 0.6.0

AIContext 0.6.0 Pre-release
Pre-release

Choose a tag to compare

@mortylen mortylen released this 09 Nov 19:28
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.

AIContext 0.5.0

AIContext 0.5.0 Pre-release
Pre-release

Choose a tag to compare

@mortylen mortylen released this 08 Nov 08:57

AIContext 0.5.0

AIContext 0.5.0 hardens the CLI and the export. It fixes problems that could delete or write files outside the intended place, and problems that let a mistyped or broken invocation pass silently in CI. Some of the fixes change behavior that scripts may have relied on, so read Changed and Upgrade notes before updating.

Highlights

  • Safer export.
    • Export never writes or deletes outside the project through a symlink or junction. A path that leaves the project is reported as Blocked, nothing is written and the command fails.
    • Exporting a project no longer deletes the generated AGENTS.md of an independent AIContext project in a subdirectory (a directory with its own .aicontext/ is now a project boundary).
    • export and status refuse what validate reports as an error, for example an unsupported specVersion, a wrong type or an unknown property in context.json.
  • Strict CLI arguments. Unknown options, missing values, repeated options and non-boolean values after a flag are errors before anything runs. Previously validate --strcit passed without --strict, export --chek wrote files instead of checking them, and init --path --force ran in the current directory. aicontext <command> --help prints the usage of one command.
  • Secret scan without a size limit. The scanner skipped every file above 512 KiB silently. Files are now read line by line, and a file that cannot be scanned completely is reported as a warning (an error with --strict).
  • Stable diagnostic codes and ExportService. Every validation, rule, secret-scan and export problem has a code (AIC1001 ... AIC4102), a message and a location, and the new ExportService (Plan, Apply, Status) is the safe way to export from your own tools. The CLI now only parses arguments and prints.

New

  • aicontext <command> --help (also -h).
  • aicontext status shows blocked for a target whose files would leave the project through a link.
  • Library: Diagnostic, DiagnosticCodes, ExportService, ExportRequest, ExportPlan, StatusReport, SecretScanner.ScanDirectoryReport, ExportFileStatus.Blocked, SyncState.Blocked, ContextSchema.CanonicalUrl. The codes are listed in the user manual.
  • User manual: monorepo section (independent projects), safety rules of export, troubleshooting rows and the table of diagnostic codes.
  • Tests run in the PR checks on Ubuntu and Windows, and the CLI is tested in-process (about 250 tests in total).

Changed

  • Invalid CLI arguments are rejected with exit code 1 (see above). Flags still accept an explicit true / false / 1 / 0.
  • export and status stop on the errors that validate reports. Warnings (missing recommended files, possible secrets, ...) never block them.
  • Errors on the option level (unsupported target, missing target, unsupported layout) now have the ERROR: prefix and end with No files were written.
  • Library: ContextValidationResult, RuleLoadResult and ContextLoadResult carry a list of diagnostics. Errors and Warnings remain as views with the same messages; only code that constructs these records needs an update.
  • SPEC 6.3, 6.4, 7 and 10 are clarified (no writes outside the project, separate projects, export applies validation errors, the secret lint is a heuristic). The schema and specVersion (0.1.0) are unchanged, so existing context.json files stay valid.

Upgrade notes

dotnet tool update --global AIContext.CLI
aicontext --version
  • Check your scripts and CI for mistyped or unsupported options. They fail now instead of being ignored, and the message lists the valid options of the command.
  • If export now fails with ERROR: context.json ..., the file was accepted before although validate reports the same error. Fix it as aicontext validate shows.
  • If export reports Blocked, a symlink or junction inside the project leads out of it (for example .github). Replace the link with a real directory or point it inside the project.
  • Running export in a monorepo is now safe for nested projects. Run it in each project separately (or add one export --check per project to CI).
  • Library users: update code that constructs ContextValidationResult, RuleLoadResult or ContextLoadResult; use Diagnostics and the codes for machine-readable handling.
  • In CI you can keep using aicontext validate --strict and aicontext export --target all --check.

Known limitations

  • The link checks and the new tests were verified on Windows (junctions) and Linux (symlinks); macOS was not verified.
  • On Windows, an absolute link target written with a different 8.3 short-name form than the project path could be reported as outside the project (it fails closed).
  • Secret detection is heuristic and does not replace a dedicated secret scanner. Only .md, .mdc, .json, .yml, .yaml and .txt files are scanned.
  • The CLI does not print the diagnostic codes yet; they are available to library users.

AIContext v0.4.0

AIContext v0.4.0 Pre-release
Pre-release

Choose a tag to compare

@mortylen mortylen released this 04 Nov 13:12

AIContext 0.4.0

AIContext 0.4.0 makes the CLI easier to start with and to run day to day: --version, an extended init profile, and export that honors exports.defaultTarget. The standalone binaries are also about three times smaller.

Highlights

  • aicontext --version (also -v and version) prints the tool version and the specification version.
  • aicontext init --profile extended creates starter architecture.md, decisions.md and constraints.md next to README.md and context.json, so a new project passes validate --strict as the Extended profile right away. The default stays core.
  • export without --target. When exports.defaultTarget is set in context.json, aicontext export uses it. --target always takes precedence, all means the targets from exports.targets, and if neither is available the command fails with a message that names both options.
  • Smaller standalone binaries. Self-contained, single-file binaries are now published with partial trimming: about 11 MB instead of about 36 MB for Windows x64. No .NET installation is required.

New

  • aicontext --version, -v, version.
  • aicontext init --profile <core|extended>.
  • export falls back to exports.defaultTarget and prints Using exports.defaultTarget '<value>' from .aicontext/context.json.
  • ProjectInitializer in the AIContext library (the init logic moved out of the CLI).
  • Release smoke test for the standalone binaries now also covers --version, the extended profile and rejection of an invalid context.json.
  • English user manual on the website.

Changed

  • init checks all files it would create before writing anything: if any of them exists it reports every conflict and writes nothing (unless --force). Files are now written with LF line endings and without a BOM.
  • SPEC 6.1 now defines the meaning of exports.defaultTarget. The schema and specVersion (0.1.0) are unchanged, so existing context.json files stay valid.

Upgrade notes

dotnet tool update --global AIContext.CLI
aicontext --version
  • Nothing breaks: export without --target used to fail, so existing scripts are unaffected. If your context.json already contains exports.defaultTarget, aicontext export now acts on it.
  • In CI you can keep using aicontext export --target all --check.

Known limitations

  • Partial trimming was verified locally on Windows x64; the other platforms are verified by the release workflow.
  • Secret detection is heuristic and does not replace a dedicated secret scanner.
  • Per-tool rule formats were verified against vendor documentation, not yet against every tool in real projects.

AIContext v0.3.0

AIContext v0.3.0 Pre-release
Pre-release

Choose a tag to compare

@mortylen mortylen released this 02 Nov 18:32

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.

AIContext v0.2.0

AIContext v0.2.0 Pre-release
Pre-release

Choose a tag to compare

@mortylen mortylen released this 01 Nov 15:32

AIContext v0.2.0

First practical CLI release for AIContext with installable tooling, improved export behavior, and secure NuGet publishing.

What's new

  • Installable .NET tool

    • AIContext.CLI can now be installed globally:
    • dotnet tool install --global AIContext.CLI
    • Command: aicontext
  • export --target all now respects config

    • Uses exports.targets from .aicontext/context.json
    • Falls back to all supported targets when not configured
  • Trusted Publishing enabled

    • NuGet publishing now uses OIDC (NuGet/login@v1)
    • No long-lived NUGET_API_KEY secret required
  • Validation and tests improved

    • Validation logic centralized in core library
    • Export target resolution extracted and tested
    • Expanded automated test coverage

Supported export targets

agents, copilot, claude, cursor, windsurf, aider, all

Quickstart

dotnet tool install --global AIContext.CLI
aicontext init --name my-project
aicontext validate
aicontext export --target all

Release status

This version is marked as a pre-release while broader cross-repository validation is being finalized.