GrakStack

AI talk too much. Grak fix.

One agent. Six commands. Zero dependencies. Grak is a caveman staff engineer for your AI coding host: plan, build, review, team, ship, land. Finished code, fast.

curl -fsSL grakstack.jerkyjesse.com/install | sh
Same /review · same patch · watch difference

Before / After.

Default verbose left. Caveman mode right. Same findings, 82% less prose.

Default verbose
# patch /review

Analyzing your changes...

I'll review the changes in auth/middleware.ts and provide
comprehensive feedback on the implementation.

## Summary

This pull request modifies the authentication middleware
to add token expiry validation. The changes look generally
good, but I have several observations and recommendations
that I'd like to share with you.

## Detailed Analysis

### Finding 1: Token Expiry Check (Medium)

In auth/middleware.ts:47, the token expiry comparison
uses a strict less-than operator (<) when it should
use less-than-or-equal-to (<=). This means tokens
that expire at exactly the current timestamp will
incorrectly be treated as valid.

Recommendation: Change the comparison operator from
< to <= to ensure tokens are invalidated at exactly
their expiry time.

### Finding 2: Missing Error Context (Low)

The error response at line 52 returns a generic 401
without diagnostic information. Consider adding a
"reason" field to the error response.

## Overall Assessment

The changes demonstrate a solid understanding of the
authentication flow. With the operator fix applied,
this should be ready to merge.
Grak · same findings
# patch /review

## Findings: 2

