Skip to content

Commit 1461c4a

Browse files
committed
chore: update harness context to v0.33.0
1 parent 4a9dd3e commit 1461c4a

17 files changed

Lines changed: 1503 additions & 25 deletions

.harness-backup/AGENTS.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<!-- HARNESS:START
2+
version=0.31.0
3+
schema=1
4+
updated=2026-07-04T02:31:42Z
5+
DO NOT EDIT THIS BLOCK — regenerate with: harness-ctl update /Users/patrickbertsch/dev/tqai
6+
-->
7+
8+
# Agents — Harness Configuration
9+
10+
**Harness endpoint:** `http://127.0.0.1:7700`
11+
**Registration:** `POST http://127.0.0.1:7700/harness/register` with `X-Harness-Register-Secret`
12+
**Protocol:** MCP 2025-06-18 (JSON-RPC 2.0 over HTTP)
13+
14+
## This project's agent
15+
16+
| Field | Value |
17+
|---|---|
18+
| Agent ID | `tqai` |
19+
| Trust level | `worker` |
20+
| Model tier | `mid``claude-sonnet-4-6` |
21+
| Privacy tier | `local_preferred` |
22+
| Memory namespace | `tqai-worker` |
23+
| Max steps / session | 40 |
24+
| Max cost / session | $3.00 |
25+
| Session token TTL | 15 minutes (re-register to refresh) |
26+
27+
## All registered agents (harness fleet)
28+
29+
30+
## Delegation rules
31+
32+
Agents can delegate tasks to peers via A2A (`POST http://127.0.0.1:7700/a2a/tasks`).
33+
Delegation **narrows** authority — a worker cannot delegate to an orchestrator.
34+
35+
```
36+
orchestrator → can delegate to → worker, ephemeral
37+
worker → can delegate to → ephemeral
38+
ephemeral → cannot delegate
39+
```
40+
41+
This agent (`tqai`, trust: `worker`) can delegate to:
42+
43+
- `ephemeral`
44+
45+
46+
47+
## HITL workflow
48+
49+
Actions in `must_escalate` block execution until a human approves:
50+
51+
1. Call triggers → harness returns a HITL token (HTTP 200, not an error)
52+
2. Slack DM sent to `@here` (if configured) with approve/deny link
53+
3. Human runs: `harness-ctl hitl approve <token>` or `harness-ctl hitl deny <token>`
54+
4. On approve → original tool call executes, result returned to agent
55+
5. On deny / 30-min timeout → call fails with `hitl_denied`
56+
57+
Check pending approvals: `harness-ctl pending`
58+
59+
## Working on this project
60+
61+
1. **Start from `CLAUDE.md`** at the project root — it is the canonical
62+
entry point for every task/session, listing this agent's active
63+
constraints and where to look next.
64+
65+
3. Reference docs, regenerated by `harness-ctl update`:
66+
- `harness/TOOLS.md` — full tool schemas and error cases
67+
- `harness/SECURITY.md` — threat model and controls
68+
- `harness/WORKFLOWS.md` — operational patterns, HITL gates, delegation
69+
- `harness/ARCHITECTURE.md` — project structure and dependencies
70+
- `harness/TESTING.md` — test commands and coverage targets
71+
- `harness/INFRASTRUCTURE.md` — deploy targets and environments
72+
73+
74+
## Session lifecycle
75+
76+
```
77+
1. Register POST /harness/register → sessionToken (15 min)
78+
2. Call tools POST /mcp → tools/list, tools/call
79+
3. Run LLM POST /harness/run → routed inference
80+
4. Delegate POST /a2a/tasks → peer agent task
81+
5. Re-register when token expires (budget resets on each new session)
82+
```
83+
84+
<!-- HARNESS:END -->
85+
86+
---
87+
88+
89+
<!-- Add your project-specific agent workflow, stage definitions, and
90+
business rules below. The harness block above is managed automatically. -->
91+

.harness-backup/CHANGELOG.md

Lines changed: 473 additions & 0 deletions
Large diffs are not rendered by default.

.harness-backup/CLAUDE.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Harness — Tqai
2+
3+
**Agent:** `tqai` · trust: `worker` · model: `mid`
4+
**Project root:** `~/dev/tqai`
5+
**Remote:** `https://github.com/AlphaWaveSystems/tqai`
6+
**Stack:** `Python`
7+
8+
## Startup
9+
10+
Before working:
11+
1. Read this file
12+
2. `cd ~/dev/tqai`
13+
3. Run verification: `pytest && ruff check .`
14+
4. Check `git status` and `git log --oneline -10`
15+
16+
## Working rules
17+
18+
- Branch names: `feat/tqai`, `fix/tqai`, `chore/tqai`
19+
- Always work in a git worktree: `git worktree add .worktrees/<branch> -b <branch>`
20+
- Stage specific files only — never `git add .`
21+
- Commit format: `type: description` (feat/fix/chore/refactor/docs)
22+
- PRs required for all merges — no direct commits to main/master
23+
- Run verification before every commit
24+
25+
## Verification
26+
27+
```bash
28+
pytest && ruff check .
29+
```
30+
31+
## Definition of done
32+
33+
- [ ] Implementation complete and verified
34+
- [ ] Tests pass
35+
- [ ] PR created (or commit staged if no remote)
36+
- [ ] No regressions in adjacent features
37+
38+
## Guardrails
39+
40+
Bounded autonomy. Escalate deploys and spend to Zeus.

