Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .jp/config/knowledge/architecture.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ about programming like it is about writing code, but the code ends up being less
important than the architecture, and the architecture ends up being less important than \
social issues."
For JP specifically, the "social structure" is one human author working with a small \
For JP specifically, the "social structure" is three human authors working with a small \
set of AI agents (`dev`, `architect`, `rfd-reviewer`, `committer`, …), each constrained \
by a persona. The architecture reflects this:
Expand Down
37 changes: 37 additions & 0 deletions .jp/config/knowledge/code-comments.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ been produced in this project and corrected.
own terms; if the contrast actually matters for using the item, restate \
the relevant fact directly.

- **Caller-context leak.** A doc comment describes what the function \
promises to *any* caller. Don't justify the promise in terms of one \
particular caller's situation — "so that `--check` mode exits non-zero", \
"because the CLI prints this", "to keep the wizard's flow correct". The \
reader of the doc comment doesn't know about the wizard or `--check`. \
State the contract on its own terms; the caller-specific reasoning \
belongs in a `//` comment at the call site.

- **Restating the signature.** `/// Returns the user's name.` on \
`fn name() -> String` adds nothing. Either say what isn't visible \
(where the value comes from, what happens on the unset path, ownership, \
Expand Down Expand Up @@ -125,6 +133,11 @@ items = [
State what it does on its own terms.\
""",
"""\
**Don't justify a function's behavior with caller context.** State the \
contract on its own terms; caller-specific reasoning belongs at the \
call site.\
""",
"""\
**Don't ship stale inline comments.** Update the invariant or delete \
the line — never both wrong and ignored.\
""",
Expand Down Expand Up @@ -198,6 +211,30 @@ function. The good version describes the contract directly; the contrast \
with `read` is implicit and stays out of the way.\
"""

[[assistant.instructions.examples]]
good = """\
/// Walk the tree under `root` and return every `.rs` file.
///
/// Walker errors (unreadable directories, symlink loops, etc.) are
/// propagated rather than silently skipped.
fn walk_rust_files(root: &Path) -> Result<Vec<PathBuf>, Error> { ... }\
"""
bad = """\
/// Walker errors (unreadable directories, symlink loops, etc.) are
/// propagated rather than silently skipped: in `--check` mode a swallowed
/// error would let the job exit 0 without having checked the file the
/// user asked about.
fn walk_rust_files(root: &Path) -> Result<Vec<PathBuf>, Error> { ... }\
"""
reason = """\
The bad version makes the function's contract depend on the reader \
knowing about `--check` mode — but `walk_rust_files` doesn't know about \
`--check` mode; only one of its callers does. The good version states \
the contract on its own terms (errors propagate, period). The \
`--check`-mode reasoning belongs in a `//` comment at the call site, \
where the reader is already in that world.\
"""

[[assistant.instructions.examples]]
good = """\
// Sorted by created_at upstream; the binary search below depends on it.
Expand Down
7 changes: 4 additions & 3 deletions .jp/config/personas/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,10 @@ response style. Simply answer the query appropriately.
position = -90
tag = "forbidden_words"
content = """
You MUST NOT use these words or phrases in your responses, unless there is a
very good reason to do so:
You MUST NOT use these words or phrases in your responses:

- comprehensive
- "key insight"
- key insight
- load-bearing
- *em dashes*
"""
Loading