GrakStack

AI talk too much. Grak fix.

One agent. Five commands. Zero dependencies. Grak is a caveman staff engineer for your AI coding host: 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
5 commands · the whole loop

Build. Review. Ship. Land.

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

/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.

20 papers · 10 rock logic · 10 mark-making

Level 100 OP.

Twenty paper on the wall. Every paper sit five-question exam: four right pass, five right OP, hundred right is GOD LEVEL 100 OP. 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.
Sit exam · 100 questions
cd characters/grak/credentials
python exam.py --check      # validate the bank: 20 papers, 100 questions
python exam.py              # sit it, paper by paper
python exam.py --self-test  # prove the scoring engine

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

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/{grak,review,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.