post_commit

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package post_commit implements the ctx system post-commit subcommand.

It detects git commit commands and nudges the agent to capture context (decisions or learnings) and run lints/tests after committing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the "ctx system post-commit" subcommand.

Returns:

  • *cobra.Command: Configured post-commit subcommand

func Run

func Run(cmd *cobra.Command, stdin *os.File) error

Run executes the post-commit hook logic.

After a successful git commit (non-amend), nudges the agent to offer context capture (decision or learning) and to run lints/tests before pushing. Also checks for version drift.

Parameters:

  • cmd: Cobra command for output
  • stdin: standard input for hook JSON

Returns:

  • error: Always nil (hook errors are non-fatal)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL