Repository navigation
Releases
AIContext 0.7.0
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
initcan 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 asalias/../xcannot 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.initchecks every destination before it writes the first file, creates new files exclusively, and--forcenever crosses the project boundary. - Sources outside the project are refused (
AIC1008). AREADME.md, a section file, arules/directory or.aicontext/itself that is a link leading outside the project used to be copied intoAGENTS.mdand 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-runand--check(exit code 1), andstatusshows 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
pathsordescription, a repeated key, a quote that is not closed) is an error instead of a silently broader, always-on rule. SPEC 4.4.2 definespaths: relative to the project root,*.tsis the root only,**/*.tsany 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.mdfile hasapplyToalone; the description is aDescription: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. SeeRELEASING.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), andSECURITY.mdsays how to report a vulnerability.
New
- Diagnostic codes
AIC1007,AIC1008,AIC2006,AIC2007,AIC2008,AIC4105,AIC4106andAIC4107; 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
pathspatterns (exact sets of matched files, and the patterns that are invalid). - The library README shows how to tell plan errors,
Applyerrors 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
descriptionfield where a tool documents it as a second trigger) and 10 (sources outside the project) are new or clarified.specVersionstays0.1.0; rule files carry no version, so the change is recorded in SPEC 9.1 and in the changelog. ExportResult.Unchangedcounts only files that were already up to date.ExportService.Plancan return errors for blocked destinations, andProjectInitializer.Initializecan 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
pathsordescription, a repeated key, a quote that is not closed andpaths: "a", "b"are errors now (AIC2003,AIC2004,AIC2007). A#after whitespace starts a comment, indescriptiontoo:description: Fix #12isFix, so write"Fix #12". pathspatterns. A pattern without/means the project root only for every tool; for Claude*.mdused to mean any depth, so write**/*.md.**,src/,./src/**andapp/[id]/**are errors (AIC2008); write**/*,src/**,src/**andapp/*/**. 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 withAIC4107: rewrite the pattern, split the rule, or export without that target.- Copilot. The first
aicontext exportrewrites.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.HasErrorsandInitResult.HasErrors, and useresult.Writtenfor 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
pathsfor each tool follow the vendors' documentation as of November 2026; the tools were not run.
AIContext 0.6.0
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.Applyused 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 asAIC4103(orAIC4102), 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) andstatusnow 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.jsonare 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:defaultTargetmust be listed intargets, andlastReviewedmust 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 initalso finds hand-written rule files and nestedAGENTS.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 needsaider --read CONVENTIONS.md(orread: CONVENTIONS.mdin.aider.conf.yml), Copilot in VS Code depends on the selected agent and its settings, and Claude Code, Cursor, Windsurf/Devin and tools that readAGENTS.mdare summarized.
New
AIC4103(stale export plan),AIC4104(a link leads into a separate project) andAIC4201(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 statusshows the overlap between exported files,validatereports obvious placeholder text (AIC1107),validate --strictfails 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, asAIC1005, which is still the code reported). validate --strictfails for a project that still contains starter placeholders; a plainvalidatestill passes.
Upgrade notes
dotnet tool update --global AIContext.CLI
aicontext --version- If your CI runs
aicontext validate --stricton a project created withaicontext init --profile extended, it fails until theTODOplaceholders are replaced (as already announced for the unreleased changes). - If
exportnow 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.mdor addread: CONVENTIONS.mdto.aider.conf.yml. - Library users: recompile your program.
ExportFilePlan,SchemaIssueandExportResultgained members, andExportService.Applycan return a result with errors (checkHasErrors). Plans built by hand withoutExistingHashare 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
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.mdof an independent AIContext project in a subdirectory (a directory with its own.aicontext/is now a project boundary). exportandstatusrefuse whatvalidatereports as an error, for example an unsupportedspecVersion, a wrong type or an unknown property incontext.json.
- Export never writes or deletes outside the project through a symlink or junction. A path that leaves the project is reported as
- Strict CLI arguments. Unknown options, missing values, repeated options and non-boolean values after a flag are errors before anything runs. Previously
validate --strcitpassed without--strict,export --chekwrote files instead of checking them, andinit --path --forceran in the current directory.aicontext <command> --helpprints 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 newExportService(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 statusshowsblockedfor 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. exportandstatusstop on the errors thatvalidatereports. 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 withNo files were written. - Library:
ContextValidationResult,RuleLoadResultandContextLoadResultcarry a list of diagnostics.ErrorsandWarningsremain 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 existingcontext.jsonfiles 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
exportnow fails withERROR: context.json ..., the file was accepted before althoughvalidatereports the same error. Fix it asaicontext validateshows. - If
exportreportsBlocked, 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
exportin a monorepo is now safe for nested projects. Run it in each project separately (or add oneexport --checkper project to CI). - Library users: update code that constructs
ContextValidationResult,RuleLoadResultorContextLoadResult; useDiagnosticsand the codes for machine-readable handling. - In CI you can keep using
aicontext validate --strictandaicontext 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,.yamland.txtfiles are scanned. - The CLI does not print the diagnostic codes yet; they are available to library users.
AIContext v0.4.0
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-vandversion) prints the tool version and the specification version.aicontext init --profile extendedcreates starterarchitecture.md,decisions.mdandconstraints.mdnext toREADME.mdandcontext.json, so a new project passesvalidate --strictas the Extended profile right away. The default stayscore.exportwithout--target. Whenexports.defaultTargetis set incontext.json,aicontext exportuses it.--targetalways takes precedence,allmeans the targets fromexports.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>.exportfalls back toexports.defaultTargetand printsUsing exports.defaultTarget '<value>' from .aicontext/context.json.ProjectInitializerin theAIContextlibrary (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 invalidcontext.json. - English user manual on the website.
Changed
initchecks 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 andspecVersion(0.1.0) are unchanged, so existingcontext.jsonfiles stay valid.
Upgrade notes
dotnet tool update --global AIContext.CLI
aicontext --version- Nothing breaks:
exportwithout--targetused to fail, so existing scripts are unaffected. If yourcontext.jsonalready containsexports.defaultTarget,aicontext exportnow 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 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-hashinstead), output always uses LF, and unchanged files are not rewritten.exportnever overwrites a file it did not generate unless you pass--force. New--dry-runand--check(exit code 1 when exports are out of date) make it CI-friendly. - Real validation.
aicontext validatenow evaluatescontext.jsonagainst 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).--strictturns warnings into errors. - Scoped rules and split layout. Put guidance that only matters for part of the code in
.aicontext/rules/*.md(paths/descriptionfrontmatter) and setexports.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
aicontexttool targetnet9.0;net10.0.
New
exports.layout(single|split) andexport --layout..aicontext/rules/*.mdrules withpathsanddescriptionfrontmatter (SPEC 4.4).devinexport target (.devin/rules/). Opt-in: not part of the defaultallset, andvalidatewarns whenwindsurfanddevinare both enabled because Devin also loads.windsurf/rules.exports.nestedAgents(split layout): rules scoped to an exact directory are written to nested<directory>/AGENTS.mdfiles, for tools that only readAGENTS.md. Other rules stay in the root file;statusexplains 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 bySource-hash: sha256:<hex>. Existing generated files are refreshed once on the nextexport. validateerror messages now have the formcontext.json <json-pointer>: <message>.- The "local schema file not found" warning was removed (the schema is embedded).
- Library API (
AIContextpackage):ContextExporter.Build*no longer take a timestamp,ContextValidator.ValidateDirectory(basePath, canonicalSchemaUrl)has a simpler signature, andContextValidationResultexposesExtendedProfileinstead ofLocalSchemaPath. - Repository CI now runs
aicontext validate --strictandaicontext export --target all --check; the PowerShell validation script was removed.
Fixed
- Boolean CLI flags without a value (for example
init --force) were treated asfalse.
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.mdand their own rule files (Copilot, Cursor, Devin) can see content twice whenagentsis 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
First practical CLI release for AIContext with installable tooling, improved export behavior, and secure NuGet publishing.
What's new
-
Installable .NET tool
AIContext.CLIcan now be installed globally:dotnet tool install --global AIContext.CLI- Command:
aicontext
-
export --target allnow respects config- Uses
exports.targetsfrom.aicontext/context.json - Falls back to all supported targets when not configured
- Uses
-
Trusted Publishing enabled
- NuGet publishing now uses OIDC (
NuGet/login@v1) - No long-lived
NUGET_API_KEYsecret required
- NuGet publishing now uses OIDC (
-
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 allRelease status
This version is marked as a pre-release while broader cross-repository validation is being finalized.