KSL — Keneil Shell Language
keneil alpha.1 · accepted directionKSL composes a context the way a shell composes a pipeline — but it does not stream bytes and does not execute system commands. It builds a working set: a set of files, digests, and context windows, ready to be sent to a local model.
Mental model
Every KSL line has three optional stages:
- select
- transform
- ask
@{src/router.js, src/api.js} | digest | ask "How are routes connected to handlers?"select@{...} Selects files for the current pipeline
transformdigest Builds a structural index of each file
askask Sends the prepared context to the local model
Works now
Implemented in keneil alpha.1Selectors
@src/file.jsSelect a single file
@{file1, file2}Select multiple files
@loadedSelect all files currently loaded
!@{file}Exclude file(s) from set
Actions
loadAdd files to context
focusSet as active set
untrackRemove from context
digestBuild structural index
contextDry-run inspection
askSend to Ollama
Recipes
Common patternsCompare two files
@{src/auth.js, src/session.js} | digest | ask "What does each file own?"Compare ownership and patterns across related files.
Digest multiple files
@{src/router.js, src/api.js, src/db.js} | digestPrepare the structural index for the core stack.
Remove a file from working set
@{src/config.js} | untrackStop tracking sensitive or irrelevant configuration files.
Inspect what gets sent to the model
@loaded | contextInspect the current selected working set.
Exclude a file temporarily
@loaded !@{src/secrets.js} | ask "What does this codebase expose?"Analyze the full set while masking specific sensitive paths.
Coming soon
Glob patterns
PLANNED@{src/**/*.js} | digest | ask "Summarize the architecture"Project-wide analysis
PLANNED@{*} | !@{bin/**} | digest | ask "Explain the project"Glob patterns and wildcard selectors are a future target. The core pipeline syntax (@, |, !, actions) is stable.