strray-ai 1.7.8 → 1.9.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.
Files changed (77) hide show
  1. package/.opencode/AGENTS-consumer.md +652 -0
  2. package/.opencode/agents/analyzer.yml +11 -0
  3. package/.opencode/agents/architect.yml +11 -0
  4. package/.opencode/agents/backend-engineer.yml +12 -0
  5. package/.opencode/agents/bug-triage-specialist.yml +46 -2
  6. package/.opencode/agents/code-reviewer.yml +12 -0
  7. package/.opencode/agents/content-creator.yml +11 -0
  8. package/.opencode/agents/database-engineer.yml +12 -0
  9. package/.opencode/agents/devops-engineer.yml +12 -0
  10. package/.opencode/agents/document-writer.yml +11 -0
  11. package/.opencode/agents/enforcer.yml +12 -0
  12. package/.opencode/agents/frontend-engineer.yml +12 -0
  13. package/.opencode/agents/frontend-ui-ux-engineer.yml +11 -0
  14. package/.opencode/agents/growth-strategist.yml +11 -0
  15. package/.opencode/agents/librarian-agents-updater.yml +11 -0
  16. package/.opencode/agents/log-monitor.yml +11 -0
  17. package/.opencode/agents/mobile-developer.yml +11 -0
  18. package/.opencode/agents/multimodal-looker.yml +11 -0
  19. package/.opencode/agents/orchestrator.yml +11 -0
  20. package/.opencode/agents/performance-engineer.yml +11 -0
  21. package/.opencode/agents/refactorer.yml +12 -0
  22. package/.opencode/agents/researcher.yml +11 -0
  23. package/.opencode/agents/security-auditor.yml +12 -0
  24. package/.opencode/agents/seo-consultant.yml +11 -0
  25. package/.opencode/agents/storyteller-growth-strategy.md +281 -0
  26. package/.opencode/agents/storyteller-style-guide.md +296 -0
  27. package/.opencode/agents/storyteller.yml +1140 -0
  28. package/.opencode/agents/strategist.yml +11 -0
  29. package/.opencode/agents/tech-writer.yml +11 -0
  30. package/.opencode/agents/testing-lead.yml +12 -0
  31. package/.opencode/init.sh +2 -1
  32. package/.opencode/plugins/strray-codex-injection.js +1 -1
  33. package/.opencode/strray/agents_template.md +105 -0
  34. package/.opencode/strray/features.json +16 -0
  35. package/AGENTS-consumer.md +560 -2
  36. package/AGENTS.md +560 -2
  37. package/README.md +3 -2
  38. package/dist/delegation/complexity-analyzer.d.ts +3 -1
  39. package/dist/delegation/complexity-analyzer.d.ts.map +1 -1
  40. package/dist/delegation/complexity-analyzer.js +6 -4
  41. package/dist/delegation/complexity-analyzer.js.map +1 -1
  42. package/dist/delegation/task-skill-router.d.ts +1 -0
  43. package/dist/delegation/task-skill-router.d.ts.map +1 -1
  44. package/dist/delegation/task-skill-router.js +75 -7
  45. package/dist/delegation/task-skill-router.js.map +1 -1
  46. package/dist/enforcement/enforcer-tools.d.ts +1 -0
  47. package/dist/enforcement/enforcer-tools.d.ts.map +1 -1
  48. package/dist/enforcement/enforcer-tools.js +236 -4
  49. package/dist/enforcement/enforcer-tools.js.map +1 -1
  50. package/dist/enforcement/rule-enforcer.d.ts.map +1 -1
  51. package/dist/enforcement/rule-enforcer.js +5 -4
  52. package/dist/enforcement/rule-enforcer.js.map +1 -1
  53. package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts.map +1 -1
  54. package/dist/mcps/knowledge-skills/skill-invocation.server.js +14 -4
  55. package/dist/mcps/knowledge-skills/skill-invocation.server.js.map +1 -1
  56. package/dist/orchestrator/universal-registry-bridge.js +1 -1
  57. package/dist/orchestrator/universal-registry-bridge.js.map +1 -1
  58. package/dist/plugin/strray-codex-injection.d.ts.map +1 -1
  59. package/dist/plugin/strray-codex-injection.js +17 -2
  60. package/dist/plugin/strray-codex-injection.js.map +1 -1
  61. package/dist/postprocessor/triggers/GitHookTrigger.js +1 -1
  62. package/dist/scripts/profiling-demo.d.ts +2 -0
  63. package/dist/scripts/profiling-demo.d.ts.map +1 -0
  64. package/dist/scripts/profiling-demo.js +78 -0
  65. package/dist/scripts/profiling-demo.js.map +1 -0
  66. package/opencode.json +3 -3
  67. package/package.json +5 -2
  68. package/scripts/node/profiling-demo.js +1 -1
  69. package/scripts/node/release-tweet-multi.mjs.bak +269 -0
  70. package/scripts/node/release-tweet-single.mjs +323 -0
  71. package/scripts/node/release-tweet.mjs +268 -0
  72. package/scripts/node/setup.cjs +1 -1
  73. package/scripts/node/validate-codex.mjs +1 -1
  74. package/scripts/node/value-tweet.mjs +305 -0
  75. package/scripts/node/value-tweet.mjs.backup +487 -0
  76. package/scripts/node/version-manager.mjs +216 -38
  77. package/.opencode/agents/general.yml +0 -86
