feat(skill): add git operation skills #300

Closed
opened 2026-02-22 23:41:04 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit: feat(skill): add git operation skills
  • Branch: feature/m3-skill-git

Subtasks

  • Implement read-only git tools (status, diff, log, blame per spec) for sandboxed repos.
  • Register git tools in Tool Registry with read-only capability metadata.
  • Add path guards to ensure git tools only run inside sandbox root.
  • Normalize git command output (strip color, set GIT_PAGER=cat) for deterministic tests.
  • Add safe environment variables for git execution (disable prompts, set safe.directory).
  • Add error mapping for common git failures (not a repo, detached HEAD) with explicit messages.
  • Add docs/reference/skills_git.md clarifying no destructive ops in MVP.
  • Document environment variables and safety settings for git tool execution.
  • Tests (Behave): Add features/git_tools.feature for git tool outputs (16 scenarios).
  • Tests (Robot): Add robot/tool_git_builtins.robot for git tool integration (5 tests).
  • Tests (ASV): Add benchmarks/git_tool_bench.py for diff/log performance.
  • Verify coverage >=97% via nox -s coverage_report. Coverage: 97.1%.
  • Run nox (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.

Section: ### Section 5: Actors, Skills & Tool Execution [WORKSTREAM C - Aditya Lead]
Status: Completed

## Metadata - **Commit**: `feat(skill): add git operation skills` - **Branch**: `feature/m3-skill-git` ## Subtasks - [x] Implement read-only git tools (status, diff, log, blame per spec) for sandboxed repos. - [x] Register git tools in Tool Registry with read-only capability metadata. - [x] Add path guards to ensure git tools only run inside sandbox root. - [x] Normalize git command output (strip color, set `GIT_PAGER=cat`) for deterministic tests. - [x] Add safe environment variables for git execution (disable prompts, set safe.directory). - [x] Add error mapping for common git failures (not a repo, detached HEAD) with explicit messages. - [x] Add `docs/reference/skills_git.md` clarifying no destructive ops in MVP. - [x] Document environment variables and safety settings for git tool execution. - [x] Tests (Behave): Add `features/git_tools.feature` for git tool outputs (16 scenarios). - [x] Tests (Robot): Add `robot/tool_git_builtins.robot` for git tool integration (5 tests). - [x] Tests (ASV): Add `benchmarks/git_tool_bench.py` for diff/log performance. - [x] Verify coverage >=97% via `nox -s coverage_report`. Coverage: 97.1%. - [x] Run `nox` (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it. **Section**: ### Section 5: Actors, Skills & Tool Execution [WORKSTREAM C - Aditya Lead] **Status**: Completed
freemo added this to the v3.1.0 milestone 2026-02-22 23:41:04 +00:00
Author
Owner

Implementation Notes — C4.git: Git Operation Skills

2026-02-19: Stage C4.git COMMIT Complete - Add git operation skills [Luis]

  • Created git_tools.py: 4 read-only git tools (status, diff, log, blame) with safe environment variables, path traversal guards, and user-friendly error mapping for 5 common git failure patterns.
  • 16 BDD scenarios, 5 integration smoke tests, 3 ASV benchmark suites.

(Migrated from docs/implementation-notes.md)

## Implementation Notes — C4.git: Git Operation Skills **2026-02-19**: Stage C4.git COMMIT Complete - Add git operation skills [Luis] - Created `git_tools.py`: 4 read-only git tools (status, diff, log, blame) with safe environment variables, path traversal guards, and user-friendly error mapping for 5 common git failure patterns. - 16 BDD scenarios, 5 integration smoke tests, 3 ASV benchmark suites. *(Migrated from `docs/implementation-notes.md`)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#354 Epic: Actor & Skill Schema + CLI (C0)
cleveragents/cleveragents-core
Depends on
#137 develop-luis-1
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#300
No description provided.