Phase 4: Agent context, doctor command, CLAUDE.md, README - #5
Merged
Conversation
- Replace context.py stub with comprehensive agent instructions including all commands with copy-pasteable examples, tips for AI agents, common workflows, exit codes table, and environment variables - Replace doctor.py stub with full health check: config file existence and permissions (0600), config JSON validity, per-project API connectivity with response time, and CLI version - Create CLAUDE.md with build/run/test instructions, project structure, and coding conventions - Replace minimal README.md with full documentation: installation, quick start, all commands, JSON output format, exit codes, architecture - Add 22 new tests: context output (5), doctor checks (8), --no-color flag (3), exit codes (6) - All 173 tests pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Closed
8 tasks
padak
added a commit
that referenced
this pull request
May 22, 2026
…ss tracker Lays the documentation foundation for the Agent Studio Phase 1 effort: - docs/agents-v2.md — Playbook-first PRD that supersedes the heavyweight Team/Role/WorkItem v1. Closes every blocking finding from docs/agents-review.md: budget caps in MVP, scoped per-run JWTs, stable API contract, body_hash + 5s undo on external_send, untrusted-content wrapping, expires_at + scope on approvals. - docs/agent-studio-design-system.md — canonical NERD UI spec, single source of truth for visual contract. Light mode primary, dark secondary. Reference implementation runs at http://127.0.0.1:8001/ via `kbagent serve --ui`. - docs/mockups/ — 6 light primary screens (conditioning approach via Playwright reference + nano-banana edit mode) + 6 dark secondary backups. README documents the regen workflow. - docs/agent-studio-progress.md — persistent cross-session tracker for the Phase 1 build. New chat sessions can pick up from this file. Customer-validated workflow (product-cost-allocation Solution) drove five v2 updates: - §9.3 xlsx-renderer added to first-party tools - §18 6th Solution product-cost-allocation (Finance Ops) with full spec - §21 Phase 2 promoted basic view scoping (created_by + allowed_users) - §21 Phase 1 acceptance criterion now includes the controller-handoff scenario - §24 Open Q #5 split (view scoping = Phase 2 done, approval routing still Phase 5+) - §26 Appendix E "Deployment Patterns" added (local / single-server shared-team / future SaaS)
Matovidlo
added a commit
that referenced
this pull request
Jun 15, 2026
…, dedup Thermo-nuclear review follow-ups (behavior-preserving): - #1/#6: move inline nfpm loop -> build/package/linux/build_packages.sh and the zip+sha256 -> build/package/zip_binary.sh (explicit per-OS archiver); workflow is now pure orchestration. - #2: .github/actions/setup-build composite (uv + optional Node) replaces the repeated setup preamble in pypi/freeze. - #3: index.sh deb/rpm/apk collapsed into a publish_repo() helper + per-format indexers. - #5: sign.sh parses the Azure token with jq instead of a sed regex. - #7: nfpm.yaml notes it's rendered via envsubst. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Matovidlo
added a commit
that referenced
this pull request
Jun 17, 2026
…, dedup Thermo-nuclear review follow-ups (behavior-preserving): - #1/#6: move inline nfpm loop -> build/package/linux/build_packages.sh and the zip+sha256 -> build/package/zip_binary.sh (explicit per-OS archiver); workflow is now pure orchestration. - #2: .github/actions/setup-build composite (uv + optional Node) replaces the repeated setup preamble in pypi/freeze. - #3: index.sh deb/rpm/apk collapsed into a publish_repo() helper + per-format indexers. - #5: sign.sh parses the Azure token with jq instead of a sed regex. - #7: nfpm.yaml notes it's rendered via envsubst. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
martinsifra
added a commit
that referenced
this pull request
Aug 26, 2026
The big one (#2, upgraded): the diff sides' wire shape was WRONG in the implementation and in the test fixtures that defined it. Verified against connection (ConfigurationVersionResponse + ConfigurationDiffData OA schemas, now recorded in the notes wire-truth table): each side is {version, isDeleted, diff: {name, description, changeDescription, isDisabled, configuration, rows}} -- content NESTED under diff, version/deletion as side metadata. The classification and both take modes now read the envelope; the flat-side code would have been dead on arrival against the live API. #1: resolve_conflict no longer takes branch_id -- it derives the branch from the MR itself (branches.branchFromId), so the conflict-set guard and the branch being written to can never disagree; a caller-supplied id could point the REPLACing rebase at an unrelated dev branch the guard never checked. A published/canceled MR (null branchFromId) is refused readably. #3: take=theirs of a deleted side collapses to the delete resolution, symmetric with ours ('production deleted it, dev changed it' is a live conflict shape). #4: deletion surfaces as top-level ours_deleted/theirs_deleted booleans on get_config_diff (None = side never existed) -- it is side metadata, not a content path. #5: a 'both' row where the sides agree on the identical value carries agreed: true -- agreement, not a conflict hotspot. #2 (message half): a take side missing required envelope keys is reported as a backend contract violation pointing at the resolved-body workaround, not as caller error. #6: wire ids compared via _same_id / int-coerced (find_merge_request_for_ branch, merge()'s was_active) -- a string-serialized branchFromId can no longer silently defeat the post-merge cleanup. #7: the feature pre-flight raises FeatureNotEnabledError carrying the new ErrorCode.FEATURE_NOT_ENABLED (value matches the string SearchService already emits; categorized 'configuration' like PAYG_NOT_AVAILABLE). #8: ConfigError imported from ..errors like every other service; the isDefault scan hoisted to services.base.find_default_branch_id and the copies in config/sync/workspace services migrated (lib.py keeps its own loop -- the SDK facade does not import the services layer); verify_token is skipped when the server already serialized viewer (the polyfill's cost dies with the polyfill); list --state validates against the closed vocabulary instead of returning a silent count: 0 on a typo. #9: test imports hoisted (no mid-file noqa), mocks spec'd at the L3 seam (KeboolaClient + MergeRequests -- a renamed L3 method now fails the tests), and regression tests added for every finding (82 tests total). Doc drift: layer2/layer3 references updated to BRANCHES_MERGE_REQUESTS_ FEATURE, the layer3 open nit closed, tokens.py line ref fixed. Review: tasks/pr-703-review.md (2026-08-27). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kbagent contextwith agent instructions, examples, workflows, exit codes, and environment variableskbagent doctorwith 4 health checks (config file existence/permissions, JSON validity, per-project API connectivity with response time, CLI version)Implementation Details
commands/context.py--json, how to parse output, common workflowscommands/doctor.pyCLAUDE.mduv pip install -e ".[dev]"kbagent --help/uv run kbagent --helpuv run pytest tests/ -vREADME.mdTests Added (22 new tests)
Acceptance Criteria
kbagent contextoutputs comprehensive usage instructionskbagent contexttext mentions--jsonflag, exit codes, and common workflowskbagent doctorchecks config file existence, permissions, validitykbagent doctortests connectivity to all configured projectskbagent doctor --jsonoutputs structured JSON with all check results--no-colorflag works correctly on all commands🤖 Generated with Claude Code