brichan 0.6.0__tar.gz
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.
- brichan-0.6.0/LICENSE +21 -0
- brichan-0.6.0/PKG-INFO +191 -0
- brichan-0.6.0/README.md +158 -0
- brichan-0.6.0/README_PYPI.md +147 -0
- brichan-0.6.0/pyproject.toml +45 -0
- brichan-0.6.0/setup.cfg +4 -0
- brichan-0.6.0/src/brichan.egg-info/PKG-INFO +191 -0
- brichan-0.6.0/src/brichan.egg-info/SOURCES.txt +47 -0
- brichan-0.6.0/src/brichan.egg-info/dependency_links.txt +1 -0
- brichan-0.6.0/src/brichan.egg-info/entry_points.txt +6 -0
- brichan-0.6.0/src/brichan.egg-info/top_level.txt +1 -0
- brichan-0.6.0/src/brida/__init__.py +3 -0
- brichan-0.6.0/src/brida/cli/__init__.py +1 -0
- brichan-0.6.0/src/brida/cli/_root.py +46 -0
- brichan-0.6.0/src/brida/cli/claude.py +57 -0
- brichan-0.6.0/src/brida/cli/codex.py +116 -0
- brichan-0.6.0/src/brida/cli/provider_commands.py +404 -0
- brichan-0.6.0/src/brida/cli/render.py +181 -0
- brichan-0.6.0/src/brida/cli/runtime.py +244 -0
- brichan-0.6.0/src/brida/contracts/__init__.py +1 -0
- brichan-0.6.0/src/brida/contracts/receipts/__init__.py +13 -0
- brichan-0.6.0/src/brida/contracts/receipts/discovery.py +5 -0
- brichan-0.6.0/src/brida/contracts/receipts/parser.py +5 -0
- brichan-0.6.0/src/brida/contracts/receipts/schema.py +35 -0
- brichan-0.6.0/src/brida/contracts/receipts/validation.py +1177 -0
- brichan-0.6.0/src/brida/lifecycle.py +334 -0
- brichan-0.6.0/src/brida/orchestration/__init__.py +23 -0
- brichan-0.6.0/src/brida/orchestration/herdr_client.py +8 -0
- brichan-0.6.0/src/brida/orchestration/layout.py +5 -0
- brichan-0.6.0/src/brida/orchestration/model_routing.py +283 -0
- brichan-0.6.0/src/brida/orchestration/worker_launch.py +479 -0
- brichan-0.6.0/src/brida/project.py +64 -0
- brichan-0.6.0/src/brida/resources/__init__.py +1 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/__init__.py +1 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/__pycache__/__init__.cpython-310.pyc +0 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/config/model-routing.json +38 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/policy/bootstrap.md +23 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/policy/identity.md +18 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/policy/memory-policy.md +14 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/policy/operating-principles.md +13 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/project-memory/index.md +6 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/project-memory/main/current-state.md +9 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/project-memory/main/decisions.md +3 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/project-memory/main/overview.md +8 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/project-memory/main/references.md +3 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/project-memory/main/tasks.md +11 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/skills/herdr-orchestration/SKILL.md +25 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/skills/herdr-orchestration/references/commands.md +24 -0
- brichan-0.6.0/src/brida/resources/dogfood_v1/skills/herdr-orchestration/references/task-packet.md +39 -0
brichan-0.6.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Minh Tran
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
brichan-0.6.0/PKG-INFO
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: brichan
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: Repository-native AI Chief of Staff orchestration
|
|
5
|
+
Author: Minh Tran
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Minh Tran
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Keywords: ai,orchestration,codex,claude-code,chief-of-staff
|
|
29
|
+
Classifier: Development Status :: 3 - Alpha
|
|
30
|
+
Classifier: Environment :: Console
|
|
31
|
+
Classifier: Intended Audience :: Developers
|
|
32
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
33
|
+
Classifier: Operating System :: POSIX
|
|
34
|
+
Classifier: Programming Language :: Python :: 3
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
39
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
40
|
+
Requires-Python: >=3.10
|
|
41
|
+
Description-Content-Type: text/markdown
|
|
42
|
+
License-File: LICENSE
|
|
43
|
+
Dynamic: license-file
|
|
44
|
+
|
|
45
|
+
# Brichan
|
|
46
|
+
|
|
47
|
+
[](https://pypi.org/project/brichan/)
|
|
48
|
+
[](https://pypi.org/project/brichan/)
|
|
49
|
+
[](https://pypi.org/project/brichan/)
|
|
50
|
+
|
|
51
|
+
Coding agents are very good at the work in front of them and very bad at
|
|
52
|
+
remembering why it was asked for. Context lives in a chat window, so it is lost
|
|
53
|
+
when the window closes; decisions are re-litigated, status is reconstructed from
|
|
54
|
+
memory, and the record of what was actually verified never outlives the session.
|
|
55
|
+
Running several agents at once makes this worse, not better, because nothing
|
|
56
|
+
owns the state between them.
|
|
57
|
+
|
|
58
|
+
This package introduces an AI Chief of Staff that sits above the coding agent
|
|
59
|
+
rather than inside it. You give it a project goal; it keeps only the context
|
|
60
|
+
that goal needs, hands bounded tasks to independent workers, checks the evidence
|
|
61
|
+
they return, and records decisions and status as files in your repository —
|
|
62
|
+
outside chat, where they survive the session.
|
|
63
|
+
|
|
64
|
+
The distribution is named `brichan`. The importable package stays `brida`, and
|
|
65
|
+
every console command keeps its existing `brida` / `brida-*` name.
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
|
|
69
|
+
### PyPI
|
|
70
|
+
|
|
71
|
+
To install Brichan, simply:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
$ pip install brichan
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Brichan runs on POSIX-compatible systems with Python 3.10 or newer. It has no
|
|
78
|
+
runtime dependencies.
|
|
79
|
+
|
|
80
|
+
### From source
|
|
81
|
+
|
|
82
|
+
The repository ships an installer that builds a wheel and installs every console
|
|
83
|
+
command into a dedicated environment. It can be invoked from any directory and
|
|
84
|
+
does not activate or modify your project's virtual environment:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
$ /absolute/path/to/brida/scripts/install-brida
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
By default it creates an environment at `$HOME/.local/share/brida/venv` and
|
|
91
|
+
command symlinks in `$HOME/.local/bin`, selecting an available Python 3.10+
|
|
92
|
+
interpreter with `pip`, `setuptools`, `venv`, and `wheel`. If the command
|
|
93
|
+
directory is not on `PATH`, the installer prints the exact export to add to your
|
|
94
|
+
shell profile.
|
|
95
|
+
|
|
96
|
+
## Usage
|
|
97
|
+
|
|
98
|
+
Brichan operates on an existing top-level Git repository. Initialization
|
|
99
|
+
defaults to a dry run and performs zero writes, so you can preview the complete
|
|
100
|
+
footprint before anything is created:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
$ brida init --project /absolute/path/to/repository
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Once the footprint looks right, apply it:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
$ brida init --apply --project /absolute/path/to/repository
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
This creates only a versioned `.brida/` directory holding managed policy, model
|
|
113
|
+
routing, Herdr skill resources, and mutable project memory. Repeating it against
|
|
114
|
+
healthy state is idempotent. Your `AGENTS.md`, `CLAUDE.md`, `.codex/`, and
|
|
115
|
+
provider configuration are left untouched.
|
|
116
|
+
|
|
117
|
+
Diagnose and launch from any directory by naming the target explicitly:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
$ brida status --project /absolute/path/to/repository
|
|
121
|
+
$ brida doctor --project /absolute/path/to/repository
|
|
122
|
+
$ brida run --project /absolute/path/to/repository -- <codex arguments>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
From inside a healthy initialized repository, bare `brida` launches Codex
|
|
126
|
+
directly:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
$ brida
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Arguments after `--` are forwarded to Codex. Option-looking text after `--` is
|
|
133
|
+
treated as literal prompt content, so a prompt beginning with a dash cannot
|
|
134
|
+
silently become a flag:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
$ brida run --project /absolute/path/to/repository -- --review the auth module
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Before the `--`, Brichan rejects native delegation, permission bypasses,
|
|
141
|
+
cwd/scope widening, profiles, remote execution, and arbitrary Codex
|
|
142
|
+
configuration. State diagnostics reject malformed, dangling, symlinked,
|
|
143
|
+
inaccessible, or incompatible `.brida/` state rather than silently repairing it.
|
|
144
|
+
Schema v1 has no automatic migration: a package-version change requires
|
|
145
|
+
deliberate backup and reinitialization.
|
|
146
|
+
|
|
147
|
+
### Coordinating workers
|
|
148
|
+
|
|
149
|
+
Herdr is the worker control plane. Native runtime delegation stays disabled so
|
|
150
|
+
worker ownership, evidence, and cleanup remain visible:
|
|
151
|
+
|
|
152
|
+
1. You describe the outcome and constraints.
|
|
153
|
+
2. Brichan reads only the project context that work needs.
|
|
154
|
+
3. Brichan gives bounded tasks to independent workers through Herdr.
|
|
155
|
+
4. Brichan verifies the results, records decisions and status, then reports back.
|
|
156
|
+
|
|
157
|
+
Herdr is needed only when Brichan coordinates independent worker sessions.
|
|
158
|
+
Project context is written to `projects/<project-slug>/` as a small set of
|
|
159
|
+
Markdown files covering overview, current state, tasks, decisions, and
|
|
160
|
+
references.
|
|
161
|
+
|
|
162
|
+
Coordinator defaults and worker routes are settings-driven, so the coordinator
|
|
163
|
+
and the implementation, review, planning, or scan workers may each use a
|
|
164
|
+
different runtime.
|
|
165
|
+
|
|
166
|
+
### Other console commands
|
|
167
|
+
|
|
168
|
+
Installing `brichan` also provides:
|
|
169
|
+
|
|
170
|
+
- `brida-codex` — resolves coordinator routing from a Brida source checkout (or
|
|
171
|
+
`BRIDA_ROOT`), or from an already-initialized project's `.brida/` state.
|
|
172
|
+
- `brida-claude` — resolves only from a checkout or `BRIDA_ROOT`.
|
|
173
|
+
- `brida-herdr-agent-start` — starts a Herdr worker session.
|
|
174
|
+
- `brida-validate-receipts` — validates canonical handoff receipts.
|
|
175
|
+
|
|
176
|
+
`brida-codex` and `brida-claude` are checkout-oriented and intended for
|
|
177
|
+
development, not standalone installed-project launches. `--help` and `--version`
|
|
178
|
+
work from any directory.
|
|
179
|
+
|
|
180
|
+
## Contributing
|
|
181
|
+
|
|
182
|
+
1. Fork it (https://github.com/minhtran3124/Brichan/fork)
|
|
183
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
184
|
+
3. Run the validation suite (`make check`)
|
|
185
|
+
4. Commit your changes (`git commit -am 'Add some feature'`)
|
|
186
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
|
187
|
+
6. Create a new Pull Request
|
|
188
|
+
|
|
189
|
+
## License
|
|
190
|
+
|
|
191
|
+
Brichan is available under the [MIT License](https://opensource.org/licenses/MIT).
|
brichan-0.6.0/README.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Brichan
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Brichan is an AI Chief of Staff for Codex and Claude Code. Give it a project
|
|
6
|
+
goal; it keeps the necessary context, coordinates independent workers through
|
|
7
|
+
Herdr, checks their evidence, and records useful project state outside chat.
|
|
8
|
+
Its existing runtime package and console commands remain `brida` and
|
|
9
|
+
`brida-*` for compatibility.
|
|
10
|
+
|
|
11
|
+
## Current dogfood scope
|
|
12
|
+
|
|
13
|
+
The primary one-user dogfood path is now an installed Python package running
|
|
14
|
+
inside an existing top-level Git repository. Installed-project mode currently
|
|
15
|
+
supports Codex on POSIX-compatible systems with Python 3.10+. Herdr is needed
|
|
16
|
+
only when Brida coordinates independent worker sessions.
|
|
17
|
+
|
|
18
|
+
Brida is published to PyPI as `brichan`, while the importable package stays
|
|
19
|
+
`brida` and every console command keeps its existing name:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install brichan
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
To install from this repository instead — for development, or to run a change
|
|
26
|
+
that is not released yet — use the installer. It can be invoked from any
|
|
27
|
+
directory and does not activate or modify the target project's virtual
|
|
28
|
+
environment:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
/absolute/path/to/brida/scripts/install-brida
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
By default, the script creates a dedicated environment at
|
|
35
|
+
`$HOME/.local/share/brida/venv` and command symlinks in `$HOME/.local/bin`.
|
|
36
|
+
It automatically selects an available Python 3.10+ interpreter with `pip`,
|
|
37
|
+
`setuptools`, `venv`, and `wheel`, builds from a temporary source snapshot,
|
|
38
|
+
and installs all Brida console commands. No virtualenv activation is
|
|
39
|
+
required. If the command directory is not on `PATH`, the installer prints
|
|
40
|
+
the exact export to add to the shell profile.
|
|
41
|
+
|
|
42
|
+
## Initialize a project
|
|
43
|
+
|
|
44
|
+
Preview the complete footprint before writing:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
brida init --project /absolute/path/to/repository
|
|
48
|
+
brida init --apply --project /absolute/path/to/repository
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`init` defaults to dry-run and performs zero writes. `--apply` creates only a
|
|
52
|
+
versioned `.brida/` directory containing managed policy, model routing, Herdr
|
|
53
|
+
skill resources, and mutable project memory. Repeating it against healthy
|
|
54
|
+
state is idempotent.
|
|
55
|
+
|
|
56
|
+
Diagnose and launch from any directory with an explicit target:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
brida status --project /absolute/path/to/repository
|
|
60
|
+
brida doctor --project /absolute/path/to/repository
|
|
61
|
+
brida run --project /absolute/path/to/repository -- <codex arguments>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
From inside a healthy initialized repository, bare `brida` also launches
|
|
65
|
+
Codex. The installed entrypoint:
|
|
66
|
+
|
|
67
|
+
- leaves `AGENTS.md`, `CLAUDE.md`, `.codex/`, and provider configuration
|
|
68
|
+
untouched;
|
|
69
|
+
- launches external `codex` directly at the target root and never executes
|
|
70
|
+
target-owned `bin/brida-*` wrappers;
|
|
71
|
+
- injects package-owned Brida policy and Herdr skill discovery;
|
|
72
|
+
- rejects native delegation, permission bypasses, cwd/scope widening, profiles,
|
|
73
|
+
remote execution, and arbitrary Codex configuration before `--`;
|
|
74
|
+
- treats option-looking text after `--` as literal prompt content.
|
|
75
|
+
|
|
76
|
+
State diagnostics reject malformed, dangling, symlinked, inaccessible, or
|
|
77
|
+
incompatible `.brida/` state without silently repairing it. Schema v1 has no
|
|
78
|
+
automatic migration: package-version changes require deliberate backup and
|
|
79
|
+
reinitialization. See the
|
|
80
|
+
[installed Codex dogfood guide](docs/guides/installable-dogfood.md) for the
|
|
81
|
+
exact footprint, exit codes, safeguards, and compatibility boundary.
|
|
82
|
+
|
|
83
|
+
## Checkout compatibility and development
|
|
84
|
+
|
|
85
|
+
The original checkout workflow remains available for development and for
|
|
86
|
+
Claude Code:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
bin/brida
|
|
90
|
+
bin/brida --runtime claude
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
From a checkout, `brida --help` and `brida --version` report Brida itself; a
|
|
94
|
+
checkout has no project state to launch into. Name a runtime to reach its own
|
|
95
|
+
help instead, with `brida --runtime codex --help` or `bin/brida-codex --help`.
|
|
96
|
+
|
|
97
|
+
Checkout mode uses package-owned `bin/brida-*` wrappers. Installed-project mode
|
|
98
|
+
does not. Coordinator defaults and worker routes are settings-driven, so the
|
|
99
|
+
coordinator and implementation, review, planning, or scan workers may use
|
|
100
|
+
different runtimes. See the [model-routing guide](docs/guides/model-routing.md)
|
|
101
|
+
to change defaults, select a named route, or use a one-off override.
|
|
102
|
+
|
|
103
|
+
The `brida-codex` and `brida-claude` console commands installed by `brichan`
|
|
104
|
+
remain checkout-oriented: `brida-codex` resolves coordinator routing from a
|
|
105
|
+
Brida source checkout (or `BRIDA_ROOT`) or from an already-initialized
|
|
106
|
+
project's `.brida/` state, while `brida-claude` resolves only from a checkout
|
|
107
|
+
or `BRIDA_ROOT`. Both are for development and checkout use, not standalone
|
|
108
|
+
installed-project launches. `--help`/`--version` work from any directory; the
|
|
109
|
+
[installed Codex dogfood guide](docs/guides/installable-dogfood.md) has the
|
|
110
|
+
exact boundary.
|
|
111
|
+
|
|
112
|
+
## How it works
|
|
113
|
+
|
|
114
|
+
1. You describe the outcome and constraints.
|
|
115
|
+
2. Brida reads only the project context needed for that work.
|
|
116
|
+
3. Brida gives bounded tasks to independent workers through Herdr.
|
|
117
|
+
4. Brida verifies results, records decisions and status, then reports back.
|
|
118
|
+
|
|
119
|
+
Herdr is the worker control plane. Native runtime delegation stays disabled so
|
|
120
|
+
worker ownership, evidence, and cleanup remain visible.
|
|
121
|
+
|
|
122
|
+
Project context lives in `projects/<project-slug>/` as a small set of Markdown
|
|
123
|
+
files for overview, current state, tasks, decisions, and references. Read the
|
|
124
|
+
[project memory policy](docs/policy/memory-policy.md) for the contract.
|
|
125
|
+
|
|
126
|
+
## Development
|
|
127
|
+
|
|
128
|
+
Run the complete local validation suite before sharing a change:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
make check
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
You can also run individual layers while iterating:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
make test-unit
|
|
138
|
+
make test-contract
|
|
139
|
+
make test-integration
|
|
140
|
+
make package-check
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The importable implementation is in `src/brida/`; stable command wrappers are
|
|
144
|
+
in `bin/` and `scripts/`. See [CONTRIBUTING.md](CONTRIBUTING.md) for the change
|
|
145
|
+
workflow and [the repository layout](docs/architecture/repository-layout.md)
|
|
146
|
+
for module boundaries.
|
|
147
|
+
|
|
148
|
+
## Learn more
|
|
149
|
+
|
|
150
|
+
- [Model routing and worker launch settings](docs/guides/model-routing.md)
|
|
151
|
+
- [Installed Codex dogfood](docs/guides/installable-dogfood.md)
|
|
152
|
+
- [Documentation index](docs/index.md)
|
|
153
|
+
- [Operating principles](docs/policy/operating-principles.md)
|
|
154
|
+
- [Security policy](SECURITY.md)
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
Brida is available under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Brichan
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/brichan/)
|
|
4
|
+
[](https://pypi.org/project/brichan/)
|
|
5
|
+
[](https://pypi.org/project/brichan/)
|
|
6
|
+
|
|
7
|
+
Coding agents are very good at the work in front of them and very bad at
|
|
8
|
+
remembering why it was asked for. Context lives in a chat window, so it is lost
|
|
9
|
+
when the window closes; decisions are re-litigated, status is reconstructed from
|
|
10
|
+
memory, and the record of what was actually verified never outlives the session.
|
|
11
|
+
Running several agents at once makes this worse, not better, because nothing
|
|
12
|
+
owns the state between them.
|
|
13
|
+
|
|
14
|
+
This package introduces an AI Chief of Staff that sits above the coding agent
|
|
15
|
+
rather than inside it. You give it a project goal; it keeps only the context
|
|
16
|
+
that goal needs, hands bounded tasks to independent workers, checks the evidence
|
|
17
|
+
they return, and records decisions and status as files in your repository —
|
|
18
|
+
outside chat, where they survive the session.
|
|
19
|
+
|
|
20
|
+
The distribution is named `brichan`. The importable package stays `brida`, and
|
|
21
|
+
every console command keeps its existing `brida` / `brida-*` name.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
### PyPI
|
|
26
|
+
|
|
27
|
+
To install Brichan, simply:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
$ pip install brichan
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Brichan runs on POSIX-compatible systems with Python 3.10 or newer. It has no
|
|
34
|
+
runtime dependencies.
|
|
35
|
+
|
|
36
|
+
### From source
|
|
37
|
+
|
|
38
|
+
The repository ships an installer that builds a wheel and installs every console
|
|
39
|
+
command into a dedicated environment. It can be invoked from any directory and
|
|
40
|
+
does not activate or modify your project's virtual environment:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
$ /absolute/path/to/brida/scripts/install-brida
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
By default it creates an environment at `$HOME/.local/share/brida/venv` and
|
|
47
|
+
command symlinks in `$HOME/.local/bin`, selecting an available Python 3.10+
|
|
48
|
+
interpreter with `pip`, `setuptools`, `venv`, and `wheel`. If the command
|
|
49
|
+
directory is not on `PATH`, the installer prints the exact export to add to your
|
|
50
|
+
shell profile.
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
Brichan operates on an existing top-level Git repository. Initialization
|
|
55
|
+
defaults to a dry run and performs zero writes, so you can preview the complete
|
|
56
|
+
footprint before anything is created:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
$ brida init --project /absolute/path/to/repository
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Once the footprint looks right, apply it:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
$ brida init --apply --project /absolute/path/to/repository
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This creates only a versioned `.brida/` directory holding managed policy, model
|
|
69
|
+
routing, Herdr skill resources, and mutable project memory. Repeating it against
|
|
70
|
+
healthy state is idempotent. Your `AGENTS.md`, `CLAUDE.md`, `.codex/`, and
|
|
71
|
+
provider configuration are left untouched.
|
|
72
|
+
|
|
73
|
+
Diagnose and launch from any directory by naming the target explicitly:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
$ brida status --project /absolute/path/to/repository
|
|
77
|
+
$ brida doctor --project /absolute/path/to/repository
|
|
78
|
+
$ brida run --project /absolute/path/to/repository -- <codex arguments>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
From inside a healthy initialized repository, bare `brida` launches Codex
|
|
82
|
+
directly:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
$ brida
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Arguments after `--` are forwarded to Codex. Option-looking text after `--` is
|
|
89
|
+
treated as literal prompt content, so a prompt beginning with a dash cannot
|
|
90
|
+
silently become a flag:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
$ brida run --project /absolute/path/to/repository -- --review the auth module
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Before the `--`, Brichan rejects native delegation, permission bypasses,
|
|
97
|
+
cwd/scope widening, profiles, remote execution, and arbitrary Codex
|
|
98
|
+
configuration. State diagnostics reject malformed, dangling, symlinked,
|
|
99
|
+
inaccessible, or incompatible `.brida/` state rather than silently repairing it.
|
|
100
|
+
Schema v1 has no automatic migration: a package-version change requires
|
|
101
|
+
deliberate backup and reinitialization.
|
|
102
|
+
|
|
103
|
+
### Coordinating workers
|
|
104
|
+
|
|
105
|
+
Herdr is the worker control plane. Native runtime delegation stays disabled so
|
|
106
|
+
worker ownership, evidence, and cleanup remain visible:
|
|
107
|
+
|
|
108
|
+
1. You describe the outcome and constraints.
|
|
109
|
+
2. Brichan reads only the project context that work needs.
|
|
110
|
+
3. Brichan gives bounded tasks to independent workers through Herdr.
|
|
111
|
+
4. Brichan verifies the results, records decisions and status, then reports back.
|
|
112
|
+
|
|
113
|
+
Herdr is needed only when Brichan coordinates independent worker sessions.
|
|
114
|
+
Project context is written to `projects/<project-slug>/` as a small set of
|
|
115
|
+
Markdown files covering overview, current state, tasks, decisions, and
|
|
116
|
+
references.
|
|
117
|
+
|
|
118
|
+
Coordinator defaults and worker routes are settings-driven, so the coordinator
|
|
119
|
+
and the implementation, review, planning, or scan workers may each use a
|
|
120
|
+
different runtime.
|
|
121
|
+
|
|
122
|
+
### Other console commands
|
|
123
|
+
|
|
124
|
+
Installing `brichan` also provides:
|
|
125
|
+
|
|
126
|
+
- `brida-codex` — resolves coordinator routing from a Brida source checkout (or
|
|
127
|
+
`BRIDA_ROOT`), or from an already-initialized project's `.brida/` state.
|
|
128
|
+
- `brida-claude` — resolves only from a checkout or `BRIDA_ROOT`.
|
|
129
|
+
- `brida-herdr-agent-start` — starts a Herdr worker session.
|
|
130
|
+
- `brida-validate-receipts` — validates canonical handoff receipts.
|
|
131
|
+
|
|
132
|
+
`brida-codex` and `brida-claude` are checkout-oriented and intended for
|
|
133
|
+
development, not standalone installed-project launches. `--help` and `--version`
|
|
134
|
+
work from any directory.
|
|
135
|
+
|
|
136
|
+
## Contributing
|
|
137
|
+
|
|
138
|
+
1. Fork it (https://github.com/minhtran3124/Brichan/fork)
|
|
139
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
140
|
+
3. Run the validation suite (`make check`)
|
|
141
|
+
4. Commit your changes (`git commit -am 'Add some feature'`)
|
|
142
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
|
143
|
+
6. Create a new Pull Request
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
Brichan is available under the [MIT License](https://opensource.org/licenses/MIT).
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "brichan"
|
|
7
|
+
version = "0.6.0"
|
|
8
|
+
description = "Repository-native AI Chief of Staff orchestration"
|
|
9
|
+
# Generated from README.md by scripts/build_pypi_readme.py; see that module
|
|
10
|
+
# for why the published description cannot just be README.md.
|
|
11
|
+
readme = "README_PYPI.md"
|
|
12
|
+
requires-python = ">=3.10"
|
|
13
|
+
license = {file = "LICENSE"}
|
|
14
|
+
authors = [{name = "Minh Tran"}]
|
|
15
|
+
keywords = ["ai", "orchestration", "codex", "claude-code", "chief-of-staff"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: POSIX",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Topic :: Software Development :: Build Tools",
|
|
28
|
+
]
|
|
29
|
+
dependencies = []
|
|
30
|
+
|
|
31
|
+
[project.scripts]
|
|
32
|
+
brida = "brida.cli.runtime:main"
|
|
33
|
+
brida-codex = "brida.cli.codex:main"
|
|
34
|
+
brida-claude = "brida.cli.claude:main"
|
|
35
|
+
brida-herdr-agent-start = "brida.orchestration.worker_launch:main"
|
|
36
|
+
brida-validate-receipts = "brida.contracts.receipts.validation:main"
|
|
37
|
+
|
|
38
|
+
[tool.setuptools]
|
|
39
|
+
package-dir = {"" = "src"}
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.packages.find]
|
|
42
|
+
where = ["src"]
|
|
43
|
+
|
|
44
|
+
[tool.setuptools.package-data]
|
|
45
|
+
"brida.resources.dogfood_v1" = ["**/*"]
|
brichan-0.6.0/setup.cfg
ADDED