team-commit-and-workspace-audit

Audits git commits, staging areas, and pull requests for workspace boundary violations.

1|Updated Sep 1, 2026
One-click install
npx skills add https://github.com/nvtruongops/pi-guard --skill team-commit-and-workspace-audit-nvtruongops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: team-commit-and-workspace-audit
Source: https://github.com/nvtruongops/pi-guard/tree/main/.agents/skills/team-commit-and-workspace-audit
Command: npx skills add https://github.com/nvtruongops/pi-guard --skill team-commit-and-workspace-audit-nvtruongops

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Team members in the PI-Guard capstone project may accidentally commit files outside their assigned workspace directories or modify protected files, breaking repository governance rules. This Skill automates the detection and prevention of such violations across commits, staging areas, and pull requests. ## Core Features & Use Cases - Boundary Auditing: Verifies that each member (ducnq, vietpmh, phuongddd) only modifies files inside their own workspaces/<name>/ directory, flagging violations as WORKSPACE_BOUNDARY_VIOLATION. - Immutable File Protection: Blocks any edits to CAPSTONE PROJECT REGISTER.md and docs/fpt_capstone_guide/ at CRITICAL severity, even for the team leader. - Pre-Commit Automation: Installs a Git pre-commit hook via validate_local.py --install-hook that aborts non-compliant commits automatically. - Use Case: Before merging a pull request from a teammate, run the audit script with --commit-range origin/main..HEAD --author <name> to confirm every changed file stays within that member's workspace. ## Quick Start Ask the AI to audit the current staged changes for workspace boundary violations by running the audit script in staged mode.

Frequently Asked Questions about team-commit-and-workspace-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit git commits for unauthorized file changes?

Run the audit script with a mode flag such as --mode all, --mode staged, or --mode last_commit to scan working tree changes, staged files, or the most recent commit. Use --commit-range with --author to audit a specific member's pull request.

How to block commits that modify protected files with a pre-commit hook?

Install the hook once with python Final-Report/scripts/validate_local.py --install-hook. After that, every git commit automatically triggers validation, and Git aborts the commit if a violation is detected.

What happens when a workspace boundary violation is detected?

The commit is flagged as WORKSPACE_BOUNDARY_VIOLATION at ERROR severity, or IMMUTABLE_FILE_VIOLATION at CRITICAL severity for protected files. The fix is to run git restore on protected files or move offending files into the correct workspaces/<name>/ directory.

Can the team leader edit files outside the workspaces directory?

Yes, only the team leader (nvtruongops) may edit root-level directories like src/, docs/, and reports/. However, even the leader cannot modify CAPSTONE PROJECT REGISTER.md or anything under docs/fpt_capstone_guide/.

Why does the audit report UNAUTHORIZED_ROOT_EDIT?

This error appears when an unrecognized git account edits root directories like src/ or docs/. Fix it by configuring git config user.name correctly or moving the changes through your assigned workspace directory.