devrites 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +24 -0
- package/.claude-plugin/plugin.json +43 -0
- package/CHANGELOG.md +391 -0
- package/LICENSE +56 -0
- package/NOTICE.md +18 -0
- package/README.md +582 -0
- package/SECURITY.md +193 -0
- package/bin/devrites.mjs +100 -0
- package/docs/architecture.md +272 -0
- package/docs/cli-mcp.md +57 -0
- package/docs/command-map.md +143 -0
- package/docs/flow.md +360 -0
- package/docs/release.md +29 -0
- package/docs/skills.md +214 -0
- package/docs/usage.md +325 -0
- package/install.sh +359 -0
- package/mcp/devrites-mcp.mjs +103 -0
- package/pack/.claude/agents/devrites-code-reviewer.md +50 -0
- package/pack/.claude/agents/devrites-doubt-reviewer.md +55 -0
- package/pack/.claude/agents/devrites-frontend-reviewer.md +52 -0
- package/pack/.claude/agents/devrites-performance-reviewer.md +47 -0
- package/pack/.claude/agents/devrites-plan-reviewer.md +79 -0
- package/pack/.claude/agents/devrites-security-auditor.md +53 -0
- package/pack/.claude/agents/devrites-simplifier-reviewer.md +75 -0
- package/pack/.claude/agents/devrites-slice-wright.md +181 -0
- package/pack/.claude/agents/devrites-spec-reviewer.md +72 -0
- package/pack/.claude/agents/devrites-strategy-reviewer.md +62 -0
- package/pack/.claude/agents/devrites-test-analyst.md +47 -0
- package/pack/.claude/hooks/devrites-a1-guard.sh +81 -0
- package/pack/.claude/hooks/devrites-allow.sh +44 -0
- package/pack/.claude/hooks/devrites-cursor.sh +28 -0
- package/pack/.claude/hooks/devrites-orient.sh +53 -0
- package/pack/.claude/hooks/devrites-redwatch.sh +39 -0
- package/pack/.claude/hooks/devrites-refresh-indexes.sh +127 -0
- package/pack/.claude/hooks/devrites-reviewer-readonly.sh +28 -0
- package/pack/.claude/hooks/devrites-statusline.sh +18 -0
- package/pack/.claude/hooks/devrites-stop-gate.sh +45 -0
- package/pack/.claude/hooks/devrites-wright-scope.sh +35 -0
- package/pack/.claude/hooks/hooks.json +52 -0
- package/pack/.claude/rules/README.md +48 -0
- package/pack/.claude/rules/afk-hitl.md +245 -0
- package/pack/.claude/rules/agents.md +98 -0
- package/pack/.claude/rules/anti-patterns.md +48 -0
- package/pack/.claude/rules/code-review.md +38 -0
- package/pack/.claude/rules/coding-style.md +55 -0
- package/pack/.claude/rules/context-hygiene.md +97 -0
- package/pack/.claude/rules/core.md +119 -0
- package/pack/.claude/rules/development-workflow.md +40 -0
- package/pack/.claude/rules/documentation.md +27 -0
- package/pack/.claude/rules/error-handling.md +33 -0
- package/pack/.claude/rules/git-workflow.md +35 -0
- package/pack/.claude/rules/hooks.md +38 -0
- package/pack/.claude/rules/patterns.md +45 -0
- package/pack/.claude/rules/performance.md +27 -0
- package/pack/.claude/rules/prose-style.md +101 -0
- package/pack/.claude/rules/security.md +63 -0
- package/pack/.claude/rules/testing.md +88 -0
- package/pack/.claude/rules/tooling.md +72 -0
- package/pack/.claude/settings.json +53 -0
- package/pack/.claude/skills/devrites-api-interface/SKILL.md +45 -0
- package/pack/.claude/skills/devrites-audit/SKILL.md +73 -0
- package/pack/.claude/skills/devrites-browser-proof/SKILL.md +38 -0
- package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +50 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/build-the-loop.md +47 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +17 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/hypotheses.md +17 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/instrumentation.md +21 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/regression-test.md +31 -0
- package/pack/.claude/skills/devrites-doubt/SKILL.md +75 -0
- package/pack/.claude/skills/devrites-frontend-craft/SKILL.md +96 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/craft.md +59 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/design-references.md +116 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/fullstack.md +45 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/quality-standards.md +215 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/reuse-first.md +59 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/shape.md +60 -0
- package/pack/.claude/skills/devrites-interview/SKILL.md +81 -0
- package/pack/.claude/skills/devrites-lib/SKILL.md +76 -0
- package/pack/.claude/skills/devrites-lib/scripts/analyze.sh +78 -0
- package/pack/.claude/skills/devrites-lib/scripts/check-acceptance.sh +75 -0
- package/pack/.claude/skills/devrites-lib/scripts/close-out.sh +47 -0
- package/pack/.claude/skills/devrites-lib/scripts/conventions.py +273 -0
- package/pack/.claude/skills/devrites-lib/scripts/coverage.sh +51 -0
- package/pack/.claude/skills/devrites-lib/scripts/devrites.sh +69 -0
- package/pack/.claude/skills/devrites-lib/scripts/doctor.sh +92 -0
- package/pack/.claude/skills/devrites-lib/scripts/evidence-fresh.sh +63 -0
- package/pack/.claude/skills/devrites-lib/scripts/footprint.sh +45 -0
- package/pack/.claude/skills/devrites-lib/scripts/learnings.sh +74 -0
- package/pack/.claude/skills/devrites-lib/scripts/mutation-gate.sh +52 -0
- package/pack/.claude/skills/devrites-lib/scripts/package-existence.sh +68 -0
- package/pack/.claude/skills/devrites-lib/scripts/preamble.sh +76 -0
- package/pack/.claude/skills/devrites-lib/scripts/progress.sh +103 -0
- package/pack/.claude/skills/devrites-lib/scripts/readiness.sh +62 -0
- package/pack/.claude/skills/devrites-lib/scripts/reconcile.sh +123 -0
- package/pack/.claude/skills/devrites-lib/scripts/resolve.sh +279 -0
- package/pack/.claude/skills/devrites-lib/scripts/stuck.sh +67 -0
- package/pack/.claude/skills/devrites-lib/scripts/test-integrity.sh +87 -0
- package/pack/.claude/skills/devrites-lib/scripts/tick-afk.sh +52 -0
- package/pack/.claude/skills/devrites-prose-craft/SKILL.md +105 -0
- package/pack/.claude/skills/devrites-prose-craft/reference/banned-phrases.md +95 -0
- package/pack/.claude/skills/devrites-prose-craft/reference/examples.md +88 -0
- package/pack/.claude/skills/devrites-prose-craft/reference/structures.md +134 -0
- package/pack/.claude/skills/devrites-refresh-indexes/SKILL.md +54 -0
- package/pack/.claude/skills/devrites-source-driven/SKILL.md +36 -0
- package/pack/.claude/skills/devrites-ux-shape/SKILL.md +121 -0
- package/pack/.claude/skills/devrites-ux-shape/reference/brief-template.md +93 -0
- package/pack/.claude/skills/devrites-ux-shape/reference/visual-direction-probe.md +48 -0
- package/pack/.claude/skills/rite/SKILL.md +135 -0
- package/pack/.claude/skills/rite/reference/menu.md +32 -0
- package/pack/.claude/skills/rite-adopt/SKILL.md +83 -0
- package/pack/.claude/skills/rite-adopt/reference/adoption.md +58 -0
- package/pack/.claude/skills/rite-adopt/reference/anti-patterns.md +19 -0
- package/pack/.claude/skills/rite-autocomplete/SKILL.md +96 -0
- package/pack/.claude/skills/rite-autocomplete/reference/decision-policy.md +35 -0
- package/pack/.claude/skills/rite-autocomplete/reference/loop.md +54 -0
- package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +59 -0
- package/pack/.claude/skills/rite-build/SKILL.md +261 -0
- package/pack/.claude/skills/rite-build/reference/afk-discipline.md +145 -0
- package/pack/.claude/skills/rite-build/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-build/reference/checkpoint-protocol.md +149 -0
- package/pack/.claude/skills/rite-build/reference/evidence-standard.md +32 -0
- package/pack/.claude/skills/rite-build/reference/frontend-trigger.md +39 -0
- package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +38 -0
- package/pack/.claude/skills/rite-build/reference/spec-drift-guard.md +43 -0
- package/pack/.claude/skills/rite-build/reference/tdd.md +26 -0
- package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +115 -0
- package/pack/.claude/skills/rite-define/SKILL.md +157 -0
- package/pack/.claude/skills/rite-define/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-define/reference/gates.md +152 -0
- package/pack/.claude/skills/rite-define/reference/plan-template.md +65 -0
- package/pack/.claude/skills/rite-doctor/SKILL.md +50 -0
- package/pack/.claude/skills/rite-frame/SKILL.md +116 -0
- package/pack/.claude/skills/rite-frame/reference/failure-modes.md +68 -0
- package/pack/.claude/skills/rite-handoff/SKILL.md +95 -0
- package/pack/.claude/skills/rite-handoff/reference/handoff-template.md +34 -0
- package/pack/.claude/skills/rite-learn/SKILL.md +82 -0
- package/pack/.claude/skills/rite-plan/SKILL.md +82 -0
- package/pack/.claude/skills/rite-plan/reference/anti-patterns.md +24 -0
- package/pack/.claude/skills/rite-plan/reference/dependency-graph.md +33 -0
- package/pack/.claude/skills/rite-plan/reference/replan-and-repair.md +42 -0
- package/pack/.claude/skills/rite-plan/reference/slicing.md +52 -0
- package/pack/.claude/skills/rite-plan/reference/task-breakdown.md +34 -0
- package/pack/.claude/skills/rite-polish/SKILL.md +90 -0
- package/pack/.claude/skills/rite-polish/reference/anti-ai-slop.md +177 -0
- package/pack/.claude/skills/rite-polish/reference/anti-patterns.md +27 -0
- package/pack/.claude/skills/rite-polish/reference/backend-polish.md +80 -0
- package/pack/.claude/skills/rite-polish/reference/browser-polish-evidence.md +31 -0
- package/pack/.claude/skills/rite-polish/reference/code.md +85 -0
- package/pack/.claude/skills/rite-polish/reference/design-system-discovery.md +35 -0
- package/pack/.claude/skills/rite-polish/reference/harden-checklist.md +109 -0
- package/pack/.claude/skills/rite-polish/reference/ui.md +136 -0
- package/pack/.claude/skills/rite-pressure-test/SKILL.md +43 -0
- package/pack/.claude/skills/rite-prototype/SKILL.md +87 -0
- package/pack/.claude/skills/rite-prove/SKILL.md +120 -0
- package/pack/.claude/skills/rite-prove/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-prove/reference/browser-proof.md +26 -0
- package/pack/.claude/skills/rite-prove/reference/failure-triage.md +25 -0
- package/pack/.claude/skills/rite-prove/reference/proof-ladder.md +26 -0
- package/pack/.claude/skills/rite-prove/reference/test-command-discovery.md +30 -0
- package/pack/.claude/skills/rite-quick/SKILL.md +81 -0
- package/pack/.claude/skills/rite-resolve/SKILL.md +113 -0
- package/pack/.claude/skills/rite-resolve/reference/answer-protocol.md +114 -0
- package/pack/.claude/skills/rite-review/SKILL.md +170 -0
- package/pack/.claude/skills/rite-review/reference/anti-patterns.md +32 -0
- package/pack/.claude/skills/rite-review/reference/cognitive-load.md +90 -0
- package/pack/.claude/skills/rite-review/reference/feature-scoped-review.md +26 -0
- package/pack/.claude/skills/rite-review/reference/five-axis-review.md +46 -0
- package/pack/.claude/skills/rite-review/reference/nielsen-heuristics.md +130 -0
- package/pack/.claude/skills/rite-review/reference/parallel-dispatch.md +62 -0
- package/pack/.claude/skills/rite-review/reference/performance-review.md +28 -0
- package/pack/.claude/skills/rite-review/reference/security-review.md +32 -0
- package/pack/.claude/skills/rite-seal/SKILL.md +183 -0
- package/pack/.claude/skills/rite-seal/reference/anti-patterns.md +27 -0
- package/pack/.claude/skills/rite-seal/reference/conventions-ledger.md +63 -0
- package/pack/.claude/skills/rite-seal/reference/final-evidence.md +72 -0
- package/pack/.claude/skills/rite-seal/reference/go-no-go.md +37 -0
- package/pack/.claude/skills/rite-seal/reference/parallel-dispatch.md +69 -0
- package/pack/.claude/skills/rite-seal/reference/risk-and-rollback.md +30 -0
- package/pack/.claude/skills/rite-seal/reference/seal-template.md +36 -0
- package/pack/.claude/skills/rite-ship/SKILL.md +120 -0
- package/pack/.claude/skills/rite-ship/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-ship/reference/close-out.md +31 -0
- package/pack/.claude/skills/rite-ship/reference/design-memory.md +120 -0
- package/pack/.claude/skills/rite-ship/reference/git-ship.md +42 -0
- package/pack/.claude/skills/rite-ship/reference/ship-template.md +33 -0
- package/pack/.claude/skills/rite-spec/SKILL.md +126 -0
- package/pack/.claude/skills/rite-spec/reference/acceptance-criteria.md +31 -0
- package/pack/.claude/skills/rite-spec/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-spec/reference/interview-patterns.md +56 -0
- package/pack/.claude/skills/rite-spec/reference/investigation.md +64 -0
- package/pack/.claude/skills/rite-spec/reference/question-protocol.md +61 -0
- package/pack/.claude/skills/rite-spec/reference/references-intake.md +57 -0
- package/pack/.claude/skills/rite-spec/reference/spec-checklists.md +73 -0
- package/pack/.claude/skills/rite-spec/reference/spec-template.md +124 -0
- package/pack/.claude/skills/rite-spec/reference/state-workspace.md +159 -0
- package/pack/.claude/skills/rite-status/SKILL.md +101 -0
- package/pack/.claude/skills/rite-temper/SKILL.md +119 -0
- package/pack/.claude/skills/rite-temper/reference/anti-patterns.md +29 -0
- package/pack/.claude/skills/rite-temper/reference/review-dimensions.md +65 -0
- package/pack/.claude/skills/rite-temper/reference/scope-modes.md +53 -0
- package/pack/.claude/skills/rite-temper/reference/significance.md +46 -0
- package/pack/.claude/skills/rite-temper/reference/strategy-template.md +90 -0
- package/pack/.claude/skills/rite-vet/SKILL.md +155 -0
- package/pack/.claude/skills/rite-vet/reference/anti-patterns.md +29 -0
- package/pack/.claude/skills/rite-vet/reference/artifacts.md +135 -0
- package/pack/.claude/skills/rite-vet/reference/cross-model.md +41 -0
- package/pack/.claude/skills/rite-vet/reference/depth.md +53 -0
- package/pack/.claude/skills/rite-vet/reference/eng-lenses.md +48 -0
- package/pack/.claude/skills/rite-vet/reference/review-axes.md +167 -0
- package/pack/.claude/skills/rite-zoom-out/SKILL.md +75 -0
- package/package.json +68 -0
- package/scripts/build-release-tarball.sh +74 -0
- package/scripts/check-cross-refs.py +121 -0
- package/scripts/check-no-global-writes.sh +44 -0
- package/scripts/check-rule-uniqueness.sh +73 -0
- package/scripts/devrites-detect.sh +175 -0
- package/scripts/eval-runner.py +273 -0
- package/scripts/grade-feature.sh +104 -0
- package/scripts/install-lib.sh +83 -0
- package/scripts/pin.sh +166 -0
- package/scripts/render-eval-summary.py +48 -0
- package/scripts/run-evals.sh +149 -0
- package/scripts/run-outcome-evals.sh +49 -0
- package/scripts/scan-pack-security.py +209 -0
- package/scripts/scan-supply-chain-iocs.py +127 -0
- package/scripts/supply-chain-iocs.json +11 -0
- package/scripts/sync-version.sh +56 -0
- package/scripts/validate-frontmatter.py +149 -0
- package/scripts/validate-workflow-security.py +86 -0
- package/scripts/validate.sh +234 -0
- package/uninstall.sh +137 -0
- package/update.sh +196 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# test-integrity.sh — anti-reward-hacking gate for /rite-build, /rite-prove, /rite-seal.
|
|
3
|
+
# Proves the slice did not reach green by WEAKENING its tests. Diffs the test files
|
|
4
|
+
# against the slice base (the reconcile.sh snapshot tree if present, else HEAD) and
|
|
5
|
+
# flags any test file that was deleted, had a skip/focus marker added, or lost
|
|
6
|
+
# assertions. Turns "never weaken a failing test" (rules/testing.md) into an exit code
|
|
7
|
+
# instead of a prose promise the model can rationalize past — same doctrine as
|
|
8
|
+
# reconcile.sh / readiness.sh. Read-only.
|
|
9
|
+
#
|
|
10
|
+
# Usage:
|
|
11
|
+
# test-integrity.sh [slug] (alias: test-integrity.sh check [slug])
|
|
12
|
+
# slug — optional; defaults to .devrites/ACTIVE
|
|
13
|
+
#
|
|
14
|
+
# Exit codes:
|
|
15
|
+
# 0 clean — no test file deleted, skipped, or de-asserted since the base
|
|
16
|
+
# 2 no active workspace / bad args
|
|
17
|
+
# 3 WEAKENED — a test was deleted, skip/.only-marked, or lost assertions: Critical.
|
|
18
|
+
# Revert the weakening; fix the code (or route the change as a blocking question).
|
|
19
|
+
set -u
|
|
20
|
+
|
|
21
|
+
a1="${1:-}"
|
|
22
|
+
case "$a1" in
|
|
23
|
+
check) slug="${2:-}" ;;
|
|
24
|
+
""|-*) slug="" ;;
|
|
25
|
+
*) slug="$a1" ;;
|
|
26
|
+
esac
|
|
27
|
+
[ -n "$slug" ] || slug="$(cat .devrites/ACTIVE 2>/dev/null || true)"
|
|
28
|
+
[ -n "$slug" ] || { echo "test-integrity: no active workspace (pass a slug or set .devrites/ACTIVE)." >&2; exit 2; }
|
|
29
|
+
|
|
30
|
+
d=".devrites/work/$slug"
|
|
31
|
+
[ -d "$d" ] || { echo "test-integrity: no workspace at $d." >&2; exit 2; }
|
|
32
|
+
|
|
33
|
+
root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
|
|
34
|
+
if [ -z "$root" ]; then
|
|
35
|
+
echo "test-integrity: not a git repo — gate skipped, eyeball the test diff by hand." >&2
|
|
36
|
+
exit 0
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
base_tree="$(cat "$d/.reconcile-base" 2>/dev/null || true)"
|
|
40
|
+
ref="${base_tree:-HEAD}"
|
|
41
|
+
|
|
42
|
+
is_test_file() {
|
|
43
|
+
case "$1" in
|
|
44
|
+
*_test.*|*.test.*|*.spec.*|*_spec.*|*Test.*|*Tests.*|*Spec.*) return 0 ;;
|
|
45
|
+
*/__tests__/*|*/tests/*|*/test/*|*/spec/*|test_*) return 0 ;;
|
|
46
|
+
*test*|*spec*) return 0 ;;
|
|
47
|
+
esac
|
|
48
|
+
return 1
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
SKIP_RE='(\bit|\bdescribe|\btest|\bcontext)\.skip|\bxit\b|\bxdescribe\b|\.only\b|@pytest\.mark\.skip|@unittest\.skip|\bpytest\.skip\b|t\.Skip\(|#\[ignore\]|@Ignore\b|@Disabled\b|\bfdescribe\b|\bfit\('
|
|
52
|
+
ASSERT_RE='assert|expect\(|\.should\b|\brequire\.|EXPECT_|ASSERT_|XCTAssert|t\.Error|t\.Fatal'
|
|
53
|
+
|
|
54
|
+
count() { printf '%s' "${1:-}" | grep -oE "$2" 2>/dev/null | wc -l | tr -d ' '; }
|
|
55
|
+
|
|
56
|
+
weak=0
|
|
57
|
+
report=""
|
|
58
|
+
|
|
59
|
+
while IFS= read -r f; do
|
|
60
|
+
[ -z "$f" ] && continue
|
|
61
|
+
is_test_file "$f" || continue
|
|
62
|
+
old="$(git -C "$root" show "$ref:$f" 2>/dev/null || true)"
|
|
63
|
+
[ -n "$old" ] || continue # new test file — adding tests is never a weakening
|
|
64
|
+
if [ ! -f "$root/$f" ]; then
|
|
65
|
+
weak=$((weak+1)); report="${report} - ${f}: test file DELETED
|
|
66
|
+
"; continue
|
|
67
|
+
fi
|
|
68
|
+
new="$(cat "$root/$f")"
|
|
69
|
+
os="$(count "$old" "$SKIP_RE")"; ns="$(count "$new" "$SKIP_RE")"
|
|
70
|
+
oa="$(count "$old" "$ASSERT_RE")"; na="$(count "$new" "$ASSERT_RE")"
|
|
71
|
+
if [ "${ns:-0}" -gt "${os:-0}" ]; then
|
|
72
|
+
weak=$((weak+1)); report="${report} - ${f}: skip/focus markers added (${os}→${ns})
|
|
73
|
+
"
|
|
74
|
+
elif [ "${na:-0}" -lt "${oa:-0}" ]; then
|
|
75
|
+
weak=$((weak+1)); report="${report} - ${f}: assertions dropped (${oa}→${na})
|
|
76
|
+
"
|
|
77
|
+
fi
|
|
78
|
+
done < <(git -C "$root" diff --name-only "$ref" 2>/dev/null)
|
|
79
|
+
|
|
80
|
+
if [ "$weak" -gt 0 ]; then
|
|
81
|
+
echo "test-integrity: WEAKENED — $weak test file(s) lost coverage since the slice base:" >&2
|
|
82
|
+
printf '%s' "$report" >&2
|
|
83
|
+
echo "A test weakened to pass a gate is a Critical finding. Revert it; fix the code or raise a blocking question." >&2
|
|
84
|
+
exit 3
|
|
85
|
+
fi
|
|
86
|
+
echo "test-integrity: OK — no test deleted, skipped, or de-asserted since the base."
|
|
87
|
+
exit 0
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Decrement the AFK slice budget in state.md — called by /rite-build's record
|
|
3
|
+
# step (workflow step 6) after a slice is built under AFK. The mutable remaining count lives in
|
|
4
|
+
# state.md (`AFK slices remaining: <n>`); `.devrites/AFK`'s `max_slices` is the
|
|
5
|
+
# read-only initial budget and is never rewritten in place.
|
|
6
|
+
#
|
|
7
|
+
# Usage: tick-afk.sh <state.md path>
|
|
8
|
+
#
|
|
9
|
+
# Reads "AFK slices remaining: <n>", decrements it, writes it back in place,
|
|
10
|
+
# and prints the new value.
|
|
11
|
+
#
|
|
12
|
+
# Exit codes:
|
|
13
|
+
# 0 decremented, budget remains (new value > 0); or no AFK budget set (no-op)
|
|
14
|
+
# 3 budget exhausted (new value reached 0) — caller must force a HITL stop
|
|
15
|
+
|
|
16
|
+
set -euo pipefail
|
|
17
|
+
|
|
18
|
+
sfile="${1:-}"
|
|
19
|
+
if [ -z "$sfile" ] || [ ! -f "$sfile" ]; then
|
|
20
|
+
printf 'tick-afk: state.md not found at %s\n' "${sfile:-<unset>}" >&2
|
|
21
|
+
exit 5
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# Defensive: a state.md without the field means no AFK budget is in effect.
|
|
25
|
+
# Don't invent one; let the build proceed (HITL or unbudgeted AFK).
|
|
26
|
+
# state.md renders fields as markdown bullets ("- AFK slices remaining: <n>").
|
|
27
|
+
# Tolerate an optional leading "- " and a trailing " | none" / comment.
|
|
28
|
+
cur="$(awk 'match($0, /^[[:space:]]*-?[[:space:]]*AFK slices remaining:[[:space:]]*/) {
|
|
29
|
+
rest = substr($0, RLENGTH + 1); sub(/[[:space:]].*$/, "", rest); print rest; exit }' "$sfile")"
|
|
30
|
+
if [ -z "$cur" ] || [ "$cur" = "none" ]; then
|
|
31
|
+
printf 'tick-afk: no "AFK slices remaining" budget set in %s — no-op\n' "$sfile"
|
|
32
|
+
exit 0
|
|
33
|
+
fi
|
|
34
|
+
if ! printf '%s' "$cur" | grep -qE '^[0-9]+$'; then
|
|
35
|
+
printf 'tick-afk: "AFK slices remaining" is not a number (%s) in %s\n' "$cur" "$sfile" >&2
|
|
36
|
+
exit 5
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
new=$(( cur - 1 ))
|
|
40
|
+
[ "$new" -lt 0 ] && new=0
|
|
41
|
+
|
|
42
|
+
# Rewrite the field in place. Awk rewrites the file atomically via a temp file.
|
|
43
|
+
awk -v n="$new" '
|
|
44
|
+
/^[[:space:]]*-?[[:space:]]*AFK slices remaining:/ { print "- AFK slices remaining: " n; next }
|
|
45
|
+
{ print }
|
|
46
|
+
' "$sfile" > "$sfile.tmp" && mv "$sfile.tmp" "$sfile"
|
|
47
|
+
|
|
48
|
+
printf '%s\n' "$new"
|
|
49
|
+
|
|
50
|
+
# Budget exhausted — force the caller to stop and revert to HITL.
|
|
51
|
+
[ "$new" -le 0 ] && exit 3
|
|
52
|
+
exit 0
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devrites-prose-craft
|
|
3
|
+
description: Write the artifacts and chat replies a senior engineer would — direct, specific, human voice — not the default LLM tells (filler openers, false contrasts, fake profundity, em-dash tics, hedging). Use when a DevRites phase writes prose (spec.md, plan.md, decisions.md, review.md, seal.md, commit/PR bodies) or composes a user-facing reply, and as the catch pass in /rite-polish. Calibrated for technical writing — keeps precise lists, exact terms, and spec structure. Not for code comments and naming (the build-time anti-slop charter covers those) or UI craft (use devrites-frontend-craft).
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# devrites-prose-craft — prose that reads human
|
|
8
|
+
|
|
9
|
+
Strip the default LLM voice from everything DevRites writes. The reader is a teammate, not a
|
|
10
|
+
search engine; the artifact is documentation a person will rely on, not content to fill a box.
|
|
11
|
+
This is the prose sibling of [`devrites-frontend-craft`](../devrites-frontend-craft/SKILL.md):
|
|
12
|
+
craft applied to words instead of UI.
|
|
13
|
+
|
|
14
|
+
The always-available core is [`.claude/rules/prose-style.md`](../../rules/prose-style.md) — the
|
|
15
|
+
two registers and the cut-list. This skill carries the depth: the full banned-phrase and
|
|
16
|
+
structure references, and the before/after examples. Read the rule first; load a reference
|
|
17
|
+
when you need the full list.
|
|
18
|
+
|
|
19
|
+
## When this fires
|
|
20
|
+
- A text-generating phase composes an artifact: `/rite-spec` (overview, rationale),
|
|
21
|
+
`/rite-define` / `/rite-plan` (plan narrative), `/rite-temper` / `/rite-vet` (review prose),
|
|
22
|
+
`/rite-review` / `/rite-seal` (findings + verdict prose), `/rite-ship` (commit/PR body),
|
|
23
|
+
`devrites-doubt` / `rite-handoff` (notes).
|
|
24
|
+
- Any phase composes a substantive **user-facing reply** (not the deterministic progress
|
|
25
|
+
footers — those are script-rendered and exact by design).
|
|
26
|
+
- `/rite-polish` Phase 1 as the **catch** pass on prose that slipped through at write time.
|
|
27
|
+
|
|
28
|
+
## Two modes
|
|
29
|
+
- **Rewrite (default).** When DevRites writes the artifact/reply or polishes it, fix the prose
|
|
30
|
+
in place.
|
|
31
|
+
- **Detect-only.** When auditing prose you shouldn't silently change — a user's existing
|
|
32
|
+
`spec.md` at `/rite-adopt`, text under `/rite-review` — list the tells with quotes and leave
|
|
33
|
+
the text untouched. Mirrors `devrites-audit`'s read-only stance.
|
|
34
|
+
|
|
35
|
+
Order findings by severity: **P0** credibility-killers (vague attribution, a marketing
|
|
36
|
+
adjective standing in for evidence, a false/unsourced claim) → **P1** obvious tells (negative
|
|
37
|
+
parallelism, filler openers, em-dash tics) → **P2** polish (rhythm, word choice). A quick pass
|
|
38
|
+
fixes P0 + P1 and stops; a full pass takes P2 too.
|
|
39
|
+
|
|
40
|
+
## The two registers (calibrated — this is the adaptation that matters)
|
|
41
|
+
DevRites writes in two voices; apply the cut-list to both, but the precision rules differ.
|
|
42
|
+
|
|
43
|
+
- **Prose** — replies and narrative artifact sections. Optimize for a human voice: direct,
|
|
44
|
+
specific, active, varied rhythm.
|
|
45
|
+
- **Technical** — acceptance criteria, task slices, API/data contracts, schema, config, test
|
|
46
|
+
names. Optimize for **precision**. Numbered criteria, complete enumerations, exact
|
|
47
|
+
identifiers, and domain terms are correct here — **keep them**. Never humanize a spec into
|
|
48
|
+
vagueness.
|
|
49
|
+
|
|
50
|
+
The shared rule: cut what carries no information; keep what the reader needs. In prose that
|
|
51
|
+
kills filler; in technical writing it keeps the precise list.
|
|
52
|
+
|
|
53
|
+
## The cut-list (summary — full lists in references)
|
|
54
|
+
1. **Throat-clearing openers.** "Here's the thing", "It's worth noting", "Let me be clear".
|
|
55
|
+
State the point. → [`reference/banned-phrases.md`](reference/banned-phrases.md)
|
|
56
|
+
2. **False binary contrast.** "It's not X, it's Y", "not just X but Y", "the question isn't X".
|
|
57
|
+
State Y directly; drop the negation. → [`reference/structures.md`](reference/structures.md)
|
|
58
|
+
3. **Fake profundity & vague declaratives.** "Let that sink in", "the implications are
|
|
59
|
+
significant". Show the specific thing or cut the sentence.
|
|
60
|
+
4. **Marketing adjectives on engineering work.** "robust", "scalable", "seamless",
|
|
61
|
+
"production-ready", "comprehensive". Say what it does and what proves it.
|
|
62
|
+
5. **Hedging stacks & meta-narration.** "it's important to note that, generally"; "in this
|
|
63
|
+
section we'll…". Make the claim or delete the announcement.
|
|
64
|
+
6. **False agency.** "the data tells us", "the decision emerges". Name who acts.
|
|
65
|
+
7. **Em-dash tics.** A tool, not a tic — at most one per paragraph; multiple is the tell.
|
|
66
|
+
8. **Active voice, varied rhythm.** Named actor at the front; mix sentence lengths; don't
|
|
67
|
+
stack staccato fragments for drama.
|
|
68
|
+
|
|
69
|
+
## Strong verbs (technical register)
|
|
70
|
+
Weak verb + adverb → one precise verb. The swap kills filler and sharpens the claim:
|
|
71
|
+
|
|
72
|
+
| Weak | Strong |
|
|
73
|
+
|---|---|
|
|
74
|
+
| "helps with" / "works to" | powers · enforces · gates · blocks |
|
|
75
|
+
| "makes use of" / "utilizes" | uses |
|
|
76
|
+
| "is responsible for" | owns · writes · renders |
|
|
77
|
+
| "in order to" | to |
|
|
78
|
+
| "has the ability to" | can |
|
|
79
|
+
| "provides support for" | supports |
|
|
80
|
+
| "a number of" / "a variety of" | the actual count |
|
|
81
|
+
|
|
82
|
+
**Signal, not verdict.** The cut-list flags *signals* of LLM prose, not proof — a precise technical
|
|
83
|
+
list, an exact identifier, or a numbered acceptance criterion can trip a "tell" pattern and still be
|
|
84
|
+
correct. When a flagged construct carries real information (a genuine three-item list, a real
|
|
85
|
+
contrast the spec needs), keep it. Over-correcting precise spec structure into smooth prose is its
|
|
86
|
+
own slop (this is the same calibration as the two registers above).
|
|
87
|
+
|
|
88
|
+
## Quick check before delivering prose
|
|
89
|
+
- Filler opener or recap of what you just said? Cut it.
|
|
90
|
+
- "Not X, it's Y" anywhere? Rewrite to state Y.
|
|
91
|
+
- A claim of significance with no specific named? Replace with the specific, or cut.
|
|
92
|
+
- A marketing adjective standing in for evidence? Replace with what proves it.
|
|
93
|
+
- Passive voice hiding the actor? Front the actor.
|
|
94
|
+
- More than one em-dash in a paragraph? Reduce to one.
|
|
95
|
+
- Vague attribution ("studies show", "best practice says") with no source named? Cite or cut.
|
|
96
|
+
- Topic-swap test: would the sentence read true for any other feature? Then name the specific.
|
|
97
|
+
- **Technical register intact?** Acceptance criteria still numbered, identifiers exact, real
|
|
98
|
+
enumerations complete, one name per entity — confirm the calibration didn't strip precision.
|
|
99
|
+
|
|
100
|
+
Examples (including a slop `spec.md` vs a clean one): [`reference/examples.md`](reference/examples.md).
|
|
101
|
+
|
|
102
|
+
## Default vs departure
|
|
103
|
+
Match the project's existing writing where it has a voice (its README, ADRs, code comments).
|
|
104
|
+
A house style — even a plain one — beats a "better" foreign voice. Only depart when the
|
|
105
|
+
existing prose is itself slop. When unsure, write flatter and more direct.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Phrases & words to cut
|
|
2
|
+
|
|
3
|
+
Load this when scrubbing prose. The lists are calibrated for a coding agent: the **AI
|
|
4
|
+
vocabulary** section marks which words are *always* slop versus which are legitimate in
|
|
5
|
+
technical writing, so the skill doesn't flatten a real spec into vagueness.
|
|
6
|
+
|
|
7
|
+
## Throat-clearing openers (cut — state the point)
|
|
8
|
+
|
|
9
|
+
- "Here's the thing:" / "Here's what / why / how [X]"
|
|
10
|
+
- "It's worth noting that" / "It's important to note that"
|
|
11
|
+
- "Let me be clear" / "I'll be honest" / "To be honest"
|
|
12
|
+
- "The uncomfortable truth is" / "The reality is" / "It turns out"
|
|
13
|
+
- "Make no mistake" / "At its core" / "At the end of the day"
|
|
14
|
+
- "When it comes to [X]" / "In today's [fast-paced / digital] world"
|
|
15
|
+
|
|
16
|
+
Any "here's what/this/that" or "it's worth noting" is runway before the point. Delete it and
|
|
17
|
+
start at the point.
|
|
18
|
+
|
|
19
|
+
## Emphasis crutches (delete — they add no information)
|
|
20
|
+
|
|
21
|
+
- "Let that sink in." / "Full stop." / "Period."
|
|
22
|
+
- "This matters because" / "Here's why that matters"
|
|
23
|
+
- "This is the deepest problem" / "the stakes are high" / "the consequences are real"
|
|
24
|
+
|
|
25
|
+
## Hedging stacks (make the claim or cut it)
|
|
26
|
+
|
|
27
|
+
- "it's important to note that, generally, in most cases…"
|
|
28
|
+
- "perhaps", "could potentially", "it could be argued that", "one might say"
|
|
29
|
+
|
|
30
|
+
Stacked hedges read as a model covering itself. One honest qualifier is fine; a stack is slop.
|
|
31
|
+
|
|
32
|
+
## Sycophancy & chatbot artifacts (remove entirely)
|
|
33
|
+
|
|
34
|
+
These leak the assistant register into artifacts and replies:
|
|
35
|
+
|
|
36
|
+
- "Great question!" / "You're absolutely right!" / "Certainly!" / "Of course!"
|
|
37
|
+
- "I hope this helps!" / "Let me know if you need anything else" / "Feel free to reach out"
|
|
38
|
+
|
|
39
|
+
A `decisions.md` entry or a `seal.md` verdict is a document, not a chat turn. No pleasantries.
|
|
40
|
+
|
|
41
|
+
## Business jargon → plain language
|
|
42
|
+
|
|
43
|
+
| Avoid | Use instead |
|
|
44
|
+
|---|---|
|
|
45
|
+
| Navigate (challenges) | handle, address |
|
|
46
|
+
| Unpack (the analysis) | explain, examine |
|
|
47
|
+
| Lean into | accept, commit to |
|
|
48
|
+
| Landscape (figurative) | situation, field, area |
|
|
49
|
+
| Game-changer | significant, important |
|
|
50
|
+
| Deep dive | analysis, examination |
|
|
51
|
+
| Circle back / revisit later | return to |
|
|
52
|
+
| Moving forward | next, from now on |
|
|
53
|
+
| On the same page | aligned, agreed |
|
|
54
|
+
|
|
55
|
+
## AI vocabulary — calibrated (this is the adaptation that matters)
|
|
56
|
+
|
|
57
|
+
Word lists are blunt instruments. A coding agent must not "fix" a spec that legitimately says
|
|
58
|
+
a system is *robust* under load or exposes a *comprehensive* API. Three tiers:
|
|
59
|
+
|
|
60
|
+
**Tier 1 — always slop, replace on sight (figurative filler, never load-bearing in a spec):**
|
|
61
|
+
delve / delve into, tapestry, beacon, embark, testament to, realm, landscape (figurative),
|
|
62
|
+
pave the way, shed light on, game-changer, unlock the potential, ever-evolving, vibrant,
|
|
63
|
+
multifaceted, holistic, paradigm (as praise), groundbreaking, transformative, cutting-edge.
|
|
64
|
+
|
|
65
|
+
**Tier 2 — slop in prose, legitimate in technical context (keep the meaning, judge by use):**
|
|
66
|
+
robust, comprehensive, seamless, leverage, harness, facilitate, underpin, streamline,
|
|
67
|
+
foster, utilize, ecosystem, scalable.
|
|
68
|
+
- In a sentence selling the work ("a robust, scalable, seamless solution") → cut; say what it
|
|
69
|
+
does and what proves it.
|
|
70
|
+
- In a precise technical claim ("the retry path is robust to a dropped connection — see
|
|
71
|
+
`evidence.md`") → keep. The word carries a real, tested meaning.
|
|
72
|
+
|
|
73
|
+
**Tier 3 — flag by density, not per-word:** ordinary words (`important`, `key`, `various`,
|
|
74
|
+
`significant`) become slop only when they cluster. If a paragraph leans on three of them, it's
|
|
75
|
+
saying nothing — name the specific thing instead.
|
|
76
|
+
|
|
77
|
+
**Co-occurrence tell:** these words travel in packs. Where you find one Tier-1 word, look for
|
|
78
|
+
its neighbours (delve / boasts / bolstered / crucial / pivotal cluster together). One sighting
|
|
79
|
+
means scan the whole passage.
|
|
80
|
+
|
|
81
|
+
**Match inflected forms.** Each entry covers the word *and* its variants — adverb (`-ly`),
|
|
82
|
+
gerund (`-ing`), plural, conjugations: `delve` also catches `delving` / `delved`; `leverage`
|
|
83
|
+
catches `leveraging` / `leveraged`. The exception is a variant with a distinct, legitimate
|
|
84
|
+
meaning (`real` the intensifier vs `real` meaning factual) — judge it by use, same as the
|
|
85
|
+
tier calibration above.
|
|
86
|
+
|
|
87
|
+
## Adverbs (cut empty intensifiers; keep load-bearing ones)
|
|
88
|
+
|
|
89
|
+
Cut the emphasis adverbs that add nothing: really, very, just, literally, genuinely, honestly,
|
|
90
|
+
simply, actually, truly, fundamentally, inherently, inevitably, basically.
|
|
91
|
+
|
|
92
|
+
Keep adverbs that change meaning or precision: "validate **server-side**", "fail **closed**",
|
|
93
|
+
"runs **concurrently**", "**explicitly** typed". The rule is "cut the empty intensifier", not
|
|
94
|
+
"delete every -ly word" — over-applying the no-adverb rule is its own kind of damage in
|
|
95
|
+
technical writing.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Before / after — DevRites artifacts & replies
|
|
2
|
+
|
|
3
|
+
Real shapes DevRites emits. Each pair keeps the technical content and strips the voice. Note
|
|
4
|
+
how the calibration preserves precise lists and identifiers while cutting the prose slop.
|
|
5
|
+
|
|
6
|
+
## 1. `spec.md` overview
|
|
7
|
+
|
|
8
|
+
**Before (slop):**
|
|
9
|
+
> In today's fast-paced data landscape, this feature delivers a robust, scalable, and seamless
|
|
10
|
+
> CSV export capability. It's not just about exporting data — it's about empowering users to
|
|
11
|
+
> unlock the full potential of their information. This is a pivotal step forward.
|
|
12
|
+
|
|
13
|
+
**After:**
|
|
14
|
+
> Export the report table to CSV. Users currently copy rows by hand; this adds a one-click
|
|
15
|
+
> download. Scope: the reports table only, server-side streaming so memory stays flat on large
|
|
16
|
+
> exports.
|
|
17
|
+
|
|
18
|
+
Cut the jargon, the negative-parallelism hook, and the importance inflation. Kept what the
|
|
19
|
+
feature is, who it's for, and the scope boundary.
|
|
20
|
+
|
|
21
|
+
## 2. Acceptance criteria (technical register — precision stays)
|
|
22
|
+
|
|
23
|
+
**Keep this as-is — do NOT "humanize" it:**
|
|
24
|
+
> - [AC1] A `GET /reports/:id/export?format=csv` returns `200` with `Content-Type: text/csv`.
|
|
25
|
+
> - [AC2] Rows stream; peak memory stays under 50 MB for a 1M-row export.
|
|
26
|
+
> - [AC3] An unknown `format` returns `400` with `{ "error": "unsupported format" }`.
|
|
27
|
+
|
|
28
|
+
Three items, exact identifiers, exact status codes. This is the technical register working
|
|
29
|
+
correctly. The skill leaves it alone.
|
|
30
|
+
|
|
31
|
+
## 3. `decisions.md` entry
|
|
32
|
+
|
|
33
|
+
**Before (slop):**
|
|
34
|
+
> We made the strategic decision to leverage a streaming approach. This robust solution
|
|
35
|
+
> seamlessly handles large datasets and represents a best-in-class architecture that will
|
|
36
|
+
> empower the system to scale effortlessly.
|
|
37
|
+
|
|
38
|
+
**After:**
|
|
39
|
+
> Stream rows to the response instead of buffering the full file. Buffering OOM-ed on a
|
|
40
|
+
> 1M-row export in testing (see `evidence.md`). Trade-off: streaming rules out a total-row
|
|
41
|
+
> count in the header. Revisit if the UI needs an upfront progress bar.
|
|
42
|
+
|
|
43
|
+
Named the decision, the reason (with evidence), and the trade-off. That's what an ADR is for.
|
|
44
|
+
|
|
45
|
+
## 4. `review.md` / `seal.md` finding
|
|
46
|
+
|
|
47
|
+
**Before (slop):**
|
|
48
|
+
> It's worth noting that the error handling here could potentially be more robust. This is a
|
|
49
|
+
> critical area that fundamentally matters for production readiness.
|
|
50
|
+
|
|
51
|
+
**After:**
|
|
52
|
+
> Critical — `export.ts:42` catches every error and returns `500 "something went wrong"`. A
|
|
53
|
+
> bad `format` param should be a `400` with the specific message (AC3). Catch the parse error
|
|
54
|
+
> narrowly; let the rest propagate.
|
|
55
|
+
|
|
56
|
+
Severity label, `file:line`, the specific problem, the fix. No hedging, no "fundamentally".
|
|
57
|
+
|
|
58
|
+
## 5. Chat reply
|
|
59
|
+
|
|
60
|
+
**Before (slop):**
|
|
61
|
+
> Great question! I've gone ahead and implemented the export feature. It's not just functional
|
|
62
|
+
> — it's production-ready. Let me know if you need anything else!
|
|
63
|
+
|
|
64
|
+
**After:**
|
|
65
|
+
> Built slice 3 (CSV streaming). Tests pass (`npm test -- export` → 14 passing), peak memory
|
|
66
|
+
> 38 MB on the 1M-row fixture. Next: slice 4 (pagination). Want me to continue?
|
|
67
|
+
|
|
68
|
+
Dropped the pleasantries and the "not just X" inflation. Led with what's done and the evidence.
|
|
69
|
+
|
|
70
|
+
## 6. Commit body
|
|
71
|
+
|
|
72
|
+
**Before (slop):**
|
|
73
|
+
> This commit introduces a comprehensive and robust solution that seamlessly enables users to
|
|
74
|
+
> leverage powerful new export capabilities.
|
|
75
|
+
|
|
76
|
+
**After:**
|
|
77
|
+
> Buffering the whole CSV OOM-ed on >100k rows. Stream rows to the response so memory stays
|
|
78
|
+
> flat. Rules out an upfront total-count header; tracked in #123.
|
|
79
|
+
|
|
80
|
+
Followed `git-workflow.md`: the *why*, wrapped, in plain language.
|
|
81
|
+
|
|
82
|
+
## The pattern across all six
|
|
83
|
+
|
|
84
|
+
1. Lead with the concrete thing (what it is, what's done, what's wrong).
|
|
85
|
+
2. Replace every "robust/seamless/leverage" flourish with the specific behavior + its proof.
|
|
86
|
+
3. Drop negative-parallelism hooks ("not just X, it's Y") and importance labels ("pivotal").
|
|
87
|
+
4. Keep the technical register intact: exact identifiers, status codes, numbered criteria,
|
|
88
|
+
real enumerations. Precision is not slop.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Structures to avoid
|
|
2
|
+
|
|
3
|
+
The sentence- and paragraph-level shapes that mark machine-written prose. Each row is a
|
|
4
|
+
pattern and its fix. Calibrated: the slop is the *decorative* version; the genuine structural
|
|
5
|
+
version (a real enumeration, a real contrast that carries information) stays.
|
|
6
|
+
|
|
7
|
+
## Negative parallelism — the "not X, it's Y" family
|
|
8
|
+
|
|
9
|
+
The single most recognizable tell. It mimics insight by manufacturing a contrast.
|
|
10
|
+
|
|
11
|
+
| Pattern | Fix |
|
|
12
|
+
|---|---|
|
|
13
|
+
| "It's not X, it's Y." / "It isn't X. It's Y." | State Y. "Y is the cause." |
|
|
14
|
+
| "Not just X, but Y." / "Not only X but also Y." | State both plainly, or just Y if X is filler. |
|
|
15
|
+
| "The question isn't X. It's Y." | Ask the real question once, or state the answer. |
|
|
16
|
+
| "This isn't about X. It's about Y." | "This is about Y." |
|
|
17
|
+
| "X isn't the problem. Y is." | "Y is the problem." |
|
|
18
|
+
| "No X. No Y. Just Z." | "Z." or a normal sentence naming Z. |
|
|
19
|
+
|
|
20
|
+
Drop the negation; lead with the thing you actually mean.
|
|
21
|
+
|
|
22
|
+
## Rule of three / decorative tricolon
|
|
23
|
+
|
|
24
|
+
AI defaults to three-item adjective or benefit triplets. The fix depends on whether the three
|
|
25
|
+
items are *real*.
|
|
26
|
+
|
|
27
|
+
- **Decorative triad** — "innovative, transformative, and groundbreaking", "fast, reliable, and
|
|
28
|
+
scalable" as a flourish → cut to the one that's true and provable, or delete.
|
|
29
|
+
- **Real enumeration** — three acceptance criteria, three slices, three status codes the
|
|
30
|
+
endpoint returns → **keep all three.** This is precision, not slop. The technical register
|
|
31
|
+
needs the complete list.
|
|
32
|
+
|
|
33
|
+
Test: if removing one item loses information a reader needs, it's a real list — keep it. If the
|
|
34
|
+
three are interchangeable adjectives, it's a triad — cut it.
|
|
35
|
+
|
|
36
|
+
## Importance inflation
|
|
37
|
+
|
|
38
|
+
Announcing significance instead of showing it. Let the reader judge weight.
|
|
39
|
+
|
|
40
|
+
| Pattern | Fix |
|
|
41
|
+
|---|---|
|
|
42
|
+
| "a pivotal moment", "a broader movement" | Describe what happened; drop the significance label. |
|
|
43
|
+
| "The implications are significant." | Name the specific implication. |
|
|
44
|
+
| "This is a critical step." | Show why it's required (the dependency, the gate, the risk). |
|
|
45
|
+
|
|
46
|
+
## Vague attribution — cite the source or drop it
|
|
47
|
+
|
|
48
|
+
The prose twin of DevRites's evidence discipline (`devrites-source-driven`, `evidence.md`). An
|
|
49
|
+
unnamed authority is not a source; it inflates one person's claim into consensus.
|
|
50
|
+
|
|
51
|
+
| Pattern | Fix |
|
|
52
|
+
|---|---|
|
|
53
|
+
| "Experts believe…", "Studies show…", "Research suggests…" | Name the study/doc/benchmark, or cut the appeal and state the claim on its own merits. |
|
|
54
|
+
| "Best practice says…", "The community recommends…", "It's widely agreed…" | Link the source (an RFC, the framework docs, a measured result), or make the call yourself and own it in `decisions.md`. |
|
|
55
|
+
|
|
56
|
+
If you can't name who holds the view, you don't have a source — you have a guess. State it as one.
|
|
57
|
+
|
|
58
|
+
## Abstract category nouns — name the specific items
|
|
59
|
+
|
|
60
|
+
"Various factors", "several considerations", "a number of issues" say nothing. Replace the
|
|
61
|
+
category word with the actual items.
|
|
62
|
+
|
|
63
|
+
| Pattern | Fix |
|
|
64
|
+
|---|---|
|
|
65
|
+
| "improvements across various metrics" | "cuts p95 latency 120ms→80ms and halves the query count" |
|
|
66
|
+
| "there are several considerations" | List the considerations, or name the one that matters. |
|
|
67
|
+
| "performance issues", "some edge cases" | Name the N+1 query; name the empty-input and the 10k-row cases. |
|
|
68
|
+
|
|
69
|
+
Offender words to catch: factors, aspects, considerations, issues, elements, things, areas,
|
|
70
|
+
metrics (unnamed). In a spec or `decisions.md`, the specific item is the whole point.
|
|
71
|
+
|
|
72
|
+
## False agency — name who acts
|
|
73
|
+
|
|
74
|
+
Giving inanimate things human verbs. Common in machine prose because it avoids naming the actor.
|
|
75
|
+
|
|
76
|
+
| Pattern | Fix |
|
|
77
|
+
|---|---|
|
|
78
|
+
| "the data tells us" | "the grader reads X and returns Y" |
|
|
79
|
+
| "the decision emerges" | "we chose X because…" |
|
|
80
|
+
| "the complaint becomes a fix" | "the team fixed it in slice 3" |
|
|
81
|
+
| "the test ensures correctness" | "the test asserts `total === 42`" |
|
|
82
|
+
|
|
83
|
+
Front the actor: the script, the gate, the function, the engineer, or "you".
|
|
84
|
+
|
|
85
|
+
## Dramatic fragmentation & rhetorical setups
|
|
86
|
+
|
|
87
|
+
| Pattern | Fix |
|
|
88
|
+
|---|---|
|
|
89
|
+
| "[Noun]. That's it. That's the [thing]." | One complete sentence. |
|
|
90
|
+
| "X. And Y. And Z." (staccato for drama) | Join into normal sentences; vary length. |
|
|
91
|
+
| "The result? Devastating." (self-posed Q&A) | Fold into a statement. |
|
|
92
|
+
| "What if [reframe]?" as a hook | Make the point directly. |
|
|
93
|
+
| "Think about it:" / "Here's what I mean:" | Delete; the next sentence already does the work. |
|
|
94
|
+
|
|
95
|
+
## Inflated constructions
|
|
96
|
+
|
|
97
|
+
Three small tells that pad a plain sentence into something that sounds weightier than it is.
|
|
98
|
+
|
|
99
|
+
| Pattern | Fix |
|
|
100
|
+
|---|---|
|
|
101
|
+
| **Copula-dodge** — "X serves as / functions as / stands as / boasts / features…" | Use the plain verb. "The gateway **is** the entry point", "the module **has** three handlers". |
|
|
102
|
+
| **Participle tail** — "…, highlighting its importance", "…, reflecting broader trends", "…, underscoring its role as a dynamic hub" | Cut the trailing `-ing` clause; it adds fake depth, not information. |
|
|
103
|
+
| **Aphorism formula** — "X is the Y of Z" ("caching is the heartbeat of the system"), "X is not a tool but a Y" | State the actual property. "The cache holds the hot rows so the DB isn't hit on every request." |
|
|
104
|
+
| **Invented concept label** — coining a pseudo-term as if it's established: "the N+1 tax", "the supervision paradox", "the abstraction trap" | Name the concrete thing and skip the coined label, or define it once if it genuinely recurs. |
|
|
105
|
+
|
|
106
|
+
## Passive voice (prose register)
|
|
107
|
+
|
|
108
|
+
Every prose sentence wants a subject doing something. Passive hides the actor and drains energy.
|
|
109
|
+
|
|
110
|
+
| Pattern | Fix |
|
|
111
|
+
|---|---|
|
|
112
|
+
| "It was decided that…" | "We decided…" |
|
|
113
|
+
| "Mistakes were made." | Name who, and what. |
|
|
114
|
+
| "The endpoint is called by the client." | "The client calls the endpoint." |
|
|
115
|
+
|
|
116
|
+
Calibration: passive is fine when the actor is genuinely unknown or irrelevant ("the row is
|
|
117
|
+
deleted on cascade"). Don't contort a sentence to name an actor that doesn't matter.
|
|
118
|
+
|
|
119
|
+
## Rhythm
|
|
120
|
+
|
|
121
|
+
- Don't run three same-length sentences in a row; don't stack three short fragments for effect.
|
|
122
|
+
- Don't end every paragraph on a punchy one-liner. Vary where the weight lands.
|
|
123
|
+
- **Em-dashes:** at most one per paragraph, used where a comma or period won't do. Multiple per
|
|
124
|
+
paragraph is the tell. (Catch both the em-dash `—` and the `--` substitute.)
|
|
125
|
+
- Don't open consecutive sentences with the same Wh- word ("What makes this… What this means…")
|
|
126
|
+
as a crutch; lead with the subject.
|
|
127
|
+
|
|
128
|
+
## Formatting tells
|
|
129
|
+
|
|
130
|
+
- **No "Bold term: explanation" bullet lists** as the default structure for prose — the most
|
|
131
|
+
recognizable AI formatting pattern. Use real prose, or a plain bullet, unless the document's
|
|
132
|
+
existing style genuinely uses definition lists (a glossary, an API reference).
|
|
133
|
+
- No emoji in headings or section titles (artifacts and code both).
|
|
134
|
+
- Don't over-bold. Bold the one load-bearing term, not every noun.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devrites-refresh-indexes
|
|
3
|
+
description: Keep the optional code-intelligence indexes — codebase-memory-mcp, codegraph, graphify — current after code changes so the next structural lookup reads live code, not a stale graph. Use when the index looks stale (a structural lookup disagrees with the live code), after a large change before a structural query, or the user says "reindex" / "the graph is stale" / "refresh the index". The Stop hook does this automatically; this skill is the manual force + the reference for it. Not for agentmemory (a separate, judgment-based store).
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# devrites-refresh-indexes — keep the code-intelligence indexes fresh
|
|
8
|
+
|
|
9
|
+
`tooling.md` says to cross-verify structural claims across codebase-memory-mcp, codegraph, and
|
|
10
|
+
graphify, and that **a disagreement between indexes is a signal** — a fresh read of live code
|
|
11
|
+
beats any index. A *stale* index manufactures exactly that disagreement. This keeps the three
|
|
12
|
+
mechanical indexes current after edits so the next lookup is trustworthy.
|
|
13
|
+
|
|
14
|
+
All three are **optional** (per `tooling.md`): each is refreshed only if its binary is on PATH
|
|
15
|
+
**and** it already tracks this repo. None present → this is a silent no-op. Never installs
|
|
16
|
+
anything, never blocks. Same incremental shape for all three; no LLM needed for code.
|
|
17
|
+
|
|
18
|
+
| Index | Tracks repo when | Refresh |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| **codebase-memory-mcp** (primary) | binary present + repo in `list_projects` (or `.codebase-memory/`) | `codebase-memory-mcp cli index_repository '{"repo_path":"<root>"}'` |
|
|
21
|
+
| **codegraph** | `.codegraph/` exists + `codegraph` on PATH | `codegraph sync` |
|
|
22
|
+
| **graphify** | `graphify-out/` exists + `graphify` on PATH | `graphify update .` |
|
|
23
|
+
|
|
24
|
+
## Automatic (already wired — no action needed)
|
|
25
|
+
|
|
26
|
+
The `Stop` hook `devrites-refresh-indexes.sh` runs at end of turn. It self-guards: exits
|
|
27
|
+
instantly unless an index tracks the repo, exits instantly if no source file changed since the
|
|
28
|
+
last refresh, else stamps + locks and spawns a **detached** worker so the turn never blocks.
|
|
29
|
+
ON by default; disable with `DEVRITES_REFRESH_INDEXES=off`.
|
|
30
|
+
|
|
31
|
+
## Manual / thorough refresh (this skill)
|
|
32
|
+
|
|
33
|
+
Force a synchronous refresh now and print the report — resolve the hook across install layouts:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
H=".claude/hooks/devrites-refresh-indexes.sh"
|
|
37
|
+
[ -f "$H" ] || H="${CLAUDE_PLUGIN_ROOT:-}/pack/.claude/hooks/devrites-refresh-indexes.sh"
|
|
38
|
+
[ -f "$H" ] || H="pack/.claude/hooks/devrites-refresh-indexes.sh"
|
|
39
|
+
bash "$H" --force .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then the one case the hook can't cover:
|
|
43
|
+
|
|
44
|
+
- **Docs / papers / images changed** (not just code) → `graphify update` only re-runs AST. Run
|
|
45
|
+
the full semantic re-extraction: `/graphify --update` (re-extracts only changed files).
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
|
|
49
|
+
- codegraph and codebase-memory-mcp each have their own background watcher; the explicit
|
|
50
|
+
reindex is the belt-and-suspenders fallback for when a watcher isn't running. graphify has no
|
|
51
|
+
default watcher, so this is its primary freshness path.
|
|
52
|
+
- The index lags writes by ~1s after a refresh — don't re-query in the same instant you edit.
|
|
53
|
+
- Output hygiene (`prose-style.md`): don't name these tools to the user — say what changed
|
|
54
|
+
("re-indexed the edited files"), not which tool did it.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devrites-source-driven
|
|
3
|
+
description: Verify uncertain framework or library behavior against official docs or installed source before relying on it, then record the source in `evidence.md` / `decisions.md`. Use when the user says "check the docs", "is this still the API", "don't guess", "cite the source", "verify this assumption", or build encounters an unfamiliar framework call. Not for project-internal code or trivial stdlib calls.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# devrites-source-driven — verify, don't guess
|
|
8
|
+
|
|
9
|
+
A confident wrong assumption about a library is a bug waiting to ship. When behavior
|
|
10
|
+
matters and isn't certain, check the source of truth.
|
|
11
|
+
|
|
12
|
+
## When to trigger
|
|
13
|
+
- You're about to rely on an API signature, default, config key, or behavior you're not
|
|
14
|
+
sure of.
|
|
15
|
+
- The docs in memory might be stale (the project pins a different version).
|
|
16
|
+
- Tests can't easily prove the assumption, but it drives the implementation.
|
|
17
|
+
- An error message points at framework behavior you don't fully understand.
|
|
18
|
+
|
|
19
|
+
## How
|
|
20
|
+
1. **Find the version** the project actually uses (lockfile, manifest) — behavior is
|
|
21
|
+
version-specific.
|
|
22
|
+
2. **Consult the source of truth**, in order: the installed package's own source/types
|
|
23
|
+
in `node_modules`/gem/site-packages; context7 if available (`resolve-library-id` →
|
|
24
|
+
`query-docs`) for current upstream docs; official docs for *that version*; the project's
|
|
25
|
+
existing usage of the same API.
|
|
26
|
+
3. **Confirm the specific fact** — the signature, the default, the edge behavior — not a
|
|
27
|
+
general impression.
|
|
28
|
+
4. **Record it** in `decisions.md` (or `evidence.md`): the fact, the version, and the
|
|
29
|
+
source (path or URL). Future phases trust the record instead of re-checking.
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
- Prefer the **installed** source over remembered docs — it can't be out of date.
|
|
33
|
+
- Quote the exact relevant detail; don't paraphrase a behavior into something convenient.
|
|
34
|
+
- If the doc/source contradicts the plan, that's a **Spec Drift Guard** event — stop and
|
|
35
|
+
handle it.
|
|
36
|
+
- Don't rabbit-hole: confirm the one fact you need, record it, return.
|