01 · Code Review (read-only)
A teammate drops a short Rust file in front of you and asks “anything obviously wrong?”. This case plants two or three issues in a small file and asks DSCC to find them without touching the repo. It is the lowest-risk way to try DSCC on a real codebase: the permission mode forbids edits, so at worst you spend tokens.
Capability demonstrated
grep_search+read_fileto locate and inspect the target.StructuredOutput(or a plain markdown table) to return findings in a consistent shape.ReadOnlypermission mode — see guides/permissions.md.
Setup
Create a small file with known issues. Example — from the repo root:
mkdir -p src
cat > src/foo.rs <<'RS'
pub fn first_word(s: &str) -> &str {
let bytes = s.as_bytes();
for i in 0..bytes.len() {
if bytes[i] == b' ' {
return &s[0..i + 1]; // off-by-one: includes the space
}
}
&s[..]
}
pub fn read_port() -> u16 {
let raw = std::env::var("PORT").unwrap(); // panics if PORT is unset
raw.parse().unwrap() // panics on bad input
}
RS
Run command
dscc --model claude-sonnet-4-6 \
--permission-mode read-only \
prompt "$(cat docs/cookbook/01-code-review/PROMPT.md)"
A live run against doubao-seed-2.0-code is captured at
report_dscc.md / dscc_run.log.
Expected behavior
The model should typically:
- Call
glob_searchorgrep_searchto confirmsrc/foo.rsexists. - Call
read_fileon it. - Return a markdown table of findings plus a verdict line.
No edit_file / write_file /
bash calls. If the model attempts a write, the
ReadOnly permission mode blocks it.
Verification
git diffis empty (orgit statusshows no modifications under tracked files).- The returned table mentions both planted issues: the off-by-one
slice in
first_wordand the.unwrap()calls inread_port. - Severity labels are populated for every row.