Skip to main content
Glama

ddflow_precommit

Generate a .pre-commit-config.yaml matched to your repository's stacks, with pinned hooks plus ddflow checks, so the pre-commit framework owns .git/hooks. Writes only if none exists.

Instructions

A .pre-commit-config.yaml proposed for THIS repository: the stacks it actually has (Python, shell, Docker, JS, Go, Rust; YAML/TOML/JSON files add their checks) mapped to pinned hooks, plus ddflow's own check-commit and check-msg as local hooks, so the pre-commit framework, not ddflow, owns .git/hooks/ (ddflow's own hooks, if installed, are named: remove them before pre-commit install, which would keep them as duplicates). Proposes; installs nothing. write creates the file and is REFUSED (exit 3) when one exists -- merge by hand. The body names programs the hooks need that this machine lacks (missing) and whether the hooks can reach ddflow (ddflow_cmd_found). Installing pre-commit itself is the operator's call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
writeNoCreate the file; never replaces an existing one.
as_agentNoSubagent sharing the parent's connection: your own stable name, for this call only (see ddflow_identify).
ddflow_cmdNoHow the local hooks reach ddflow (default `ddflow` on PATH).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.10

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: it discloses that nothing is installed, that `write` is REFUSED with exit 3 when the file already exists (merge by hand), and that the returned body reports missing programs and ddflow_cmd_found. Exit codes, refusal behavior, and hook-ownership side effects are all surfaced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is dense and information-rich with little filler, and the core purpose is front-loaded. However, it is delivered as one long run-on paragraph with stacked parentheticals, which hurts parseability and ordering of the behavioral details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with no annotations and no output schema, the description covers what the tool produces, the refusal semantics, and the ownership caveat. It is nearly complete; only the `as_agent` parameter and any relationship to sibling hook tools go unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: `write` is refused with exit 3 when a file exists, and `ddflow_cmd` drives whether the hooks can reach ddflow. Only `as_agent` is left to the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: it proposes a .pre-commit-config.yaml for THIS repository, mapping detected stacks to pinned hooks plus ddflow's local check-commit/check-msg hooks. The resource is unmistakable, but no sibling (e.g. ddflow_hooks) is named to differentiate it, so it lands just short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operating context: 'Proposes; installs nothing,' and 'Installing pre-commit itself is the operator's call,' which scopes the tool correctly. It also warns to remove ddflow's own hooks before `pre-commit install` to avoid duplicates, but it never names an alternative tool or an explicit when-not-to-use condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools