Skip to content

docs: Add FAQ section and update CLI Reference in README - #39

Merged
BjRo merged 14 commits into
mainfrom
deliver-agentbox-tghq
Apr 9, 2026
Merged

BjRo merged 14 commits into
mainfrom
deliver-agentbox-tghq

Conversation

@BjRo

@BjRo BjRo commented Apr 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add a ## FAQ section to README.md with 7 practical entries covering common customization tasks (runtime versions, custom tools, firewall domains, API keys, stack updates, file preservation, VS Code extensions)
  • Update CLI Reference with ### agentbox update subsection and --runtime-version flag for agentbox init
  • Each FAQ answer is verified against actual codebase behavior and includes code snippets

Test plan

  • go test ./... passes (no Go code modified)
  • golangci-lint run ./... passes
  • No TODO/FIXME/HACK/XXX comments introduced
  • FAQ entries render correctly in GitHub Markdown preview
  • All file references and flag names match actual codebase

Bean: agentbox-tghq

🤖 Generated with Claude Code

BjRo and others added 6 commits April 9, 2026 10:12
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a 7-entry FAQ section covering common customization tasks (runtime
versions, custom tools, firewall domains, API keys, stack changes,
file preservation semantics, and VS Code extensions). Add `agentbox update`
subsection and `--runtime-version` flag to CLI Reference. FAQ entries for
devcontainer.json edits include a version-control/git-diff workaround
for the overwrite-on-update behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…pr in-progress)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BjRo

BjRo commented Apr 9, 2026

Copy link
Copy Markdown
Owner Author

Codex Code Review

The changes are limited to README documentation, and the new CLI reference and FAQ entries appear consistent with the current command flags and update behavior in the codebase. I did not find any discrete documentation errors in the diff that would mislead users into unsupported workflows.


Automated review by Codex Review Agent

@BjRo BjRo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go Code Review

Summary

Documentation-only PR adding a FAQ section (7 entries) and CLI Reference updates to README.md. I verified every FAQ claim against the actual codebase (cmd/init.go, cmd/update.go, internal/firewall/merge.go, internal/dockerfile/split.go, internal/config/config.go, and all relevant templates). All documentation claims are factually accurate.

Verified claims:

  • mise-config.toml preservation on update (update.go lines 98-125)
  • Custom stage preservation via SplitAtCustomStage (update.go line 86)
  • --runtime-version flag exists on init only, with tool=version format (init.go lines 180-181, 328-343)
  • User extra domains classified as Dynamic (merge.go lines 73-89)
  • devcontainer.json regeneration on update (renderFiles output, no preservation logic)
  • --stack on update reads from .agentbox.yml when omitted (update.go lines 51-65)
  • --extra-domains on update reads from .agentbox.yml when omitted (update.go lines 67-74)
  • --force flag behavior (update.go lines 88-96)
  • All files listed in the "safe to edit" table match the renderFiles output map (init.go lines 312-324)
  • Generated devcontainer.json has only OPENAI_API_KEY in containerEnv (devcontainer.json.tmpl line 27)
  • Default extensions are anthropic.claude-code and openai.chatgpt (devcontainer.json.tmpl lines 9-10)

One observation worth noting: the --stack flag description in the agentbox update CLI Reference table says "Reuses recorded stacks if omitted" which correctly describes the code behavior. However, the cobra help text in cmd/update.go:169 says "Auto-detects if omitted" which is misleading -- the code reads from .agentbox.yml, it does not auto-detect. The README documentation is more accurate than the cobra help text itself. Consider fixing the cobra description in a follow-up.

Markdown formatting is consistent with the rest of the document: level-2 heading for the FAQ section, level-3 for each question, fenced code blocks with language tags, consistent table formatting.

Verdict

LGTM -- all documentation claims verified against source code, Markdown formatting is consistent, and the FAQ entries provide practical, accurate guidance.

Automated review by Go Review Agent

Comment thread README.md
@@ -199,6 +211,106 @@

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: The README correctly says "Reuses recorded stacks if omitted" here, which matches the actual code at cmd/update.go lines 51-65 (reads from .agentbox.yml). However, the cobra help string at cmd/update.go:169 says "Auto-detects if omitted" which is inaccurate -- update does not auto-detect, it reads from the config file. Consider a follow-up to fix the cobra description to match this (correct) README text.

Comment thread README.md
| `mise-config.toml` | **Preserved** -- your version pins are never overwritten |
| `Dockerfile` (agentbox stage) | Regenerated |
| `devcontainer.json` | Regenerated |
| `init-firewall.sh`, `warmup-dns.sh` | Regenerated |

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: The FAQ correctly warns that devcontainer.json is regenerated on update and suggests using git diff to restore changes. A possible improvement for a future PR: support a containerEnv override mechanism (e.g., reading extra env vars from .agentbox.yml) so users do not lose custom API key forwarding on every update. This is not a documentation issue -- the guidance here is accurate and practical.

BjRo and others added 2 commits April 9, 2026 10:24
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The cobra help string said "Auto-detects if omitted" but the update
command actually reads stacks from .agentbox.yml when the flag is
omitted. Updated to match the actual behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BjRo

BjRo commented Apr 9, 2026

Copy link
Copy Markdown
Owner Author

