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 .dz/maintainer/reviewer.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Reviewer instructions — developerz-ai/fast_rspec

> Read by the developerz.ai reviewer at EVERY review of this repository, at the reviewed
> commit, as this repo's own layer of the reviewer's prompt — established by dz-runner setup mode.
> commit, as this repo's own layer of the reviewer's prompt.
> It refines the platform rules (a finding is cited or withheld; the bot always discloses)
> and never overrides them. Edit freely; keep it under 12,000 characters — past that it is cut.

Expand Down
3 changes: 1 addition & 2 deletions .dz/onboarding/scorecard.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# AI-first scorecard

> Written by the developerz.ai maintainer agent — established by dz-runner setup mode. Each onboarding run rewrites this file whole; the latest run wins, and the same card is stored on the platform.
> Written by the developerz.ai maintainer agent. Each onboarding run rewrites this file whole; the latest run wins, and the same card is stored on the platform.

- Run: `run_5c8b684df57a49a9b94b756bdadfcddf`
- Computed: 2026-10-31T21:55:27.177Z
- Proof: **proved** — every command ran green at head.
- Score: 13 of 15 items ok
Expand Down
5 changes: 2 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# .env.example — established by dz-runner setup mode.
# .env.example — owned by this repository's maintainers.
# NAMES only. Copy to `.env`, fill each value there, and never commit that file.

# dormant: only `.mcp.json` uses it for the developerz MCP server; setup, dev and check read no credential (optional)
DEVELOPERZ_API_KEY=
# setup, dev and check read no credential.
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# pre-commit gate — established by dz-runner setup mode. Runs the SAME
# pre-commit gate — owned by this repository's maintainers. Runs the SAME
# `bin/check` CI runs, so a commit that would fail CI fails here first.
# ACTIVATE IT (once, per clone): git config core.hooksPath .githooks
set -euo pipefail
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ jobs:
- uses: ruby/setup-ruby@v1
with: { ruby-version: '3.4', bundler-cache: true }
- run: bundle exec rubocop --parallel
- name: Public tree
env:
# The public-tree guard's private words (bin/check-public-tree). Required on this
# repository's own runs, where the secret exists; forks and Dependabot get none.
PUBLIC_TREE_PRIVATE_WORDS: ${{ secrets.PUBLIC_TREE_PRIVATE_WORDS }}
PUBLIC_TREE_PRIVATE_WORDS_REQUIRED: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && github.actor != 'dependabot[bot]' && '1' || '' }}
working-directory: .
run: bash bin/check-public-tree --self-test && bash bin/check-public-tree

test:
name: Test / ${{ matrix.ruby }}
Expand Down
16 changes: 0 additions & 16 deletions .mcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@
"type": "stdio",
"command": "codegraph",
"args": ["serve", "--mcp"]
},
"developerz": {
"type": "http",
"url": "https://mcp.developerz.ai/v1/mcp",
"headers": {
"Authorization": "Bearer ${DEVELOPERZ_API_KEY}"
}
},
"sentry-mcp": {
"type": "stdio",
"command": "bunx",
"args": ["@sentry/mcp-server"],
"env": {
"SENTRY_ACCESS_TOKEN": "${SENTRY_ACCESS_TOKEN}",
"SENTRY_HOST": "${SENTRY_HOST}"
}
}
}
}
153 changes: 153 additions & 0 deletions bin/check-public-tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
#!/usr/bin/env bash
# The public tree names nothing private. This repository is public, so every tracked file is a
# public document: no host on our own domain beyond the public site, no private repository or its
# tracker, no one's home directory, no name of the setup mode that once wrote agent files, and none
# of the private words.
#
# The private words are never in this file, whole or in parts: fragments joined in a public file
# are the word to anyone who reads it. They come from the PUBLIC_TREE_PRIVATE_WORDS CI secret
# (comma- or newline-separated). A run without it says it skipped them; this repository's own CI
# runs set PUBLIC_TREE_PRIVATE_WORDS_REQUIRED=1, where an empty secret fails. The setup mode's name
# is already public, so it is assembled here.
#
# Reads `git ls-files`, proves it read this file and counts what it read. A failure names the file
# and the rule, never the matched text: CI logs are public. `--self-test` proves each rule fires.
#
# bin/check-public-tree [--self-test]
set -euo pipefail

