Skip to content

feat: Add get CLI subcommand for programmatic artifact retrieval - #10

Merged
timeleft-- merged 4 commits into
mainfrom
feature-559-porch-fava-trails-artifact-resolver
Mar 8, 2026
Merged

timeleft-- merged 4 commits into
mainfrom
feature-559-porch-fava-trails-artifact-resolver

Conversation

@timeleft--

Copy link
Copy Markdown
Member

Summary

  • Adds fava-trails get <scope-path> CLI subcommand for programmatic content retrieval
  • Supports 3 modes: content output (default), --list (list children), --exists (exit code check)
  • Enables porch (codev protocol orchestrator) to resolve specs/plans from FAVA Trails instead of local filesystem
  • Includes GPT-5.3 Codex review feedback fixes (stderr diagnostics, is_dir() checks)

Context

This is Track 1 of Spec 559 (Porch FAVA Trails Artifact Resolver). Track 2 (porch-side resolver abstraction) is in a separate PR against the codev repo.

Test plan

  • fava-trails get mwai/eng/best-practices/codev-assets/specs/559-porch-fava-trails-artifact-resolver returns spec content
  • fava-trails get --list mwai/eng/best-practices/codev-assets/specs lists spec children
  • fava-trails get --exists mwai/eng/best-practices/codev-assets/specs/559-porch-fava-trails-artifact-resolver exits 0
  • fava-trails get --exists mwai/eng/nonexistent exits 1
  • --list and --exists are mutually exclusive (argparse error)

🤖 Generated with Claude Code

timeleft-- and others added 4 commits March 6, 2026 17:02
Adds `fava-trails get <scope>` with three modes:
- Default: output latest non-superseded thought content to stdout
- `--list`: list child scope names (for directory-style enumeration)
- `--exists`: exit 0/1 for existence checks (no output)
- `--with-frontmatter`: include YAML frontmatter in output

Strict stdout hygiene — only requested content goes to stdout,
all errors/diagnostics go to stderr. This enables reliable parsing
by tools like porch that consume stdout with regex.

Spec 559: Porch FAVA Trails Artifact Resolver

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Make --list and --exists mutually exclusive (argparse group)
- Use is_dir() instead of exists() before directory operations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@timeleft--
timeleft-- merged commit 2b8b3ba into main Mar 8, 2026
1 check passed
@timeleft--
timeleft-- deleted the feature-559-porch-fava-trails-artifact-resolver branch March 8, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant