docs: add CLI architecture deep-dive guides - #1087
Conversation
Port and reorganize the CLI architecture deep-dive documentation from internal research into three audience-specific guides: - docs/guides/dev/cli-internals.md - Developer reference covering CLI command structure, unified installation pipeline, sandbox lifecycle, workflow deployment, and source code reference - docs/guides/admin/infrastructure-reference.md - Admin reference covering token mint (OIDC), WIF provisioning, secrets/variables deployment, and GCF provisioner flow - docs/guides/user/customizing-agents.md - User guide covering harness configuration, layered config resolution, agent roles, and customization examples These guides provide implementation details that complement the existing high-level installation and workflow documentation. Signed-off-by: Wayne Sun <gsun@redhat.com>
Site previewPreview: https://bc962b21-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsLow
Previous runReviewFindingsNo findings. All three documentation files were verified against the current codebase implementation:
No sensitive data exposure detected — all identifiers use template patterns ( All internal cross-references resolve to existing files ( Previous run (2)ReviewFindingsMedium
Low
Info
Previous run (3)ReviewFindingsNo findings. The prior medium-severity finding (incorrect security block types in Previous run (4)ReviewFindingsNo findings. The prior medium-severity finding (incorrect security block types in Previous run (5)ReviewFindingsMedium
Previous run (6)ReviewFindingsMedium
Low
Previous run (7)ReviewFindingsHigh
Low
|
Address review feedback:
- Fix role permissions matrix to match actual code in
internal/mint/main.go rolePermissions map:
- fullsend: add workflows, actions_variables; remove issues, checks,
members
- triage: remove pull_requests
- coder: remove actions, change checks to read
- review: change checks to read
- fix: remove actions, checks
- retro: add actions (read); change pull_requests to read
- prioritize: remove pull_requests; add organization_projects
- Fix secret naming pattern from {org}-{role}-github-app-pem to
fullsend-{org}--{role}-app-pem (matches smPEMAccessor implementation)
- Add note to source file reference table that line counts are
approximate and may drift
Signed-off-by: Wayne Sun <gsun@redhat.com>
Address review feedback: - Expand CLI command tree to show subcommands: - scan: input, output, context, url - enable: repos - disable: repos - Fix harness YAML example types to match internal/harness/harness.go: - plugins: changed from object list to string list - providers: changed from object list to string list - runner_env: changed from string list to key-value map - Update source file line counts to current values: - root.go: 50 → 34 - layers.go: 100 → 159 - dispatch.go: 250 → 364 - config.go: 200 → 264 Signed-off-by: Wayne Sun <gsun@redhat.com>
Address review feedback:
- Fix security block to match actual struct types from
internal/harness/harness.go:
- host_scanners: changed from string list to object with boolean
fields (unicode_normalizer, context_injection, ssrf_validator,
secret_redactor) and nested llm_guard config object
- sandbox_hooks: changed from string list to object with boolean
and nested config fields (tirith object with enabled/fail_on,
plus boolean flags for ssrf_pretool, secret_redact_posttool,
unicode_posttool, context_suppress_posttool, canary_pretool,
canary_posttool)
- escalation: changed from string to object with on_critical and
review_label fields
- trace: changed from boolean to object with enabled field
Users can now copy this example and produce valid harness YAML.
Signed-off-by: Wayne Sun <gsun@redhat.com>
With OIDC/WIF as the standard deployment mode, PEM keys are stored in
GCP Secret Manager, not as GitHub repo secrets. The FULLSEND_{ROLE}_APP_PRIVATE_KEY
entry under '.fullsend repo secrets' was confusing because it claimed to be
a repo secret while simultaneously noting it's NOT a repo secret in OIDC mode.
The Secrets Layer Behavior section already correctly documents that in OIDC mode,
Install is a no-op and PEMs are stored in Secret Manager. Removing the misleading
entry from the active secrets list.
Signed-off-by: Wayne Sun <gsun@redhat.com>
- Fix FULLSEND_PER_REPO_GUARD → FULLSEND_PER_REPO_INSTALL per forge.go - Improve runner_env examples to show variable references instead of empty strings - All Go code blocks already have language tags Signed-off-by: Wayne Sun <gsun@redhat.com>
Replace invalid plugin names (github, sourcebot) with realistic example (gopls-lsp). These are Claude Code plugins from anthropics/claude-plugins-official, not MCP servers. MCP servers are configured separately in Claude Code settings, not in harness plugin lists. Actual available plugins include: - plugins/gopls-lsp (Go language server) - plugins/clangd-lsp (C/C++ language server) - plugins/code-review (code review enhancements) - plugins/feature-dev (feature development workflows) MCP servers like github, context7, etc. are not harness plugins. Signed-off-by: Wayne Sun <gsun@redhat.com>
Split harness YAML structure into two sections: 1. Minimal realistic example based on actual code.yaml harness 2. Optional fields section showing security/providers configs Key changes: - Use actual agent name 'code' (not 'coder') - Use actual skill name 'code-implementation' (not generic examples) - Show model: opus (actual scaffold value) in minimal example - Show model: claude-opus-4-6 in customization example (clearer) - Clarify that security/providers fields are optional with secure defaults - Note that all scaffold harnesses omit security block (rely on defaults) - Match field structure to internal/harness/harness.go - Match examples to internal/scaffold/fullsend-repo/harness/*.yaml Signed-off-by: Wayne Sun <gsun@redhat.com>
Added 'How Override Resolution Works' section explaining: - Overrides are file-level replacement, not YAML field merging - Complete workflow example: copy upstream → modify → add custom files - Runtime behavior: upstream defaults + customizations overlay - Important caveat: must maintain full harness structure Updated 'Customizing Harness Configuration' example to: - Show full harness YAML (not partial snippet) - Highlight changed fields with inline comments - Emphasize this is a complete replacement - Include step to create custom skill file This addresses confusion about whether adding a skill requires copying the entire harness (answer: yes, file-level replacement). Signed-off-by: Wayne Sun <gsun@redhat.com>
| └─────────────────────────────────────────────────────────────────┘ | ||
| ``` | ||
|
|
||
| --- |
There was a problem hiding this comment.
[low] correctness
Variable name FULLSEND_PER_REPO_GUARD is incorrect. The actual environment variable is FULLSEND_PER_REPO_INSTALL (the Go constant PerRepoGuardVar has value "FULLSEND_PER_REPO_INSTALL"). The admin guide infrastructure-reference.md correctly uses the right name.
Suggested fix: Change FULLSEND_PER_REPO_GUARD=true to FULLSEND_PER_REPO_INSTALL=true.
Review follow-upsCreated follow-up issues for actionable non-blocking review findings:
|
Pre-commit hook detected trailing whitespace on line 168 (blank line in heredoc example). Fixed by stripping all trailing whitespace from the file. Signed-off-by: Wayne Sun <gsun@redhat.com>
Summary
Adds comprehensive CLI architecture documentation organized by audience:
docs/guides/dev/cli-internals.md) - CLI command structure, unified installation pipeline, sandbox lifecycle, workflow deployment, and source code referencedocs/guides/admin/infrastructure-reference.md) - Token mint (OIDC), WIF provisioning, secrets/variables deployment, and GCF provisioner flowdocs/guides/user/customizing-agents.md) - Harness configuration, layered config resolution, agent roles, and customization examplesThese guides provide implementation details that complement the existing high-level installation and workflow documentation.
Content Organization
Developer Guide - CLI internals for contributors:
Admin Guide - Infrastructure details for operators:
User Guide - Customization for end users:
Changes
New files:
docs/guides/dev/cli-internals.md(460 lines)docs/guides/admin/infrastructure-reference.md(291 lines)docs/guides/user/customizing-agents.md(220 lines)Cross-references added between related guides
All content verified against current codebase implementation
Test Plan
🤖 Generated with Claude Code