harness-gardening

Detects and repairs drift between harness-generated documentation and actual project state.

840|261|Updated Apr 18, 2019
One-click install
npx skills add https://github.com/TencentBlueKing/bk-bcs --skill harness-gardening
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harness-gardening
Source: https://github.com/TencentBlueKing/bk-bcs/tree/main/.agents/skills/harness-engineering/harness-gardening
Command: npx skills add https://github.com/TencentBlueKing/bk-bcs --skill harness-gardening

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Over time, project documentation such as AGENTS.md, docs/harness/, docs/standards/, and glossaries drifts out of sync with the actual codebase as files are renamed, skills are added, and architectures evolve. This Skill continuously audits that documentation against the real project state and fixes deterministic deviations automatically.

Core Features & Use Cases

  • Three scan modes: PR lightweight checks triggered by changed files, full twelve-dimension deep scans, and targeted single-dimension inspections.
  • Graded remediation: P0 deviations (renamed paths, stale skill lists, standards preset drift) are auto-fixed and committed; P1 semantic deviations are proposed to the user for confirmation before fixing.
  • Twelve detection dimensions: path validity, skill manifest consistency, architecture descriptions, standards preset sync, glossary completeness, directory structure, tool dependencies, dev-map/IDE integration, workflow residue cleanup, business standards, standards rules, and AGENTS project memory preservation.
  • Use Case: After a PR renames a directory and adds a new skill, run a PR-mode scan to automatically update all documentation references, register the new skill in tooling.md, and commit the fixes with a gardening report.

Quick Start

Ask the agent to run a full harness-gardening scan of the current repository to detect and fix documentation drift.

Frequently Asked Questions about harness-gardening

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

FAQPage Schema
How do I keep AGENTS.md and project documentation in sync with code changes?

Run harness-gardening in PR mode after code changes. It diffs changed files, infers which of the twelve detection dimensions are affected, auto-fixes deterministic drift like renamed paths, and commits the updates with a gardening report.

What is the difference between PR mode, full mode, and targeted mode?

PR mode checks only dimensions affected by changed files and can auto-upgrade to full scan. Full mode runs all twelve dimensions against every harness document. Targeted mode runs one chosen dimension, such as paths, skills, or standards, against a specific component.

How does the P0 versus P1 classification work for documentation fixes?

P0 deviations are deterministic and unambiguous, like broken paths or missing skill entries, and are auto-fixed and committed. P1 deviations require human judgment, such as architecture description mismatches, and are proposed to the user for confirmation before being applied.

Can harness-gardening restore deleted files referenced in documentation?

No. When a referenced path was deleted from the working tree, it is treated as a P1 deviation. The skill only updates documentation references or proposes options, and never runs git checkout or git restore to bring deleted files back unless the user explicitly confirms restoration.

What prerequisites are needed before running a documentation consistency scan?

The target project must already have harness-generating outputs, meaning an AGENTS.md and docs/harness/ directory must exist. The skill then auto-configures .gitattributes merge drivers and determines the report path and diff baseline via its setup scripts.