Rework: Addressing review findings

  1. Cobra help text bug (SUGGESTION) -- Fixed in commit 1f0066b. The --stack flag description in cmd/update.go:169 now reads "Reuses stacks from .agentbox.yml if omitted" instead of the inaccurate "Auto-detects if omitted".

  2. containerEnv override in .agentbox.yml (SUGGESTION) -- Acknowledged as a future improvement. Supporting a containerEnv section in .agentbox.yml so users can declare extra environment variables that survive agentbox update is a good idea. This is out of scope for this documentation PR but worth tracking as a feature request.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@BjRo BjRo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go Code Review (Iteration 2)

Summary

Reviewed the rework addressing two SUGGESTION-level findings from iteration 1.

Finding 1 (Cobra help text): Correctly fixed. The --stack flag help in cmd/update.go line 169 now reads "Reuses stacks from .agentbox.yml if omitted" which accurately reflects the fallback behavior at lines 61-65 where agentboxCfg.Stacks is used when no --stack flag is provided. Verified by building the binary and checking agentbox update --help.

Finding 2 (containerEnv override): Acknowledged as a future feature request, no code change expected. The FAQ entries for API keys and VS Code extensions now include a practical git diff workaround for the overwrite-on-update limitation.

New content review:

  • The agentbox update CLI reference table is accurate -- all four flags (--stack, --extra-domains, --dir, --force) match their definitions in cmd/update.go lines 169-172.
  • The --runtime-version addition to the agentbox init table matches cmd/init.go lines 180-181.
  • All seven FAQ entries are factually correct against the codebase. Preservation semantics for mise-config.toml and the Dockerfile custom stage are accurately described.
  • No new issues introduced by the rework.
  • All tests pass.

Verdict

LGTM -- no remaining findings.

Automated review by Go Review Agent

@BjRo

BjRo commented Apr 9, 2026

Copy link
Copy Markdown
Owner Author

Codex Code Review (Iteration 2)

The patch mainly updates documentation, but one new FAQ entry describes a CLI workflow that does not work in the default interactive agentbox init flow. That misinformation is likely to mislead users configuring extra firewall domains.

  • [P2] Avoid documenting init --extra-domains as a general workflow — README.md:250-257
    This answer is only correct in non-interactive init runs. In the common TTY path without --stack/-y, newInitCmd hands control to the wizard and replaces extraDomains with choices.ExtraDomains, so the --extra-domains flag from this example is ignored. As written, users following this FAQ can finish agentbox init and end up without the domains they thought they had allowlisted.

Automated review by Codex Review Agent

BjRo and others added 3 commits April 9, 2026 10:28
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In interactive mode, the wizard overrides the --extra-domains flag
with its own prompt values. Update the FAQ example to include -y and
add an explanatory note so users are not misled into thinking the
flag works without non-interactive mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BjRo

BjRo commented Apr 9, 2026

Copy link
Copy Markdown
Owner Author

Codex Code Review (Iteration 3 - Final)

The changes are limited to documentation and a help-string clarification, and they are consistent with the current command behavior shown in cmd/init.go and cmd/update.go. I did not find any introduced inaccuracies or regressions that would break existing code or misdocument the supported workflow in a way that warrants an inline finding.

Automated review by Codex Review Agent

@BjRo BjRo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go Code Review (Iteration 3)

Summary

This PR adds a well-structured FAQ section to the README and fills a gap in the CLI Reference by documenting agentbox update and the --runtime-version flag on agentbox init. It also fixes the Cobra help text for the --stack flag on update (previously said "Auto-detects if omitted" when the command actually reuses stacks from .agentbox.yml).

All findings from iterations 1 and 2 have been addressed correctly:

  1. Cobra help text bug (iteration 1): cmd/update.go line 169 now reads "Reuses stacks from .agentbox.yml if omitted." -- matches the actual behavior at lines 61-65 where stacks are read from agentboxCfg.Stacks.

  2. containerEnv override acknowledgement (iteration 1): FAQ entries for API keys and VS Code extensions now include a git diff workaround suggestion for the regeneration trade-off.

  3. Missing -y flag in FAQ example (iteration 2): The --extra-domains example now shows agentbox init -y --extra-domains ... with an explanatory paragraph about why -y is required (the wizard overrides the flag in interactive mode). Verified against cmd/init.go lines 81-97 -- the wizard's choices.ExtraDomains does override the flag value.

Verification of documentation accuracy:

  • CLI Reference table for agentbox init matches all 5 flag definitions in cmd/init.go lines 176-181.
  • CLI Reference table for agentbox update matches all 4 flag definitions in cmd/update.go lines 169-172.
  • FAQ "What's safe to edit" table matches the actual update behavior: mise-config.toml preserved (line 122-124), custom stage preserved (line 109-111), everything else regenerated via renderFiles.
  • Tests pass, linter clean, no code changes beyond the help text fix.

Verdict

LGTM -- no findings. All previous rework verified and correct.

Automated review by Go Review Agent

BjRo and others added 2 commits April 9, 2026 10:32
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BjRo
BjRo merged commit 3234c8e into main Apr 9, 2026
3 checks passed
@BjRo
BjRo deleted the deliver-agentbox-tghq branch April 9, 2026 10:36
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