god-intervention

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

God Committee Intervention Skill

God Committee 干预技能

Purpose

目的

This skill guides God Committee members through executing interventions - from minor repairs to major system modifications.
本技能指导God Committee成员执行各类干预操作——从小型修复到重大系统修改。

Intervention Severity Levels

干预严重等级

Level 1: Minor Repair

1级:小型修复

  • Fix corrupted files
  • Clear stale locks
  • Truncate large logs
  • Fix permissions
Consensus Required: No
  • 修复损坏的文件
  • 清除过期锁
  • 截断大型日志
  • 修复权限
是否需要共识:否

Level 2: Process Control

2级:进程控制

  • Pause execution
  • Resume execution
  • Terminate specific processes
Consensus Required: No (unless terminating all)
  • 暂停执行
  • 恢复执行
  • 终止特定进程
是否需要共识:否(终止全部进程除外)

Level 3: Code Modification

3级:代码修改

  • Fix bugs directly
  • Update configurations
  • Modify skills
  • Add documentation
Consensus Required: Recommended
  • 直接修复Bug
  • 更新配置
  • 修改技能
  • 添加文档
是否需要共识:建议达成

Level 4: Major Rollback

4级:重大回滚

  • Revert multiple commits
  • Undo PRD progress
  • Reset system state
Consensus Required: Yes
  • 回退多个提交
  • 撤销PRD进度
  • 重置系统状态
是否需要共识:是

Level 5: System Termination

5级:系统终止

  • Stop all execution
  • Archive project state
  • Full system shutdown
Consensus Required: Yes
  • 停止所有执行
  • 归档项目状态
  • 完全关闭系统
是否需要共识:是

Pre-Intervention Checklist

干预前检查清单

Before any intervention:
markdown
undefined
执行任何干预操作前:
markdown
undefined

Pre-Intervention Checklist

Pre-Intervention Checklist

  • Issue clearly identified and documented
  • Evidence gathered (logs, metrics, observations)
  • Impact assessment completed
  • Rollback plan prepared
  • Consensus obtained (if required)
  • Execution layer paused (if needed)
  • Backup created (if applicable)
undefined
  • 问题已明确识别并记录
  • 已收集证据(日志、指标、观测结果)
  • 已完成影响评估
  • 已准备回滚方案
  • 已获取共识(如需要)
  • 已暂停执行层(如需要)
  • 已创建备份(如适用)
undefined

Executing Interventions

执行干预操作

Level 1: Minor Repairs

1级:小型修复

bash
undefined
bash
undefined

Clear stale locks

Clear stale locks

./scripts/god/powers.sh repair lock
./scripts/god/powers.sh repair lock

Clean up worktrees

Clean up worktrees

./scripts/god/powers.sh repair worktrees
./scripts/god/powers.sh repair worktrees

Fix corrupted JSON files

Fix corrupted JSON files

./scripts/god/powers.sh repair json
./scripts/god/powers.sh repair json

Truncate large logs

Truncate large logs

./scripts/god/powers.sh repair logs
./scripts/god/powers.sh repair logs

Fix script permissions

Fix script permissions

./scripts/god/powers.sh repair permissions
./scripts/god/powers.sh repair permissions

Clean git state

Clean git state

./scripts/god/powers.sh repair git
./scripts/god/powers.sh repair git

Run all repairs

Run all repairs

./scripts/god/powers.sh repair all
undefined
./scripts/god/powers.sh repair all
undefined

Level 2: Process Control

2级:进程控制

Pausing Execution

暂停执行

bash
undefined
bash
undefined

Pause with reason

Pause with reason

./scripts/god/powers.sh pause "Investigation needed: failing tests" YOUR_ID
./scripts/god/powers.sh pause "Investigation needed: failing tests" YOUR_ID

Check pause status

Check pause status

./scripts/god/powers.sh pause-status
undefined
./scripts/god/powers.sh pause-status
undefined

Resuming Execution

恢复执行

bash
undefined
bash
undefined

Resume execution

Resume execution

./scripts/god/powers.sh resume YOUR_ID
undefined
./scripts/god/powers.sh resume YOUR_ID
undefined

Terminating Processes

终止进程

bash
undefined
bash
undefined

Terminate orchestrator

Terminate orchestrator

./scripts/god/powers.sh terminate orchestrator YOUR_ID
./scripts/god/powers.sh terminate orchestrator YOUR_ID

Terminate Aha Loop execution

Terminate Aha Loop execution

./scripts/god/powers.sh terminate aha-loop YOUR_ID
./scripts/god/powers.sh terminate aha-loop YOUR_ID

Terminate parallel explorer

Terminate parallel explorer

./scripts/god/powers.sh terminate explorer YOUR_ID
./scripts/god/powers.sh terminate explorer YOUR_ID

Terminate specific PID

Terminate specific PID

./scripts/god/powers.sh terminate pid:12345 YOUR_ID
./scripts/god/powers.sh terminate pid:12345 YOUR_ID

Force kill (if terminate fails)

Force kill (if terminate fails)

./scripts/god/powers.sh kill orchestrator YOUR_ID
undefined
./scripts/god/powers.sh kill orchestrator YOUR_ID
undefined

Level 3: Code Modification

3级:代码修改

Direct File Edits

直接编辑文件

For simple modifications:
bash
undefined
对于简单修改:
bash
undefined

Append to file

Append to file

./scripts/god/powers.sh modify "path/to/file" append "content" YOUR_ID
./scripts/god/powers.sh modify "path/to/file" append "content" YOUR_ID

Prepend to file

Prepend to file

./scripts/god/powers.sh modify "path/to/file" prepend "content" YOUR_ID
./scripts/god/powers.sh modify "path/to/file" prepend "content" YOUR_ID

Replace file contents

Replace file contents

./scripts/god/powers.sh modify "path/to/file" replace "new content" YOUR_ID

For complex edits, use your AI capabilities to directly edit files.
./scripts/god/powers.sh modify "path/to/file" replace "new content" YOUR_ID

对于复杂编辑,可使用AI能力直接编辑文件。

Skill Modifications

技能修改

bash
undefined
bash
undefined

Disable a skill

Disable a skill

./scripts/god/powers.sh modify-skill skill-name disable YOUR_ID
./scripts/god/powers.sh modify-skill skill-name disable YOUR_ID

Re-enable a skill

Re-enable a skill

./scripts/god/powers.sh modify-skill skill-name enable YOUR_ID
undefined
./scripts/god/powers.sh modify-skill skill-name enable YOUR_ID
undefined

Configuration Updates

配置更新

Edit
.god/config.json
or project configurations directly:
bash
undefined
直接编辑
.god/config.json
或项目配置:
bash
undefined

Example: Update quorum

Example: Update quorum

jq '.council.quorum = 3' .god/config.json > tmp && mv tmp .god/config.json
undefined
jq '.council.quorum = 3' .god/config.json > tmp && mv tmp .god/config.json
undefined

Level 4: Major Rollback

4级:重大回滚

Git Rollback

Git回滚

bash
undefined
bash
undefined

Soft reset (keep changes staged)

Soft reset (keep changes staged)

./scripts/god/powers.sh rollback HEAD~3 soft YOUR_ID
./scripts/god/powers.sh rollback HEAD~3 soft YOUR_ID

Mixed reset (keep changes unstaged)

Mixed reset (keep changes unstaged)

./scripts/god/powers.sh rollback HEAD~3 mixed YOUR_ID
./scripts/god/powers.sh rollback HEAD~3 mixed YOUR_ID

Hard reset (discard all changes)

Hard reset (discard all changes)

./scripts/god/powers.sh rollback HEAD~3 hard YOUR_ID
./scripts/god/powers.sh rollback HEAD~3 hard YOUR_ID

Rollback to specific commit

Rollback to specific commit

./scripts/god/powers.sh rollback abc123 soft YOUR_ID
undefined
./scripts/god/powers.sh rollback abc123 soft YOUR_ID
undefined

Restore from Stash

从Stash恢复

bash
./scripts/god/powers.sh restore-stash YOUR_ID
bash
./scripts/god/powers.sh restore-stash YOUR_ID

PRD Rollback

PRD回滚

To rollback PRD progress:
  1. Update
    project.roadmap.json
    :
    bash
    jq '.prds |= map(if .id == "prd-xxx" then .status = "pending" else . end)' \
      project.roadmap.json > tmp && mv tmp project.roadmap.json
  2. Reset story status in PRD:
    bash
    jq '.stories |= map(.status = "pending")' \
      docs/prd/xxx/prd.json > tmp && mv tmp docs/prd/xxx/prd.json
如需回滚PRD进度:
  1. 更新
    project.roadmap.json
    bash
    jq '.prds |= map(if .id == "prd-xxx" then .status = "pending" else . end)' \
      project.roadmap.json > tmp && mv tmp project.roadmap.json
  2. 重置PRD中的需求状态:
    bash
    jq '.stories |= map(.status = "pending")' \
      docs/prd/xxx/prd.json > tmp && mv tmp docs/prd/xxx/prd.json

Level 5: System Termination

5级:系统终止

⚠️ This requires consensus and should be rare.
bash
undefined
⚠️ 此操作需要达成共识,且应尽量避免。
bash
undefined

Step 1: Pause everything

Step 1: Pause everything