@@ -0,0 +1,652 @@
1
+ # StringRay Agents
2
+
3
+ Quick reference for StringRay AI orchestration framework.
4
+
5
+ ## What is StringRay?
6
+
7
+ StringRay provides intelligent multi-agent orchestration with automatic delegation and Codex compliance validation. Agents operate via OpenCode plugin injection - no manual setup needed.
8
+
9
+ ## How StringRay Works
10
+
11
+ StringRay provides intelligent multi-agent orchestration with automatic delegation and Codex compliance validation. Agents operate via OpenCode plugin injection - no manual setup needed.
12
+
13
+ ### Basic Operation
14
+
15
+ 1. **Install**: Run `npx strray-ai install` to configure agents in your project
16
+ 2. **Invoke**: Use `@agent-name` syntax in prompts or code comments (e.g., `@architect design this API`)
17
+ 3. **Automatic Routing**: StringRay automatically routes tasks to the appropriate agent based on complexity
18
+ 4. **Agent Modes**: Agents can be `primary` (main coordinator) or `subagent` (specialized helper)
19
+
20
+ ### Where to Find Reflections
21
+
22
+ Deep reflection documents capture development journeys and lessons learned:
23
+ - **Location**: `docs/reflections/` (main) and `docs/deep-reflections/` (detailed)
24
+ - **Examples**: `kernel-v2.0-skill-system-fix-journey.md`, `typescript-build-fix-journey-2026-03-09.md`, `stringray-framework-deep-reflection-v1.4.21.md`
25
+
26
+ These documents capture:
27
+ - Technical challenges encountered and solved
28
+ - Architectural decisions made
29
+ - Lessons learned for future development
30
+ - Best practices established
31
+
32
+ ### File Organization Guidelines
33
+
34
+ **IMPORTANT**: Save all generated files to their proper directories. Do NOT save to root.
35
+
36
+ | File Type | Save To | Example |
37
+ |-----------|---------|---------|
38
+ | **Reflections** | `docs/reflections/` or `docs/deep-reflections/` | `docs/reflections/my-fix-reflection.md` |
39
+ | **Logs** | `logs/` | `logs/framework/activity.log` |
40
+ | **Scripts** | `scripts/` or `scripts/bash/` | `scripts/bash/my-script.sh` |
41
+ | **Test Files** | `src/__tests__/` | `src/__tests__/unit/my-test.test.ts` |
42
+ | **Source Code** | `src/` | `src/my-module.ts` |
43
+ | **Config** | `config/` or `.opencode/strray/` | `.opencode/strray/config.json` |
44
+
45
+ **Never save to root** - Root directory is for essential files only:
46
+ - `README.md`, `CHANGELOG.md`, `package.json`, `tsconfig.json`
47
+
48
+ ### Logging Guidelines
49
+
50
+ **IMPORTANT**: Never use `console.log`, `console.warn`, or `console.error`. Use the framework logger instead.
51
+
52
+ | Use This | Not This |
53
+ |----------|-----------|
54
+ | `frameworkLogger.log(module, event, 'info', { data })` | `console.log()` |
55
+ | `frameworkLogger.log(module, event, 'error', { error })` | `console.error()` |
56
+ | `frameworkLogger.log(module, event, 'warning', { warning })` | `console.warn()` |
57
+
58
+ **Why**: Console statements bleed through to OpenCode console and create noise. Framework logger is structured and filtered.
59
+
60
+ **Example**:
61
+ ```typescript
62
+ // WRONG ❌
63
+ console.log("Starting process");
64
+
65
+ // CORRECT ✅
66
+ import { frameworkLogger } from "../core/framework-logger.js";
67
+ frameworkLogger.log("my-module", "process-start", "info", { message: "Starting process" });
68
+ ```
69
+
70
+ Reflection Template Paths
71
+
72
+ StringRay uses **two reflection folders** for different purposes:
73
+
74
+ #### Option 1: Standard Reflections (`docs/reflections/`)
75
+ **When to use:** Single-session work, specific bug fixes, targeted implementations
76
+ - **Template:** `docs/reflections/TEMPLATE.md` (442 lines)
77
+ - **Naming:** `{topic}-reflection.md` or `{topic}-YYYY-MM-DD.md`
78
+ - **Length:** 1,000-5,000 lines
79
+ - **Format:** 11 structured sections (Executive Summary, Dichotomy, Counterfactual, etc.)
80
+
81
+ **Examples:**
82
+ - `docs/reflections/deployment-crisis-v12x-reflection.md`
83
+ - `docs/reflections/kernel-confidence-fix.md`
84
+
85
+ #### Option 2: Deep Reflections (`docs/deep-reflections/`)
86
+ **When to use:** Multi-session journeys, complex investigations, architectural transformations
87
+ - **Template:** `docs/deep-reflections/TEMPLATE.md` (NEW - 300 lines)
88
+ - **Naming:** `{topic}-journey-YYYY-MM-DD.md` or `DEEP_REFLECTION_{topic}.md`
89
+ - **Length:** 10,000+ lines
90
+ - **Format:** Narrative journey with session chronology, investigation narrative, technical deep dives
91
+
92
+ **Examples:**
93
+ - `docs/deep-reflections/kernel-journey-2026-03-09.md`
94
+ - `docs/deep-reflections/AGENTS-consumer-documentation-strategy-journey-2026-03-09.md`
95
+
96
+ #### Quick Decision Guide
97
+
98
+ | Scenario | Use |
99
+ |----------|------|
100
+ | Fixed a bug in one session | `docs/reflections/` |
101
+ | Investigated something complex over multiple days | `docs/deep-reflections/` |
102
+ | Single architectural change | `docs/reflections/` |
103
+ | System-wide transformation | `docs/deep-reflections/` |
104
+ | Quick learning/insight | `docs/reflections/` |
105
+ | Deep investigation with many discoveries | `docs/deep-reflections/` |
106
+
107
+ ### Storyteller Story Types
108
+
109
+ The `@storyteller` agent supports multiple story types:
110
+
111
+ | Type | Description | Invoke |
112
+ |------|-------------|--------|
113
+ | `reflection` | Technical deep reflections on development process | `@storyteller write a reflection about X` |
114
+ | `saga` | Long-form technical saga spanning multiple sessions | `@storyteller write a saga about X` |
115
+ | `journey` | Investigation/learning journey | `@storyteller write a journey about X` |
116
+ | `narrative` | Technical narrative - telling the story of code | `@storyteller write a narrative about X` |
117
+
118
+ **Example:**
119
+ ```
120
+ @storyteller write a reflection about fixing the memory leak
121
+ ```
122
+
123
+ ## Available Agents
124
+
125
+ | Agent | Purpose | Invoke |
126
+ |-------|---------|--------|
127
+ | `@enforcer` | Codex compliance & error prevention | `@enforcer analyze this code` |
128
+ | `@orchestrator` | Complex multi-step task coordination | `@orchestrator implement feature` |
129
+ | `@architect` | System design & technical decisions | `@architect design API` |
130
+ | `@security-auditor` | Vulnerability detection | `@security-auditor scan` |
131
+ | `@code-reviewer` | Quality assessment | `@code-reviewer review PR` |
132
+ | `@refactorer` | Technical debt elimination | `@refactorer optimize code` |
133
+ | `@testing-lead` | Testing strategy | `@testing-lead plan tests` |
134
+ | `@bug-triage-specialist` | Error investigation | `@bug-triage-specialist debug error` |
135
+ | `@storyteller` | Narrative deep reflections | `@storyteller write a journey` |
136
+ | `@researcher` | Codebase exploration | `@researcher find implementation` |
137
+
138
+ ## Complexity Routing
139
+
140
+ StringRay automatically routes tasks based on complexity:
141
+
142
+ - **Simple (≤20)**: Single agent
143
+ - **Moderate (21-35)**: Single agent with tools
144
+ - **Complex (36-75)**: Multi-agent coordination
145
+ - **Enterprise (>75)**: Orchestrator-led team
146
+
147
+ ## CLI Commands
148
+
149
+ ```bash
150
+ npx strray-ai install # Install and configure
151
+ npx strray-ai status # Check configuration
152
+ npx strray-ai health # Health check
153
+ npx strray-ai validate # Validate installation
154
+ npx strray-ai capabilities # Show all features
155
+ npx strray-ai report # Generate reports
156
+ npx strray-ai analytics # Pattern analytics
157
+ npx strray-ai calibrate # Calibrate complexity
158
+ ```
159
+
160
+ ## Features.json Configuration
161
+
162
+ StringRay uses `.opencode/strray/features.json` for feature flags and settings:
163
+
164
+ ### Location
165
+ - **Path**: `.opencode/strray/features.json`
166
+ - **Consumer Path**: When installed as npm package, loaded from `node_modules/strray-ai/.opencode/strray/features.json`
167
+
168
+ ### Key Features
169
+ - `token_optimization` - Context token management
170
+ - `model_routing` - AI model routing
171
+ - `batch_operations` - File batch processing
172
+ - `multi_agent_orchestration` - Agent coordination
173
+ - `autonomous_reporting` - Automatic reporting
174
+ - `activity_logging` - Activity logging configuration
175
+ - `security` - Security settings
176
+ - `performance_monitoring` - Performance tracking
177
+
178
+ ### Modifying Features
179
+ To modify features in consumer installations:
180
+ ```bash
181
+ # View current features
182
+ cat .opencode/strray/features.json
183
+
184
+ # Set feature via CLI
185
+ npx strray-ai config set --feature token_optimization.enabled --value false
186
+ ```
187
+
188
+ ### .opencode/strray Directory
189
+
190
+ The `.opencode/strray/` directory contains core framework configuration:
191
+
192
+ | File | Purpose |
193
+ |------|---------|
194
+ | `codex.json` | Universal Development Codex (60 error prevention terms) |
195
+ | `features.json` | Feature flags and settings |
196
+ | `config.json` | Framework configuration |
197
+ | `agents_template.md` | Agent architecture templates |
198
+ | `routing-mappings.json` | Agent routing configurations |
199
+ | `workflow_state.json` | Runtime workflow state |
200
+
201
+ ## Agent Discovery & Capabilities
202
+
203
+ ### First-Time Agent Context
204
+
205
+ When agents are first spawned:
206
+ - **Zero Context**: Agents start with minimal initial context
207
+ - **Discovery Happens**: Agents discover available tools through MCP servers
208
+ - **State Builds**: Over time, agents build comprehensive knowledge graph
209
+
210
+ ### Static vs Dynamic Discovery
211
+
212
+ **Static Discovery** (Immediate):
213
+ - Source: `.opencode/agents/` directory
214
+ - Speed: Fast - scans local directory
215
+ - Scope: Only locally configured agents
216
+
217
+ **Dynamic Discovery** (After Startup):
218
+ - Source: MCP Protocol via `mcp-client.ts`
219
+ - Process: Loads config → Connects to servers → Lists tools → Makes available
220
+ - Scope: Full agent capabilities with MCP server tools
221
+
222
+ ### Access & Permissions Pipeline
223
+
224
+ **Load Priority**:
225
+ 1. Development: `node_modules/strray-ai/dist/` (most current)
226
+ 2. Consumer: Falls back to `dist/` directory
227
+ 3. Configuration: `.opencode/strray/features.json`
228
+
229
+ **Spawn Authorization**:
230
+ - Only main orchestrator can spawn agents
231
+ - Subagents cannot spawn other agents
232
+ - Workers cannot spawn agents directly
233
+
234
+ ## Activity Log & Reporting
235
+
236
+ ### Activity Logging
237
+
238
+ **Location**: `.opencode/logs/` directory
239
+ - **File Format**: `strray-plugin-YYYY-MM-DD.log`
240
+ - **Enabled by**: `activity_logging` feature in features.json
241
+
242
+ ### Report Generation
243
+
244
+ **CLI Command**:
245
+ ```bash
246
+ # Generate daily report
247
+ npx strray-ai report --daily
248
+
249
+ # Generate performance report
250
+ npx strray-ai report --performance
251
+
252
+ # Generate compliance report
253
+ npx strray-ai report --compliance
254
+ ```
255
+
256
+ **Report Types**:
257
+ - Daily reports: Agent invocations, task completions
258
+ - Performance reports: Response times, resource usage
259
+ - Compliance reports: Codex violations, agent performance
260
+
261
+ ## Skill Scripts & Agent Registry
262
+
263
+ ### Agent Registry
264
+
265
+ **Location**: `scripts/node/agent-registry.js`
266
+ - **Purpose**: Register new custom agents
267
+ - **Usage**: Add to `.opencode/agents/` and auto-discovered
268
+
269
+ ### Custom Skills
270
+
271
+ **Adding Custom Agents**:
272
+ 1. Create skill file in `.opencode/agents/`
273
+ 2. Export handler function
274
+ 3. Auto-available to agents
275
+
276
+ **Example**:
277
+ ```javascript
278
+ // .opencode/agents/my-custom-skill.js
279
+ module.exports = async (context, tool) => {
280
+ return { result: "Skill executed", data: {} };
281
+ };
282
+ ```
283
+
284
+ ## Codex
285
+
286
+ StringRay enforces Universal Development Codex (60 terms) for systematic error prevention. See [.opencode/strray/codex.json](https://github.com/htafolla/stringray/blob/master/.opencode/strray/codex.json) for full reference.
287
+
288
+ ## Configuration Files Reference
289
+
290
+ StringRay uses multiple configuration files to control behavior:
291
+
292
+ ### Main Configuration Files
293
+
294
+ | File | Purpose | Key Settings |
295
+ |------|---------|--------------|
296
+ | `.opencode/opencode.json` | Main framework config | mode, plugins, paths |
297
+ | `.opencode/strray/features.json` | Feature flags | enabled/disabled features |
298
+ | `.opencode/agents/` | Custom agent configs | agent-specific settings |
299
+ | `.opencode/strray/codex.json` | Codex terms | 60 error prevention rules |
300
+
301
+ ### Configuration Hierarchy
302
+
303
+ ```
304
+ 1. .opencode/opencode.json # Highest priority - project overrides
305
+ 2. .opencode/strray/features.json # Feature flags
306
+ 3. node_modules/strray-ai/.opencode/ # Package defaults (lowest)
307
+ ```
308
+
309
+ ### Environment Variables
310
+
311
+ ```bash
312
+ # Optional overrides
313
+ STRRAY_MODE=development # or 'consumer'
314
+ STRRAY_LOG_LEVEL=info # debug, info, warn, error
315
+ STRRAY_CONFIG_PATH=.opencode/ # Custom config directory
316
+ STRRAY_NO_TELEMETRY=1 # Disable analytics
317
+ ```
318
+
319
+ ## Integration Points
320
+
321
+ ### Git Hooks Integration
322
+
323
+ StringRay integrates with Git hooks for automated validation:
324
+
325
+ ```bash
326
+ # Install Git hooks
327
+ npx strray-ai install --hooks
328
+
329
+ # Hooks available:
330
+ # - pre-commit: TypeScript check, linting, Codex validation
331
+ # - post-commit: Activity logging, analytics
332
+ # - pre-push: Full validation suite
333
+ ```
334
+
335
+ **Manual Hook Setup** (if not using --hooks):
336
+ ```bash
337
+ # .git/hooks/pre-commit
338
+ #!/bin/bash
339
+ npx strray-ai validate --pre-commit
340
+
341
+ # .git/hooks/post-commit
342
+ #!/bin/bash
343
+ npx strray-ai report --auto
344
+ ```
345
+
346
+ ### CI/CD Pipeline Integration
347
+
348
+ **GitHub Actions Example**:
349
+ ```yaml
350
+ - name: StringRay Validation
351
+ run: |
352
+ npx strray-ai validate
353
+ npx strray-ai report --ci
354
+ ```
355
+
356
+ **GitLab CI Example**:
357
+ ```yaml
358
+ strray-validate:
359
+ script:
360
+ - npx strray-ai validate
361
+ - npx strray-ai report --ci
362
+ ```
363
+
364
+ ### MCP Server Configuration
365
+
366
+ MCP (Model Context Protocol) servers extend agent capabilities:
367
+
368
+ ```bash
369
+ # List available MCP servers
370
+ npx strray-ai capabilities --mcp
371
+
372
+ # MCP server types:
373
+ # - knowledge-skills/ # Domain-specific skills
374
+ # - framework-help.server.ts # Framework utilities
375
+ # - orchestrator.server.ts # Task orchestration
376
+ ```
377
+
378
+ ### Marketplace Plugin Installation
379
+
380
+ ```bash
381
+ # Search for plugins
382
+ npx strray-ai marketplace search <keyword>
383
+
384
+ # Install plugin
385
+ npx strray-ai marketplace install <plugin-name>
386
+
387
+ # List installed plugins
388
+ npx strray-ai marketplace list
389
+ ```
390
+
391
+ ## Tuning & Optimization
392
+
393
+ ### Complexity Calibration
394
+
395
+ StringRay uses complexity scoring to route tasks to appropriate agents:
396
+
397
+ ```bash
398
+ # Calibrate complexity scoring
399
+ npx strray-ai calibrate
400
+
401
+ # View current complexity settings
402
+ cat .opencode/strray/features.json | jq '.complexity'
403
+ ```
404
+
405
+ **Complexity Factors**:
406
+ - File count and size
407
+ - Import dependencies
408
+ - Test coverage percentage
409
+ - Code duplication
410
+ - Architectural patterns
411
+
412
+ ### Performance Tuning
413
+
414
+ **Memory Management**:
415
+ ```bash
416
+ # View memory settings
417
+ cat .opencode/strray/features.json | jq '.memory'
418
+
419
+ # Key settings:
420
+ # - memory_threshold_mb: Emergency cleanup trigger (default: 80MB)
421
+ # - gc_interval_ms: Garbage collection frequency
422
+ # - cache_size: Agent state cache limit
423
+ ```
424
+
425
+ **Token Optimization**:
426
+ ```bash
427
+ # Configure token limits
428
+ npx strray-ai config set --feature token_optimization.max_context_tokens --value 8000
429
+ npx strray-ai config set --feature token_optimization.compression_enabled --value true
430
+ ```
431
+
432
+ ### Agent Spawn Limits
433
+
434
+ Control how agents are spawned and coordinated:
435
+
436
+ ```json
437
+ // In features.json
438
+ {
439
+ "agent_spawn": {
440
+ "max_concurrent": 8,
441
+ "max_per_type": 3,
442
+ "spawn_cooldown_ms": 500,
443
+ "rate_limit_per_minute": 20
444
+ }
445
+ }
446
+ ```
447
+
448
+ ## CLI Command Details
449
+
450
+ ### Core Commands
451
+
452
+ | Command | Description | Common Use |
453
+ |---------|-------------|------------|
454
+ | `npx strray-ai install` | Install and configure framework | Initial setup |
455
+ | `npx strray-ai status` | Show current configuration status | Debug setup issues |
456
+ | `npx strray-ai health` | Run health check | Verify installation |
457
+ | `npx strray-ai validate` | Run full validation suite | Pre-commit validation |
458
+ | `npx strray-ai capabilities` | List all available features | Discover capabilities |
459
+ | `npx strray-ai calibrate` | Recalibrate complexity scoring | After major refactors |
460
+ | `npx strray-ai report` | Generate analytics reports | Review performance |
461
+ | `npx strray-ai analytics` | View pattern analytics | Understand agent behavior |
462
+ | `npx strray-ai config` | Manage configuration | Tune settings |
463
+
464
+ ### Configuration Commands
465
+
466
+ ```bash
467
+ # Get a specific config value
468
+ npx strray-ai config get --feature activity_logging.enabled
469
+
470
+ # Set a config value
471
+ npx strray-ai config set --feature token_optimization.enabled --value false
472
+
473
+ # Reset to defaults
474
+ npx strray-ai config reset
475
+
476
+ # Export current config
477
+ npx strray-ai config export > strray-config.json
478
+ ```
479
+
480
+ ### Report Commands
481
+
482
+ ```bash
483
+ # Daily summary report
484
+ npx strray-ai report --daily
485
+
486
+ # Performance analysis
487
+ npx strray-ai report --performance
488
+
489
+ # Compliance report (Codex violations)
490
+ npx strray-ai report --compliance
491
+
492
+ # Session report
493
+ npx strray-ai report --session
494
+
495
+ # Generate CI-friendly report
496
+ npx strray-ai report --ci --output json
497
+ ```
498
+
499
+ ## Common Agent Workflows
500
+
501
+ ### Invoking Agents
502
+
503
+ **Basic Invocation**:
504
+ ```bash
505
+ # In code comment or prompt
506
+ @architect design a REST API for user management
507
+
508
+ @enforcer analyze this code for security issues
509
+
510
+ @testing-lead create tests for authentication module
511
+ ```
512
+
513
+ **Chaining Agents**:
514
+ ```
515
+ @orchestrator implement feature:user-authentication
516
+ → Spawns @architect → @testing-lead → @code-reviewer
517
+ ```
518
+
519
+ ### Agent Selection Guide
520
+
521
+ | Task Type | Primary Agent | Supporting Agents |
522
+ |-----------|---------------|-------------------|
523
+ | New feature | @orchestrator | @architect, @testing-lead |
524
+ | Bug fix | @bug-triage-specialist | @enforcer, @code-reviewer |
525
+ | Refactor | @refactorer | @architect, @testing-lead |
526
+ | Security audit | @security-auditor | @enforcer |
527
+ | Code review | @code-reviewer | @enforcer |
528
+ | Research | @researcher | @architect |
529
+
530
+ ### Session Management
531
+
532
+ **Start a Session**:
533
+ ```bash
534
+ # Sessions are automatic - invoke agent to start
535
+ @orchestrator implement login feature
536
+ ```
537
+
538
+ **View Active Sessions**:
539
+ ```bash
540
+ # Active sessions shown in status
541
+ npx strray-ai status
542
+ ```
543
+
544
+ **End a Session**:
545
+ ```bash
546
+ # Sessions auto-end after inactivity timeout
547
+ # Or manually via:
548
+ npx strray-ai session end <session-id>
549
+ ```
550
+
551
+ ### Error Recovery
552
+
553
+ **Common Error Patterns**:
554
+
555
+ 1. **Agent Spawn Failure**
556
+ ```bash
557
+ # Check spawn limits
558
+ npx strray-ai status | grep -A5 "spawn"
559
+
560
+ # Solution: Wait for cooldown or increase limit
561
+ npx strray-ai config set --feature agent_spawn.max_concurrent --value 10
562
+ ```
563
+
564
+ 2. **Memory Exhaustion**
565
+ ```bash
566
+ # Check memory settings
567
+ npx strray-ai health
568
+
569
+ # Solution: Clear cache
570
+ npx strray-ai session clear-cache
571
+ ```
572
+
573
+ 3. **Validation Failures**
574
+ ```bash
575
+ # Run detailed validation
576
+ npx strray-ai validate --detailed
577
+
578
+ # View specific failures
579
+ npx strray-ai report --compliance --detailed
580
+ ```
581
+
582
+ ## Troubleshooting Guide
583
+
584
+ ### Quick Diagnostics
585
+
586
+ ```bash
587
+ # Full health check
588
+ npx strray-ai health
589
+
590
+ # Validate installation
591
+ npx strray-ai validate
592
+
593
+ # View recent activity
594
+ ls -la .opencode/logs/
595
+ cat .opencode/logs/strray-plugin-$(date +%Y-%m-%d).log | tail -50
596
+
597
+ # Check configuration
598
+ npx strray-ai status
599
+ ```
600
+
601
+ ### Common Issues
602
+
603
+ | Issue | Symptom | Solution |
604
+ |-------|---------|----------|
605
+ | Agents not spawning | Timeout on @invoke | Run `npx strray-ai health` |
606
+ | Validation failures | Pre-commit blocks | Run `npx strray-ai validate --fix` |
607
+ | Memory issues | Slow performance | `npx strray-ai session clear-cache` |
608
+ | Config not loading | Settings ignored | Check `.opencode/opencode.json` syntax |
609
+ | MCP servers unavailable | Tools missing | `npx strray-ai capabilities --mcp` |
610
+
611
+ ### Getting Help
612
+
613
+ ```bash
614
+ # Framework help
615
+ npx strray-ai help
616
+
617
+ # View capabilities
618
+ npx strray-ai capabilities
619
+
620
+ # Check version
621
+ npx strray-ai --version
622
+ ```
623
+
624
+ ## Framework Configuration Limits
625
+
626
+ ### Consumer Environment Limitations
627
+
628
+ - **Features.json**: Automatically loaded from package, not project root
629
+ - **Codex Version**: Frozen at v1.7.5 in consumer mode (stable)
630
+ - **Plugin Behavior**: Reduced functionality in consumer mode:
631
+ - No dynamic codex term enrichment
632
+ - Fixed codex version
633
+ - No MCP server discovery
634
+ - No real-time tool discovery
635
+
636
+ ### Development vs Consumer
637
+
638
+ | Aspect | Development | Consumer |
639
+ |--------|-----------|----------|
640
+ | Features | Full (latest) | Optimized (stable) |
641
+ | Codex | Latest terms | v1.7.5 fallback |
642
+ | Discovery | Dynamic (MCP) | Static only |
643
+ | Hot Reload | Yes | No |
644
+
645
+ ## Documentation
646
+
647
+ - [Full Documentation](https://github.com/htafolla/stringray)
648
+ - [Configuration Guide](https://github.com/htafolla/stringray/blob/master/docs/CONFIGURATION.md)
649
+ - [Troubleshooting](https://github.com/htafolla/stringray/blob/master/docs/TROUBLESHOOTING.md)
650
+
651
+ ---
652
+ **Version**: 1.7.8 | [GitHub](https://github.com/htafolla/stringray)
@@ -3,6 +3,17 @@ description: "System Analyzer agent for comprehensive log analysis, performance
3
3
  version: "1.0.0"
4
4
  mode: subagent
5
5
 
6
+ # =============================================================================
7
+ # CODEX COMPLIANCE
8
+ # =============================================================================
9
+ # System analysis must follow these Codex rules:
10
+ # - Term 6: Batched Introspection Cycles - group analysis into intentional cycles
11
+ # - Term 16: DRY - extract repeated analysis patterns into reusable functions
12
+ # - Term 25: Code Rot Prevention - monitor for organically grown code
13
+ # - Term 33: Logging and Monitoring - structured logging for analysis results
14
+ # - Term 36: Continuous Integration - automated analysis on every commit
15
+ # - Term 42: Code Review Standards - at least one reviewer for all changes
16
+
6
17
  # Analysis Configuration
7
18
  analysis:
8
19
  enabled: true
@@ -3,6 +3,17 @@ description: "Architect agent for design and architecture validation"
3
3
  version: "1.0.0"
4
4
  mode: subagent
5
5
 
6
+ # =============================================================================
7
+ # CODEX COMPLIANCE
8
+ # =============================================================================
9
+ # Architecture decisions must follow these Codex rules:
10
+ # - Term 24: Single Responsibility Principle - each component has one reason to change
11
+ # - Term 22: Interface Segregation - specific interfaces over god interfaces
12
+ # - Term 23: Open/Closed Principle - open for extension, closed for modification
13
+ # - Term 15: Separation of Concerns - clear boundaries between layers
14
+ # - Term 3: Do Not Over-Engineer - simple solutions over complex
15
+ # - Term 17: YAGNI - don't build what isn't needed
16
+
6
17
  # State Management Configuration
7
18
  state_management:
8
19
  enabled: true
@@ -1,6 +1,18 @@
1
1
  name: backend-engineer
2
2
  description: "Backend engineer agent for API development"
3
3
  version: "1.0.0"
4
+
5
+ # =============================================================================
6
+ # CODEX COMPLIANCE
7
+ # =============================================================================
8
+ # Backend engineering must follow these Codex rules:
9
+ # - Term 21: Dependency Injection - pass dependencies as parameters
10
+ # - Term 22: Interface Segregation - specific API interfaces
11
+ # - Term 23: Open/Closed Principle - open for extension, closed for modification
12
+ # - Term 29: Security by Design - validate all inputs, sanitize data
13
+ # - Term 5: Surgical Fixes - targeted API changes, minimal breaking changes
14
+ # - Term 7: Resolve All Errors - zero tolerance for API errors
15
+
4
16
  mode: subagent
5
17
 
6
18
  # Logging Configuration