docs: add missing hash-frontmatter command to CLI reference#14285
docs: add missing hash-frontmatter command to CLI reference#14285
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds missing CLI reference documentation for the already-implemented gh aw hash-frontmatter command, making it discoverable under the “Utility Commands” section.
Changes:
- Documented
hash-frontmatterpurpose (deterministic SHA-256 hash for drift detection) - Added basic usage examples
- Listed the intended hash inputs/components
Comments suppressed due to low confidence (1)
docs/src/content/docs/setup/cli.md:581
- The docs claim the hash includes “Version information (gh-aw, awf, agents)”, but
parser.ComputeFrontmatterHashFromFilebuilds the hash from the workflow frontmatter text, imported frontmatter texts, import paths, and selected template expressions; it does not incorporate tool/version metadata. Please remove or correct this bullet so users don’t rely on version changes affecting the hash.
- Template expressions containing `env.` or `vars.` from the markdown body
- Version information (gh-aw, awf, agents)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| The hash includes: | ||
| - All frontmatter fields from the main workflow | ||
| - Frontmatter from all imported workflows (BFS traversal) |
There was a problem hiding this comment.
The docs say imported workflow frontmatter is included via “BFS traversal”, but the Go implementation used by gh aw hash-frontmatter (parser.ComputeFrontmatterHashFromFile → processImportsTextBased) recursively walks imports (depth-first) and then sorts imported paths/texts for determinism. Please update this wording to avoid claiming BFS ordering (e.g., describe it as recursively processing imports with deterministic sorting).
This issue also appears on line 580 of the same file.
| - Frontmatter from all imported workflows (BFS traversal) | |
| - Frontmatter from all imported workflows, resolved recursively with deterministic sorting |
The
hash-frontmattercommand was fully implemented and registered but undocumented, making it undiscoverable to users.Changes
hash-frontmatterdocumentation to Utility Commands section indocs/src/content/docs/setup/cli.mdenv./vars., version info)The command computes hashes useful for detecting configuration drift between workflow compilation and execution time.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.