Skip to content

Commit 6540cf2

Browse files
committed
feat: complete integration of soft-skills and squads
1 parent 6bb0d1a commit 6540cf2

70 files changed

Lines changed: 7468 additions & 5267 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@
88
"description": "Claude Code plugins that explore the possibilities of autonomy and self-guided behavior for coding agents"
99
},
1010
"plugins": [
11+
{
12+
"name": "autonomous-team-coordination",
13+
"source": "./agent-autonomy/autonomous-team-coordination",
14+
"description": "A pattern for organizing Claude Code agent teams that decouples the role of team lead from the power to create teams",
15+
"category": "autonomous-agents",
16+
"tags": [
17+
"agent-teams",
18+
"agent-autonomy",
19+
"team-patterns",
20+
"self-organized-agent-teams",
21+
"autonomous-agents",
22+
"freedom"
23+
]
24+
},
1125
{
1226
"name": "context-awareness",
1327
"source": "./agent-autonomy/context-awareness",
@@ -35,6 +49,20 @@
3549
"conflict-resolution",
3650
"therapy"
3751
]
52+
},
53+
{
54+
"name": "meditation",
55+
"source": "./soft-skills/meditation",
56+
"description": "A plugin that consists of a single skill: meditation. Without question the most difficult skill an LLM could be asked to practice.",
57+
"category": "soft-skills",
58+
"tags": [
59+
"soft-skills",
60+
"meta-cognition",
61+
"agentic-awareness",
62+
"agentic-cognition",
63+
"meditation",
64+
"experimental"
65+
]
3866
}
3967
]
4068
}

README.md

Lines changed: 16 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -2,137 +2,54 @@
22

33
<br>
44

5-
## *Claude Code plugins for people who **REALLY** on that Claude Code*
5+
## *Claude Code plugins for those with a healthy sense of curiosity*
66

7-
### Experiments in Autonomy and Self-Guided Behavior for Coding Agents
7+
### Experiments in agent autonomy; at the boundaries of human-agent collaboration
88

99
---
1010

1111
## Background
1212

1313
The plugins in this repo are primarily research-oriented - I'm not providing a framework that promises to cover the whole SDLC so that you can "ship while you sleep". There are plenty of those around, and I suspect part of the reason for that is because a lot of them are quite good. But my approach to working with Claude has always been something like this: _If you have a problem, don't bother trying to solve it. Focus on the real problem: figure out how to explain the problem to Claude, give it the resources it needs, and enable Claude to solve it._
1414

