@northbridge-security/secureai 0.1.13

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.
Files changed (50) hide show
  1. package/.claude/README.md +122 -0
  2. package/.claude/commands/architect/clean.md +978 -0
  3. package/.claude/commands/architect/kiss.md +762 -0
  4. package/.claude/commands/architect/review.md +704 -0
  5. package/.claude/commands/catchup.md +90 -0
  6. package/.claude/commands/code.md +115 -0
  7. package/.claude/commands/commit.md +1218 -0
  8. package/.claude/commands/cover.md +1298 -0
  9. package/.claude/commands/fmea.md +275 -0
  10. package/.claude/commands/kaizen.md +312 -0
  11. package/.claude/commands/pr.md +503 -0
  12. package/.claude/commands/todo.md +99 -0
  13. package/.claude/commands/worktree.md +738 -0
  14. package/.claude/commands/wrapup.md +103 -0
  15. package/LICENSE +183 -0
  16. package/README.md +108 -0
  17. package/dist/cli.js +75634 -0
  18. package/docs/agents/devops-reviewer.md +889 -0
  19. package/docs/agents/kiss-simplifier.md +1088 -0
  20. package/docs/agents/typescript.md +8 -0
  21. package/docs/guides/README.md +109 -0
  22. package/docs/guides/agents.clean.arch.md +244 -0
  23. package/docs/guides/agents.clean.arch.ts.md +1314 -0
  24. package/docs/guides/agents.gotask.md +1037 -0
  25. package/docs/guides/agents.markdown.md +1209 -0
  26. package/docs/guides/agents.onepassword.md +285 -0
  27. package/docs/guides/agents.sonar.md +857 -0
  28. package/docs/guides/agents.tdd.md +838 -0
  29. package/docs/guides/agents.tdd.ts.md +1062 -0
  30. package/docs/guides/agents.typesript.md +1389 -0
  31. package/docs/guides/github-mcp.md +1075 -0
  32. package/package.json +130 -0
  33. package/packages/secureai-cli/src/cli.ts +21 -0
  34. package/tasks/README.md +880 -0
  35. package/tasks/aws.yml +64 -0
  36. package/tasks/bash.yml +118 -0
  37. package/tasks/bun.yml +738 -0
  38. package/tasks/claude.yml +183 -0
  39. package/tasks/docker.yml +420 -0
  40. package/tasks/docs.yml +127 -0
  41. package/tasks/git.yml +1336 -0
  42. package/tasks/gotask.yml +132 -0
  43. package/tasks/json.yml +77 -0
  44. package/tasks/markdown.yml +95 -0
  45. package/tasks/onepassword.yml +350 -0
  46. package/tasks/security.yml +102 -0
  47. package/tasks/sonar.yml +437 -0
  48. package/tasks/template.yml +74 -0
  49. package/tasks/vscode.yml +103 -0
  50. package/tasks/yaml.yml +121 -0