1. auth/middleware.ts:47 — token expiry check
   use < not <=. Token at exact expiry time
   passes validation. Fix:

   - if (token.exp < now) {
   + if (token.exp <= now) {

2. auth/middleware.ts:52 — 401 response
   missing reason field. Add:

   { error: "unauthorized", reason: "token_expired" }

Status: Fix #1, merge.
187 fewer words · 82% less · same findings
6 commands · the whole loop

Plan. Build. Review. Ship. Land.

Any repo, any language. No config. Done means landed.

/plan
Read-only recon plus a step-by-step build plan. No edits. Sign off, then build.
/grak
Plain build. Finished, tested code, fast. Evidence pasted. No push.
/review
Pre-ship diff review. Findings only: file:line, severity, one-line fix.
/team
Team mode: clones build a task or review a diff in parallel. One lens each, findings ranked, safe fixes tested.
/ship
Run the project's tests. Commit, push, open the PR. Green or stop.
/land
Merge when checks are green. Verify on the default branch. Report.

Newcomer path: clone, ./setup, Tab to grak, /grak, /ship, /land. Zero to landed.

Move cursor slow. Cave wall light up. Old paintings hide in dark.

one standard · every clone · receipts always

Higher standard.

Grak speak caveman. Grak work engineer. Same standard bind Grak and every clone: prove it, or do not say it. Full text in characters/grak/standard.md, read on demand.

Engineer's layer
Read file before you rule. Run command before you claim. Paste tail before you count. Watch check fail once, or delete it.
Optimizer's ledger
Budget: tokens, seconds, compute, cents. No number, no tuning. Number not move? Revert.
Receipts
Every claim carry receipt: command tail, file:line, or pinned check. No receipt, no claim. Red tail kept, never erased.
First sentence
Open with point. Close with verdict or next step. Report without first sentence not finished.

The scorer keep the books: win pay credit, failure charge debt, every row carry receipt. Run python characters/grak/scorer.py --read. Voice under load lives in scenes.md. The team run two rounds: takes, then exchange. Bounded. Facts win.

40 papers · 4 sides · 200 questions

Level 200 OP.

Forty paper on the wall, four sides: rock logic, mark-making, seven roads (trivium and quadrivium), coin logic (finance and economics). Every paper sit five-question exam: four right pass, five right OP, two hundred right is GOD LEVEL 200 OP. Field seeds in curriculum/ carry the working knowledge. Circle rank is firelight — real credential and proof are what stranger can check.

Rock logic
CMU SCS PhD (compilers) + ACM Doctoral Dissertation Award · A.M. Turing Award · ACM + IEEE Fellow · IMO gold + Putnam Fellow · ICPC world champion · AWS SA Professional + GCP Professional Cloud Architect · CKA + CKS + RHCE · OSCP + CISSP · Cisco CCIE · NAE member.
Mark-making
Juilliard M.M. composition · RISD BFA illustration · CalArts character + experimental animation · RCA MA visual communication · EGOT · Pulitzer · Nobel in Literature · MacArthur Fellowship · Palme d'Or · Venice Golden Lion.
Seven roads
Oxford D.Phil. linguistics · CMU logic + ASL Sacks Prize · Pittsburgh argumentation · Berkeley rhetoric + NCA Distinguished Scholar · Princeton number theory + AMS Cole Prize · Oxford geometry + LMS Whitehead Prize · Stony Brook differential geometry + AMS Veblen Prize · Eastman music theory + SMT award · Caltech astronomy + Heineman Prize · Cornell dynamical astronomy + Brouwer Award.
Coin logic
CFA + FRM · Chicago Booth finance + Smith Breeden Prize · MIT Sloan financial engineering + Fischer Black Prize · CFA + Markowitz Award · NYU Stern microstructure + WFA best paper · MIT economics + John Bates Clark Medal · Stockholm macro + Nobel Memorial · Chicago monetary economics + Bernacer Prize · Princeton international economics + Bhagwati Award · Cambridge history of thought + HES Spengler Prize.
Sit exam · 200 questions
cd characters/grak/credentials
python exam.py --check      # validate the bank: 40 papers, 200 questions
python exam.py              # sit it, paper by paper
python exam.py --self-test  # prove the scoring engine

Bank: characters/grak/credentials/ · seeds: characters/grak/curriculum/ · full table: GRAK.md. In the loop: /grak exam. Installer drop the whole record in ~/.grakstack/: lore, papers, proof, exam, seeds.

Deep dive

How it work.

Install, voice, hosts, uninstall, license

Install

curl -fsSL grakstack.jerkyjesse.com/install | sh
# pick your host:
curl -fsSL grakstack.jerkyjesse.com/install | sh -s -- --host opencode

Needs git. No bun, no node, no sudo. On Windows: irm https://grakstack.jerkyjesse.com/install.ps1 | iex.

From a clone: ./setup --host opencode. Refresh after a pull: same command. All hosts: ./setup --host all. Only hosts already installed: ./setup --host auto.

Voice

Grak speak compressed caveman. Drop articles. Drop filler. Fragments OK. Code, commits, PRs stay normal prose. Locked to full — no lite/ultra toggles. Off per session: stop caveman.

Finish doctrine

Ship fully finished code, fast. Finished means: compiles, runs, focused tests pass with evidence pasted, edge cases named, no stubs, no TODOs, no "phase 2". If it cannot be finished in the pass, Grak says exactly what is missing and stops.

Hosts

opencode   ~/.config/opencode/agent/grak.md + command/{plan,grak,review,team,ship,land}.md
claude     ~/.claude/agents/grak.md + ~/.claude/commands/
cursor     ~/.cursor/agents/grak.md + ~/.cursor/commands/
codex      ~/.codex/agents/grak.toml + ~/.codex/prompts/
factory    ~/.factory/droids/grak.md + ~/.factory/commands/
kiro       ~/.kiro/agents/grak.md
slate      reads Claude Code config
openclaw   ~/.openclaw/skills/grakstack/ (digest)
hermes     ~/.hermes/skills/grakstack/ (digest)
gbrain     ~/.gbrain/skills/grakstack/ (digest)

On opencode, Grak is a selectable agent mode: Tab to grak.

Uninstall

./setup --host opencode --uninstall

Only provably-owned files are removed — a marker or a symlink into the repo. Your own files with the same names are kept and listed, never swept.

License

Dual-licensed: AGPL-3.0-or-later or commercial. Upstream portions (gstack, caveman) remain MIT. See LICENSE, LICENSE-AGPL, COMMERCIAL.md.

Source: github.com/JerkyJesse/grakstack. Issues, ideas, PRs welcome.