docs: align verify commands with CI, fix doc drift, add architecture guides#900
docs: align verify commands with CI, fix doc drift, add architecture guides#900vkayonline wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughAdds five new architecture docs ( ChangesContributor docs, architecture guides, and quality bar
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/architecture/ai-subsystem.md`:
- Line 71: The mutating-tools approval list in the architecture docs includes a
stale shell tool name; update the list to match the current shell tool surface
by removing bash_session_run and keeping the shell-related entries aligned with
src/modules/ai/tools/shell.ts, especially the bash_run and bash_background tool
names referenced in the approval flow description.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 299fa4ee-fda7-4b5a-9592-3fe507777e2d
📒 Files selected for processing (13)
.github/PULL_REQUEST_TEMPLATE.mdCODE_OF_CONDUCT.mdCONTRIBUTING.mdREADME.mdSECURITY.mdTERAX.mddocs/README.mddocs/architecture/ai-subsystem.mddocs/architecture/pty-shell-integration.mddocs/architecture/security-model.mddocs/architecture/terminal-renderer-pool.mddocs/architecture/two-process-model.mddocs/contributing/testing.md
| Tool definitions live under `src/modules/ai/tools/`: | ||
|
|
||
| - Read-only tools (`read_file`, `list_directory`, `grep`, `glob`) auto-execute after passing the security deny-list. | ||
| - Mutating tools (`write_file`, `edit`, `multi_edit`, `create_directory`, `bash_run`, `bash_background`, `bash_session_run`) set `needsApproval: true`. The AI SDK pauses and the UI renders an approval card. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
rg -n 'bash_run|bash_background|bash_session_run|run_command|shell_session_run|shell_bg_spawn' src/modules/ai/tools/Repository: crynta/terax-ai
Length of output: 1600
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- src/modules/ai/tools/tools.ts ---'
sed -n '1,220p' src/modules/ai/tools/tools.ts
echo
echo '--- src/modules/ai/tools/shell.ts ---'
sed -n '1,220p' src/modules/ai/tools/shell.ts
echo
echo '--- docs/architecture/ai-subsystem.md (around line 71) ---'
sed -n '60,82p' docs/architecture/ai-subsystem.mdRepository: crynta/terax-ai
Length of output: 8476
Replace the stale shell-tool name in the approval list.
bash_session_run is not part of the current shell tool surface here; the mutating tools are bash_run and bash_background. Update the list so the approval flow matches src/modules/ai/tools/shell.ts.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/architecture/ai-subsystem.md` at line 71, The mutating-tools approval
list in the architecture docs includes a stale shell tool name; update the list
to match the current shell tool surface by removing bash_session_run and keeping
the shell-related entries aligned with src/modules/ai/tools/shell.ts, especially
the bash_run and bash_background tool names referenced in the approval flow
description.
What
This PR sets up proper in-repo contributor documentation and fixes existing doc drift:
TERAX.md,README.md,CONTRIBUTING.md, and the PR template to match what CI actually runs (.github/workflows/ci.yml).TERAX.mddrift from the current codebase:command-palette/andspaces/modules.0.5.xversion pin inSECURITY.md.docs/tree with long-form contributor guides:docs/README.md- indexdocs/architecture/two-process-model.md- IPC boundary and command referencedocs/architecture/pty-shell-integration.md- PTY, shell init, OSC, ConPTY, Job Objectdocs/architecture/security-model.md- consolidated security boundariesdocs/architecture/ai-subsystem.md- AI stack + "Adding a provider" walkthroughdocs/architecture/terminal-renderer-pool.md- renderer pool and DormantRing invariantsdocs/contributing/testing.md- testing contract and core-subsystem invariantsWhy
The project already had a strong
README.md,CONTRIBUTING.md, andTERAX.md, but:TERAX.mdhad drifted fromconfig.ts(providers),shell_init.rs(fish), and the actual module tree.docs/only held screenshots.How
TERAX.mdremains the source of truth. Each new guide starts with "If anything conflicts withTERAX.md,TERAX.mdwins."TERAX.mdand thedocs/README.mdindex.Testing
pnpm check-typescleanpnpm test- 245 tests passed; one pre-existing suite failure insrc/app/eager-budget.test.ts(SyntaxError importing.mjs), unrelated to docspnpm lint- passed with pre-existing warnings (biome does not lint.md)cargo clippy --all-targets --locked -- -D warnings- could not run;cargois not installed in this environmentcargo test --locked/cargo nextest run --locked- could not run;cargois not installed in this environment**/*.mdreturns zero matchesNotes for reviewer
.gitignorechange adding.codegraph/and the untrackedopencode.json/.opencode/files were left out of this PR because they are not part of the documentation work.Summary by CodeRabbit