Commit Graph

46 Commits

Author SHA1 Message Date
Dhanji R. Prasanna
74c2671e1b docs: Update documentation for Agent Skills system
Document the new Skills system introduced in recent commits:

- docs/architecture.md: Add Skills System section with discovery
  priority, embedded skills, script extraction, and key types
- docs/skills.md: New comprehensive guide covering SKILL.md format,
  discovery priority, embedded skills, research skill usage, and
  troubleshooting
- README.md: Update Agent Skills section with correct priority order,
  add embedded skills info, research skill usage, and link to Skills
  Guide in Documentation Map
- AGENTS.md: Add skill creation to Adding Features, skill extraction
  to Dangerous Code Paths, and new Skills System Entry Points section

All documentation links validated - no broken links or orphan files.

Agent: lamport
2026-02-05 14:26:26 +11:00
Dhanji R. Prasanna
a5f6475603 feat: implement Agent Skills specification support
Implements the Agent Skills specification (https://agentskills.io) for
portable skill packages that give the agent new capabilities.

Changes:
- Add skills module with SKILL.md parser (YAML frontmatter + markdown body)
- Implement skill discovery from ~/.g3/skills/, config extra_paths, and .g3/skills/
- Generate <available_skills> XML for system prompt injection
- Add SkillsConfig to g3-config with enabled flag and extra_paths
- Wire skills discovery into CLI startup
- Add 29 unit tests for parser, discovery, and prompt generation
- Update README with Agent Skills documentation

Skill locations (priority order):
1. ~/.g3/skills/ (global)
2. Config extra_paths
3. .g3/skills/ (workspace, highest priority)

At startup, g3 scans skill directories and injects a summary into the
system prompt. When the agent needs a skill, it reads the full SKILL.md
using the read_file tool.
2026-02-04 12:58:57 +11:00
Dhanji R. Prasanna
51d22b3282 gemini model perf 2026-01-30 10:09:46 +11:00
Dhanji R. Prasanna
8191a5e8e6 feat(embedded): add GLM tool format adapter for code fence stripping
GLM-4 models wrap tool calls in markdown code fences and inline backticks,
which prevents the streaming parser from detecting them. This adapter:

- Strips ```json and ``` code fence markers during streaming
- Strips inline backticks from tool call JSON
- Handles chunked streaming correctly (buffers potential fence lines)
- Transforms GLM native format (<|assistant|>tool_name) to g3 JSON format

Also refactors embedded provider into module structure:
- embedded/mod.rs - module exports
- embedded/provider.rs - main EmbeddedProvider (moved from embedded.rs)
- embedded/adapters/mod.rs - ToolFormatAdapter trait
- embedded/adapters/glm.rs - GLM-specific adapter

Includes 22 unit tests covering edge cases like nested JSON in strings,
chunk boundary handling, and false pattern detection.

Updates README to show GLM-4 9B now works () for agentic tasks.
2026-01-29 12:52:09 +11:00
Dhanji R. Prasanna
bd4473b75f model performance tweaks to readme 2026-01-29 11:31:29 +11:00
Dhanji R. Prasanna
570a824780 Rename archivist agent to huffman
Named after David Huffman, inventor of Huffman coding -
compression that preserves information with fewer bits.

Fits the agent's purpose: compact memory, preserve semantics.
2026-01-29 11:22:59 +11:00
Dhanji R. Prasanna
627dd45966 Add archivist to built-in agents list in README 2026-01-29 11:20:23 +11:00
Dhanji R. Prasanna
7bfb9efa19 Remove automatic README loading from context window
README.md is no longer auto-loaded into the LLM context at startup.
This saves ~4,600 tokens per session while AGENTS.md and memory.md
still provide all critical information for code tasks.

Changes:
- Delete read_project_readme() function
- Remove readme_content parameter from combine_project_content()
- Rename extract_readme_heading() -> extract_project_heading()
- Rename Agent constructors: *_with_readme_* -> *_with_project_context_*
- Update context preservation to only check for Agent Configuration
- Remove has_readme field from LoadedContent
- Update all tests to use new markers and function names

The LLM can still read README.md on-demand via read_file when needed.
2026-01-29 11:07:41 +11:00
Dhanji R. Prasanna
05d253ee2a docs: add embedded model performance comparison for agentic tasks
Added a new section documenting local LLM performance on complex agentic
tasks (comic book repacking test case). Includes:

- Cloud model baseline (Claude Opus 4.5, Sonnet 4.5, Claude 4 family)
- Local model ratings (Qwen3-32B, Qwen3-14B, GLM-4 9B, Qwen3-4B)
- Key findings about MoE vs dense models
- Configuration example for embedded providers
2026-01-29 10:33:53 +11:00
Dhanji R. Prasanna
03143ec7f8 Agent Mode Enhancements
• Agent prompts are now embedded within the g3 binary
• README.md - Added new "Agent Mode" section documenting:
  • All 7 built-in agents with their focus areas
  • Usage examples (--list-agents, --agent <name>)
  • How to create custom workspace agents

Behavior
1. Workspace agents take priority - If agents/<name>.md exists in the workspace, it's used
2. Embedded fallback - If no workspace agent exists, the embedded version is used
3. Portability - g3 binary now works on any repo without needing the agents/ directory
4. Discoverability - g3 --list-agents shows all available agents and their source
2026-01-14 16:27:03 +05:30
Dhanji R. Prasanna
c2f96d7048 Make WebDriver and Chrome headless enabled by default
- webdriver flag now defaults to true (tools always available)
- chrome_headless flag now defaults to true (Chrome is default browser)
- Use --safari flag to override and use Safari instead
- Updated README documentation to reflect new defaults
2026-01-13 21:14:52 +05:30
Dhanji R. Prasanna
562c4199f8 docs: Add Studio documentation and UTF-8 safety invariants
README.md:
- Add Studio section documenting the multi-agent workspace manager
- Document usage: run, list, status, accept, discard commands
- Explain worktree-based isolation and workflow

AGENTS.md:
- Add UTF-8 safe string slicing as critical invariant (#8)
- Add MUST NOT for byte-index slicing on multi-byte text (#5)
- Document parser sanitization as dangerous/subtle code path
  (prevents parser poisoning from inline tool-call JSON patterns)

Agent: lamport
2026-01-13 15:31:01 +05:30
Dhanji R. Prasanna
9a3b03a41f Remove flock mode (superseded by studio)
Flock mode has been superseded by the studio multi-agent workspace manager.

Changes:
- Remove g3-ensembles crate entirely
- Remove --project, --flock-workspace, --segments, --flock-max-turns CLI flags
- Remove run_flock_mode() from autonomous.rs
- Remove flock-related tests from cli_integration_test.rs
- Update README.md, docs/architecture.md, analysis/memory.md
- Delete docs/FLOCK_MODE.md
2026-01-13 15:01:12 +05:30
Dhanji R. Prasanna
f6b84d864a Rename G3 -> g3 in docs and comments
Standardize project name to lowercase 'g3' throughout documentation,
comments, and configuration files. Environment variables (G3_*) are
unchanged as they follow the uppercase convention.
2026-01-13 14:36:33 +05:30
Dhanji R. Prasanna
be54032cd8 docs: Fix documentation inaccuracies and add missing tool documentation
Agent: lamport

Changes:
- docs/architecture.md: Replace non-existent g3-console with studio crate,
  remove references to non-existent retro_tui.rs, update g3-cli module list
  to reflect actual source files, fix execution modes list
- docs/tools.md: Add missing Research & Memory Tools section documenting
  research, remember, and rehydrate tools with examples and notes
- AGENTS.md: Fix error logs path from logs/errors/ to .g3/errors/
- README.md: Remove references to non-existent CONTRIBUTING.md and LICENSE

All documentation links verified working.
2026-01-12 20:44:21 +05:30
Dhanji R. Prasanna
c2aa80647a Remove legacy logs/ directory, consolidate all data under .g3/
This change removes the legacy logs/ directory and consolidates all
session data, error logs, and discovery files under the .g3/ directory.

New directory structure:
- .g3/sessions/<session_id>/session.json - session logs
- .g3/errors/ - error logs (was logs/errors/)
- .g3/background_processes/ - background process logs
- .g3/discovery/ - planner discovery files (was workspace/logs/)

Changes:
- paths.rs: Remove get_logs_dir()/logs_dir(), add get_errors_dir(),
  get_background_processes_dir(), get_discovery_dir()
- session.rs: Anonymous sessions now use .g3/sessions/anonymous_<ts>/
- error_handling.rs: Errors now saved to .g3/errors/
- project.rs: Remove logs_dir() and ensure_logs_dir() methods
- feedback_extraction.rs: Remove logs_dir field and fallback logic
- planner: Use .g3/ for workspace data and .g3/discovery/ for reports
- flock.rs: Look for session metrics in .g3/sessions/
- coach_feedback.rs: Remove fallback to logs/ path
- Update all tests to use new paths
- Update README.md and .gitignore
2026-01-12 18:20:08 +05:30
Dhanji R. Prasanna
5bfaee8dd5 use consistent naming for compaction 2026-01-08 12:54:03 +11:00
Dhanji R. Prasanna
386176899e Remove vision tools (except take_screenshot) and macax tools
Vision tools removed:
- extract_text (OCR from image files)
- extract_text_with_boxes (OCR with bounding boxes)
- vision_find_text (find text in app windows)
- vision_click_text (find and click on text)
- vision_click_near_text (click near text labels)

macax tools removed:
- macax_list_apps
- macax_get_frontmost_app
- macax_activate_app
- macax_press_key
- macax_type_text

The LLM can now read images directly via read_image tool.
take_screenshot is retained for capturing application windows.

Files deleted:
- crates/g3-core/src/tools/vision.rs
- crates/g3-core/src/tools/macax.rs
- docs/macax-tools.md

Updated tool counts: 12 core + 15 webdriver = 27 total
2026-01-03 17:38:25 +11:00
Dhanji R. Prasanna
f7e2f38fe9 lamport run 2026-01-03 16:48:30 +11:00
Dhanji R. Prasanna
0b023b610f Update README with recent improvements
- Added section on Tool Call Duplicate Detection explaining the
  sequential-only duplicate prevention logic
- Added section on Timing Footer showing token usage and context %
- Updated Logging note to mention INFO->DEBUG conversion for cleaner CLI
2025-12-22 17:32:39 +11:00
Dhanji R. Prasanna
faa6512b1f Revert to Safari as default WebDriver browser
Chrome headless has too many issues:
- Session creation hangs when Chrome is already running
- Cloudflare and other bot protection blocks headless browsers
- Version mismatch issues between Chrome and ChromeDriver

Safari is more reliable for web automation on macOS.
Chrome headless is still available via --chrome-headless flag.
2025-12-16 12:36:18 +11:00
Dhanji R. Prasanna
81cba42c8d Add Chrome for Testing support for reliable WebDriver automation
- Add setup script (scripts/setup-chrome-for-testing.sh) that downloads
  matching Chrome and ChromeDriver versions from Google's CDN
- Add chrome_binary config option to specify custom Chrome binary path
- Update ChromeDriver to support custom binary via with_port_headless_and_binary()
- Update README with Chrome for Testing setup instructions
- Update config.example.toml with chrome_binary documentation

Chrome for Testing is Google's dedicated browser for automated testing
that guarantees version compatibility with ChromeDriver, avoiding the
common 'version mismatch' errors when Chrome auto-updates.
2025-12-15 17:02:30 +11:00
Dhanji R. Prasanna
3d1b86d24b Make Chrome headless the default WebDriver browser
- Add --safari flag to CLI for explicitly choosing Safari
- Update --chrome-headless flag description to indicate it's the default
- Update README to reflect Chrome headless as default
- Remove broken link to non-existent docs/webdriver-setup.md
- Add Safari flag handling in all webdriver config locations

The config already had ChromeHeadless as the default, this commit
updates the CLI and documentation to match.
2025-12-15 16:51:42 +11:00
Jochen
68fbc54812 Update README.md 2025-12-11 15:01:43 +11:00
Jochen
ff8b3e7c7b Implement planning mode 2025-12-09 17:03:53 +11:00
Dhanji R. Prasanna
678403da35 add a force thinnify cmd 2025-12-05 15:32:13 +11:00
Dhanji Prasanna
4cfa0147ca first cut of horizontal partitioning
# Conflicts:
#	Cargo.lock

# Conflicts:
#	Cargo.lock
#	crates/g3-cli/src/lib.rs
2025-11-26 17:12:07 +11:00
Dhanji Prasanna
aaf918828f g3 console initial cut + error doesnt kill auto 2025-11-07 09:27:13 +11:00
Dhanji R. Prasanna
fa38439a06 adding more languages to tree-sitter (java, go, cpp,..) 2025-11-05 14:07:50 +11:00
Dhanji R. Prasanna
f25a3d5e06 tree-sitter replaces ast-grep 2025-11-05 13:56:23 +11:00
Michael Neale
63c2aff7ba clearer 2025-10-29 14:47:25 +11:00
Michael Neale
45bffc40da coach player always when starting 2025-10-29 13:04:16 +11:00
Michael Neale
c1ce3038d8 will need this for it to work 2025-10-28 15:07:24 +11:00
Dhanji Prasanna
3ec65e38ee macax tools 2025-10-23 06:53:42 +11:00
Dhanji Prasanna
c5d6fbef08 control commands 2025-10-22 22:14:12 +11:00
Dhanji Prasanna
758e255af8 dont run safaridriver --enable each time 2025-10-21 16:00:58 +11:00
Dhanji Prasanna
2488cc54d5 docs: update README and DESIGN to reflect current project state
- Add g3-computer-control crate to architecture documentation
- Document all 13 tools including computer control and TODO management
- Add context thinning feature documentation (50-80% thresholds)
- Update tool ecosystem section with complete tool list
- Remove broken link to non-existent COMPUTER_CONTROL.md
- Update workspace count from 5 to 6 crates
- Add platform-specific implementation details for computer control
- Document OCR support via Tesseract
- Clarify setup instructions for computer control features
2025-10-20 15:03:22 +11:00
Dhanji Prasanna
da652bf287 computer control tools 2025-10-18 14:16:50 +11:00
Dhanji Prasanna
b9679e14dc force update of head 2025-10-01 14:12:23 +10:00
Dhanji Prasanna
5f642061de error handling in autonomous mode 2025-10-01 11:01:23 +10:00
Dhanji Prasanna
f0ddfdc3d2 move logs into subdir 2025-09-30 22:29:49 +10:00
Dhanji Prasanna
3c4da6f974 update readme 2025-09-30 14:00:04 +10:00
Dhanji R. Prasanna
826c0120fe Update README.md 2025-09-18 14:29:05 +10:00
Dhanji Prasanna
fa34755851 tool calling support for anthropic 2025-09-15 09:07:12 +10:00
Dhanji Prasanna
1834b8946c embedded model support 2025-09-15 09:07:12 +10:00
Dhanji Prasanna
57626042a9 initial import 2025-09-15 09:07:09 +10:00