Documentation
¶
Overview ¶
Package drift implements the "ctx drift" command for detecting stale or invalid context.
The drift command checks for broken path references, staleness indicators, constitution violations, and missing required files. Results can be output as formatted text or JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd returns the "ctx drift" command for detecting stale context.
The command checks for broken path references, staleness indicators, constitution violations, and missing required files.
Flags:
- --json: Output results as JSON for machine parsing
- --fix: Auto-fix supported issues (staleness, missing_file)
Returns:
- *cobra.Command: Configured drift command with flags registered
Types ¶
type JsonOutput ¶
type JsonOutput struct {
Timestamp string `json:"timestamp"`
Status drift.StatusType `json:"status"`
Warnings []drift.Issue `json:"warnings"`
Violations []drift.Issue `json:"violations"`
Passed []drift.CheckName `json:"passed"`
}
JsonOutput represents the JSON structure for machine-readable drift output.
Fields:
- Timestamp: RFC3339-formatted UTC time when the report was generated
- Status: Overall drift status ("ok", "warning", or "violation")
- Warnings: Issues that should be addressed but don't block
- Violations: Constitution violations that must be fixed
- Passed: Names of checks that passed successfully
Click to show internal directories.
Click to hide internal directories.