Add Go-side dedup in searchTableInTx to ensure SearchIssues never
returns the same issue ID twice, regardless of how many dependency
subqueries match. This prevents bd list from showing issues multiple
times when they have more than one blocks dependency.
`Ephemeral=&false` in SearchIssuesInTx previously only queried the issues
table, skipping the wisps table entirely. But NoHistory beads (ephemeral=0,
no_history=1) live in the wisps table and must survive export.
Extend the wisps merge pass to also run when Ephemeral=&false. The WHERE
clause (`ephemeral=0 OR ephemeral IS NULL`) already exists in the wisps
query via BuildIssueFilterClauses — so NoHistory beads are included while
true ephemeral wisps (ephemeral=1) are correctly excluded.
Fixes the regression flagged in GH#3659 review: `TestExportNoHistoryBeadRoundTrip`
documents that NoHistory beads must survive export/import. (GH#3649)
Keep GetLabelsForIssuesInTx compatible with existing callers that pass a scoped active-wisp set while retaining the new batched partitioner for default callers.
This fixes stale Dolt tests on PR #3666 after the GH#3414 batching refactor.
Co-authored-by: Harry Miller <harry_miller@trimble.com>
Every mutating bd command against a remote Dolt backend hung ~10–15s
with `auto-export failed: ... hydrate labels: ... context canceled`.
Root cause: five bulk fetchers in internal/storage/issueops partitioned
IDs into wisp vs permanent buckets by calling IsActiveWispInTx once per
ID, and each call is a round-trip to the SQL server. With ~600 issues
over WAN latency that's ~12s of sequential SELECTs *before* the real
label query runs — blowing past the context deadline.
Fix:
- Add PartitionWispIDsInTx that batches the check into one
`SELECT id FROM wisps WHERE id IN (...)` per queryBatchSize chunk,
reducing cost from O(N) to O(1 + N/200) round-trips. Falls back to
"no wisps" when the wisps table is absent (pre-migration dbs).
- Rewrite GetLabelsForIssuesInTx, GetCommentsForIssuesInTx,
GetDependencyRecordsForIssuesInTx, GetBlockingInfoForIssuesInTx, and
DeleteIssuesInTx to use it.
- Add fast-path helpers GetLabelsForIssuesFromTableInTx and
GetDependencyRecordsForIssuesFromTableInTx for callers (searchTableInTx)
that already know every ID is in a single table, skipping the partition
round-trip entirely on the hot auto-export path.
Tests:
- New wisp_partition_test.go covering the partitioner directly: empty,
all-perm, all-wisp, mixed-with-unknown, input-order preservation, and
a 450-ID large-batch case crossing the queryBatchSize boundary.
- End-to-end mixed-routing regression tests for GetCommentsForIssues,
GetDependencyRecordsForIssues, and a 250-ID GetLabelsForIssues case
that crosses the chunk boundary.
Made-with: Cursor
bd list --deferred only matched issues with defer_until set, missing
issues with status=deferred but no defer_until timestamp. The filter
now uses (defer_until IS NOT NULL OR status = 'deferred') in both
issueops and dolt transaction paths.
* perf: add --no-cycle-check flag to bd dep add for bulk wiring
On large dependency graphs (230+ edges), bd dep add performs a full
DetectCycles traversal after every insertion — O(V+E) per call. This
causes individual dep add calls to hang for 3+ minutes as the graph
grows beyond ~150 edges.
Add --no-cycle-check to both `dep add` and the `dep --blocks`
shorthand. When set, the post-insert warnIfCyclesExist call is skipped.
Callers doing bulk wiring can run `bd dep cycles` once at the end to
verify the complete graph.
The flag is intentionally not the default: single-edge interactive use
keeps cycle detection on. Bulk callers opt in explicitly.
* Add bulk JSONL dependency wiring (bd-wjl)
* Fix bulk dep file lint warning
---------
Co-authored-by: Robin Carswell <robin@robincarswell.com>
* fix(ready): honor filter.ExcludeTypes in GetReadyWorkInTx (GH#3397)
The --exclude-type CLI flag was silently ignored by bd ready. The CLI
correctly populated filter.ExcludeTypes, and the type's godoc promised
that values are "Appended to the default exclusion list", but the
no-Type branch of GetReadyWorkInTx built the NOT IN clause from the
hardcoded defaults only.
Merge user-supplied ExcludeTypes into the default exclusion list (with
dedup against defaults and empties) before building the placeholders.
This matches the pattern already used by issueops/filters.go and
dolt/queries.go for bd list.
Fixes GH#3397.
* fix(ready): --parent returns transitive descendants, not direct children only (GH#3396)
The SQL clause in GetReadyWorkInTx's ParentID branch was a one-hop join
against the parent-child dependency table, so only direct children
surfaced. The --parent help text in cmd/bd/ready.go:672 and the
WorkFilter.ParentID godoc (internal/types/types.go:1295) both promise
"descendants (recursive)".
Add a BFS helper GetDescendantIDsInTx alongside GetChildrenOfIssuesInTx
in blocked.go — BFS rather than a recursive CTE because the existing
children helper already iterates across both dependencies and
wisp_dependencies tables, and composing that inside a single CTE gets
ugly. The visited set breaks cycles and a depth cap (default 100,
matching the cycle-detection CTE elsewhere in issueops) guards against
malformed data.
Rewrite the ParentID branch in GetReadyWorkInTx to resolve descendants
via the new helper and OR that with the prior dotted-ID prefix match
(for implicit-parent IDs with no explicit parent-child dep), preserving
the original semantics for dotted IDs.
MoleculeID is deliberately left as one-hop — its inline comment
explicitly scopes it to "direct children" unlike ParentID.
Fixes GH#3396.
* Improve ready and list UX regressions (bd-main-typ)
* fix(list): make --ready flag use blocker-aware GetReadyWork semantics (GH#3478)
bd list --ready previously only filtered by status=open, showing issues
that bd ready correctly excluded as blocked. Now both commands use the
same GetReadyWork path, ensuring consistent results.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add list ready blocker regression coverage (bd-qo1)
* Fix ready list review regressions
---------
Co-authored-by: Daniel Jasiński <daniel.jasinski@gmail.com>
Co-authored-by: kev <kglynn@pryoninc.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* perf(storage): amortize per-ID wisp routing via WispIDSetInTx
Implements D2 build per ADR be-nu4 §4.D2 (bead be-nu4.2.1).
Add WispIDSetInTx helper that returns the set of currently-active
wisp IDs, consistent for the tx's lifetime under Dolt MVCC. The hot
batch-routing paths (GetLabelsForIssuesInTx, GetIssuesByIDsInTx)
gain a trailing wispSet parameter; callers that pass nil trigger a
single internal SELECT id FROM wisps rather than the N-per-ID
IsActiveWispInTx loop the helpers previously ran.
IsActiveWispInTx is retained unchanged for single-ID callers
(AddLabelInTx etc.) per the ADR audit note.
Mixed-ID routing is the sacred invariant (ADR §11.5); covered by a
new hard-gate test TestWispIDSetInTx_HardGate that exercises both
refactored helpers with a permanent issue and an active wisp in the
same input slice. Pure-fn unit coverage (partitionByWispSet) runs
without a testcontainer.
Adds BenchmarkGetLabelsForIssues_Mixed and
BenchmarkGetIssuesByIDs_Mixed at 1K / 10K / 50K with 25% wisp share.
Note for reviewer: two additional per-ID hot loops share the same
pattern (GetDependencyRecordsForIssuesInTx,
GetBlockingInfoForIssuesInTx in dependency_queries.go) and would
benefit from the same treatment. Left alone here to respect ADR
scope; flagged for a follow-up bead.
Dolt testcontainer runs flaky on this worktree (Docker 29.4 + ryuk
0.13.0). TESTCONTAINERS_RYUK_DISABLED=true works when infra
cooperates; unit-level coverage (TestPartitionByWispSet) runs
container-free and is green.
Refs: be-nu4.2.1, be-nu4
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: release gate PASS for be-eqw
* fix(storage): scope WispIDSetInTx to input IDs
Reviewer maphew on #3453 flagged that the new default helper builds
the active wisp set with an unscoped SELECT id FROM wisps for
nil-set callers. That turns a small hydration batch (N IDs) into a
full scan of the wisps table (W rows), which is worse than the
pre-PR per-ID IsActiveWispInTx path for small N against large W.
Scope the helper query to the input IDs so cost becomes O(N·log W)
+ 1 round-trip — strictly better than both the old per-ID path and
the current unscoped path.
Signature change: WispIDSetInTx now takes ids []string. Both
internal call sites (GetIssuesByIDsInTx, GetLabelsForIssuesInTx)
pass their input IDs through; all 13 existing nil-set callers
continue to pass nil and get a scoped internal build. Doc updated
on the wispSet parameter to reflect "set scoped to cover these
IDs."
Note: committed with --no-verify (authorized) because release/be-eqw
inherits a pre-existing pre-commit hook blocker — sanitizeDBName is
only defined in the cgo-tagged store_factory.go and the hook runs the
linter under CGO_ENABLED=0. be-4lf (on main) deletes the duplicate
extraction file; once release/be-eqw rebases onto main post-merge the
hook passes naturally. Green-field build/vet/gofmt and all wisp
routing tests were run locally before committing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(storage): be-rgm WispIDSetInTx scoped path + small-N bench
be-3l2 fills the codecov gap on PR #3453 flagged by maphew:
WispIDSetInTx scope-to-input-IDs (14 missing lines on
wisp_routing.go, 0% on dependencies.go/labels.go hydration paths).
New tests in internal/storage/dolt/wisp_set_scoped_test.go:
- TestWispIDSetInTx_Scoped_ReturnsOnlyInputIDs — "lock the fix"
regression: seeds 5 wisps, passes 1 ID, asserts the other 4
are NOT in the set. Reverting to `SELECT id FROM wisps` fails this.
- TestWispIDSetInTx_Scoped_AcrossBatchBoundary — 250 wisps (past
queryBatchSize=200) all pass through the batched IN-clause loop.
- TestWispIDSetInTx_Scoped_UnknownIDsReturnEmpty — unknown IDs
return empty set; a bait wisp outside the input must not leak.
- TestGetLabelsForIssuesInTx_SmallInputLargeWispTable — end-to-end
hydration with nil wispSet against 20 noise wisps; exercises the
dependencies.go/labels.go callers that pass input IDs through.
- TestGetIssuesByIDsInTx_SmallInputLargeWispTable — same shape for
issue hydration.
New benches in internal/storage/dolt/dolt_benchmark_test.go:
- BenchmarkGetLabelsForIssues_SmallNLargeW_10_5K / _10_10K / _100_5K
- BenchmarkGetIssuesByIDs_SmallNLargeW_10_5K / _10_10K / _100_5K
These measure the maphew regression shape: small input batch
against a large wisps table. Local 10_5K: ~2.6 ms/op, confirming
the scoped N·log(W) path wins cleanly over the pre-be-rgm
full-scan path (existing Mixed10K is ~1.35 s/op for the full
hydration, but that loads 10K not 10).
Note: committed with --no-verify (authorized). release/be-eqw
inherits a pre-existing pre-commit hook blocker — golangci-lint
on the hook is built with go1.25 while go.mod targets 1.26.2,
so the lint step errors before seeing the diff. Green-field
go vet, go build, and all five new tests pass locally against
an isolated Dolt test container.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Jim Wordelman <jim@wordelman.name>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(config): reject 'bd config set issue-prefix' with actionable error
'bd config set' landed the value in DB key "issue-prefix" (dash), while
'bd create' reads YAML "issue-prefix" then DB "issue_prefix" (underscore) —
a third key no reader consults. The result was a silent-success write
that left users unable to create issues after what looked like a successful
config change (bd-f4m).
Reject both dash and underscore forms at the top of the config-set handler
and point the user at the three commands that own the prefix lifecycle
(bd init --prefix / bd bootstrap / bd rename-prefix). A unit test locks
in the rejected keys, the required error substrings, and a control set
of adjacent keys that must continue to work.
* fix(errors): mention 'bd bootstrap' in 'issue_prefix is missing' hint
The fresh-clone flow lands here when a user clones a repo but has no
local database yet. The existing hint only mentioned 'bd init --prefix',
which is the wrong answer for that scenario — 'bd bootstrap' is what
reconstitutes a database from the remote. Add it to the hint alongside
'bd init --prefix' so both the new-project and fresh-clone paths are
directed at the right command (bd-f4m, AC bullet 4).
* fix(config): drop private tracker IDs from issue-prefix rejection comments
Strips internal bead tracker IDs from code comments and a test
message. Private tracker IDs have no meaning to external reviewers,
so they should not ship in the repository.
No behavior change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When a formula step has `gate = { type = "human" }`, the cook pipeline
creates a companion bead with IssueType "gate". But "gate" was
intentionally removed from the built-in type whitelist (see types.go
comment at the IssueType const block) and moved to a custom type that
requires explicit `types.custom` configuration. Without that config,
`bd mol pour` fails with:
validation failed for issue : invalid issue type: gate
This forces operators to run `bd config set types.custom '["gate"]'`
before pouring any formula with gate steps — a papercut that blocks
first-time formula users.
Fix: add `ensureSubgraphCustomTypes` in `cloneSubgraph` (template.go)
that scans the template issues for non-built-in types and auto-registers
any missing ones via `SetConfig("types.custom", ...)` before the clone
transaction creates the issues. This is the same store path that
`bd config set` uses, which triggers `SyncCustomTypesTable` to populate
the normalized `custom_types` table consumed by `PrepareIssueForInsert →
ValidateWithCustom`.
Also add `EnsureCustomTypeInTx` helper in issueops/config_helpers.go
for callers that already hold a transaction (not used by this fix but
provides a lower-level primitive for future use).
The fix applies to both `bd mol pour` (persistent) and `bd mol wisp`
(ephemeral) since both call `cloneSubgraph`.
Fixes#3213
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move type validation from CLI-level (update.go) to storage layer
(UpdateIssueInTx), matching the create path. The CLI-level validation
failed when GetCustomTypes() was unavailable (subprocess context,
circuit breaker) and config.yaml lacked types.custom (because bd config
set only writes to Dolt). The storage layer reads custom types within
the same transaction, so it always works.
Co-authored-by: mayor <rastislav.marko@panzarobotics.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: enable auto-export by default with canonical issues.jsonl name (GH#2973)
Users expected JSONL export to refresh automatically but export.auto
defaulted to false, requiring explicit opt-in. Also the default filename
(export.jsonl) didn't match the canonical issues.jsonl used in docs and
git hooks. Change defaults: export.auto=true, export.path=issues.jsonl,
export.git-add=true so viewers (bv) and git workflows see fresh data
without extra configuration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(init): add auto-export prompt and document export.* config (GH#2973)
Interactive bd init now asks whether to enable auto-export (default: yes).
Users can opt out during setup instead of discovering the setting later.
Also documents the export.* config namespace in bd config --help with
all four keys (export.auto, export.path, export.interval, export.git-add)
and adds export examples.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(issues): add started_at timestamp (GH#2796)
Adds a `started_at` field to issues that is auto-populated when an
issue transitions to in_progress status. Preserved across subsequent
status changes.
- Migration 0027 adds started_at column to issues and wisps tables
- ManageStartedAt() in issueops mirrors ManageClosedAt() pattern
- Query filter support: `started>2026-01-01`, `started<...`
- Displayed in `bd show` between Created and Updated
- Exposed in --json output via struct tag
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: gofmt alignment in update.go and types.go
Amp-Thread-ID: https://ampcode.com/threads/T-019d887d-4eb1-7648-96be-8d906797c382
Co-authored-by: Amp <amp@ampcode.com>
* fix(claim): set started_at when claiming via --claim (GH#2796)
ClaimIssueInTx had its own bespoke UPDATE that only wrote assignee, status,
and updated_at. Since `bd update --claim` is the canonical way agents transition
issues to in_progress, started_at was left NULL in the common case. Set it on
first transition, mirroring ManageStartedAt's guard (preserve existing value on
re-claim).
Also document the `started` field in `bd query --help`.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Amp <amp@ampcode.com>
ResolveCustomStatusesDetailedInTx and ResolveCustomTypesInTx returned
empty results when the custom_statuses/custom_types tables existed but
had no rows (e.g. after schema v11 migration created the tables without
populating them from the existing status.custom/types.custom config).
This caused `bd list --status=<custom>` and `bd update --type=<custom>`
to reject valid custom values with "invalid status/type" errors.
Fix: fall through to the config string fallback when table queries
succeed but return zero rows, matching the pre-migration behavior.
Also fix list.go to log GetCustomStatuses errors instead of silently
discarding them (matching update.go's pattern).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes data-loss: exports now retain comment bodies. Import dedup now includes comment text to prevent same-second collision. Conflict in export.go resolved (allComments→commentsMap). Thanks to the contributor!
Co-authored-by: sms <223721492+s070681@users.noreply.github.com>
When the schema v11 migration creates the custom_statuses table but fails
to populate it from the existing status.custom config value, the table is
empty. ResolveCustomStatusesDetailedInTx returned the empty result without
falling through to the config string fallback, causing bd list --status to
reject valid custom statuses.
Now the table result is only returned when it has rows; an empty table
falls through to the config string and then config.yaml, matching the
pre-migration behavior.
Also fix bd list to log GetCustomStatuses errors instead of silently
discarding them, matching the pattern already used in bd update.
Fixes#2984
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
types.custom config values can be JSON arrays (e.g. '["gate"]') or
comma-separated strings. SyncCustomTypesTable was only handling
comma-separated, causing gate tests to fail because the literal
string '["gate"]' was inserted into custom_types instead of 'gate'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix pull dedup: check wisps table and match work_items URLs
- Add type-based filtering to GitLab sync CLI
- Default-exclude molecule/message/event types from push
- Fix source_system update that breaks external_ref persistence
- Map all beads statuses to GitLab scoped labels for board columns
- Handle status::review and status::done labels on pull
- Map epic beads to GitLab milestones instead of issues
- Create task beads as GitLab Task work items with parent hierarchy
- Walk parent chain to find epic milestone, use API ID not IID
Co-authored-by: ktoulgaridis <ktoulg@gmail.com>
Executed-By: beads/crew/emma
* feat: migrate custom statuses and types to normalized tables
Migrate custom statuses from comma-separated config string
(status.custom) to a normalized custom_statuses(name, category) table.
Similarly migrate types.custom to a custom_types(name) table.
Views now use JOINs against these tables instead of dynamically
building IN clauses with escapeSQL(). Config set/get commands maintain
backward compatibility by reading/writing through the tables.
Includes schema migration (v9→v10) that auto-populates tables from
existing config values.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address PR review — rows.Err(), error propagation, CTE, dead params
Fixes all issues raised in PR #2961 review:
🔴 Critical:
- Add rows.Err() checks after all rows.Next() loops in
ResolveCustomStatusesDetailedInTx, ResolveCustomTypesInTx,
and readCustomStatusesFromDB (now removed as unused)
- Use types.ParseCustomStatusConfig() in migration instead of
hand-rolled inline parsing, ensuring validation parity
🟡 Medium:
- Propagate parse errors from syncCustomStatusesTable instead of
silently swallowing them (returns error to SetConfig caller)
- Use json.Unmarshal in migration's parseTypesValue instead of
hand-rolled bracket/comma splitting
- Remove dead []types.CustomStatus parameter from BuildReadyIssuesView
and BuildBlockedIssuesView (now parameterless)
- Add CTE (done_frozen) to blocked_issues view to deduplicate the
repeated custom_statuses subquery
- Fix empty-table fallback ambiguity: successful table query with 0
rows is now authoritative (no fallthrough to config string)
- Add // Deprecated: godoc comment to escapeSQL
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Extend write-path CTE and DFS cycle detection to include conditional-blocks
(also creates blocking relationships, same as blocks)
- Add explicit self-dependency check in AddDependencyInTx
- Add bd graph check subcommand: runs DetectCycles, reports results in
JSON or human-readable format, exits with code 1 if issues found
waits-for is intentionally excluded from cycle detection — it uses gate
semantics (fan-in) rather than direct blocking, so A waits-for B does
not mean B blocks A in the traditional sense.
Fixes: bd-2qr
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Metadata keys containing dots (e.g., `gc.routed_to`, `gc.kind`) were
passed to SQL JSON_EXTRACT as `$.gc.routed_to`, which Dolt interprets
as a nested path (`{gc: {routed_to: ...}}`). The correct path for a
flat key with dots is `$."gc.routed_to"`.
This broke `--metadata-field` and `--has-metadata-key` filters for any
key containing a dot. Since Gas City's pool routing uses `gc.routed_to`
metadata, no pool work query using the default `--metadata-field` filter
could find matching beads, causing workflow stalls.
The fix adds `storage.JSONMetadataPath()` which quotes keys containing
dots, and applies it to all 6 call sites across queries.go,
transaction.go, filters.go, and ready_work.go.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The issueops package has 34 source files with 6,500+ lines of core business
logic but zero direct tests. This adds tests for all pure functions that
don't require a database connection:
- filters_test.go: BuildIssueFilterClauses, LooksLikeIssueID
- helpers_test.go: NullString, NullStringPtr, NullInt, NullIntVal,
JSONMetadata, FormatJSONStringArray, IsWisp, TableRouting
- batching_test.go: isTableNotExistError
- ready_work_test.go: buildSQLInClause
https://claude.ai/code/session_01ESW3XvdoVy3rWMnHB6FT1o
Co-authored-by: Claude <noreply@anthropic.com>
Extend embedded Dolt to 6 more commands by adding CommitPending calls,
extracting shared dependency-tree and epic-closure logic into issueops/,
and implementing them in EmbeddedDoltStore. Includes 7 comprehensive
test files with concurrency tests. Bump CI embedded test timeout from
default 10m to 20m to accommodate the larger test suite.
Co-Authored-By: Dustin Brown <coffeegoddd@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The old query used CAST(SUBSTRING_INDEX(...) AS UNSIGNED) which silently
returns 0 for non-numeric IDs (e.g., base32 hashes), breaking child ID
reconciliation after JSONL imports. Move numeric extraction to Go using
the existing ParseHierarchicalID function.
PR: #2744
Co-Authored-By: matt wilkie <maphew@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the entire agent-as-bead subsystem which treated agents as beads
with GT-specific state management. This is pure Gas Town infrastructure
that belongs in GT, not in the beads issue tracker.
Deleted files:
- cmd/bd/agent.go (state, heartbeat, show, backfill-labels commands)
- cmd/bd/slot.go (hook/role slot management)
- cmd/bd/merge_slot.go (merge queue slot primitives)
- All associated test files
Removed from types.Issue:
- AgentState, HookBead, RoleBead, LastActivity, RoleType, Rig, Holder
- AgentState type definition and constants
Removed from storage layer:
- 6 agent columns from DB schema (hook_bead, role_bead, agent_state,
last_activity, role_type, rig)
- Agent field scanning, insertion, and update allowlisting
Cleaned up references in:
- show_format.go (agent identity and slot display sections)
- create.go (--agent-rig flag and agent label auto-add)
- move.go, refile.go (RoleType/Rig field copying)
- doctor/deep.go (agent bead integrity check)
- config.go (agent role configuration functions)
Remove GT-specific HOP (Human-Oriented Programming) fields that were
only used by Gas Town agents, not by standalone beads:
- Remove Creator (*EntityRef), Validations ([]Validation),
QualityScore (*float32), Crystallizes (bool) from Issue struct
- Remove EntityRef, Validation types and ParseEntityURI function
- Drop quality_score and crystallizes DB columns via migration 012
- Remove from schema, scan, insert, and show display code
- Remove all related tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>