Repository navigation
Expand file tree
/
Copy pathopencode.json
More file actions
91 lines (91 loc) · 9.31 KB
/
Copy pathopencode.json
File metadata and controls
91 lines (91 loc) · 9.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"llmstudio": {
"npm": "@ai-sdk/openai-compatible",
"name": "LM Studio (local)",
"options": {
"baseURL": "http://localhost:1234/v1",
"apiKey": "lm-studio-api-key"
},
"models": {
"google/gemma-4-e4b": { "name": "Gemma 4-e4b" }
}
}
},
"instructions": ["AGENTS.md"],
"skills": {
"paths": ["skills"]
},
"command": {
"build": {
"template": "Build NeoDOS using neodev: `neodev build --image`. For quick (kernel+bootloader only): `neodev build --quick --image`. Kernel requires nightly Rust: `RUSTUP_TOOLCHAIN=nightly neodev build --quick --image`. Verify with `neodev check-deps`.",
"description": "Build bootloader, kernel, user binaries, and disk image"
},
"build-lsp": {
"template": "Build the NeoDOS LSP server from neodos-dev-server repo: `cd neodos-dev-server && cargo build --release`. The binary will be at neodos-dev-server/target/release/neodos-lsp.",
"description": "Build the NeoDOS LSP server"
},
"build-neotools": {
"template": "Build NeoTools from the NeoTools repo: `cd neotools && cargo build --release`. Binaries: nxeinfo, nxpkg, nxdump at target/release/.",
"description": "Build NeoTools: nxeinfo, nxpkg, nxdump"
},
"run": {
"template": "Launch NeoDOS in QEMU with neodev: `neodev run`. Options: --kvm, --gdb, --storage ahci|ata|nvme|virtio, --net user|tap|bridge, --bdm (persistent OVMF vars), --headless, --serial <file>.",
"description": "Run NeoDOS in QEMU with neodev"
},
"debug": {
"template": "Connect GDB to a running QEMU instance (port :1234) with kernel symbols loaded. Run from neodos/ using `gdb -x .gdbinit`. The debug build is at neodos-kernel/target/x86_64-unknown-none/debug/neodos-kernel.",
"description": "Debug with GDB"
},
"github": {
"template": "Review uncommitted changes in the repo. Check that `docs/` files are up to date (see `docs/README.md` for the index). Run `RUSTUP_TOOLCHAIN=nightly cargo build` in neodos-kernel/, then `neodev build --quick`, then `neodev check-deps`. Commit with `git add -A && git commit -m \"feat|fix|refactor: ...\" && git push`.",
"description": "Build, test, commit, and push to GitHub"
},
"audit": {
"template": "Perform a complete NeoDOS project audit. Use the MCP tools extensively: run `neodos-mcp_check_consistency targets=all` for invariant validation. Then:\n1. Detect dead code: search for unused functions, globals, and modules with `rg \"fn .*\\{\" --include=\"*.rs\"` and cross-reference with grep for callers.\n2. Detect duplicate code: look for similar patterns across subsystems (e.g., two cache implementations, two mount managers).\n3. Find API inconsistencies: check ObInfoClass/ObSetInfoClass enum completeness vs handler implementation in src/object/types.rs and src/syscall/ob.rs.\n4. Review docs against code: check docs/<subsystem>/ for stale file paths, wrong struct names, outdated version numbers.\n5. Check for architectural improvements: identify fixed-size arrays, hardcoded limits, tight coupling, missing abstractions.\n6. Add findings to roadmap/improvements.md as new LOW/MEDIUM items.\nDo NOT modify any code — only report findings.",
"description": "Full project audit: dead code, duplicates, API consistency, docs, architecture"
},
"review": {
"template": "Review the current code changes for NeoDOS. Check:\n1. Potential bugs: look for unwrap(), expect(), indexing without bounds check, integer overflow, unsafe without safety comments.\n2. Rust errors: run `cargo build` in neodos-kernel/.\n3. Architecture compliance: verify new code follows NT-like design (Ob handles, not raw pointers; no Ring 0 shell commands; new syscalls are sys_ob_* — no numeric threshold).\n4. Naming consistency: kebab-case for files/dirs, PascalCase for types/enums/traits, snake_case for fns/vars (AGENTS.md rule 10).\n5. Cross-subsystem dependencies: run `neodev check-deps`.\n6. Documentation: check if docs/<subsystem>.md needs updating for changed APIs.\nProvide a verdict: approve, changes-requested (with file/line refs), or reject (with rule reference).",
"description": "Review code changes: bugs, architecture, naming, deps, docs"
},
"docs": {
"template": "Synchronize all NeoDOS documentation. For each step, use Read/Edit tools — do NOT run scripts.\n1. Scan `docs/` directory: check every .md file exists as referenced from AGENTS.md (the Table of Contents must match actual files).\n2. Check `CHANGELOG.md` for any missing entries since last commit (run `git log --oneline -10` to see recent work).\n3. Verify `docs/architecture/overview.md` boot phase list matches `src/main.rs`.\n4. Verify cross-references between docs are valid (relative .md links resolve).\n5. Run `neodos-mcp_check_consistency targets=docs` for automated doc validation.\nDo NOT modify code. Only fix documentation.",
"description": "Sync all docs: verify references, update changelog, fix stale content"
},
"design": {
"template": "Before implementing a new NeoDOS feature, produce a design document. Follow these steps in order:\n1. Research: read `docs/architecture/vision.md` and relevant subsystem docs (e.g., docs/kernel/objects.md for Ob changes, docs/kernel/syscalls.md for new syscalls).\n2. Problem analysis: what is the current limitation? Why can't existing abstractions solve it?\n3. Solution design: describe the proposed change. Include:\n - New types/structs/enums needed (with ObType numbers if applicable)\n - New syscalls (MUST be sys_ob_*)\n - New ObInfoClass/ObSetInfoClass variants\n - New files or modules (path relative to neodos-kernel/src/)\n - Changes to existing files\n4. Alternatives: list at least one alternative approach and explain why it was rejected.\n5. Affected components: list every subsystem that will change (scheduler, VFS, memory, drivers, etc.).\n6. API contract: for each new public function/syscall, specify: args, return values, error codes, preconditions.\n7. Test plan: list at least 3 test cases per invariant.\n8. Implementation plan: sequential steps with file paths.\nDo NOT write implementation code. Only produce the design.",
"description": "Design a feature before implementation: analysis, API, affected components, test plan"
},
"cleanup": {
"template": "Find and clean up technical debt in the NeoDOS kernel and user code. Use grep and ripgrep extensively.\n1. Search for TODO comments: `rg \"TODO\" --include=\"*.rs\"` — report each with file:line, assess if still relevant.\n2. Search for FIXME comments: `rg \"FIXME\" --include=\"*.rs\"` — report each, prioritize critical ones.\n3. Search for HACK comments: `rg \"HACK\" --include=\"*.rs\"`.\n4. Search for commented-out code blocks: `rg \"^// \" --include=\"*.rs\"` looking for large commented sections (>5 lines).\n5. Detect dead functions: for each `pub fn` or `fn`, grep for callers. If none found, check if it's a trait impl or test.\n6. Check for obsolete modules: look at mod.rs files, cross-reference with directory listings.\n7. Search for duplicate code: e.g., two implementations of the same algorithm (search for \"fn.*same_name\" across files).\nFor each finding: remove if clearly unused, add a TODO with issue ref if too risky to remove now.\nRun `cargo build` in neodos-kernel/ after any removal to verify nothing breaks.",
"description": "Find and remove dead code, old TODOs, FIXMEs, commented code, duplicates"
},
"testing": {
"template": "Validate NeoDOS changes with the complete test suite.\n1. Build: `RUSTUP_TOOLCHAIN=nightly cargo build` in neodos-kernel/ — fix any compilation errors first.\n2. Run kernel tests: `neodev build --quick --image && neodev test` — all tests must pass.\n3. Check dependency rules: `neodev check-deps`.\n4. If tests fail: identify the failing test group (printed in output), inspect the test code in src/testing.rs, fix the issue, re-run.\n5. Check test coverage: look at the feature being changed — are there existing tests? If the feature lacks tests, propose new test_case! entries in the appropriate module with descriptions.\n6. For user-mode changes: build with `neodev build --image` and boot in QEMU to verify.\n7. Report: summary of passed tests, any regressions, and test coverage gaps found.",
"description": "Run tests, check coverage, propose new tests for uncovered code"
},
"roadmap": {
"template": "Sync the NeoDOS roadmap with GitHub Issues. Run `scripts/sync-roadmap.sh check` first to verify the connection, then `scripts/sync-roadmap.sh sync` to sync all labels, milestones, and issues. Alternatively, run individual steps: `scripts/sync-roadmap.sh labels && scripts/sync-roadmap.sh milestones && scripts/sync-roadmap.sh issues`. For changelog generation: `scripts/sync-roadmap.sh changelog`. The local source is `roadmap/improvements.md`; labels in `roadmap/labels.yaml`; milestones in `roadmap/milestones.yaml`.",
"description": "Sync roadmap with GitHub Issues"
}
},
"lsp": {
"neodos-lsp": {
"command": ["neodos-lsp"],
"extensions": ["rs"],
"disabled": false,
"env": {
"RUST_LOG": "neodos_lsp=info"
}
}
},
"mcp": {
"neodos-mcp": {
"type": "local",
"command": ["/home/amartinper/rust-os/neodos-dev-server/target/release/neodos-mcp"],
"enabled": true
}
}
}