@@ -0,0 +1,880 @@
1
+ # GoTask Task Libraries
2
+
3
+ This directory contains GoTask task libraries for the AI Toolkit project. Tasks are organized by functionality into separate YAML files.
4
+
5
+ ## Index
6
+
7
+ Jump to a specific task library:
8
+
9
+ - [Main Taskfile](#main-taskfile) - Core tasks and library includes
10
+ - [AWS](#aws-cli-operations-awsyml) - AWS SSO authentication
11
+ - [Bash](#bash-linting--formatting-bashyml) - Shell script linting and formatting
12
+ - [Bun](#bun-development-tasks-bunyml) - Build, test, lint, format
13
+ - [Claude](#claude-code--mcp-claudeyml) - MCP server management
14
+ - [Docker](#docker-operations-dockeryml) - Container and image management
15
+ - [Docs](#api-documentation-docsyml) - API documentation generation
16
+ - [Git](#git--github-operations-gityml) - Git and GitHub operations
17
+ - [GoTask](#gotask-utilities-gotaskyml) - Task development utilities
18
+ - [JSON](#json-linting--validation-jsonyml) - JSON linting and formatting
19
+ - [Markdown](#markdown-linting--validation-markdownyml) - Markdown linting
20
+ - [1Password](#1password-secret-management-onepasswordyml) - Secret management
21
+ - [Security](#security-scanning-securityyml) - SAST and secret scanning
22
+ - [SonarQube](#sonarqube-code-quality-sonaryml) - Code quality analysis
23
+ - [YAML](#yaml-linting--validation-yamlyml) - YAML linting and formatting
24
+
25
+ ---
26
+
27
+ ## Main Taskfile
28
+
29
+ **File:** [../Taskfile.yml](../Taskfile.yml)
30
+
31
+ Primary task runner configuration that includes all other task libraries.
32
+
33
+ **Core Tasks** (flattened from [bun.yml](bun.yml)):
34
+
35
+ | Task | Alias | Description |
36
+ | --------------------------- | ------ | ------------------------------------------------- |
37
+ | `task setup` | - | Setup development environment (run after cloning) |
38
+ | `task install` | `i` | Install dependencies |
39
+ | `task build` | `b` | Build the project |
40
+ | `task rebuild` | `rb` | Clean and rebuild project |
41
+ | `task clean` | `c` | Clean build artifacts and temporary files |
42
+ | `task dev` | `d` | Run in development mode |
43
+ | `task test` | `t` | Run unit tests |
44
+ | `task test:integration` | `ti` | Run integration tests |
45
+ | `task test:coverage` | `cov` | Run tests with coverage |
46
+ | `task test:coverage:report` | `covr` | Display coverage report |
47
+ | `task lint` | `l` | Run linter |
48
+ | `task lint:fix` | `lf` | Run linter with auto-fix |
49
+ | `task format` | `f` | Format code |
50
+ | `task typecheck` | `tc` | Type check TypeScript |
51
+ | `task ci` | - | Run CI checks (lint, typecheck, test, build) |
52
+
53
+ **Included Task Libraries:**
54
+
55
+ | Namespace | Alias | File | Description |
56
+ | ---------- | ----- | ---------------------------------- | ----------------------------- |
57
+ | `aws` | - | [aws.yml](aws.yml) | AWS CLI operations |
58
+ | `bash` | - | [bash.yml](bash.yml) | Bash linting & formatting |
59
+ | `claude` | `cd` | [claude.yml](claude.yml) | Claude Code & MCP management |
60
+ | `docker` | `dk` | [docker.yml](docker.yml) | Docker container management |
61
+ | `docs` | - | [docs.yml](docs.yml) | API documentation generation |
62
+ | `git` | - | [git.yml](git.yml) | Git & GitHub operations |
63
+ | `gotask` | `gt` | [gotask.yml](gotask.yml) | Task development utilities |
64
+ | `json` | - | [json.yml](json.yml) | JSON linting & validation |
65
+ | `markdown` | `md` | [markdown.yml](markdown.yml) | Markdown linting & validation |
66
+ | `op` | `1p` | [onepassword.yml](onepassword.yml) | 1Password secret management |
67
+ | `security` | `s` | [security.yml](security.yml) | Security scanning |
68
+ | `sonar` | - | [sonar.yml](sonar.yml) | SonarQube code quality |
69
+ | `yaml` | `yml` | [yaml.yml](yaml.yml) | YAML linting & validation |
70
+
71
+ ---
72
+
73
+ ## AWS CLI Operations ([aws.yml](aws.yml))
74
+
75
+ Utilities for AWS SSO authentication and credential management.
76
+
77
+ **Commands:**
78
+
79
+ | Task | Alias | Description |
80
+ | ---------------- | ----- | ------------------------------------- |
81
+ | `task aws:login` | `l` | Check and refresh AWS SSO credentials |
82
+
83
+ **Usage:**
84
+
85
+ ```bash
86
+ # Login with profile from environment or .env
87
+ task aws:login
88
+
89
+ # Login with specific profile
90
+ task aws:login PROFILE=my-profile
91
+
92
+ # Using AWS_PROFILE environment variable
93
+ export AWS_PROFILE=my-profile
94
+ task aws:login
95
+ ```
96
+
97
+ **Features:**
98
+
99
+ - Checks if credentials are valid before prompting
100
+ - Loads profile from parameter, environment, or `.env` file
101
+ - Integrates with 1Password for secret management
102
+ - Only prompts for SSO login if credentials expired
103
+
104
+ **Requirements:**
105
+
106
+ - AWS CLI v2 must be installed
107
+ - AWS SSO must be configured in `~/.aws/config`
108
+ - `AWS_PROFILE` must be set via parameter, environment, or `.env` file
109
+
110
+ ---
111
+
112
+ ## Bash Linting & Formatting ([bash.yml](bash.yml))
113
+
114
+ Bash script validation, linting, and auto-formatting with global tool installation.
115
+
116
+ **Implementation:** Task logic is in TypeScript ([src/tasks/bash/](../src/tasks/bash/)) for maintainability and testability.
117
+
118
+ **Commands:**
119
+
120
+ | Task | Alias | Description |
121
+ | ------------------------ | ----- | -------------------------------- |
122
+ | `task bash:lint` | `l` | Lint bash files with shellcheck |
123
+ | `task bash:format` | `f` | Format bash files with shfmt |
124
+ | `task bash:format:check` | `fc` | Check formatting without changes |
125
+ | `task bash:setup` | `s` | Install bash tools globally |
126
+
127
+ **Usage:**
128
+
129
+ ```bash
130
+ # Lint all bash files (quiet on success)
131
+ task bash:lint
132
+
133
+ # Lint specific pattern
134
+ task bash:lint FILES="*.sh"
135
+ task bash:lint FILES="scripts/**/*.sh"
136
+
137
+ # Show output even on success
138
+ VERBOSE=1 task bash:lint
139
+
140
+ # Format all bash files
141
+ task bash:format
142
+
143
+ # Check formatting without making changes
144
+ task bash:format:check
145
+
146
+ # Install tools globally (one-time setup)
147
+ task bash:setup
148
+ ```
149
+
150
+ **Features:**
151
+
152
+ - Quiet output on success (use `VERBOSE=1` for details)
153
+ - File pattern support with glob expansion
154
+ - Auto-formatting with shfmt
155
+ - Global tool installation via `task bash:setup`
156
+ - Cross-platform support (macOS, Linux)
157
+
158
+ **Tools Installed by `setup`:**
159
+
160
+ - **shellcheck** - Bash linting and validation
161
+ - **shfmt** - Bash script formatting
162
+
163
+ **Default Patterns:**
164
+
165
+ `*.sh,**/*.sh,bin/*,scripts/**/*.sh`
166
+
167
+ ---
168
+
169
+ ## Bun Development Tasks ([bun.yml](bun.yml))
170
+
171
+ Core development tasks for building, testing, and maintaining the project.
172
+
173
+ **Commands:**
174
+
175
+ | Task | Alias | Description |
176
+ | --------------------------- | ------ | -------------------------------------------- |
177
+ | `task install` | `i` | Install dependencies |
178
+ | `task build` | `b` | Build the project |
179
+ | `task rebuild` | `rb` | Clean and rebuild project |
180
+ | `task clean` | `c` | Clean build artifacts and temporary files |
181
+ | `task dev` | `d` | Run in development mode |
182
+ | `task lint` | `l` | Run linter |
183
+ | `task lint:fix` | `lf` | Run linter with auto-fix |
184
+ | `task format` | `f` | Format code |
185
+ | `task typecheck` | `tc` | Type check TypeScript |
186
+ | `task test` | `t` | Run unit tests |
187
+ | `task test:integration` | `ti` | Run integration tests |
188
+ | `task test:coverage` | `cov` | Run tests with coverage |
189
+ | `task test:coverage:report` | `covr` | Display coverage report |
190
+ | `task ci` | - | Run CI checks (lint, typecheck, test, build) |
191
+
192
+ **Usage:**
193
+
194
+ ```bash
195
+ # Development workflow
196
+ task install
197
+ task build
198
+ task test
199
+
200
+ # Lint and auto-fix
201
+ task lint:fix
202
+
203
+ # Run tests with coverage
204
+ task test:coverage
205
+
206
+ # Show coverage report with files below threshold
207
+ task test:coverage:report THRESHOLD=80
208
+
209
+ # Clean everything including git worktrees
210
+ task clean
211
+
212
+ # Full rebuild
213
+ task rebuild
214
+
215
+ # Run CI checks locally
216
+ task ci
217
+ ```
218
+
219
+ **Features:**
220
+
221
+ - Auto-detection of ESLint, Biome, and Prettier
222
+ - Coverage tracking with low-coverage file highlighting
223
+ - Git worktree cleanup in clean task
224
+ - Integration with 1Password for secrets
225
+ - Parallel test execution support
226
+
227
+ ---
228
+
229
+ ## Claude Code & MCP ([claude.yml](claude.yml))
230
+
231
+ Tasks for managing Claude Code integration and MCP server installations.
232
+
233
+ **MCP Server Management:**
234
+
235
+ | Task | Alias | Description |
236
+ | ------------------------- | ----- | ------------------------------ |
237
+ | `task claude:mcp:install` | `mi` | Install MCP server globally |
238
+ | `task claude:mcp:verify` | `mv` | Verify MCP server installation |
239
+ | `task claude:mcp:status` | `ms` | Show MCP server status |
240
+ | `task claude:mcp:remove` | `mr` | Remove MCP server |
241
+
242
+ **Installer Testing:**
243
+
244
+ | Task | Alias | Description |
245
+ | ---------------------------------- | ----- | --------------------------------- |
246
+ | `task claude:installer:test` | `it` | Run complete installer test suite |
247
+ | `task claude:installer:test:force` | `itf` | Test force reinstall |
248
+ | `task claude:installer:test:clean` | `itc` | Clean up test installations |
249
+
250
+ ---
251
+
252
+ ## Docker Operations ([docker.yml](docker.yml))
253
+
254
+ Docker container management, image operations, and security scanning.
255
+
256
+ **Image Operations:**
257
+
258
+ | Task | Alias | Description | Parameters |
259
+ | ------------------- | ----- | ---------------------- | -------------------------- |
260
+ | `task docker:build` | - | Build Docker image | `IMAGE=... TAG=... PATH=.` |
261
+ | `task docker:tag` | - | Tag Docker image | `SOURCE=... TARGET=...` |
262
+ | `task docker:push` | - | Push image to registry | `IMAGE=... TAG=...` |
263
+
264
+ **GitHub Container Registry:**
265
+
266
+ | Task | Alias | Description | Parameters |
267
+ | ----------------------- | ----- | ---------------- | -------------------------------------- |
268
+ | `task docker:git:login` | - | Login to ghcr.io | `USER=... TOKEN=...` |
269
+ | `task docker:git:push` | - | Push to ghcr.io | `IMAGE=... TAG=... USER=... TOKEN=...` |
270
+
271
+ **Security Scanning:**
272
+
273
+ | Task | Alias | Description | Parameters |
274
+ | ----------------------------- | ----- | ------------------------------------- | ------------------- |
275
+ | `task docker:scan` | - | Scan image for vulnerabilities | `IMAGE=... TAG=...` |
276
+ | `task docker:scan:dockerfile` | `df` | Scan Dockerfile for misconfigurations | `FILE=...` |
277
+ | `task docker:scan:init` | - | Initialize Trivy cache | - |
278
+
279
+ **Linux Debug Environment:**
280
+
281
+ | Task | Alias | Description |
282
+ | -------------------------- | ----- | --------------------------- |
283
+ | `task docker:linux:build` | `b` | Build image with local code |
284
+ | `task docker:linux:test` | `t` | Run E2E tests |
285
+ | `task docker:linux:up` | `u` | Start container with SSH |
286
+ | `task docker:linux:down` | `d` | Stop and remove container |
287
+ | `task docker:linux:status` | `st` | Check container status |
288
+ | `task docker:linux:logs` | `l` | View container logs |
289
+
290
+ **Usage:**
291
+
292
+ ```bash
293
+ # Build and scan image
294
+ task docker:build IMAGE=myapp TAG=v1.0.0 PATH=.
295
+ task docker:scan IMAGE=myapp TAG=v1.0.0
296
+
297
+ # Scan Dockerfile before building
298
+ task docker:scan:dockerfile FILE=Dockerfile
299
+ task docker:scan:dockerfile FILE=docker/app/Dockerfile
300
+
301
+ # Push to GitHub Container Registry
302
+ task docker:git:push IMAGE=myapp TAG=v1.0.0 USER=username TOKEN=ghp_xxx
303
+
304
+ # Also push latest tag
305
+ task docker:git:push IMAGE=myapp TAG=v1.0.0 USER=username TOKEN=ghp_xxx LATEST=true
306
+
307
+ # Linux debug environment
308
+ task docker:linux:build && task docker:linux:test
309
+ task docker:linux:up
310
+ ssh -p 2222 developer@localhost
311
+ task docker:linux:down
312
+ ```
313
+
314
+ **Features:**
315
+
316
+ - Trivy-based vulnerability scanning for images
317
+ - Dockerfile misconfiguration scanning (security best practices)
318
+ - GitHub Container Registry integration
319
+ - Quiet mode by default (use `VERBOSE=true` for details)
320
+ - Cached Trivy database via Docker volume
321
+ - Linux debug environment for cross-platform testing
322
+
323
+ **Requirements:**
324
+
325
+ - Docker must be installed and running
326
+ - For GHCR: GitHub token with `write:packages` permission
327
+
328
+ ---
329
+
330
+ ## API Documentation ([docs.yml](docs.yml))
331
+
332
+ TypeDoc-based API documentation generation in Markdown format.
333
+
334
+ **Commands:**
335
+
336
+ | Task | Alias | Description |
337
+ | -------------------- | ----- | --------------------------------- |
338
+ | `task docs:generate` | `g` | Generate API docs from TypeScript |
339
+ | `task docs:clean` | `c` | Remove generated documentation |
340
+ | `task docs:watch` | `w` | Watch for changes and regenerate |
341
+ | `task docs:view` | `v` | Open generated docs |
342
+ | `task docs:rebuild` | `r` | Clean and regenerate docs |
343
+
344
+ **Usage:**
345
+
346
+ ```bash
347
+ # Generate API documentation
348
+ task docs:generate
349
+
350
+ # Watch and auto-regenerate on changes
351
+ task docs:watch
352
+
353
+ # View generated docs
354
+ task docs:view
355
+
356
+ # Clean and regenerate
357
+ task docs:rebuild
358
+ ```
359
+
360
+ **Features:**
361
+
362
+ - TypeDoc integration for TypeScript documentation
363
+ - Markdown output format
364
+ - Auto-open in VSCode or system viewer
365
+ - Watch mode for development
366
+
367
+ **Output:**
368
+
369
+ Documentation generated in `docs/api/` directory.
370
+
371
+ ---
372
+
373
+ ## Git & GitHub Operations ([git.yml](git.yml))
374
+
375
+ Tasks for Git operations, GitHub PR management, and repository utilities.
376
+
377
+ **Repository Utilities:**
378
+
379
+ | Task | Alias | Description |
380
+ | ------------------------- | -------- | ------------------------------------ |
381
+ | `task git:repo:root` | `root` | Get repository root path |
382
+ | `task git:repo:url` | `url` | Get repository HTTPS URL |
383
+ | `task git:branch:current` | `branch` | Get current branch name |
384
+ | `task git:branch:default` | `main` | Get default branch (main/master) |
385
+ | `task git:branch:prune` | `prune` | Delete local branches gone on remote |
386
+ | `task git:token` | `token` | Get GitHub authentication token |
387
+
388
+ **Pull Request Management:**
389
+
390
+ | Task | Alias | Description |
391
+ | ---------------------- | ----- | -------------------------------- |
392
+ | `task git:pr:create` | `pr` | Create/update draft PR from file |
393
+ | `task git:pr:open` | `pro` | Open current PR in browser |
394
+ | `task git:pr:list` | `prl` | List pull requests |
395
+ | `task git:pr:comments` | `com` | Get all comments from current PR |
396
+
397
+ **GitHub Actions:**
398
+
399
+ | Task | Alias | Description |
400
+ | ---------------------- | ------ | -------------------------- |
401
+ | `task git:runs:log` | `logs` | Download workflow run logs |
402
+ | `task git:actions:pin` | `pin` | Pin actions to commit SHAs |
403
+
404
+ **Security:**
405
+
406
+ | Task | Alias | Description |
407
+ | ---------------- | ------- | ------------------------------ |
408
+ | `task git:leaks` | `leaks` | Scan for secrets with gitleaks |
409
+ | `task git:cve` | `cve` | Download CVEs for repository |
410
+
411
+ **Usage:**
412
+
413
+ ```bash
414
+ # Repository utilities
415
+ REPO_ROOT=$(task git:repo:root)
416
+ REPO_URL=$(task git:repo:url)
417
+ CURRENT_BRANCH=$(task git:branch:current)
418
+ DEFAULT_BRANCH=$(task git:branch:default)
419
+
420
+ # Create PR from default file (.pr.local.md)
421
+ task git:pr:create
422
+
423
+ # Create PR from custom file
424
+ task git:pr:create FILE=.pr.custom.md
425
+
426
+ # List open PRs
427
+ task git:pr:list LIMIT=20 STATE=open
428
+
429
+ # Get all PR comments
430
+ task git:pr:comments
431
+
432
+ # Download workflow run logs
433
+ task git:runs:log # Latest failed run
434
+ task git:runs:log STATE=all ALL=true # All runs (any state)
435
+ task git:runs:log RUN_ID=12345678 # Specific run
436
+ task git:runs:log WORKFLOW="Tests" STATE=all # All test runs
437
+
438
+ # Pin GitHub Actions to commit SHAs
439
+ task git:actions:pin # Check for unpinned actions
440
+ task git:actions:pin UPGRADE=1 # Upgrade and pin actions
441
+ task git:actions:pin CHECK=1 # Check only (no changes)
442
+
443
+ # Security scanning
444
+ task git:leaks # Scan for secrets
445
+ task git:cve MIN_SEVERITY=medium # Download CVEs
446
+ ```
447
+
448
+ **Features:**
449
+
450
+ - Automatically pushes branch if not on remote
451
+ - Loads GitHub token from 1Password if configured
452
+ - Parses title from `# Heading` in markdown file
453
+ - Opens PR in browser after creation
454
+ - Cross-platform browser opening (macOS, Linux, Windows)
455
+ - Workflow log aggregation and filtering
456
+ - GitHub Actions pinning for security
457
+
458
+ **Requirements:**
459
+
460
+ - GitHub CLI (`gh`) must be installed: `brew install gh`
461
+ - `GITHUB_TOKEN` or `GH_TOKEN` environment variable must be set
462
+ - PR file must exist with format:
463
+
464
+ ```markdown
465
+ # PR Title
466
+
467
+ PR body content here...
468
+ ```
469
+
470
+ ---
471
+
472
+ ## GoTask Utilities ([gotask.yml](gotask.yml))
473
+
474
+ Development tools and utilities for creating and managing task files.
475
+
476
+ **Task Development:**
477
+
478
+ | Task | Alias | Description |
479
+ | ------------------------ | ----- | ----------------------------------- |
480
+ | `task gotask:format` | `f` | Format default task in Taskfile |
481
+ | `task gotask:new:task` | `nt` | Create new task in Taskfile.yml |
482
+ | `task gotask:new:script` | `ns` | Create new TypeScript task script |
483
+ | `task gotask:validate` | `v` | Validate all Taskfile.yml syntax |
484
+ | `task gotask:deps:check` | `dc` | Check for missing task dependencies |
485
+
486
+ **Setup & Configuration:**
487
+
488
+ | Task | Alias | Description |
489
+ | ------------------------------ | ----- | -------------------------------------------- |
490
+ | `task gotask:setup:extensions` | `se` | Install recommended VSCode/Cursor extensions |
491
+
492
+ **Documentation:**
493
+
494
+ | Task | Alias | Description |
495
+ | --------------------------- | ----- | --------------------------- |
496
+ | `task gotask:docs:generate` | `dg` | Generate task documentation |
497
+ | `task gotask:docs:view` | `dv` | View best practices guide |
498
+ | `task gotask:docs:edit` | `de` | Edit best practices guide |
499
+
500
+ **Templates:**
501
+
502
+ | Task | Alias | Description |
503
+ | ---------------------------- | ----- | ---------------------------- |
504
+ | `task gotask:template:basic` | `tb` | Generate basic task template |
505
+ | `task gotask:template:build` | `tbu` | Generate build task template |
506
+ | `task gotask:template:test` | `tt` | Generate test task template |
507
+
508
+ ---
509
+
510
+ ## JSON Linting & Validation ([json.yml](json.yml))
511
+
512
+ JSON file validation, linting, and auto-formatting with built-in JSON parser.
513
+
514
+ **Implementation:** Task logic is in TypeScript ([src/tasks/json/](../src/tasks/json/)) for maintainability.
515
+
516
+ **Commands:**
517
+
518
+ | Task | Alias | Description |
519
+ | -------------------- | ----- | ------------------------ |
520
+ | `task json:lint` | `l` | Lint JSON files |
521
+ | `task json:lint:fix` | `lf` | Auto-fix JSON formatting |
522
+
523
+ **Usage:**
524
+
525
+ ```bash
526
+ # Lint all JSON files (quiet on success)
527
+ task json:lint
528
+
529
+ # Lint specific pattern
530
+ task json:lint FILES="*.json"
531
+ task json:lint FILES="config/**/*.json"
532
+
533
+ # Show output even on success
534
+ VERBOSE=1 task json:lint
535
+
536
+ # Auto-fix formatting (pretty-print with 2-space indent)
537
+ task json:lint:fix
538
+ ```
539
+
540
+ **Features:**
541
+
542
+ - Quiet output on success (use `VERBOSE=1` for details)
543
+ - File pattern support with glob expansion
544
+ - Auto-fix with 2-space indentation
545
+ - Excludes node_modules, dist, and .taskmaster directories
546
+ - Built-in JSON parser (no external dependencies)
547
+
548
+ **Default Patterns:**
549
+
550
+ `*.json,**/*.json,!node_modules/**,!dist/**,!.taskmaster/**`
551
+
552
+ ---
553
+
554
+ ## Markdown Linting & Validation ([markdown.yml](markdown.yml))
555
+
556
+ Markdown file validation, linting, and auto-formatting using markdownlint.
557
+
558
+ **Implementation:** Task logic is in TypeScript ([src/tasks/markdown/](../src/tasks/markdown/)) for maintainability.
559
+
560
+ **Commands:**
561
+
562
+ | Task | Alias | Description |
563
+ | ------------------------ | ----- | ------------------------------------ |
564
+ | `task markdown:lint` | `l` | Lint markdown files |
565
+ | `task markdown:lint:fix` | `lf` | Auto-fix markdown formatting |
566
+ | `task markdown:setup` | `s` | Install markdownlint & create config |
567
+
568
+ **Usage:**
569
+
570
+ ```bash
571
+ # Lint all markdown files (quiet on success)
572
+ task markdown:lint
573
+
574
+ # Lint specific pattern
575
+ task markdown:lint FILES="*.md"
576
+ task markdown:lint FILES="docs/**/*.md"
577
+
578
+ # Show output even on success
579
+ VERBOSE=1 task markdown:lint
580
+
581
+ # Auto-fix formatting issues
582
+ task markdown:lint:fix
583
+
584
+ # Install markdownlint globally (one-time setup)
585
+ task markdown:setup
586
+ ```
587
+
588
+ **Features:**
589
+
590
+ - Quiet output on success (use `VERBOSE=1` for details)
591
+ - File pattern support with glob expansion
592
+ - Auto-fix capability
593
+ - Default config creation (`.markdownlint.yaml`)
594
+ - Cross-platform support
595
+
596
+ **Default Patterns:**
597
+
598
+ `*.md,docs/**/*.md,.github/**/*.md,tasks/**/*.md`
599
+
600
+ ---
601
+
602
+ ## 1Password Secret Management ([onepassword.yml](onepassword.yml))
603
+
604
+ Secure secret management using 1Password CLI. Secrets are automatically loaded by tasks that need them.
605
+
606
+ **Secret Loading:**
607
+
608
+ | Command | Alias | Description |
609
+ | -------------------------------- | ------- | --------------------------------------- |
610
+ | `source $(task op:export)` | `op:x` | Load secrets into shell (interactive) |
611
+ | `source $(task op:export:force)` | `op:xf` | Force reload all secrets from 1Password |
612
+ | `task op:cleanup` | `op:c` | Clean up temp secret files |
613
+ | `task op:validate` | `op:v` | Validate exported secrets |
614
+ | `task op:test` | `op:t` | Test GitHub token permissions |
615
+
616
+ **How It Works:**
617
+
618
+ Tasks that require secrets (like `semgrep`) automatically source secrets via secure temp files:
619
+
620
+ ```bash
621
+ # Just run the task - secrets loaded automatically
622
+ task semgrep
623
+
624
+ # For interactive shell use:
625
+ source $(task op:export)
626
+ ```
627
+
628
+ **Security Features:**
629
+
630
+ - Secrets stored in secure temp file (`chmod 600`)
631
+ - 1-hour cache (idempotent, avoids repeated prompts)
632
+ - No secrets printed to terminal
633
+ - Unique path per repository
634
+ - Automatic cleanup on reboot (stored in `/tmp`)
635
+
636
+ ---
637
+
638
+ ## Security Scanning ([security.yml](security.yml))
639
+
640
+ Local SAST (Static Application Security Testing) scanning with semgrep and secret detection.
641
+
642
+ **Commands:**
643
+
644
+ | Task | Alias | Description |
645
+ | -------------------------- | ----- | -------------------------------- |
646
+ | `task security:scan` | `s` | Run semgrep security scanner |
647
+ | `task security:fix` | `f` | Auto-fix security issues |
648
+ | `task security:trufflehog` | `th` | Scan for secrets with truffleHog |
649
+
650
+ **Usage:**
651
+
652
+ ```bash
653
+ # Run security scanner
654
+ task security:scan
655
+
656
+ # Auto-fix security issues
657
+ task security:fix
658
+
659
+ # Scan for secrets
660
+ task security:trufflehog
661
+ ```
662
+
663
+ **Features:**
664
+
665
+ - Semgrep integration for SAST scanning
666
+ - Auto-fix capability for common security issues
667
+ - Secret scanning with truffleHog
668
+ - Automatic tool installation if not present
669
+ - Integration with 1Password for API tokens
670
+
671
+ **Requirements:**
672
+
673
+ - Semgrep installed: `pip install semgrep` or `brew install semgrep`
674
+ - truffleHog installed: `brew install trufflehog` (auto-installed if missing)
675
+
676
+ ---
677
+
678
+ ## SonarQube Code Quality ([sonar.yml](sonar.yml))
679
+
680
+ SonarQube/SonarCloud integration for code quality analysis and issue management.
681
+
682
+ **Commands:**
683
+
684
+ | Task | Alias | Description |
685
+ | --------------------- | ----- | ------------------------------ |
686
+ | `task sonar:scan` | `s` | Run SonarQube analysis locally |
687
+ | `task sonar:download` | `dl` | Download issues from SonarQube |
688
+ | `task sonar:issues` | `i` | Display downloaded findings |
689
+ | `task sonar:setup` | - | Install sonar-scanner CLI |
690
+
691
+ **Usage:**
692
+
693
+ ```bash
694
+ # Download analysis results
695
+ task sonar:download
696
+
697
+ # View downloaded findings
698
+ task sonar:issues
699
+
700
+ # Run local scan
701
+ task sonar:scan
702
+
703
+ # Install sonar-scanner
704
+ task sonar:setup
705
+ ```
706
+
707
+ **Features:**
708
+
709
+ - Downloads complete analysis results from SonarQube/SonarCloud
710
+ - Generates human-readable reports in `.logs/sonar/`
711
+ - PR-specific analysis support
712
+ - Quality gate status tracking
713
+ - Security hotspot reporting
714
+ - Coverage metrics integration
715
+ - Auto-opens reports in VSCode
716
+
717
+ **Configuration:**
718
+
719
+ - Set `SONAR_TOKEN` in `.env` file
720
+ - Supports 1Password references: `op://vault/item/field`
721
+ - Project key read from `sonar-project.properties`
722
+
723
+ **Requirements:**
724
+
725
+ - SonarQube/SonarCloud project configured
726
+ - `SONAR_TOKEN` environment variable set
727
+ - `sonar-project.properties` file in repository root
728
+ - GitHub CLI (`gh`) for PR detection
729
+
730
+ ---
731
+
732
+ ## YAML Linting & Validation ([yaml.yml](yaml.yml))
733
+
734
+ YAML file validation, linting, and auto-formatting with global tool installation.
735
+
736
+ **Implementation:** Task logic is in TypeScript ([src/tasks/yaml/](../src/tasks/yaml/)) following best practices for maintainability and testability.
737
+
738
+ **Commands:**
739
+
740
+ | Task | Alias | Description |
741
+ | -------------------- | ----- | --------------------------- |
742
+ | `task yaml:lint` | `l` | Lint YAML files |
743
+ | `task yaml:lint:fix` | `lf` | Auto-fix YAML formatting |
744
+ | `task yaml:validate` | `v` | Validate YAML syntax only |
745
+ | `task yaml:setup` | `s` | Install YAML tools globally |
746
+
747
+ **Usage:**
748
+
749
+ ```bash
750
+ # Lint all YAML files (auto-detects prettier or yamllint)
751
+ task yaml:lint
752
+
753
+ # Lint specific pattern
754
+ task yaml:lint FILES="*.yml"
755
+ task yaml:lint FILES="config/*.yml,tasks/*.yml"
756
+
757
+ # Force specific linter
758
+ task yaml:lint LINTER=prettier
759
+ task yaml:lint LINTER=yamllint
760
+
761
+ # Auto-fix formatting issues
762
+ task yaml:lint:fix
763
+
764
+ # Validate syntax only
765
+ task yaml:validate
766
+
767
+ # Install tools globally (one-time setup)
768
+ task yaml:setup
769
+ ```
770
+
771
+ **Features:**
772
+
773
+ - Auto-detection of available linters (prettier, yamllint)
774
+ - Global tool installation via `task yaml:setup`
775
+ - File pattern support with glob expansion
776
+ - Auto-fix with prettier or yq fallback
777
+ - Default config creation (`.yamllint.yml`, `.prettierrc.yml`)
778
+ - Cross-platform support (macOS, Linux)
779
+ - Idempotent setup (checks existing installations)
780
+
781
+ **Tools Installed by `setup`:**
782
+
783
+ - **js-yaml** - YAML syntax validation
784
+ - **prettier** - Auto-formatting (recommended)
785
+ - **yamllint** - Style linting with rules
786
+
787
+ **How It Works:**
788
+
789
+ Tools are installed globally once and shared across all projects:
790
+
791
+ ```bash
792
+ # First project
793
+ cd ~/projects/ai-toolkit
794
+ task yaml:setup # Installs tools globally
795
+
796
+ # Other projects - tools already available
797
+ cd ~/projects/other-project
798
+ task yaml:lint # Works immediately
799
+ ```
800
+
801
+ ---
802
+
803
+ ## Environment Setup
804
+
805
+ Tasks assume the following tools are available:
806
+
807
+ - **bun** >= 1.0.0 (primary runtime)
808
+ - **Node.js** >= 18.0.0 (fallback)
809
+ - **Git** >= 2.0.0
810
+ - **1Password CLI** (optional, for secret management)
811
+ - **Claude CLI** (optional, for MCP tasks)
812
+ - **GoTask** >= 3.0.0
813
+
814
+ Install GoTask:
815
+
816
+ ```bash
817
+ # macOS
818
+ brew install go-task
819
+
820
+ # Linux
821
+ sh -c "$(curl -fsSL https://taskfile.dev/install.sh)" -- -d
822
+
823
+ # Windows
824
+ choco install go-task
825
+ ```
826
+
827
+ ---
828
+
829
+ ## Troubleshooting
830
+
831
+ ### Task not found
832
+
833
+ ```bash
834
+ # Verify task exists
835
+ task --list | grep task-name
836
+
837
+ # Check task file is included in main Taskfile.yml
838
+ cat Taskfile.yml | grep "includes:"
839
+ ```
840
+
841
+ ### Script execution fails
842
+
843
+ ```bash
844
+ # Check file permissions
845
+ ls -la tasks/scripts/category/script.ts
846
+
847
+ # Make executable if needed
848
+ chmod +x tasks/scripts/category/script.ts
849
+
850
+ # Run script directly to see errors
851
+ bun run tasks/scripts/category/script.ts
852
+ ```
853
+
854
+ ### 1Password tasks fail
855
+
856
+ ```bash
857
+ # Check 1Password CLI is installed
858
+ which op
859
+ op --version
860
+
861
+ # Verify authentication
862
+ op account list
863
+
864
+ # Sign in if needed
865
+ op signin
866
+ ```
867
+
868
+ ---
869
+
870
+ ## Related Documentation
871
+
872
+ - [Main README](../README.md) - Project overview
873
+ - [CONTRIBUTING](../CONTRIBUTING.md) - Development guidelines
874
+ - [Installation Guide](../docs/installer.md) - AI Toolkit usage
875
+ - [1Password Integration](../docs/1password.md) - Secret management setup
876
+ - [CLAUDE.md](../CLAUDE.md) - Project instructions for Claude Code
877
+
878
+ ---
879
+
880
+ **Need help?** Run `task` to see all available task categories, or `task <category>` to see category-specific tasks.