ai-eng-system 0.0.1

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 (122) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +115 -0
  3. package/dist/.claude-plugin/agents/agent-creator.md +206 -0
  4. package/dist/.claude-plugin/agents/ai_engineer.md +187 -0
  5. package/dist/.claude-plugin/agents/api_builder_enhanced.md +82 -0
  6. package/dist/.claude-plugin/agents/architect-advisor.md +88 -0
  7. package/dist/.claude-plugin/agents/backend_architect.md +88 -0
  8. package/dist/.claude-plugin/agents/code_reviewer.md +208 -0
  9. package/dist/.claude-plugin/agents/command-creator.md +331 -0
  10. package/dist/.claude-plugin/agents/cost_optimizer.md +284 -0
  11. package/dist/.claude-plugin/agents/database_optimizer.md +175 -0
  12. package/dist/.claude-plugin/agents/deployment_engineer.md +186 -0
  13. package/dist/.claude-plugin/agents/docs-writer.md +99 -0
  14. package/dist/.claude-plugin/agents/documentation_specialist.md +212 -0
  15. package/dist/.claude-plugin/agents/frontend-reviewer.md +51 -0
  16. package/dist/.claude-plugin/agents/full_stack_developer.md +391 -0
  17. package/dist/.claude-plugin/agents/infrastructure_builder.md +77 -0
  18. package/dist/.claude-plugin/agents/java-pro.md +182 -0
  19. package/dist/.claude-plugin/agents/ml_engineer.md +176 -0
  20. package/dist/.claude-plugin/agents/monitoring_expert.md +79 -0
  21. package/dist/.claude-plugin/agents/performance_engineer.md +193 -0
  22. package/dist/.claude-plugin/agents/plugin-validator.md +378 -0
  23. package/dist/.claude-plugin/agents/prompt-optimizer.md +63 -0
  24. package/dist/.claude-plugin/agents/security_scanner.md +332 -0
  25. package/dist/.claude-plugin/agents/seo-specialist.md +73 -0
  26. package/dist/.claude-plugin/agents/skill-creator.md +311 -0
  27. package/dist/.claude-plugin/agents/test-docs-writer-2.md +46 -0
  28. package/dist/.claude-plugin/agents/test-docs-writer-usage.md +40 -0
  29. package/dist/.claude-plugin/agents/test-docs-writer.md +98 -0
  30. package/dist/.claude-plugin/agents/test_generator.md +260 -0
  31. package/dist/.claude-plugin/agents/tool-creator.md +474 -0
  32. package/dist/.claude-plugin/commands/compound.md +26 -0
  33. package/dist/.claude-plugin/commands/context.md +318 -0
  34. package/dist/.claude-plugin/commands/create-agent.md +48 -0
  35. package/dist/.claude-plugin/commands/create-command.md +48 -0
  36. package/dist/.claude-plugin/commands/create-plugin.md +400 -0
  37. package/dist/.claude-plugin/commands/create-skill.md +48 -0
  38. package/dist/.claude-plugin/commands/create-tool.md +53 -0
  39. package/dist/.claude-plugin/commands/deploy.md +35 -0
  40. package/dist/.claude-plugin/commands/optimize.md +79 -0
  41. package/dist/.claude-plugin/commands/plan.md +215 -0
  42. package/dist/.claude-plugin/commands/recursive-init.md +217 -0
  43. package/dist/.claude-plugin/commands/research.md +199 -0
  44. package/dist/.claude-plugin/commands/review.md +73 -0
  45. package/dist/.claude-plugin/commands/seo.md +40 -0
  46. package/dist/.claude-plugin/commands/work.md +460 -0
  47. package/dist/.claude-plugin/hooks.json +15 -0
  48. package/dist/.claude-plugin/marketplace.json +54 -0
  49. package/dist/.claude-plugin/plugin.json +24 -0
  50. package/dist/.claude-plugin/skills/AGENTS.md +37 -0
  51. package/dist/.claude-plugin/skills/devops/coolify-deploy/SKILL.md +8 -0
  52. package/dist/.claude-plugin/skills/devops/git-worktree/SKILL.md +11 -0
  53. package/dist/.claude-plugin/skills/plugin-dev/SKILL.md +322 -0
  54. package/dist/.claude-plugin/skills/plugin-dev/references/agent-format.md +248 -0
  55. package/dist/.claude-plugin/skills/plugin-dev/references/claude-code-plugins.md +372 -0
  56. package/dist/.claude-plugin/skills/plugin-dev/references/command-format.md +312 -0
  57. package/dist/.claude-plugin/skills/plugin-dev/references/opencode-plugins.md +406 -0
  58. package/dist/.claude-plugin/skills/plugin-dev/references/opencode-tools.md +470 -0
  59. package/dist/.claude-plugin/skills/plugin-dev/references/skill-format.md +328 -0
  60. package/dist/.claude-plugin/skills/prompting/incentive-prompting/SKILL.md +162 -0
  61. package/dist/.claude-plugin/skills/research/comprehensive-research/SKILL.md +343 -0
  62. package/dist/.opencode/agent/ai-eng/ai-innovation/ai_engineer.md +186 -0
  63. package/dist/.opencode/agent/ai-eng/ai-innovation/ml_engineer.md +175 -0
  64. package/dist/.opencode/agent/ai-eng/ai-innovation/prompt-optimizer.md +62 -0
  65. package/dist/.opencode/agent/ai-eng/business-analytics/seo-specialist.md +72 -0
  66. package/dist/.opencode/agent/ai-eng/development/api_builder_enhanced.md +81 -0
  67. package/dist/.opencode/agent/ai-eng/development/architect-advisor.md +87 -0
  68. package/dist/.opencode/agent/ai-eng/development/backend_architect.md +87 -0
  69. package/dist/.opencode/agent/ai-eng/development/database_optimizer.md +174 -0
  70. package/dist/.opencode/agent/ai-eng/development/docs-writer.md +98 -0
  71. package/dist/.opencode/agent/ai-eng/development/documentation_specialist.md +211 -0
  72. package/dist/.opencode/agent/ai-eng/development/frontend-reviewer.md +50 -0
  73. package/dist/.opencode/agent/ai-eng/development/full_stack_developer.md +390 -0
  74. package/dist/.opencode/agent/ai-eng/development/java-pro.md +181 -0
  75. package/dist/.opencode/agent/ai-eng/development/test-docs-writer-2.md +45 -0
  76. package/dist/.opencode/agent/ai-eng/development/test-docs-writer-usage.md +39 -0
  77. package/dist/.opencode/agent/ai-eng/development/test-docs-writer.md +97 -0
  78. package/dist/.opencode/agent/ai-eng/meta/agent-creator.md +208 -0
  79. package/dist/.opencode/agent/ai-eng/meta/command-creator.md +333 -0
  80. package/dist/.opencode/agent/ai-eng/meta/skill-creator.md +313 -0
  81. package/dist/.opencode/agent/ai-eng/meta/tool-creator.md +476 -0
  82. package/dist/.opencode/agent/ai-eng/operations/cost_optimizer.md +283 -0
  83. package/dist/.opencode/agent/ai-eng/operations/deployment_engineer.md +185 -0
  84. package/dist/.opencode/agent/ai-eng/operations/infrastructure_builder.md +76 -0
  85. package/dist/.opencode/agent/ai-eng/operations/monitoring_expert.md +78 -0
  86. package/dist/.opencode/agent/ai-eng/quality-testing/code_reviewer.md +207 -0
  87. package/dist/.opencode/agent/ai-eng/quality-testing/performance_engineer.md +192 -0
  88. package/dist/.opencode/agent/ai-eng/quality-testing/plugin-validator.md +380 -0
  89. package/dist/.opencode/agent/ai-eng/quality-testing/security_scanner.md +331 -0
  90. package/dist/.opencode/agent/ai-eng/quality-testing/test_generator.md +259 -0
  91. package/dist/.opencode/command/ai-eng/compound.md +26 -0
  92. package/dist/.opencode/command/ai-eng/context.md +318 -0
  93. package/dist/.opencode/command/ai-eng/create-agent.md +48 -0
  94. package/dist/.opencode/command/ai-eng/create-command.md +48 -0
  95. package/dist/.opencode/command/ai-eng/create-plugin.md +400 -0
  96. package/dist/.opencode/command/ai-eng/create-skill.md +48 -0
  97. package/dist/.opencode/command/ai-eng/create-tool.md +53 -0
  98. package/dist/.opencode/command/ai-eng/deploy.md +35 -0
  99. package/dist/.opencode/command/ai-eng/optimize.md +79 -0
  100. package/dist/.opencode/command/ai-eng/plan.md +215 -0
  101. package/dist/.opencode/command/ai-eng/recursive-init.md +217 -0
  102. package/dist/.opencode/command/ai-eng/research.md +199 -0
  103. package/dist/.opencode/command/ai-eng/review.md +73 -0
  104. package/dist/.opencode/command/ai-eng/seo.md +40 -0
  105. package/dist/.opencode/command/ai-eng/work.md +460 -0
  106. package/dist/.opencode/opencode.jsonc +8 -0
  107. package/dist/.opencode/plugin/ai-eng-system.ts +10 -0
  108. package/dist/index.d.ts +3 -0
  109. package/dist/index.js +13 -0
  110. package/dist/skills/AGENTS.md +37 -0
  111. package/dist/skills/devops/coolify-deploy/SKILL.md +8 -0
  112. package/dist/skills/devops/git-worktree/SKILL.md +11 -0
  113. package/dist/skills/plugin-dev/SKILL.md +322 -0
  114. package/dist/skills/plugin-dev/references/agent-format.md +248 -0
  115. package/dist/skills/plugin-dev/references/claude-code-plugins.md +372 -0
  116. package/dist/skills/plugin-dev/references/command-format.md +312 -0
  117. package/dist/skills/plugin-dev/references/opencode-plugins.md +406 -0
  118. package/dist/skills/plugin-dev/references/opencode-tools.md +470 -0
  119. package/dist/skills/plugin-dev/references/skill-format.md +328 -0
  120. package/dist/skills/prompting/incentive-prompting/SKILL.md +162 -0
  121. package/dist/skills/research/comprehensive-research/SKILL.md +343 -0
  122. package/package.json +73 -0
