[codex] Add current document context command#158
Draft
afar1 wants to merge 1 commit into
Draft
Conversation
1ee899c to
781cafa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
ft current, a CLI command that reads the active Field Theory document context written by the Mac app terminal integration.The command finds the newest context manifest under the Field Theory Library, reads the pointed-at
active.md, and can print either human-readable output, JSON, or content-only markdown.Why
Agents in the embedded terminal need a stable way to answer “what document am I looking at?” without relying on manual
find/jqcommands or prompt-only context.Changes
src/current.tsfor context manifest discovery, validation, formatting, and content loading.ft current,ft current --json,ft current --content-only, and--manifest <path>.ft current --jsonfor active document questions.Validation
npm cinpx tsx --test tests/current.test.ts tests/cli.test.ts tests/skill.test.tsnpm run buildnpm run dev -- current --jsongit diff --checknpm test(545 passed)