repo_root=$(cd "$(dirname "$0")/.." && pwd -P)
self=bin/check-public-tree
min_tracked=200
domain_re='developerz\.ai'
org=developerz-ai
public_repos=" ai-army ai-designer ai-gaming-agent-mcp ai-task-master bun-on-rails cairn claude-and-conquer claude-task-master claudes db-mcp-gateway fast_rspec gold-standards-in-ai magik mcp-ssh mini multi-ai-router nexus-engine open-mmorpg open-remote-ssh-tmux research tessera ts23d ui-debugger-mcp ultimate universal-lsp wurk "
p1=dz
p2=runner
setup_re="${p1}[-_ ]?${p2}"
tracker_re="(^|[^A-Za-z0-9_./-])(infrastructure|${domain_re}|${p1}) ?#[0-9]"
home_re='(^|[^A-Za-z0-9_.-])/(home|Users)/[A-Za-z0-9_.-]+'
home_ok_re='/(home|Users)/(runner|user|app)([^A-Za-z0-9_.-]|$)'

# The rules one text breaks, one per line; never the matched text.
violations() {
local text=$1 words_file=$2 host name hit homes
while IFS= read -r host; do
[[ -z $host ]] && continue
host=$(printf '%s' "$host" | tr '[:upper:]' '[:lower:]')
if [[ $host != "www.developerz.ai" ]]; then
echo 'internal host on our own domain'
break
fi
done < <(printf '%s' "$text" | grep -oiE "([a-z0-9-]+\.)+${domain_re}" || true)
grep -qiE "$setup_re" <<< "$text" && echo 'setup-mode name'
# Captured first: under pipefail an early-exiting `grep -q` would SIGPIPE its producer.
homes=$(grep -oE "$home_re" <<< "$text" || true)
if [[ -n $homes ]] && grep -vqE "$home_ok_re" <<< "$homes"; then
echo "someone's home directory"
fi
hit=0
while IFS= read -r name; do
[[ -z $name ]] && continue
name=$(printf '%s' "${name##*/}" | tr '[:upper:]' '[:lower:]')
name=${name%.git}
name=${name%%.}
[[ $public_repos == *" $name "* ]] || hit=1
done < <(printf '%s' "$text" | grep -oiE "(github\.com/|raw\.githubusercontent\.com/|api\.github\.com/repos/|^|[^A-Za-z0-9_./@-])${org}/[A-Za-z0-9_.-]+" | grep -oiE "${org}/[A-Za-z0-9_.-]+" || true)
if [[ $hit -eq 1 ]] || grep -qiE "$tracker_re" <<< "$text"; then
echo 'private repository'
fi
if [[ -s $words_file ]] && grep -qiF -f "$words_file" <<< "$text"; then
echo 'private word (from the secret)'
fi
return 0
}

words_file=$(mktemp "${TMPDIR:-/tmp}/public-tree.XXXXXXXX")
trap 'rm -f -- "$words_file"' EXIT
printf '%s' "${PUBLIC_TREE_PRIVATE_WORDS:-}" | tr ',' '\n' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | grep -v '^$' > "$words_file" || true

if [[ ${1:-} == --self-test ]]; then
fails=0
expect() { # expect <rules> <text> [words]
local want=$1 text=$2 words=${3:-} wf got
wf=$(mktemp "${TMPDIR:-/tmp}/public-tree.XXXXXXXX")
printf '%s' "$words" | tr ',' '\n' > "$wf"
got=$(violations "$text" "$wf" | tr '\n' '|' | sed 's/|$//')
rm -f -- "$wf"
if [[ $got != "$want" ]]; then
printf 'check-public-tree self-test: expected [%s], got [%s]\n' "$want" "$got" >&2
fails=$((fails + 1))
fi
}
expect 'internal host on our own domain' "url: https://mcp.developerz.""ai/v1"
expect '' "see https://www.developerz.ai"
expect 'setup-mode name' "a ${p1^^}-${p2^^} box"
expect "someone's home directory" "cd /ho""me/someone/src"
expect '' "runs-on: /home/runner/work"
expect 'private repository' "see ${org}/vault#12"
expect 'private repository' "(${p1}#1026)"
expect '' "${org}/gold-standards-in-ai#3, github.com/${org}/wurk"
expect '' "* @${org}/admin (a team, not a repository)"
expect 'private repository' "https://raw.githubusercontent.com/${org}/vault/main/x"
expect 'private repository' "https://api.github.com/repos/${org}/vault"
expect 'private word (from the secret)' "# runs on QUIMTEL" "quimtel,zorblax.io"
expect '' "zorblax-io and quim" "quimtel,zorblax.io"
# A match at the top of a file larger than a pipe buffer must still fire (no SIGPIPE under pipefail).
big=$(printf '%0200000d' 0)
expect 'setup-mode name' "${p1}-${p2}
$big"
expect 'private word (from the secret)' "quimtel
$big" "quimtel"
expect 'private repository' "(${p1}#1026)
$big"
# CI must pass the secret and the required flag on live (uncommented) lines: deleting,
# commenting out or weakening either would switch the private-word check off silently.
ci=$repo_root/.github/workflows/ci.yml
# The exact condition: a weaker one (`false && '1'`, a renamed repo check) never sets the flag.
required_line="PUBLIC_TREE_PRIVATE_WORDS_REQUIRED: \${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && github.actor != 'dependabot[bot]' && '1' || '' }}"
if ! grep -qE '^[[:space:]]+PUBLIC_TREE_PRIVATE_WORDS: \$\{\{ secrets\.PUBLIC_TREE_PRIVATE_WORDS \}\}[[:space:]]*$' "$ci" \
|| ! grep -qxF "$required_line" <<< "$(sed 's/^[[:space:]]*//; s/[[:space:]]*$//' "$ci")"; then
echo 'check-public-tree self-test: ci.yml does not pass the secret and the required flag' >&2
fails=$((fails + 1))
fi
if [[ $fails -ne 0 ]]; then echo ' fix: bash bin/check-public-tree --self-test # the failing fixture is named above' >&2; exit 1; fi
echo 'check-public-tree self-test: every rule fires'
exit 0
fi

