Skip to content

feat(instructions)!: generate targets from instructions files - #30

Merged
showxu merged 17 commits into
masterfrom
feat/instruction-units
Oct 27, 2026
Merged

showxu merged 17 commits into
masterfrom
feat/instruction-units

Conversation

@showxu

@showxu showxu commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adapts the CLI to core's generated instruction targets (agents-tools/core#37) and prepares release 0.2.0. Package.swift depends on core "0.2.0"..<"0.3.0", resolved to the published core 0.2.0.

  • agents instructions add . <names…> and agents instructions list . use the project's own instructions in .agent/instructions/.
  • agents instructions export [--root <dir>…] [--json] maps the locked targets of the user scope and each project to their sections.
  • agents instructions update --apply --replace takes over target files that agents did not generate; add and update print Take over <path>, which agents did not generate with the diff. A file agents did not generate also stops install and remove, with remedies that keep the lock.
  • instructions add names the sections each target received; removal reports an edited target it leaves in place.
  • agents instructions init <name> creates .agent/instructions/<name>.md with front matter.
  • Update, instruction update and install JSON reports move to schemaVersion: 2: instruction targets drop adoptedSections and conflicts, add foreign, and report drift as clean, drifted or missing. Source listings add level, description and paths. Doctor's foreignTarget and invalidLink are errors.
  • The terminal demo's instructions files carry front matter; the recording and both SVGs are regenerated.

BuildInfo.version is 0.2.0; the changes, breaking ones marked, are listed under ## [0.2.0] in CHANGELOG.md.

Validation

  • swift build: pass
  • env -u CODEX_HOME -u CLAUDE_CONFIG_DIR -u XDG_CONFIG_HOME -u XDG_STATE_HOME -u XDG_CACHE_HOME swift test: 111 tests pass against core 0.2.0
  • swift build -c release: pass; agents --version prints agents 0.2.0
  • swift format lint --strict --configuration .swift-format --recursive Package.swift Sources Tests: clean
  • Terminal demo re-recorded and rendered with the github-readme-design toolchain at db02bcb24426f4add0393444f868f1bffdf06f9d; terminal check passes against the release build.
  • End-to-end runs with this build are described in feat(instructions)!: generate targets from instructions files core#37.
  • Two independent reviews from different model families; their findings are fixed on this branch.

Documentation

Documentation/Reference/CLI.md, the JSON schemas in Documentation/Reference/Schemas/ (new instructions-export.schema.json), README.md and CHANGELOG.md describe the new commands and reports.

- Add '.' as the project's own instructions source, 'instructions
  export', and '--replace' on 'instructions update --apply'.
- Report foreign targets and kept edited targets; give remedies for
  unowned targets, invalid links and changed own files.
- 'instructions init' creates .agent/instructions/<name>.md.
- Update, instruction update and install reports move to schema
  version 2; source listings add level, description and paths.
- Give the demo script's instructions files front matter.
- 'instructions add' names the sections each target received.
- Report a kept edited target as differing from its generated version.
- Treat doctor's foreignTarget as an error and give remedies for a stale
  lock; show the user scope's export root as '~'.
@showxu
showxu merged commit 2845222 into master Oct 27, 2026
11 checks passed
@showxu
showxu deleted the feat/instruction-units branch October 27, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant