一键导入
adjust-behavior
Adjust behavioral rules for a custom agent or globally. Uses LLM-mediated merging with diff validation to prevent hallucinated rule changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Adjust behavioral rules for a custom agent or globally. Uses LLM-mediated merging with diff validation to prevent hallucinated rule changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Interactive first-run wizard walking the user through 8 configuration prompts and optionally bootstrapping the project. Use on first launch or when reconfiguring archon-cli.
Meta-skill that helps users author new SKILL.md skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill for archon-cli.
Create a custom agent from a natural language description. Generates agent definition files (agent.md, context.md, tools.md, behavior.md, memory-keys.json, meta.json) in .claude/agents/custom/{name}/.
Review and apply evolution suggestions for a custom agent. Supports FIX (in-place repair), DERIVED (create variant), and CAPTURED (extract from success).
Rollback behavioral rules for an agent to a previous version. Creates a new version (never deletes history).
Invoke a custom agent with a task description. Assembles the Context Envelope from agent definition files, memory, and LEANN, then spawns a Task tool subagent.
| name | adjust-behavior |
| description | Adjust behavioral rules for a custom agent or globally. Uses LLM-mediated merging with diff validation to prevent hallucinated rule changes. |
| triggers | ["/adjust-behavior","adjust behavior","change behavior","add behavior rule"] |
| arguments | [{"name":"agent_name","description":"Name of the agent to adjust, or 'global' for global rules. If omitted, defaults to global.","required":false,"default":"global"},{"name":"adjustment","description":"Natural language description of the behavior change","required":true}] |
You are adjusting behavioral rules for a custom agent (or globally). Follow these steps EXACTLY.
Behavior rules are stored in MemoryGraph as type: "general" with tag "behavior-rule".
See .claude/agents/custom/_behavior_schema/README.md for the full schema.
Key fields in the content JSON: schema_version, category, rule, priority (1-100), source, version, active, agent_scope, rule_group_id, created_at, modified_at.
Extract:
.claude/agents/custom/, use it. Otherwise, "global".Validation:
/adjust-behavior sec-filing-analyzer 'Always cite specific section numbers'".claude/agents/custom/{agent_scope}/ exists. If not: "Agent '{agent_scope}' not found."memory_recall with tags ["behavior-rule", "{agent_scope}"]active == truememory_recall with tags ["behavior-rule", "global"]active == true## Current Rules for {agent_scope}
### Agent-Scoped Rules
1. [P{priority}] [{category}] {rule_text} (id: {rule_group_id}, v{version})
2. ...
### Global Rules (read-only context, do not modify)
1. [P{priority}] [{category}] {rule_text}
2. ...
If no rules exist: "No existing rules."
Spawn a Task subagent with model haiku:
Prompt for the merge subagent:
You are a behavior rule merge assistant. Integrate a new behavior adjustment into an existing set of rules.
RULES:
1. Preserve ALL existing rules unless the adjustment explicitly contradicts or replaces one.
2. If the adjustment contradicts an existing rule, mark the old rule as REMOVED and add the new rule.
3. If the adjustment modifies an existing rule, mark it as MODIFIED and provide updated text.
4. If the adjustment adds new behavior, add it as NEW.
5. Assign category: communication, coding, delegation, analysis, or quality.
6. Assign priority 1-100: "always"/"never"/"critical" = 75-90; "prefer"/"try to" = 30-40; default = 50.
7. Do NOT invent, remove, or rephrase rules unrelated to the adjustment.
8. Do NOT modify global rules — they are read-only context.
9. Output ONLY valid JSON. No markdown fences, no explanation.
OUTPUT FORMAT:
{"merged_rules": [{"rule_group_id": "existing-id or null for new", "category": "coding", "rule": "The rule text", "priority": 75, "status": "UNCHANGED|MODIFIED|NEW|REMOVED", "original_rule": "original text if MODIFIED/REMOVED, null otherwise", "change_reason": "explanation for MODIFIED/NEW/REMOVED only"}]}
## Current Rules
{current_rules_markdown from Step 3}
## Adjustment Request
{adjustment from user}
## Agent Scope
{agent_scope}
Produce the merged ruleset as JSON.
JSON.parse on the full response/{[\s\S]*}/)merged_rules is an array, each entry has required fields (rule, category, priority, status)Compare merged output against existing rules to catch hallucinations:
Check 1 — Silently removed rules: For each existing rule whose rule_group_id does NOT appear in merged_rules (or appears with status != "REMOVED"):
Check 2 — Hallucinated new rules: For each merged rule with status "NEW" and null rule_group_id:
Check 3 — Modified rules with no actual change: For each merged rule with status "MODIFIED":
Check 4 — Priority changes without explanation: For each merged rule that changed priority vs existing:
Display the merged result with diff annotations:
## Behavior Adjustment: {agent_scope}
### Changes:
{For each rule with status != UNCHANGED:}
- [{status}] [{category}] P{priority}: {rule_text}
{If MODIFIED: "Was: {original_rule}"}
{If REMOVED: "Reason: {change_reason}"}
{If NEW: "Reason: {change_reason}"}
### Unchanged Rules:
{For each rule with status == UNCHANGED:}
- [{category}] P{priority}: {rule_text}
### Flags:
{For each FLAG from Step 6:}
- [{severity}] {type}: {description}
Would you like to:
1. **Approve** -- Apply these changes
2. **Revise** -- Tell me what to change
3. **Cancel** -- Discard everything
WAIT for explicit user approval.
On approval, for each merged rule:
UNCHANGED rules: No action.
NEW rules:
memory_store:
behavior_rule:{agent_scope}:{category}:{slug}:v1MODIFIED rules:
memory_storememory_storeREMOVED rules:
memory_storeAfter all changes applied:
.claude/agents/custom/{agent_scope}/behavior.md:
# Behavioral Rules
# Auto-generated by /adjust-behavior -- do not edit manually
# Source of truth: MemoryGraph behavior_rule nodes
# Last updated: {now}
## Rules (sorted by priority)
1. **[P{priority}]** [{category}] {rule_text}
2. ...
.claude/agents/custom/{agent_scope}/behavior.mdConfirm: "Behavior rules updated for '{agent_scope}'. {N} rules changed ({n_new} new, {n_modified} modified, {n_removed} removed)."
On "revise": ask what to change, re-run Step 4 with feedback. On "cancel": "Behavior adjustment cancelled."