.harness-backup/CODE_OF_CONDUCT.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to a positive environment:
15+
16+
* Using welcoming and inclusive language
17+
* Being respectful of differing viewpoints and experiences
18+
* Gracefully accepting constructive criticism
19+
* Focusing on what is best for the community
20+
* Showing empathy towards other community members
21+
22+
Examples of unacceptable behavior:
23+
24+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
25+
* Trolling, insulting or derogatory comments, and personal or political attacks
26+
* Public or private harassment
27+
* Publishing others' private information without explicit permission
28+
* Other conduct which could reasonably be considered inappropriate in a professional setting
29+
30+
## Enforcement
31+
32+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
33+
reported to the project maintainers at **github@alphawavesystems.com**.
34+
35+
All complaints will be reviewed and investigated promptly and fairly.
36+
37+
## Attribution
38+
39+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.

.harness-backup/CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Contributing to tqai
2+
3+
Thank you for your interest in contributing to tqai! This guide explains how to get involved.
4+
5+
## Reporting Bugs
6+
7+
Open an issue on [GitHub Issues](https://github.com/AlphaWaveSystems/tqai/issues) with:
8+
9+
- A clear, descriptive title
10+
- Steps to reproduce the problem
11+
- Expected vs actual behavior
12+
- tqai version (`tqai info`), OS, Python version
13+
- Model ID and backend (torch/mlx) you were using
14+
15+
## Pull Request Flow
16+
17+
1. **Fork** the repository on GitHub
18+
2. **Branch** from `main` — use a descriptive name (e.g., `fix/dtype-mismatch`, `feat/bit-packing`)
19+
3. **Develop** your changes following the code style guidelines below
20+
4. **Test** your changes (see Testing section)
21+
5. **Submit a PR** against `main` with a clear description of what and why
22+
23+
Keep PRs focused on a single concern. If you have multiple unrelated changes, submit separate PRs.
24+
25+
## Code Style
26+
27+
- **Linting**: Run `ruff check .` before committing
28+
- **Formatting**: Follow PEP 8, 100-char line length
29+
- **Imports**: Sorted by ruff (isort compatible)
30+
- **Types**: Use type hints for public API functions
31+
32+
## DCO Sign-Off
33+
34+
All commits must include a Developer Certificate of Origin sign-off line:
35+
36+
```
37+
Signed-off-by: Your Name <your@email.com>
38+
```
39+
40+
Add this automatically with:
41+
42+
```bash
43+
git commit -s -m "Your commit message"
44+
```
45+
46+
This certifies that you wrote or have the right to submit the code under the project's license. See [developercertificate.org](https://developercertificate.org/) for the full text.
47+
48+
## Testing
49+
50+
Before submitting a PR, run the test suite:
51+
52+
```bash
53+
# Install dev dependencies
54+
pip install -e ".[dev]"
55+
56+
# Run unit + accuracy tests
57+
pytest tests/ --ignore=tests/test_e2e_models.py --ignore=tests/test_e2e_large_models.py
58+
59+
# Run linter
60+
ruff check .
61+
```
62+
63+
For changes to the quantizer or cache, also run the accuracy tests:
64+
65+
```bash
66+
pytest tests/test_accuracy.py -v
67+
```
68+
69+
## Adding Support for New Head Dimensions
70+
71+
If you need codebooks for a head dimension not in `{64, 96, 128, 256}`:
72+
73+
```bash
74+
pip install tqai[codegen]
75+
python scripts/generate_codebooks.py
76+
```
77+
78+
## Architecture Overview
79+
80+
- `src/tqai/quantizer.py` — Core PolarQuantizer algorithm
81+
- `src/tqai/backend/` — PyTorch + MLX abstraction (Protocol-based)
82+
- `src/tqai/codebook/` — Lloyd-Max codebook generation and loading
83+
- `src/tqai/cache/` — HuggingFace and mlx-lm cache wrappers
84+
- `src/tqai/cli.py` — CLI tool
85+
- `src/tqai/convert.py` — Offline model conversion
86+
87+
## License
88+
89+
By contributing to tqai, you agree that your contributions will be licensed under the MIT License.

0 commit comments

Comments
 (0)