@@ -0,0 +1,318 @@
1
+ ---
2
+ name: ai-eng/context
3
+ description: Manage session state, memories, and context engineering
4
+ agent: build
5
+ ---
6
+
7
+ # Context Command
8
+
9
+ Manage the context engineering system including sessions, memories, and context assembly.
10
+
11
+ ## Overview
12
+
13
+ The context system provides persistent session state, intelligent memory management, and optimized context retrieval across conversations.
14
+
15
+ ## Subcommands
16
+
17
+ ### `context status`
18
+ Show current session state and memory statistics.
19
+
20
+ ```bash
21
+ /context status
22
+ ```
23
+
24
+ **Output:**
25
+ - Current session ID and metadata
26
+ - Active files and pending tasks
27
+ - Recent decisions
28
+ - Memory statistics (total, by type, confidence)
29
+
30
+ ### `context remember`
31
+ Manually save a memory entry.
32
+
33
+ ```bash
34
+ /context remember "User prefers Bun over Node.js" --type=declarative --tags=preference,build
35
+ ```
36
+
37
+ **Options:**
38
+ - `--type` - Memory type: `declarative`, `procedural`, or `episodic` (default: declarative)
39
+ - `--tags` - Comma-separated tags for categorization
40
+ - `--context` - Additional context about where this was learned
41
+
42
+ ### `context search`
43
+ Search memories by content or tags.
44
+
45
+ ```bash
46
+ /context search "database optimization" --type=procedural
47
+ /context search --tags=decision,architecture
48
+ ```
49
+
50
+ **Options:**
51
+ - `--type` - Filter by memory type
52
+ - `--tags` - Filter by tags (comma-separated)
53
+ - `--confidence` - Minimum confidence threshold (0-1)
54
+
55
+ ### `context task`
56
+ Manage pending tasks in the current session.
57
+
58
+ ```bash
59
+ /context task add "Implement authentication" --priority=high
60
+ /context task list
61
+ /context task complete <task-id>
62
+ ```
63
+
64
+ **Subcommands:**
65
+ - `add <content>` - Add a new task
66
+ - `list` - Show all pending tasks
67
+ - `complete <id>` - Mark task as completed
68
+ - `status <id>` - Show task details
69
+
70
+ **Options:**
71
+ - `--priority` - Task priority: `low`, `medium`, `high` (default: medium)
72
+
73
+ ### `context decision`
74
+ Record architectural or design decisions.
75
+
76
+ ```bash
77
+ /context decision "Use microservices architecture" \
78
+ --rationale="Allows independent scaling and deployment" \
79
+ --alternatives="Monolith,Modular monolith" \
80
+ --tags=architecture,scalability
81
+ ```
82
+
83
+ **Options:**
84
+ - `--rationale` - Why this decision was made
85
+ - `--alternatives` - Comma-separated list of alternatives considered
86
+ - `--tags` - Decision tags for categorization
87
+
88
+ ### `context export`
89
+ Export session or memories for backup or sharing.
90
+
91
+ ```bash
92
+ /context export session --format=json
93
+ /context export memories --type=declarative --format=json
94
+ ```
95
+
96
+ **Options:**
97
+ - `--format` - Export format: `json` or `markdown` (default: json)
98
+ - `--type` - Memory type to export (optional)
99
+ - `--output` - Output file path (default: stdout)
100
+
101
+ ### `context archive`
102
+ Archive the current session and start fresh.
103
+
104
+ ```bash
105
+ /context archive
106
+ ```
107
+
108
+ This moves the current session to the archive and creates a new session.
109
+
110
+ ### `context summary`
111
+ Get a context summary for inclusion in prompts.
112
+
113
+ ```bash
114
+ /context summary --max-memories=5
115
+ ```
116
+
117
+ **Options:**
118
+ - `--max-memories` - Maximum memories to include (default: 5)
119
+ - `--include-session` - Include session state (default: true)
120
+
121
+ ## Session Lifecycle
122
+
123
+ ### Starting a Session
124
+ Sessions are automatically created when you first use the context system. The session persists across conversations.
125
+
126
+ ### Tracking Work
127
+ As you work, the system automatically:
128
+ - Tracks active files you're editing
129
+ - Records pending tasks
130
+ - Captures architectural decisions
131
+ - Learns preferences and patterns
132
+
133
+ ### Archiving
134
+ When you're done with a project or want to start fresh:
135
+ ```bash
136
+ /context archive
137
+ ```
138
+
139
+ This preserves all session data for future reference while starting a clean slate.
140
+
141
+ ## Memory Types
142
+
143
+ ### Declarative Memory
144
+ Facts, patterns, and preferences learned from the user or inferred from behavior.
145
+
146
+ **Examples:**
147
+ - "User prefers TypeScript over JavaScript"
148
+ - "Project uses Bun as the runtime"
149
+ - "API endpoints follow REST conventions"
150
+
151
+ ### Procedural Memory
152
+ Workflows, habits, and procedures that guide how work is done.
153
+
154
+ **Examples:**
155
+ - "Always run tests before committing"
156
+ - "Create feature branches for new work"
157
+ - "Update CHANGELOG.md with breaking changes"
158
+
159
+ ### Episodic Memory
160
+ Summaries of past conversations, sessions, and events.
161
+
162
+ **Examples:**
163
+ - "Yesterday: Fixed authentication bug in session.ts"
164
+ - "Last week: Refactored database layer"
165
+ - "Previous session: Implemented caching strategy"
166
+
167
+ ## Context Assembly
168
+
169
+ The system intelligently assembles context based on what you're doing:
170
+
171
+ ### Push Context (Proactive)
172
+ Automatically loaded when:
173
+ - Starting a new session
174
+ - Opening a file
175
+ - Running a command
176
+
177
+ ### Pull Context (On-Demand)
178
+ Retrieved when you:
179
+ - Ask a question
180
+ - Start a new task
181
+ - Request context summary
182
+
183
+ ## Automatic Context Inference
184
+
185
+ **Enabled by default** - the system automatically learns from your conversations and actions:
186
+
187
+ ### From Conversations
188
+ - **Preferences**: "I prefer TypeScript" → remembers preference
189
+ - **Decisions**: "Let's use React" → records technology choice
190
+ - **Problems**: Error discussions → tracks debugging patterns
191
+
192
+ ### From Code Changes
193
+ - **Frameworks**: Detects React/Vue/Angular imports
194
+ - **Patterns**: Identifies middleware, routing, authentication patterns
195
+ - **Architecture**: Learns project structure and conventions
196
+
197
+ ### From Queries
198
+ - **Technology choices**: Questions about frameworks/tools
199
+ - **Workflow preferences**: How you like to work
200
+
201
+ **All inferred memories have lower confidence (0.7) and decay over time**, allowing the system to learn while avoiding false assumptions.
202
+
203
+ ## Token Efficiency
204
+
205
+ The context system uses Progressive Disclosure Architecture to minimize token usage:
206
+
207
+ - **Tier 1**: Metadata only (~50 tokens per skill)
208
+ - **Tier 2**: Instructions (~500 tokens per skill)
209
+ - **Tier 3**: Full resources (~2000+ tokens per skill)
210
+
211
+ This achieves ~90% token reduction compared to loading all resources upfront.
212
+
213
+ ## Examples
214
+
215
+ ### Manual Context Recording (Always Available)
216
+ ```bash
217
+ /context task add "Implement authentication" --priority=high
218
+ /context decision "Use JWT tokens for stateless auth" \
219
+ --rationale="Scales better than session-based auth" \
220
+ --tags=security,authentication
221
+ /context remember "JWT tokens stored in httpOnly cookies" \
222
+ --type=procedural --tags=security,authentication
223
+ ```
224
+
225
+ ### Automatic Inference (Happens in Background)
226
+ The system automatically learns from natural conversation:
227
+
228
+ **You say:** "I prefer using TypeScript over JavaScript for type safety"
229
+ **System learns:** `User preference: TypeScript for type safety` (declarative memory)
230
+
231
+ **You say:** "Let's implement this using React hooks"
232
+ **System learns:** `Using React hooks for implementation` (procedural memory)
233
+
234
+ **You ask:** "Should I use Express or Fastify for the API?"
235
+ **System learns:** `Considering Express or Fastify for API` (episodic memory)
236
+
237
+ **You edit code with:** `import React from 'react'`
238
+ **System learns:** `Project uses React` (declarative memory)
239
+
240
+ ### Search for Past Decisions
241
+ ```bash
242
+ /context search --tags=architecture
243
+ /context search "database" --type=procedural
244
+ ```
245
+
246
+ ### Export Session for Handoff
247
+ ```bash
248
+ /context export session --format=json --output=session-backup.json
249
+ /context export memories --format=markdown --output=memories.md
250
+ ```
251
+
252
+ ## Integration with Other Commands
253
+
254
+ The context system integrates with other ai-eng-system commands:
255
+
256
+ - **`/plan`** - Saves decisions and context for the plan
257
+ - **`/work`** - Tracks tasks and progress in the session
258
+ - **`/review`** - References past decisions and patterns
259
+ - **Agents** - Access memories via the context API
260
+
261
+ ## Performance
262
+
263
+ Context operations are optimized for speed:
264
+ - Session load: <100ms
265
+ - Memory search: <50ms
266
+ - Context assembly: <200ms
267
+
268
+ ## Configuration
269
+
270
+ ## Per-Project Configuration
271
+
272
+ **Configuration is per-project** - each project can have its own settings in `.ai-context/config.json`.
273
+
274
+ ### Disable Automatic Inference
275
+ If you prefer explicit control over context learning:
276
+
277
+ ```bash
278
+ # Create project-specific config
279
+ mkdir -p .ai-context
280
+ echo '{
281
+ "enableAutoInference": false
282
+ }' > .ai-context/config.json
283
+ ```
284
+
285
+ ### Custom Storage Path
286
+ ```bash
287
+ # Use a different storage directory
288
+ echo '{
289
+ "storagePath": ".my-context"
290
+ }' > .ai-context/config.json
291
+ ```
292
+
293
+ ### Full Configuration Options
294
+ ```json
295
+ {
296
+ "storagePath": ".ai-context",
297
+ "maxMemoriesPerType": 100,
298
+ "sessionArchiveDays": 30,
299
+ "confidenceDecayRate": 0.05,
300
+ "enableEmbeddings": false,
301
+ "defaultSkillTier": 1,
302
+ "enableAutoInference": true
303
+ }
304
+ ```
305
+
306
+ **Note**: Configuration is loaded hierarchically:
307
+ 1. **Defaults** (built-in)
308
+ 2. **Project config** (`.ai-context/config.json`)
309
+ 3. **Runtime overrides** (passed to functions)
310
+
311
+ ## Privacy & Storage
312
+
313
+ All context data is stored locally in `.ai-context/` directory:
314
+ - Not uploaded to any service
315
+ - Not shared with Claude or other services
316
+ - Fully under your control
317
+
318
+ Add `.ai-context/` to `.gitignore` to keep it out of version control.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: ai-eng/create-agent
3
+ description: Create a new OpenCode agent with AI assistance. Uses agent-creator for intelligent agent generation.
4
+ agent: agent-creator
5
+ subtask: true
6
+ ---
7
+
8
+ # Create Agent Command
9
+
10
+ Create a new OpenCode agent using AI assistance.
11
+
12
+ ## Process
13
+ 1. **Understand Requirements**: What should the agent do?
14
+ 2. **Generate Agent**: Use @agent-creator to create properly formatted agent
15
+ 3. **Save Agent**: Write to appropriate location
16
+ 4. **Validate**: Run basic validation checks
17
+
18
+ ## Usage
19
+
20
+ ```bash
21
+ /ai-eng/create-agent "code reviewer that checks for security issues"
22
+ ```
23
+
24
+ ## Output Location
25
+
26
+ Agent will be saved to:
27
+ - Project-local: `.opencode/agent/[name].md`
28
+ - Global: `~/.config/opencode/agent/[name].md`
29
+ - Ferg content: `content/agents/[name].md`
30
+
31
+ ## Examples
32
+
33
+ ### Security Review Agent
34
+ ```bash
35
+ /ai-eng/create-agent "security scanner that finds vulnerabilities"
36
+ ```
37
+
38
+ ### Documentation Agent
39
+ ```bash
40
+ /ai-eng/create-agent "technical writer for API documentation"
41
+ ```
42
+
43
+ ### Data Analysis Agent
44
+ ```bash
45
+ /ai-eng/create-agent "data analyst for database queries"
46
+ ```
47
+
48
+ The agent-creator will handle platform-specific formatting and ensure the agent follows best practices for triggering, expertise, and integration.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: ai-eng/create-command
3
+ description: Create a new OpenCode command with AI assistance. Uses command-creator for intelligent command generation.
4
+ agent: command-creator
5
+ subtask: true
6
+ ---
7
+
8
+ # Create Command Command
9
+
10
+ Create a new OpenCode command using AI assistance.
11
+
12
+ ## Process
13
+ 1. **Understand Requirements**: What should the command do?
14
+ 2. **Generate Command**: Use @command-creator to create properly formatted command
15
+ 3. **Save Command**: Write to appropriate location
16
+ 4. **Validate**: Run basic validation checks
17
+
18
+ ## Usage
19
+
20
+ ```bash
21
+ /ai-eng/create-command "deploy to staging with pre-checks"
22
+ ```
23
+
24
+ ## Output Location
25
+
26
+ Command will be saved to:
27
+ - Project-local: `.opencode/command/[name].md`
28
+ - Global: `~/.config/opencode/command/[name].md`
29
+ - Ferg content: `content/commands/[name].md`
30
+
31
+ ## Examples
32
+
33
+ ### Deployment Command
34
+ ```bash
35
+ /ai-eng/create-command "deploy application with health checks"
36
+ ```
37
+
38
+ ### Testing Command
39
+ ```bash
40
+ /ai-eng/create-command "run integration tests with coverage"
41
+ ```
42
+
43
+ ### Documentation Command
44
+ ```bash
45
+ /ai-eng/create-command "generate API docs from code"
46
+ ```
47
+
48
+ The command-creator will handle platform-specific formatting and ensure the command follows best practices for arguments, shell integration, and tool usage.