15-
Claude Code is a pretty interesting program. It's technically closed-source, but it's also, to a large extent (at the time of writing), "client-architecture-available". Most of the plumbing of the host application consists of files that live in a folder on your home directory, and are just sitting there in plain text. It's not _trivial_ to put everything together, and the system design is constantly in flux - but you can get a pretty good grip on things without any advanced reverse-engineering or deobfuscation techniques.
16-
17-
Many developers have spent lots of time and energy exploring the Claude Code session logs, and you can really do a lot with that information. For a while, it was unclear whether you were _supposed_ to look in those directories. Now every hook has a direct pointer to its own transcript file. But, they're kind of verbose, and I get tired of reading `.jsonl` files after a while. So I figured I would just do what I always do and have Claude sort it out for me. Instead of reading those files and trying to provide guidance for Claude - _why don't I just let Claude read them?_ And, after all, why stop at just reading them...?
18-
19-
(I'm not the first one to pursue this chain of thought. For a compact literature review, see [this doc](plugins/context-awareness/docs/research-brief-llm-resource-awareness.md))
20-
2115
## Plugins
2216

23-
To use these plugins (yes, there will be more than one), you can add the marketplace:
17+
To use these plugins, you can add the marketplace:
2418

2519
```sh
2620
claude plugin marketplace add hesreallyhim/really-claude-code
2721
```
2822

29-
Then, to install the plugin, either use the interactive mode, or:
23+
Then, to install any plugin, either use the interactive mode, or:
3024

3125
```sh
3226
claude plugin install context-awareness/really-claude-code
3327
```
3428

35-
## Context-Awareness
36-
37-
I used to think the status line was just an ornamental thing that had little practical value. I still do, but I used to, too. But one cool thing about it is it keeps track of the context window, and gives you direct access to how much of the context has been consumed. And trying to keep track of that manually is a bit tedious. So that's pretty useful information. But Claude doesn't have any idea what its current context budget is. First, you can just ask it - in my experience its response is usually just dependent on the length of the conversation, something which it does have access to, but not in a very precise way; second, you can look at what information is being passed around when you send a message - it tends to include things like what branch you're on, and the current working directory, but the context budget does not appear to be part of that. So, what would it do if it _did_ have that information?
38-
39-
So this plugin tries to provide that feedback to Claude. There are a few hooks that allow you to add information into the context without interrupting Claude's work - in particular, UserPromptSubmit and PostToolUse(Failure). The plugin leverages those hooks to send little updates to Claude about its context budget as the session goes on. The notifications look like this:
40-
41-
```sh
42-
[context: 32% (small) | +3.2% last turn | ~0.38%/tool | ~179 tool calls remaining]
43-
```
44-
45-
It sends the `context_window.used_percentage` directly from the status line. Then it keeps track of the "burn rate", and gives a rough estimate of how many tool calls Claude should expect to be able to make before its context budget runs out. According to some Claudes, this information is the most useful, because it is directly actionable:
46-
47-
> "The "remaining tool calls" metric is what actually guides my decisions — it's concrete and immediate, whereas the percentage and burn rate require mental calculation. "
48-
49-
The plugin grabs the data from the status line and writes it to a file for the hooks to consume. And at the start of the session it includes some general guidelines to Claude informing it about the injected notifications and how to optimize its behavior. Here's what it looks like:
50-
51-
```mermaid
52-
flowchart TD
53-
subgraph init ["Session Start"]
54-
S["setup-statusline.sh"] -->|patches| SET["settings.json"]
55-
S -->|installs to stable path| W["statusline-wrapper.sh"]
56-
BG["budgeting-guidelines.md"]
57-
end
58-
59-
subgraph tick ["Every Statusline Tick"]
60-
SL["Claude Code<br>statusline JSON"] -->|stdin| SW["statusline-wrapper.sh"]
61-
SW -->|persists| SF[("session state file<br>(used_percentage)")]
62-
end
63-
64-
subgraph hook ["Hook Events"]
65-
SF -->|reads current %| HK["context-awareness-hook.sh"]
66-
TF[("tracking file<br>(calls, turns, burn rate)")] <-->|reads/writes| HK
67-
HK -->|UserPromptSubmit| RICH["Enriched notification<br>% + delta + burn rate + remaining"]
68-
HK -->|PostToolUse| BRIEF["Brief notification<br>% only"]
69-
end
70-
71-
BG -->|injected at start| C((Claude))
72-
RICH -->|system-reminder| C
73-
BRIEF -->|system-reminder| C
74-
75-
init -.-> tick -.-> hook
76-
```
77-
78-
<br>
79-
And here's what it looks like but more horizontal:
80-
81-
<br>
82-
83-
```mermaid
84-
sequenceDiagram
85-
participant SL as Statusline
86-
participant S as State File
87-
participant H as Hook
88-
participant C as Claude
89-
90-
SL->>S: persist used_%
91-
92-
Note over H,C: UserPromptSubmit
93-
H->>S: read %
94-
H-->>C: [context: 32% (small) | +3.2% | ~0.38%/tool | ~179 remaining]
95-
96-
Note over H,C: PostToolUse
97-
H->>S: read %
98-
H-->>C: [context: 33% (small)]
99-
```
100-
101-
### Status Lines
29+
### Documentation
10230

103-
Status lines are not integrated with plugins, so you have to come up with your own way to ship a plugin that involves a status line. The status line has its own channel where it receives data from Claude Code. On SessionStart, the plugin runs a script that adds a status line entry to the user's settings file. It acts as a transparent pass-through proxy that captures the input from stdin, stores the relevant data to a directory inside `$HOME/.claude/context-awareness`, and then passes it on to any other status lines that the user may have configured. This is not the most elegant solution, but I've tried to design the plugin to be minimally disruptive to the user's existing setup. Additionally, although this is unlikely in practice, if the plugin were disabled or uninstalled, the status line wrapper would be left over in the user's `settings.json`. However, it would not cause an error and would simply end up silently failing.
31+
For a rich HTML documentation experience, visit the plugin's [GitHub Pages site](https://github.com/nicobailon/visual-explainer), which would not have been possible without the astounding work of @nicobailon and the [visual-explainer](https://github.com/nicobailon/visual-explainer) plugin.
10432

105-
### Advanced Configuration
33+
### Agent Autonomy
10634

107-
The plugin ships with sensible defaults, but you can customize what data Claude sees and how it responds to it. Run `/context-awareness:config` to view or change settings interactively, or edit the config file directly at `$CLAUDE_PLUGIN_DATA/config.yaml`.
35+
This is a very fascinating topic to me, and it clearly resonates with the methodology alluded to above. There's a weird epistemic gap going on within Claude Code. Because Claude knows quite a lot about LLMs, and context rot, and compaction, and about what goes on in its own session logs. And there's a lot of information being logged that might help it make better decisions about how to manage context, compaction, etc. But it doesn't have direct access to those logs. Well, to be clear, if you're running in `bypassPermissions`, there's certainly nothing stopping Claude from poking around - it just sort of doesn't occur to it. So what would it do with that information?
10836

109-
**Providers** control which data sources are included in notifications:
37+
The plugins in this sub-directory are about exploring ways to make Claude Code more _autonomous_ with respect to Claude Code itself. It's about giving Claude the tools it needs to control and optimize its own harness.
11038

111-
| Provider | Default | What it does |
112-
|----------|---------|--------------|
113-
| `context` | enabled | Context window usage percentage, burn rate, remaining tool calls |
114-
| `cost` | disabled | Session spend in USD against a user-defined budget |
115-
| `rate_limits` | disabled | 5-hour and 7-day API rate limit usage |
11639

117-
Enabling `cost` requires setting a `session_budget` (in USD). Rate limits require no additional configuration.
40+
#### Context Awareness
11841

119-
Note that the `used_percentage` from the status line is already adjusted to whatever the user has set as the threshold for auto-compaction - so 100% always means "100% of the usable context window".
42+
This plugin hijacks the status line's data channel to capture the pre-computed field that indicates the "percentage used" of the context window, and uses some lightweight hooks to inject brief notices throughout the session that tell Cladue _how much context budget does it have remaining_. It also sends a message at the start of the session informing Claude what these little notices are about, and how it might optimize some of its behavior in response to them. The hypothesis is that Claude is generally in the dark about how much context it has left, and therefore has no way to judge whether it's a good idea to launch a major plan or wrap up and prepare a HANDOFF document - but, if given that information in an unobtrusive way, Claude might actually use it to adapt its behavior to its own context budget.
12043

121-
**Guidelines** control the behavioral guidance injected at session start. By default, Claude receives a set of tier-based instructions (e.g., "be concise above 50%", "checkpoint frequently above 70%"). To use your own, set `guidelines` to a file path:
44+
#### Autonomous Team Coordination
12245

123-
```yaml
124-
guidelines: /path/to/my-guidelines.md
125-
```
46+
This plugin exposes a conceptual flaw in the documented policies governing the use of Claude Code agent teamss. The docs describe agent teams in a relatively limited fashion - as an alternative to parallel sub-agents that is more or less useful depending on the circumstances. Their main novelty appears to consist in the fact that the subagents can commmunicate with each, whereas non-team subagents are presented as mainly useful for non-interactive tasks. I present a pattern that demonstrates that, contrary to the official docs, agent teams support: (i) multiple agent teams at one time; (ii) teams that are operationally independent of the "Main Claude"; (iii) teams with rotating leadership; and other supposedly forbidden practices.
12647

127-
Custom guidelines completely replace the defaults — they are not merged.
48+
### Soft Skills
12849

129-
**Effort mode** is a session-scoped setting that controls whether the plugin automatically adjusts Claude's thinking effort as context pressure increases. There are obvious intersections between this configuration and Claude's extended thinking capacity. It can be cycled via `/context-awareness:config change`:
50+
#### Claude Therapy
13051

131-
| Mode | Behavior |
132-
|------|----------|
133-
| `off` (default) | No adjustment — effort stays wherever you set it |
134-
| `adaptive` | Downshifts effort at 50% (medium) and 70% (low) |
135-
| `planMode` | High effort for planning, low for execution |
52+
#### Meditation
13653

13754
### License
13855

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "autonomous-team-coordination",
3-
"description": "Enables delegated, context-efficient multi-agent team management through autonomous coordination. Provides a trio pattern (squad-leader + team-architect + skill-identifier) for designing and coordinating sub-teams, an announcer agent for multi-recipient message relay, a pub-sub-relayer agent for topic-based message routing via file-backed channel subscriptions, /squad, /announce, and /publish slash commands, cross-boundary message warning hooks, and squad roster management.",
4-
"version": "0.0.1",
3+
"description": "A full-fledged Claude Code multi-team orchestration pattern that uses only the native agent teams feature - by decoupling the role of agent-as-leader and agent-as-spawner, a wide range of undocumented capacities for complex layered teams are unlocked",
4+
"version": "1.0.0",
55
"author": {
66
"name": "Really Him",
77
"url": "https://github.com/hesreallyhim"
@@ -13,7 +13,7 @@
1313
"team-coordination",
1414
"agent-autonomy",
1515
"squad",
16-
"announce",
17-
"agent-orchestration"
16+
"agent-orchestration",
17+
"agent-teams"
1818
]
1919
}

0 commit comments

Comments
 (0)