|
| 1 | +# ModularAuth-Kit — Workflow Reference |
| 2 | + |
| 3 | +> Workflows are slash commands that guide the AI agent through structured, repeatable processes. Each workflow adopts a specific mindset and follows a defined checklist. |
| 4 | +
|
| 5 | +--- |
| 6 | + |
| 7 | +## Quick Reference |
| 8 | + |
| 9 | +| Command | Category | One-Line Summary | |
| 10 | +|---|---|---| |
| 11 | +| `/develop` | Build | Follow the roadmap to implement the next phase | |
| 12 | +| `/add-feature` | Build | Plan, implement, test, and document a new feature | |
| 13 | +| `/refine-feature` | Build | Improve an existing feature without breaking changes | |
| 14 | +| `/update-docs` | Maintain | Sync all docs after a feature change | |
| 15 | +| `/update-website` | Maintain | Sync website pages after docs change | |
| 16 | +| `/prepare-release` | Release | Verify, build zip, changelog, tag, push | |
| 17 | +| `/verify-docs` | Audit | Check all docs accuracy against source code | |
| 18 | +| `/security-audit` | Audit | OWASP Top 10, password, sessions, tokens, CSRF | |
| 19 | +| `/code-quality-audit` | Audit | TypeScript strictness, patterns, naming, dead code | |
| 20 | +| `/dependency-audit` | Audit | Vulnerabilities, outdated, unused deps, licenses | |
| 21 | +| `/performance-audit` | Audit | Queries, indexes, memory, hashing, async patterns | |
| 22 | +| `/search-potential-bugs-for-future` | Audit | Scan codebase for potential bugs | |
| 23 | +| `/dx-review` | Think | Think like a new developer — find setup friction | |
| 24 | +| `/project-health-check` | Think | Think like a PM — health, risks, priorities | |
| 25 | +| `/architecture-review` | Think | Think like a senior reviewer — structure, smells | |
| 26 | +| `/brainstorm` | Think | Creative session — wild ideas, filter, rank | |
| 27 | +| `/red-team` | Think | Think like an attacker — break the auth system | |
| 28 | +| `/user-review` | Think | Think like a user — README, website, trust | |
| 29 | +| `/invent-features` | Think | Discover missing features, evaluate, propose | |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +## When to Use What |
| 34 | + |
| 35 | +### "I just added or changed a feature" |
| 36 | + |
| 37 | +``` |
| 38 | +/update-docs → /update-website → /verify-docs |
| 39 | +``` |
| 40 | + |
| 41 | +This is the most common sequence. After any code change that affects behavior, config, endpoints, or error codes, run these three in order. They ensure everything from the FAQ to the website stays in sync with the source code. |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +### "I want to add a new feature" |
| 46 | + |
| 47 | +``` |
| 48 | +/add-feature → /update-docs → /update-website → /verify-docs |
| 49 | +``` |
| 50 | + |
| 51 | +`/add-feature` walks through the full lifecycle: planning, config, implementation (model → repo → service → validation → controller → route), testing, and documentation. Then the maintenance workflows sync everything. |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +### "I want to improve something that already exists" |
| 56 | + |
| 57 | +``` |
| 58 | +/refine-feature → /update-docs → /update-website |
| 59 | +``` |
| 60 | + |
| 61 | +`/refine-feature` emphasizes backwards compatibility — no breaking changes, no removed config options, no changed response shapes. It checks edge cases and makes sure old consumers aren't affected. |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +### "I want to ship a new release" |
| 66 | + |
| 67 | +``` |
| 68 | +/security-audit → /code-quality-audit → /dependency-audit → /verify-docs → /prepare-release |
| 69 | +``` |
| 70 | + |
| 71 | +Before any release, run the full audit suite. Fix everything found, then `/prepare-release` handles the final verification, changelog, and tagging. |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +### "I want to find problems before they find me" |
| 76 | + |
| 77 | +Pick one or more: |
| 78 | + |
| 79 | +| Worried about... | Run | |
| 80 | +|---|---| |
| 81 | +| Security vulnerabilities | `/security-audit` + `/red-team` | |
| 82 | +| Code quality and tech debt | `/code-quality-audit` + `/architecture-review` | |
| 83 | +| Slow performance at scale | `/performance-audit` | |
| 84 | +| Outdated or risky dependencies | `/dependency-audit` | |
| 85 | +| Documentation lies | `/verify-docs` | |
| 86 | +| Hidden bugs | `/search-potential-bugs-for-future` | |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +### "I want to make the project better but don't know where to start" |
| 91 | + |
| 92 | +``` |
| 93 | +/project-health-check → then pick what it recommends |
| 94 | +``` |
| 95 | + |
| 96 | +This gives you an overall health score and identifies the top 3 priorities. Follow its advice. |
| 97 | + |
| 98 | +Or, for specific perspectives: |
| 99 | + |
| 100 | +| Question | Run | |
| 101 | +|---|---| |
| 102 | +| "Is this easy to use?" | `/dx-review` | |
| 103 | +| "Would users like this?" | `/user-review` | |
| 104 | +| "Is the code well-structured?" | `/architecture-review` | |
| 105 | +| "What features are we missing?" | `/invent-features` | |
| 106 | +| "What wild ideas could help?" | `/brainstorm` | |
| 107 | +| "Can someone hack this?" | `/red-team` | |
| 108 | + |
| 109 | +--- |
| 110 | + |
| 111 | +### "I want to figure out what to build next" |
| 112 | + |
| 113 | +``` |
| 114 | +/invent-features → /brainstorm → /project-health-check |
| 115 | +``` |
| 116 | + |
| 117 | +Start with `/invent-features` to systematically discover gaps. Use `/brainstorm` for creative 10x ideas. Then `/project-health-check` to prioritize against project goals. The best ideas go into `dev-docs/future-thinking.md`. |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +### "I just want to follow the roadmap" |
| 122 | + |
| 123 | +``` |
| 124 | +/develop |
| 125 | +``` |
| 126 | + |
| 127 | +This reads `dev-docs/ROADMAP.md`, finds the next incomplete phase, and implements it following all conventions and patterns. |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +## Workflow Categories Explained |
| 132 | + |
| 133 | +### 🔨 Build Workflows |
| 134 | + |
| 135 | +These workflows **create things** — new features, improvements, or roadmap phases. |
| 136 | + |
| 137 | +| Workflow | When | Why | |
| 138 | +|---|---|---| |
| 139 | +| `/develop` | Starting a dev session | Follows the roadmap sequentially, implements the next phase | |
| 140 | +| `/add-feature` | Feature doesn't exist yet | Full lifecycle from planning to documentation | |
| 141 | +| `/refine-feature` | Feature exists but needs improvement | Ensures backwards compatibility while improving behavior | |
| 142 | + |
| 143 | +### 🔧 Maintain Workflows |
| 144 | + |
| 145 | +These workflows **keep things in sync** — they don't change behavior, just documentation and presentation. |
| 146 | + |
| 147 | +| Workflow | When | Why | |
| 148 | +|---|---|---| |
| 149 | +| `/update-docs` | After any code/feature change | Docs, FAQ, AI prompt, use-cases all reference the code — they must stay accurate | |
| 150 | +| `/update-website` | After docs change | The website mirrors docs — feature grid, endpoint tables, code examples | |
| 151 | +| `/prepare-release` | Ready to ship a version | Ensures release zip is clean, changelog is written, tag is created | |
| 152 | + |
| 153 | +**Key rule:** Always run `/update-docs` before `/update-website`. Docs are the source of truth for the website. |
| 154 | + |
| 155 | +### 🔍 Audit Workflows |
| 156 | + |
| 157 | +These workflows **find problems** — they check the code against standards and best practices. |
| 158 | + |
| 159 | +| Workflow | What It Checks | Run Frequency | |
| 160 | +|---|---|---| |
| 161 | +| `/security-audit` | OWASP Top 10, passwords, sessions, tokens, CSRF, rate limits | Before every release | |
| 162 | +| `/code-quality-audit` | TypeScript strictness, error handling, naming, dead code, duplication | Monthly or before release | |
| 163 | +| `/dependency-audit` | npm vulnerabilities, outdated packages, unused deps, licenses | Monthly | |
| 164 | +| `/performance-audit` | Database queries, indexes, middleware overhead, memory, async patterns | Before scaling or on slow reports | |
| 165 | +| `/verify-docs` | Every number, default, code example against actual source code | Before every release | |
| 166 | +| `/search-potential-bugs-for-future` | Code patterns that could cause bugs under edge conditions | When bored or suspicious | |
| 167 | + |
| 168 | +### 🧠 Think Workflows |
| 169 | + |
| 170 | +These workflows **change your perspective** — they force the AI to think from a specific viewpoint to find things a generic review would miss. |
| 171 | + |
| 172 | +| Workflow | Mindset | Best For | |
| 173 | +|---|---|---| |
| 174 | +| `/dx-review` | 🧑💻 A developer using this for the first time | Finding setup friction, confusing docs, missing context | |
| 175 | +| `/project-health-check` | 📋 A project manager prioritizing work | Finding gaps in the user journey, risk assessment, sprint planning | |
| 176 | +| `/architecture-review` | 👨🏫 A senior engineer doing code review | Finding layering violations, coupling, code smells, inconsistencies | |
| 177 | +| `/brainstorm` | 💡 A creative thinker without constraints | Generating wild ideas, then filtering for feasibility | |
| 178 | +| `/red-team` | 🏴☠️ An attacker trying to break in | Finding exploitable vulnerabilities in auth flows | |
| 179 | +| `/user-review` | 👤 A user deciding whether to adopt | Evaluating first impressions, README clarity, trust signals | |
| 180 | +| `/invent-features` | 🔬 A product person finding gaps | Discovering missing features through user analysis and competitor comparison | |
| 181 | + |
| 182 | +--- |
| 183 | + |
| 184 | +## Common Chains |
| 185 | + |
| 186 | +### After a Change |
| 187 | +``` |
| 188 | +[make code changes] → /update-docs → /update-website → /verify-docs |
| 189 | +``` |
| 190 | + |
| 191 | +### Full Feature Development |
| 192 | +``` |
| 193 | +/invent-features → /add-feature → /update-docs → /update-website → /verify-docs |
| 194 | +``` |
| 195 | + |
| 196 | +### Pre-Release Audit |
| 197 | +``` |
| 198 | +/security-audit → /code-quality-audit → /dependency-audit → /performance-audit → /verify-docs → /prepare-release |
| 199 | +``` |
| 200 | + |
| 201 | +### Deep Quality Review |
| 202 | +``` |
| 203 | +/architecture-review → /code-quality-audit → /red-team → /performance-audit |
| 204 | +``` |
| 205 | + |
| 206 | +### Strategic Planning Session |
| 207 | +``` |
| 208 | +/project-health-check → /invent-features → /brainstorm → /dx-review → /user-review |
| 209 | +``` |
| 210 | + |
| 211 | +### Monthly Maintenance |
| 212 | +``` |
| 213 | +/dependency-audit → /verify-docs → /search-potential-bugs-for-future |
| 214 | +``` |
| 215 | + |
| 216 | +--- |
| 217 | + |
| 218 | +## Rules |
| 219 | + |
| 220 | +1. **All workflows use `// turbo-all`** — Commands auto-run without asking for approval each time. |
| 221 | +2. **Build workflows commit their work** — Each ends with a commit step. |
| 222 | +3. **Audit workflows fix what they find** — Don't just report; fix and commit. |
| 223 | +4. **Think workflows produce reports** — They output findings, not code changes (unless quick wins are found). |
| 224 | +5. **Maintain workflows are idempotent** — Running them twice produces the same result. |
| 225 | + |
| 226 | +--- |
| 227 | + |
| 228 | +*17 workflows · Created for ModularAuth-Kit · [Ashrafee](https://github.com/IamAshrafee)* |
0 commit comments