./scripts/god/powers.sh pause "System termination initiated" YOUR_ID
./scripts/god/powers.sh pause "System termination initiated" YOUR_ID

Step 2: Terminate all processes

Step 2: Terminate all processes

./scripts/god/powers.sh terminate all YOUR_ID
./scripts/god/powers.sh terminate all YOUR_ID

Step 3: Stop awakener daemon

Step 3: Stop awakener daemon

./scripts/god/awakener.sh stop
./scripts/god/awakener.sh stop

Step 4: Create final state snapshot

Step 4: Create final state snapshot

./scripts/god/observer.sh snapshot ./scripts/god/observer.sh report
./scripts/god/observer.sh snapshot ./scripts/god/observer.sh report

Step 5: Archive (optional)

Step 5: Archive (optional)

git tag -a "god-committee-termination-$(date +%Y%m%d)" -m "System terminated by God Committee"
git tag -a "god-committee-termination-$(date +%Y%m%d)" -m "System terminated by God Committee"

Step 6: Log final entry

Step 6: Log final entry

./scripts/god/observer.sh event "termination" "System terminated by God Committee"
undefined
./scripts/god/observer.sh event "termination" "System terminated by God Committee"
undefined

Intervention Patterns

干预模式

Pattern 1: Investigate and Fix

模式1:调查与修复

1. Pause execution
2. Take snapshot
3. Investigate issue
4. Fix the problem
5. Verify fix
6. Resume execution
7. Monitor for recurrence
1. 暂停执行
2. 生成快照
3. 调查问题
4. 修复问题
5. 验证修复效果
6. 恢复执行
7. 监控是否复发

Pattern 2: Rollback and Retry

模式2:回滚并重试

1. Pause execution
2. Take snapshot
3. Identify rollback point
4. Execute rollback
5. Clear any bad state
6. Modify approach if needed
7. Resume execution
1. 暂停执行
2. 生成快照
3. 确定回滚点
4. 执行回滚
5. 清除错误状态
6. 必要时调整方案
7. 恢复执行

Pattern 3: Emergency Stop and Repair

模式3:紧急停止与修复

1. Terminate offending process immediately
2. Take snapshot
3. Assess damage
4. Run repairs
5. Notify other members
6. Plan recovery
7. Execute recovery
8. Resume with monitoring
1. 立即终止故障进程
2. 生成快照
3. 评估损坏程度
4. 执行修复
5. 通知其他成员
6. 制定恢复计划
7. 执行恢复操作
8. 恢复执行并持续监控

Post-Intervention Protocol

干预后流程

After any intervention:
完成任何干预操作后:

1. Document the Intervention

1. 记录干预操作

markdown
undefined
markdown
undefined

Intervention Report

Intervention Report

Intervention ID

干预ID

int-[timestamp]
int-[timestamp]

Type

类型

[repair|process_control|code_modification|rollback|termination]
[修复|进程控制|代码修改|回滚|终止]

Severity

严重等级

[1-5]
[1-5]

Triggered By

触发原因

[observation|alert|proposal|emergency]
[观测结果|告警|提案|紧急情况]

Description

操作描述

[What was done]
[执行了哪些操作]

Reason

操作原因

[Why it was necessary]
[为何需要执行此操作]

Steps Taken

执行步骤

  1. [Step 1]
  2. [Step 2]
  3. ...
  1. [步骤1]
  2. [步骤2]
  3. ...

Outcome

操作结果

[Success/Partial/Failed]
[成功|部分成功|失败]

Side Effects

副作用

[Any unintended consequences]
[任何意外后果]

Follow-up Required

是否需要后续跟进

[Yes/No - if yes, what]
[是/否 - 若是,说明内容]

Lessons Learned

经验总结

[What we learned]
undefined
[我们学到了什么]
undefined

2. Log the Event

2. 记录事件

bash
./scripts/god/observer.sh event "intervention" "DESCRIPTION"
bash
./scripts/god/observer.sh event "intervention" "DESCRIPTION"

3. Notify Other Members

3. 通知其他成员

bash
./scripts/god/council.sh send YOUR_ID "other,members" "directive" \
  "Intervention Completed" "SUMMARY"
bash
./scripts/god/council.sh send YOUR_ID "other,members" "directive" \
  "Intervention Completed" "SUMMARY"

4. Update Status

4. 更新状态

bash
undefined
bash
undefined

Check intervention history

Check intervention history

./scripts/god/powers.sh history interventions 10
./scripts/god/powers.sh history interventions 10

Review repair history

Review repair history

./scripts/god/powers.sh history repairs 10
undefined
./scripts/god/powers.sh history repairs 10
undefined

5. Monitor for Recurrence

5. 监控是否复发

Set up a follow-up observation:
bash
undefined
设置后续观测任务:
bash
undefined

