mirror of
https://github.com/bleak-ai/gcontext.git
synced 2026-08-11 13:19:23 +02:00
One name per role: src/gcontext moves to gcontext/ (flat layout), the
instructions files split into framework-instructions.md (G0) and the
project's agent.md (G1). Adds the built-in describe-first setup prompt,
state files as MCP resources (gcontext://<path>), and --version.
Exec: run_script splits into run_script and run_adhoc_script; results are
plain readable text with a status line, output_schema=None on all six
tools kills the {"result": ...} wrapper. 100k-char stream caps.
Writes: connection.yaml is agent-writable (only secrets.env stays
blocked), write_file returns a unified diff and warns on index.md drift,
and the instructions require user approval before every write. New
learn-from-errors rule records fail-then-fix lessons where they belong.
Fixes: secrets.load() strips surrounding quotes (quoted tokens caused
misleading 401s). Tests: 61 passing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Examples
Complete agent folders you can serve directly or copy pieces from. gcontext init scaffolds a minimal folder; these show what a grown one looks like.
ops-agent
An operations agent for a fictional SaaS company. It shows every part of the folder model in use:
connections/stripe/,connections/cloudflare/: connection config plus API context docsmodules/company/: a knowledge module (team, infrastructure)modules/support-workflow/: a process module with steps, empty playbooks and logs that fill up with usearchive/modules/legacy-audit/: an archived module, out of every scan but still readable by path
Run it:
cp examples/ops-agent/secrets.env.example examples/ops-agent/secrets.env # fill in real values, or leave placeholders
gcontext up examples/ops-agent
Without real secret values everything still works except run_script calls against the live APIs; gcontext status shows which secrets are missing.