Repository navigation
AIContext 0.5.0
Pre-release
Pre-release
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.