DSCC
home / cookbook / 01-code-review

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

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:

  1. Call glob_search or grep_search to confirm src/foo.rs exists.
  2. Call read_file on it.
  3. 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