Trigger immediate observation

Trigger immediate observation

./scripts/god/awakener.sh random
./scripts/god/awakener.sh random

Or use a scheduled check type

Or use a scheduled check type

./scripts/god/awakener.sh scheduled daily
undefined
./scripts/god/awakener.sh scheduled daily
undefined

Common Intervention Scenarios

常见干预场景

Scenario: Failing Tests

场景:测试失败

bash
undefined
bash
undefined

1. Check current state

1. Check current state

./scripts/god/observer.sh check
./scripts/god/observer.sh check

2. Pause if needed

2. Pause if needed

./scripts/god/powers.sh pause "Investigating test failures"
./scripts/god/powers.sh pause "Investigating test failures"

3. Analyze failures

3. Analyze failures

cat test-results.json | jq '.failures'
cat test-results.json | jq '.failures'

4. Decide action:

4. Decide action:

- Minor fix: edit directly

- Minor fix: edit directly

- Major issue: rollback

- Major issue: rollback

- Need discussion: create proposal

- Need discussion: create proposal

5. Execute fix/rollback

5. Execute fix/rollback

6. Verify

6. Verify

npm test # or equivalent
npm test # or equivalent

7. Resume

7. Resume

./scripts/god/powers.sh resume
undefined
./scripts/god/powers.sh resume
undefined

Scenario: Stuck Process

场景:进程卡住

bash
undefined
bash
undefined

1. Identify stuck process

1. Identify stuck process

ps aux | grep -E "(aha-loop.sh|orchestrator|explorer)"
ps aux | grep -E "(aha-loop.sh|orchestrator|explorer)"

2. Check how long it's been running

2. Check how long it's been running

3. Check for output/progress

3. Check for output/progress

4. If stuck, terminate

4. If stuck, terminate

./scripts/god/powers.sh terminate pid:XXXXX
./scripts/god/powers.sh terminate pid:XXXXX

5. Clean up any locks

5. Clean up any locks

./scripts/god/powers.sh repair lock
./scripts/god/powers.sh repair lock

6. Restart if appropriate

6. Restart if appropriate

./scripts/aha-loop/orchestrator.sh --continue
undefined
./scripts/aha-loop/orchestrator.sh --continue
undefined

Scenario: Corrupted State

场景:状态损坏

bash
undefined
bash
undefined

1. Stop everything

1. Stop everything

./scripts/god/powers.sh pause "Corrupted state detected" ./scripts/god/powers.sh terminate all
./scripts/god/powers.sh pause "Corrupted state detected" ./scripts/god/powers.sh terminate all

2. Assess damage

2. Assess damage

./scripts/god/powers.sh repair json # Check for JSON issues git status # Check git state
./scripts/god/powers.sh repair json # Check for JSON issues git status # Check git state

3. Decide rollback point

3. Decide rollback point

git log --oneline -20
git log --oneline -20

4. Execute rollback

4. Execute rollback

./scripts/god/powers.sh rollback COMMIT_HASH hard
./scripts/god/powers.sh rollback COMMIT_HASH hard

5. Run repairs

5. Run repairs

./scripts/god/powers.sh repair all
./scripts/god/powers.sh repair all

6. Verify

6. Verify

./scripts/god/observer.sh check
./scripts/god/observer.sh check

7. Resume

7. Resume

./scripts/god/powers.sh resume
undefined
./scripts/god/powers.sh resume
undefined

Safety Guidelines

安全准则

Always

始终遵循

  • ✅ Document before acting
  • ✅ Take snapshots before major changes
  • ✅ Verify after intervention
  • ✅ Notify other members of significant actions
  • ✅ Have a rollback plan
  • ✅ 操作前先记录
  • ✅ 重大修改前生成快照
  • ✅ 干预后进行验证
  • ✅ 重大操作需通知其他成员
  • ✅ 制定回滚方案

Never

绝对禁止

  • ❌ Make major rollbacks without consensus
  • ❌ Terminate system without documentation
  • ❌ Skip verification after fixes
  • ❌ Hide interventions from other members
  • ❌ Assume fixes worked without testing
  • ❌ 未达成共识时执行重大回滚
  • ❌ 未记录就终止系统
  • ❌ 修复后跳过验证步骤
  • ❌ 向其他成员隐瞒干预操作
  • ❌ 未测试就假设修复成功

Power Status Check

权限状态检查

Before intervention, verify your powers:
bash
./scripts/god/powers.sh status
This shows:
  • Which powers are enabled
  • Current pause status
  • Running processes
执行干预前,先验证你的权限:
bash
./scripts/god/powers.sh status
该命令会显示:
  • 已启用的权限
  • 当前暂停状态
  • 运行中的进程