if [[ ! -s $words_file ]]; then
if [[ ${PUBLIC_TREE_PRIVATE_WORDS_REQUIRED:-} == 1 ]]; then
echo 'check-public-tree: PUBLIC_TREE_PRIVATE_WORDS is empty, and PUBLIC_TREE_PRIVATE_WORDS_REQUIRED=1 says this run must check the private words' >&2
echo ' fix: set the PUBLIC_TREE_PRIVATE_WORDS repository secret (an admin), or run without PUBLIC_TREE_PRIVATE_WORDS_REQUIRED locally' >&2
exit 1
fi
echo 'check-public-tree: PUBLIC_TREE_PRIVATE_WORDS is unset, private words not checked' >&2
fi

[[ $(git -C "$repo_root" rev-parse --show-toplevel) == "$repo_root" ]] || { echo "check-public-tree: git answers for another repository's tree" >&2; exit 1; }
mapfile -d '' files < <(git -C "$repo_root" ls-files -z)
# A here-string, not a pipe: under pipefail an early \`grep -q\` match would SIGPIPE a long listing.
grep -qxF "$self" <<< "$(printf '%s\n' "${files[@]}")" || { echo 'check-public-tree: the scan does not see this file, so its root is wrong' >&2; exit 1; }
read=0
failures=0
for path in "${files[@]}"; do
full=$repo_root/$path
[[ -f $full ]] || continue
grep -qI . "$full" 2>/dev/null || continue
read=$((read + 1))
while IFS= read -r rule; do
[[ -z $rule ]] && continue
printf '%s: %s\n' "$path" "$rule" >&2
failures=$((failures + 1))
done < <(violations "$(cat "$full")" "$words_file")
# The path is published too: a file named after a private word or repository is a finding.
while IFS= read -r rule; do
[[ -z $rule ]] && continue
printf '%s: %s (in the path)\n' "$path" "$rule" >&2
failures=$((failures + 1))
done < <(violations "$path" "$words_file")
done
echo "check-public-tree: read $read of ${#files[@]} tracked files, $(wc -l < "$words_file" | tr -d ' ') private words" >&2
[[ $read -ge $min_tracked ]] || { echo "check-public-tree: read only $read tracked files" >&2; exit 1; }
[[ $failures -eq 0 ]] || { echo "check-public-tree: $failures finding(s); rule per file, value withheld" >&2; echo " fix: remove the reference from each file named above, then: bash bin/check-public-tree" >&2; exit 1; }
2 changes: 1 addition & 1 deletion bin/dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# one-command dev — established by dz-runner setup mode. One command; adjust as the repo grows.
# one-command dev — owned by this repository's maintainers. One command; adjust as the repo grows.
set -euo pipefail
cd "$(dirname "$0")/../apps/fast-rspec"
bundle exec rake test
2 changes: 1 addition & 1 deletion bin/stop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# one-command stop, run by developerz.ai when a session ends — established by dz-runner setup mode. One command; adjust as the repo grows.
# one-command stop, run by developerz.ai when a session ends — owned by this repository's maintainers. One command; adjust as the repo grows.
set -euo pipefail
cd "$(dirname "$0")/.."
# Nothing detected to stop (no compose file at the repo root). Replace with the command
Expand Down
Loading