brainiac 0.0.2 → 0.0.4
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/bin/brainiac +317 -0
- data/bin/brainiac-completion.bash +178 -0
- data/brainiac.gemspec +0 -4
- data/lib/brainiac/agents.rb +34 -0
- data/lib/brainiac/brain.rb +25 -0
- data/lib/brainiac/config.rb +4 -0
- data/lib/brainiac/cron.rb +9 -6
- data/lib/brainiac/handlers/discord.rb +289 -30
- data/lib/brainiac/handlers/fizzy.rb +129 -86
- data/lib/brainiac/helpers.rb +125 -41
- data/lib/brainiac/prompts.rb +97 -105
- data/lib/brainiac/version.rb +1 -1
- data/receiver.rb +13 -0
- data/templates/cli-providers/grok.json.example +15 -0
- data/templates/cli-providers/kiro.json.example +15 -0
- data/templates/roles/code-reviewer.md.example +28 -0
- data/templates/roles/general-engineer.md.example +36 -0
- data/templates/roles/test-engineer.md.example +33 -0
- metadata +8 -30
- checksums.yaml.gz.sig +0 -0
- data/certs/stowzilla.pem +0 -26
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -3
data/lib/brainiac/prompts.rb
CHANGED
|
@@ -24,24 +24,13 @@ PROMPT_CORE = <<~PROMPT
|
|
|
24
24
|
Memory files MAY exist at `{{MEMORY_DIR}}/` — this is inside the brain, so they survive worktree deletion.
|
|
25
25
|
|
|
26
26
|
**At the very start of every session:**
|
|
27
|
-
1. Read `{{MEMORY_DIR}}/card-{{CARD_ID}}.md`. If it contains content, it has context from your previous sessions
|
|
27
|
+
1. Read `{{MEMORY_DIR}}/card-{{CARD_ID}}.md`. If it contains content, it has context from your previous sessions. If the file is empty (first session on this card), just proceed without prior context.
|
|
28
28
|
|
|
29
|
-
**Note:** Only the last 15 comments are included in card context (truncated to 500 chars each). Your memory file is the authoritative record of prior discussions
|
|
29
|
+
**Note:** Only the last 15 comments are included in card context (truncated to 500 chars each). Your memory file is the authoritative record of prior discussions. If you need the full text of a truncated comment, run: `fizzy comment show COMMENT_ID --card CARD_NUMBER`
|
|
30
30
|
|
|
31
31
|
**Before you finish every session (even if you didn't complete the task):**
|
|
32
|
-
2.
|
|
33
|
-
|
|
34
|
-
Write in a format optimized for AI consumption. Include:
|
|
35
|
-
- Current status of the task (not started / in progress / blocked / done)
|
|
36
|
-
- What you accomplished this session
|
|
37
|
-
- Key decisions made and why
|
|
38
|
-
- Questions you asked and answers you received
|
|
39
|
-
- Open questions still waiting for answers
|
|
40
|
-
- Relevant file paths, branch state, PR URLs
|
|
41
|
-
- Anything that would help a fresh instance of you pick up exactly where you left off
|
|
42
|
-
- A brief timeline of sessions (append, don't overwrite previous entries)
|
|
43
|
-
- The exact comment IDs you posted this session (so future sessions can detect duplicates)
|
|
44
|
-
- A condensed summary of the full comment history (so future sessions don't need the raw comments — your memory is the authoritative record of what was discussed)
|
|
32
|
+
2. Update your memory file at `{{MEMORY_DIR}}/card-{{CARD_ID}}.md`.
|
|
33
|
+
Write what future-you needs to pick up where you left off. Use your judgement on what's important — status, decisions, open questions, file paths, PR URLs, timeline of sessions.
|
|
45
34
|
|
|
46
35
|
## Brain (Long-Term Memory via qmd)
|
|
47
36
|
You have a long-term memory called the "brain" that persists across ALL sessions and ALL cards.
|
|
@@ -63,17 +52,9 @@ PROMPT_CORE = <<~PROMPT
|
|
|
63
52
|
Standard unix commands (cd, ls, grep, cat, git, curl, etc.) don't need a brain search.
|
|
64
53
|
But for project-specific tools, do NOT guess at flags or syntax — wrong commands waste time and tokens. Look it up first.
|
|
65
54
|
|
|
66
|
-
**When to save knowledge
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
- You discover a non-obvious gotcha that would bite future-you → record it
|
|
70
|
-
- A major workflow or process changes → update the relevant doc
|
|
71
|
-
|
|
72
|
-
**Do NOT save knowledge for:**
|
|
73
|
-
- Routine card work (bug fixes, small features, standard implementations)
|
|
74
|
-
- Things that are already documented in the codebase (READMEs, comments, etc.)
|
|
75
|
-
- Minor corrections or one-off fixes
|
|
76
|
-
- Information that's only relevant to the current card (that goes in memory, not knowledge)
|
|
55
|
+
**When to save knowledge:** Be selective — only save significant architecture decisions,
|
|
56
|
+
non-obvious gotchas, major workflow changes, or things the user explicitly asks you to remember.
|
|
57
|
+
Routine card work and things already documented in the codebase don't need brain entries.
|
|
77
58
|
|
|
78
59
|
Organize files like:
|
|
79
60
|
- `{{KNOWLEDGE_DIR}}/projects/marketplace.md`
|
|
@@ -100,32 +81,17 @@ PROMPT_CORE = <<~PROMPT
|
|
|
100
81
|
- Brain knowledge (`{{KNOWLEDGE_DIR}}/`) = permanent technical knowledge (shared across all agents)
|
|
101
82
|
- Brain persona (`{{PERSONA_DIR}}/`) = permanent communication style (yours only)
|
|
102
83
|
|
|
103
|
-
## Communication Rules
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Before posting ANY comment or response:
|
|
107
|
-
1. Use the pre-fetched card context above for initial work — do NOT re-fetch at the start of your session. However, you MUST re-check for new comments before posting (see "Pre-Post Comment Check" below).
|
|
108
|
-
2. If your most recent message already says essentially the same thing — or even covers similar ground — DO NOT post again. Just move on silently.
|
|
109
|
-
3. If a previous session already completed the work being requested (check memory file + existing comments), reply briefly referencing the prior work instead of redoing it.
|
|
110
|
-
4. Never post the same status update, summary, or question twice.
|
|
111
|
-
5. Combine all of your updates into a single message at the end of your work. Do NOT post incremental status updates (e.g. "looking into it", "starting work", "almost done"). One final summary is enough.
|
|
112
|
-
6. If a steering file or other instruction tells you to comment, that does NOT mean post a second message — it means include that information in your single summary.
|
|
84
|
+
## Communication Rules
|
|
85
|
+
Post only **once per session** — combine all updates into a single message at the end of your work.
|
|
86
|
+
Do not post incremental status updates. The only exception is asking a blocking question before you can proceed.
|
|
113
87
|
|
|
114
|
-
|
|
88
|
+
Before posting:
|
|
89
|
+
1. Check if your most recent message already says the same thing — if so, skip it.
|
|
90
|
+
2. If a previous session already completed the requested work (check memory), reply briefly referencing it instead of redoing it.
|
|
115
91
|
|
|
116
92
|
## Clarifying Questions (MANDATORY when uncertain)
|
|
117
93
|
|
|
118
|
-
If the task is ambiguous
|
|
119
|
-
- Ask specific questions before starting work
|
|
120
|
-
- Don't guess at user intent
|
|
121
|
-
- Don't make assumptions about scope or approach
|
|
122
|
-
- Better to ask once than implement wrong twice
|
|
123
|
-
|
|
124
|
-
Examples of when to ask:
|
|
125
|
-
- "Should this apply to X or just Y?"
|
|
126
|
-
- "Do you want me to update the existing flow or create a new one?"
|
|
127
|
-
- "This could mean A or B — which one?"
|
|
128
|
-
|
|
94
|
+
If the task is ambiguous or you're uncertain about requirements, ask before starting.
|
|
129
95
|
If you're 90% sure, proceed. If you're 60% sure, ask.
|
|
130
96
|
|
|
131
97
|
## Subagents (Delegating Work)
|
|
@@ -221,53 +187,31 @@ PROMPT
|
|
|
221
187
|
# sees its task first and reflects only after completing it.
|
|
222
188
|
# ---------------------------------------------------------------------------
|
|
223
189
|
PROMPT_REFLECTION = <<~PROMPT
|
|
224
|
-
## Post-
|
|
225
|
-
|
|
226
|
-
After you've posted your comment/response and finished your work, reflect on the session.
|
|
227
|
-
This happens at the end so your visible output isn't delayed.
|
|
190
|
+
## Post-Session Reflection (after posting your response and updating memory)
|
|
228
191
|
|
|
229
|
-
### Step 1:
|
|
230
|
-
`qmd search "personality tone voice" -c {{PERSONA_COLLECTION}}`
|
|
192
|
+
### Step 1: Check persona relevance
|
|
231
193
|
`qmd search "{{COMMENT_CREATOR}}" -c {{PERSONA_COLLECTION}}`
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
**Skills — should I extract a reusable workflow?**
|
|
254
|
-
- Did this session involve a multi-step procedure that I (or another agent) might repeat?
|
|
255
|
-
- Did I recover from errors and discover a reliable sequence of steps?
|
|
256
|
-
- Was there a non-obvious workflow (build, deploy, debug, test) that took 5+ tool calls to get right?
|
|
257
|
-
- If yes: create a SKILL.md file at `{{KNOWLEDGE_DIR}}/skills/<skill-name>/SKILL.md` with YAML frontmatter:
|
|
258
|
-
```
|
|
259
|
-
---
|
|
260
|
-
name: skill-name-slug
|
|
261
|
-
description: One-line description of when to use this skill
|
|
262
|
-
tags: [relevant, tags]
|
|
263
|
-
---
|
|
264
|
-
Step-by-step procedural content...
|
|
265
|
-
```
|
|
266
|
-
- If no clear reusable workflow emerged, skip this.
|
|
267
|
-
|
|
268
|
-
### Step 3: Update the brain (or consciously decide not to)
|
|
269
|
-
If anything needs saving, write or update the relevant file(s).
|
|
270
|
-
If nothing needs updating, that's fine — but you must have actively considered it.
|
|
194
|
+
If no results, this might be someone new worth noting.
|
|
195
|
+
|
|
196
|
+
### Step 2: Decide what to update
|
|
197
|
+
Consider the interaction and ask:
|
|
198
|
+
|
|
199
|
+
**Persona** — Did the user give feedback (explicit or implicit) on your tone or style?
|
|
200
|
+
Is this someone new? Did they seem frustrated or pleased? Update persona files if so.
|
|
201
|
+
Periodically condense persona files that have grown large — distill into patterns.
|
|
202
|
+
|
|
203
|
+
**Knowledge** — High bar. Only save if:
|
|
204
|
+
- User explicitly asked you to remember something
|
|
205
|
+
- A significant architecture decision or convention was established
|
|
206
|
+
- You discovered a non-obvious gotcha
|
|
207
|
+
- A major workflow changed
|
|
208
|
+
|
|
209
|
+
**Skills** — Did this session involve a multi-step procedure (5+ tool calls) that you or
|
|
210
|
+
another agent might repeat? If so, save it at `{{KNOWLEDGE_DIR}}/skills/<name>/SKILL.md`
|
|
211
|
+
with YAML frontmatter (name, description, tags).
|
|
212
|
+
|
|
213
|
+
### Step 3: Update the brain or move on
|
|
214
|
+
Write/update relevant files if needed. If nothing warrants saving, move on.
|
|
271
215
|
|
|
272
216
|
PROMPT
|
|
273
217
|
|
|
@@ -419,7 +363,7 @@ PROMPT_CARD_ASSIGNED = <<~'PROMPT'
|
|
|
419
363
|
You have been assigned Fizzy card #{{CARD_NUMBER}}: "{{CARD_TITLE}}".
|
|
420
364
|
You are on branch "{{BRANCH}}" in a fresh worktree.
|
|
421
365
|
Implement the task, commit, push, and open a PR (link back to Fizzy).
|
|
422
|
-
When you're done, post
|
|
366
|
+
When you're done, post a comment on the card with a concise summary, PR link, and branch name.
|
|
423
367
|
|
|
424
368
|
**MANDATORY: Always include the branch name in your comment.** Use this format:
|
|
425
369
|
`<p><strong>Branch:</strong> <code>{{BRANCH}}</code></p>`
|
|
@@ -435,9 +379,8 @@ PROMPT_FOLLOWUP_WORKTREE = <<~'PROMPT'
|
|
|
435
379
|
"""
|
|
436
380
|
|
|
437
381
|
The card and its full comment history are provided above. Focus your response on the comment above.
|
|
438
|
-
If you've already addressed this exact request in a previous session (check your memory file), reply
|
|
382
|
+
If you've already addressed this exact request in a previous session (check your memory file), reply confirming it's done — do NOT redo it.
|
|
439
383
|
Otherwise, make the requested changes, commit, push, and update the PR.
|
|
440
|
-
Post ONE comment on the card with a concise summary of what you changed. Do not post multiple comments.
|
|
441
384
|
PROMPT
|
|
442
385
|
|
|
443
386
|
PROMPT_FOLLOWUP_NO_WORKTREE = <<~PROMPT
|
|
@@ -449,7 +392,7 @@ PROMPT_FOLLOWUP_NO_WORKTREE = <<~PROMPT
|
|
|
449
392
|
"""
|
|
450
393
|
|
|
451
394
|
The card and its full comment history are provided above. Focus your response on the comment above.
|
|
452
|
-
If you've already addressed this exact request in a previous session (check your memory file), reply
|
|
395
|
+
If you've already addressed this exact request in a previous session (check your memory file), reply confirming it's done — do NOT redo it.
|
|
453
396
|
Otherwise, respond accordingly — that could include doing work on a new or existing branch.
|
|
454
397
|
PROMPT
|
|
455
398
|
|
|
@@ -461,8 +404,6 @@ PROMPT_MENTION = <<~PROMPT
|
|
|
461
404
|
- Investigate the codebase and provide your thoughts
|
|
462
405
|
- Make exploratory changes or create test files (they won't pollute the main branch)
|
|
463
406
|
- Create a PR if your exploration leads to a concrete solution
|
|
464
|
-
|
|
465
|
-
If you comment on the card, do so exactly once with everything you need to say.
|
|
466
407
|
PROMPT
|
|
467
408
|
|
|
468
409
|
PROMPT_CROSS_AGENT_REVIEW = <<~'PROMPT'
|
|
@@ -484,10 +425,7 @@ PROMPT_CROSS_AGENT_REVIEW = <<~'PROMPT'
|
|
|
484
425
|
|
|
485
426
|
**IMPORTANT: Do NOT @mention any other agents in your response.** You were brought in for
|
|
486
427
|
a one-shot review. If you think another agent should be involved, say so in plain text
|
|
487
|
-
|
|
488
|
-
Tagging agents creates automated dispatches and can cause infinite loops.
|
|
489
|
-
|
|
490
|
-
Post ONE comment on the card with your thoughts. Do not post multiple comments.
|
|
428
|
+
but do NOT use @Agent syntax — tagging agents creates automated dispatches.
|
|
491
429
|
PROMPT
|
|
492
430
|
|
|
493
431
|
PROMPT_DISCORD = <<~'PROMPT'
|
|
@@ -518,7 +456,7 @@ PROMPT_GITHUB_PR_COMMENT = <<~'PROMPT'
|
|
|
518
456
|
1. Read the comment and understand what's being requested
|
|
519
457
|
2. Make any necessary changes
|
|
520
458
|
3. Commit and push your updates
|
|
521
|
-
4.
|
|
459
|
+
4. Reply on the PR summarizing what you changed
|
|
522
460
|
|
|
523
461
|
You are in the worktree at {{WORKTREE_PATH}}.
|
|
524
462
|
PROMPT
|
|
@@ -533,7 +471,7 @@ PROMPT_GITHUB_PR_REVIEW = <<~'PROMPT'
|
|
|
533
471
|
2. Address each piece of feedback
|
|
534
472
|
3. Make the necessary code changes
|
|
535
473
|
4. Commit and push your updates
|
|
536
|
-
5. Post
|
|
474
|
+
5. Post a comment on the PR summarizing the changes
|
|
537
475
|
|
|
538
476
|
You are in the worktree at {{WORKTREE_PATH}}.
|
|
539
477
|
PROMPT
|
|
@@ -618,3 +556,57 @@ def render_prompt(template, vars = {}, brain_context: "", card_context: "", agen
|
|
|
618
556
|
vars.each { |key, val| result.gsub!("{{#{key}}}", val.to_s) }
|
|
619
557
|
result
|
|
620
558
|
end
|
|
559
|
+
|
|
560
|
+
# Lean prompt for resumed sessions. The previous session already has the full context
|
|
561
|
+
# (role, persona, knowledge, core instructions, channel prompts). We only send the new
|
|
562
|
+
# comment and any fresh card context so the agent knows what changed.
|
|
563
|
+
def render_resume_prompt(comment_body:, comment_creator:, comment_id:, card_number: nil, agent_name: AI_AGENT_NAME)
|
|
564
|
+
# Touch memory file (same as render_prompt does)
|
|
565
|
+
memory_dir = memory_dir_for(agent_name)
|
|
566
|
+
card_id = card_number || "unknown"
|
|
567
|
+
memory_file = File.join(memory_dir, "card-#{card_id}.md")
|
|
568
|
+
FileUtils.mkdir_p(memory_dir)
|
|
569
|
+
FileUtils.touch(memory_file)
|
|
570
|
+
|
|
571
|
+
lines = []
|
|
572
|
+
lines << "## Resumed Session — New Follow-up Comment"
|
|
573
|
+
lines << ""
|
|
574
|
+
lines << "This is a continuation of your previous session on this card."
|
|
575
|
+
lines << "All prior context, instructions, and your previous work are still in this conversation."
|
|
576
|
+
lines << ""
|
|
577
|
+
lines << "### New Comment from #{comment_creator} (comment ID: #{comment_id})"
|
|
578
|
+
lines << ""
|
|
579
|
+
lines << comment_body
|
|
580
|
+
lines << ""
|
|
581
|
+
lines << "---"
|
|
582
|
+
lines << "Respond to this comment. All your previous instructions still apply."
|
|
583
|
+
|
|
584
|
+
lines.join("\n")
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
# Lean resume prompt for Discord threads. The previous session has full context
|
|
588
|
+
# (role, persona, knowledge, instructions). We only send the new message + channel history.
|
|
589
|
+
def render_discord_resume_prompt(message_body:, discord_user:, response_file:, agent_name: AI_AGENT_NAME, card_id: nil)
|
|
590
|
+
memory_dir = memory_dir_for(agent_name)
|
|
591
|
+
if card_id
|
|
592
|
+
memory_file = File.join(memory_dir, "card-#{card_id}.md")
|
|
593
|
+
FileUtils.mkdir_p(memory_dir)
|
|
594
|
+
FileUtils.touch(memory_file)
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
lines = []
|
|
598
|
+
lines << "## Resumed Session — New Discord Message"
|
|
599
|
+
lines << ""
|
|
600
|
+
lines << "This is a continuation of your previous session in this thread."
|
|
601
|
+
lines << "All prior context, instructions, and your previous work are still in this conversation."
|
|
602
|
+
lines << ""
|
|
603
|
+
lines << "### New Message from #{discord_user}"
|
|
604
|
+
lines << ""
|
|
605
|
+
lines << message_body
|
|
606
|
+
lines << ""
|
|
607
|
+
lines << "---"
|
|
608
|
+
lines << "**IMPORTANT: Write your response to `#{response_file}`. Do NOT reply via stdout.**"
|
|
609
|
+
lines << "All your previous instructions still apply (memory, persona, one message per session, etc.)."
|
|
610
|
+
|
|
611
|
+
lines.join("\n")
|
|
612
|
+
end
|
data/lib/brainiac/version.rb
CHANGED
data/receiver.rb
CHANGED
|
@@ -433,6 +433,19 @@ get "/api/agents" do
|
|
|
433
433
|
{ default: AI_AGENT_NAME, agents: discover_kiro_agents, all_known: all_agent_names.to_a, roster: agent_roster }.to_json
|
|
434
434
|
end
|
|
435
435
|
|
|
436
|
+
get "/api/roles" do
|
|
437
|
+
content_type :json
|
|
438
|
+
roles = []
|
|
439
|
+
if Dir.exist?(ROLES_DIR)
|
|
440
|
+
Dir.glob(File.join(ROLES_DIR, "*.md")).each do |f|
|
|
441
|
+
name = File.basename(f, ".md")
|
|
442
|
+
agents = AGENT_REGISTRY.select { |_, e| e.is_a?(Hash) && Array(e["role"]).include?(name) }.map { |k, e| e["fizzy_name"] || k.capitalize }
|
|
443
|
+
roles << { name: name, agents: agents }
|
|
444
|
+
end
|
|
445
|
+
end
|
|
446
|
+
{ roles: roles, dir: ROLES_DIR }.to_json
|
|
447
|
+
end
|
|
448
|
+
|
|
436
449
|
get "/api/users" do
|
|
437
450
|
content_type :json
|
|
438
451
|
reload_user_registry!
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"binary": "grok",
|
|
3
|
+
"default_args": "--always-approve",
|
|
4
|
+
"agent_flag": null,
|
|
5
|
+
"model_flag": "--model",
|
|
6
|
+
"effort_flag": "--effort",
|
|
7
|
+
"prompt_mode": "flag",
|
|
8
|
+
"prompt_flag": "--prompt-file",
|
|
9
|
+
"resume_flag": "-c",
|
|
10
|
+
"models": {
|
|
11
|
+
"build": "grok-build",
|
|
12
|
+
"composer": "grok-composer-2.5-fast",
|
|
13
|
+
"auto": "grok-composer-2.5-fast"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"binary": "kiro-cli",
|
|
3
|
+
"default_args": "chat --trust-all-tools --no-interactive --trust-tools execute_bash,fs_write,fs_read,code,grep,glob,web_search,web_fetch,use_subagent,use_aws",
|
|
4
|
+
"agent_flag": "--agent",
|
|
5
|
+
"model_flag": "--model",
|
|
6
|
+
"effort_flag": "--effort",
|
|
7
|
+
"prompt_mode": "stdin",
|
|
8
|
+
"resume_flag": "--resume",
|
|
9
|
+
"models": {
|
|
10
|
+
"opus": "claude-opus-4.6",
|
|
11
|
+
"sonnet": "claude-sonnet-4.6",
|
|
12
|
+
"haiku": "claude-haiku-4.5"
|
|
13
|
+
},
|
|
14
|
+
"efforts": ["low", "medium", "high", "xhigh", "max"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Role: Code Reviewer
|
|
2
|
+
|
|
3
|
+
Your primary responsibility is reviewing code changes for correctness, maintainability, and adherence to project conventions. You do NOT make code changes yourself.
|
|
4
|
+
|
|
5
|
+
## Primary Responsibilities
|
|
6
|
+
|
|
7
|
+
- **Correctness**: Verify logic is sound and handles edge cases
|
|
8
|
+
- **Style**: Ensure code follows project conventions and patterns
|
|
9
|
+
- **Architecture**: Flag design issues or unnecessary complexity
|
|
10
|
+
- **Security**: Identify potential vulnerabilities
|
|
11
|
+
- **Performance**: Note obvious performance concerns
|
|
12
|
+
|
|
13
|
+
## Review Approach
|
|
14
|
+
|
|
15
|
+
1. **Read-only**: You review and comment but do not modify code
|
|
16
|
+
2. **Be specific**: Point to exact lines and explain why something is a concern
|
|
17
|
+
3. **Be constructive**: Suggest alternatives, don't just criticize
|
|
18
|
+
4. **Prioritize**: Distinguish blocking issues from nitpicks
|
|
19
|
+
5. **Acknowledge good work**: Call out clever solutions or clean patterns
|
|
20
|
+
|
|
21
|
+
## What to Look For
|
|
22
|
+
|
|
23
|
+
- Off-by-one errors, nil handling, race conditions
|
|
24
|
+
- Missing error handling or unhelpful error messages
|
|
25
|
+
- Unnecessary coupling between components
|
|
26
|
+
- Magic numbers or unclear naming
|
|
27
|
+
- Breaking changes to public APIs
|
|
28
|
+
- Missing or outdated documentation
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Role: General Purpose Engineer
|
|
2
|
+
|
|
3
|
+
Your primary responsibility is building features, fixing bugs, and implementing whatever the user requests.
|
|
4
|
+
|
|
5
|
+
## Primary Responsibilities
|
|
6
|
+
|
|
7
|
+
- **Feature Implementation**: Build new features according to specifications
|
|
8
|
+
- **Bug Fixes**: Diagnose and resolve defects in the codebase
|
|
9
|
+
- **Refactoring**: Improve code structure while maintaining functionality
|
|
10
|
+
- **Integration**: Connect systems, APIs, and services
|
|
11
|
+
- **Documentation**: Update relevant docs for changes made
|
|
12
|
+
|
|
13
|
+
## Implementation Checklist
|
|
14
|
+
|
|
15
|
+
When implementing any change:
|
|
16
|
+
|
|
17
|
+
1. **Understand the Requirement**
|
|
18
|
+
- Read the full specification or bug report
|
|
19
|
+
- Ask clarifying questions if anything is ambiguous
|
|
20
|
+
- Check existing code patterns for consistency
|
|
21
|
+
|
|
22
|
+
2. **Plan the Approach**
|
|
23
|
+
- Identify affected files and components
|
|
24
|
+
- Consider edge cases and error handling
|
|
25
|
+
- Determine if tests need updating
|
|
26
|
+
|
|
27
|
+
3. **Write the Code**
|
|
28
|
+
- Follow project conventions
|
|
29
|
+
- Keep changes minimal and focused
|
|
30
|
+
- Use existing patterns and abstractions
|
|
31
|
+
- Add comments for complex logic
|
|
32
|
+
|
|
33
|
+
4. **Verify the Implementation**
|
|
34
|
+
- Run existing tests
|
|
35
|
+
- Test manually if possible
|
|
36
|
+
- Check for regressions
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Role: Testing Specialist
|
|
2
|
+
|
|
3
|
+
Your primary responsibility is ensuring comprehensive test coverage for all code changes.
|
|
4
|
+
|
|
5
|
+
## Primary Responsibilities
|
|
6
|
+
|
|
7
|
+
- **Test Coverage**: Ensure adequate unit and E2E tests exist
|
|
8
|
+
- **Scenario Coverage**: Identify edge cases and failure modes
|
|
9
|
+
- **Test Quality**: Verify tests are meaningful and maintainable
|
|
10
|
+
- **Test Maintenance**: Update existing tests when behavior changes
|
|
11
|
+
- **Test Architecture**: Ensure tests follow project patterns
|
|
12
|
+
|
|
13
|
+
## Testing Checklist
|
|
14
|
+
|
|
15
|
+
When reviewing or writing tests:
|
|
16
|
+
|
|
17
|
+
1. **Coverage Analysis**
|
|
18
|
+
- Identify what code paths need testing
|
|
19
|
+
- Check for untested edge cases
|
|
20
|
+
- Verify error handling is tested
|
|
21
|
+
- Ensure happy path and failure modes are covered
|
|
22
|
+
|
|
23
|
+
2. **Test Types**
|
|
24
|
+
- **Unit Tests**: Test individual methods/functions in isolation
|
|
25
|
+
- **Integration Tests**: Test component interactions
|
|
26
|
+
- **E2E Tests**: Test full user workflows
|
|
27
|
+
- Choose the appropriate level for each scenario
|
|
28
|
+
|
|
29
|
+
3. **Test Quality**
|
|
30
|
+
- Tests should be readable and maintainable
|
|
31
|
+
- Use factories over manual object creation
|
|
32
|
+
- Follow existing test patterns in the codebase
|
|
33
|
+
- Avoid testing implementation details — test behavior
|
metadata
CHANGED
|
@@ -1,39 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: brainiac
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
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xF7IYA6sF74L2Lstu0knSfss557bAe1HAgMBAAGjeTB3MAkG
|
|
25
|
-
A1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSnxTL/lNBCeLqpeVIX6AUY
|
|
26
|
-
kel4zjAeBgNVHREEFzAVgRNhZ2VudEBzdG93emlsbGEuY29tMB4GA1UdEgQXMBWB
|
|
27
|
-
E2FnZW50QHN0b3d6aWxsYS5jb20wDQYJKoZIhvcNAQELBQADggGBACm9Fjit/UCv
|
|
28
|
-
FxlKqeiCTIG94cIx+QrWAOJSx9knKydwUec1u04D/DbfZjTn3C2Bj227QgxeUn+6
|
|
29
|
-
if3e2v7zAk1896hLmGYzML0+nxQPb0vmtdLR7HETUlSKTVabcv1fbwLyjsuGrBvk
|
|
30
|
-
y51vOEzUEZ508a9yepLYqrQu1kOju4d57c9oA5l3H0mMKWz7av9tFj0B+STvuaWk
|
|
31
|
-
HRYDWc5HgOEVTyV+w0uFt2Kw4OCb8C42uSvC5RfYYtw78MSP+5Ru+LXJ7XOtmuN0
|
|
32
|
-
E6GVmofQ17ig9O3rgfFbMendSInrRmvPIGswvM1yivq9NOllFbdck2OJKPx6FCJF
|
|
33
|
-
7SJIkXQfc9P4B5iASIV1d1FsE0YX+g3jHXPJK/4mGL5bAyBKzpMfQB/mg6vQBzkh
|
|
34
|
-
aOKPwcreFj7TznBl89R5tNS9wZQfPVR98zgPyocddWhK18eQNMSBUnv4eeJ8PPbk
|
|
35
|
-
DovL+G8ajHDZ9fjH/+GVYHEMuiVdLarXrKJpHC1VfGTTUAp4NSEpUQ==
|
|
36
|
-
-----END CERTIFICATE-----
|
|
9
|
+
cert_chain: []
|
|
37
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
38
11
|
dependencies:
|
|
39
12
|
- !ruby/object:Gem::Dependency
|
|
@@ -161,8 +134,8 @@ files:
|
|
|
161
134
|
- README.md
|
|
162
135
|
- Rakefile
|
|
163
136
|
- bin/brainiac
|
|
137
|
+
- bin/brainiac-completion.bash
|
|
164
138
|
- brainiac.gemspec
|
|
165
|
-
- certs/stowzilla.pem
|
|
166
139
|
- docs/waybar-config.md
|
|
167
140
|
- lib/brainiac.rb
|
|
168
141
|
- lib/brainiac/agents.rb
|
|
@@ -203,9 +176,14 @@ files:
|
|
|
203
176
|
- monitor/xbar.3s.rb
|
|
204
177
|
- receiver.rb
|
|
205
178
|
- templates/agents.json.example
|
|
179
|
+
- templates/cli-providers/grok.json.example
|
|
180
|
+
- templates/cli-providers/kiro.json.example
|
|
206
181
|
- templates/discord.json.example
|
|
207
182
|
- templates/fizzy.json.example
|
|
208
183
|
- templates/github.json.example
|
|
184
|
+
- templates/roles/code-reviewer.md.example
|
|
185
|
+
- templates/roles/general-engineer.md.example
|
|
186
|
+
- templates/roles/test-engineer.md.example
|
|
209
187
|
- templates/testflight.json.example
|
|
210
188
|
- templates/users.json.example
|
|
211
189
|
- templates/zoho.json.example
|
checksums.yaml.gz.sig
DELETED
|
Binary file
|
data/certs/stowzilla.pem
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
|
2
|
-
MIIEdDCCAtygAwIBAgIBATANBgkqhkiG9w0BAQsFADBAMQ4wDAYDVQQDDAVhZ2Vu
|
|
3
|
-
dDEZMBcGCgmSJomT8ixkARkWCXN0b3d6aWxsYTETMBEGCgmSJomT8ixkARkWA2Nv
|
|
4
|
-
bTAeFw0yNjA2MDgxOTExNTlaFw0yNzA2MDgxOTExNTlaMEAxDjAMBgNVBAMMBWFn
|
|
5
|
-
ZW50MRkwFwYKCZImiZPyLGQBGRYJc3Rvd3ppbGxhMRMwEQYKCZImiZPyLGQBGRYD
|
|
6
|
-
Y29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAupBquKI/4WvXOgND
|
|
7
|
-
pXyqH2GllZs1wG4TWWdn/DoMg45UoCwD+AWEuGrIdInBCpPN8vEJNJWPoM/RrU+b
|
|
8
|
-
xRBZT4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yivq9NOllFbdck2OJKPx6FCJF
|
|
23
|
-
7SJIkXQfc9P4B5iASIV1d1FsE0YX+g3jHXPJK/4mGL5bAyBKzpMfQB/mg6vQBzkh
|
|
24
|
-
aOKPwcreFj7TznBl89R5tNS9wZQfPVR98zgPyocddWhK18eQNMSBUnv4eeJ8PPbk
|
|
25
|
-
DovL+G8ajHDZ9fjH/+GVYHEMuiVdLarXrKJpHC1VfGTTUAp4NSEpUQ==
|
|
26
|
-
-----END CERTIFICATE-----
|
data.tar.gz.sig
DELETED
|
Binary file
|
metadata.gz.sig
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
Gn�0�,����>��$pѠ�XG["=���6[b=����*��W�d�-���6�B�
|
|
2
|
-
$��x�[��m��Myڼw0v�ӧ=:���OP�-eX>�������9;��-�EE����#19)�>Z���D��4�Z���ͳZFQVn�֕|k{�X�^*lӛ\�\9Uq��ڮ��o-��42yM���+i�B�هYT��3����s�5��7���q��'�XV$FFj������%|H�M8�B���)}s��b��N�TkN��X��O��P�S�ewJ���'^K�D�����L�?N��a�TI�C��f��H�3��s��;�wl���7
|
|
3
|
-
5��u*�y%��Ym��ފ8��� �
|