Skip to content

feat(brief): add mandatory todo tracking section to worker briefs - #1940

Closed
Ospeto wants to merge 7 commits into
kunchenguid:mainfrom
Ospeto:fm/fm-default-worker-todos
Closed

Ospeto wants to merge 7 commits into
kunchenguid:mainfrom
Ospeto:fm/fm-default-worker-todos

Conversation

@Ospeto

@Ospeto Ospeto commented Aug 8, 2026

Copy link
Copy Markdown

Add concise mandatory section to generated ordinary ship and scout briefs in . Instructs spawned workers to derive a useful checklist from , create items with , keep exactly one item in progress, and complete items immediately.

Excludes persistent secondmate charters. Adds unit test assertions in ok - fm-brief.sh: bash -n succeeds
ok - fm-project-mode: omitted mode defaults to direct-PR on and malformed modes fall back safely
ok - fm-brief.sh: no heredoc is nested inside a command substitution (Bash 3.2 parse-safe)
ok - fm-brief.sh: --help renders the complete header
ok - fm-brief.sh: no-mistakes/direct-PR/local-only briefs generate cleanly
ok - fm-brief.sh: faster paths use configured authority without stacked review
ok - fm-brief.sh: no-mistakes DOD keeps its apostrophe prose without a direct-PR Oracle gate
ok - fm-brief.sh: ship project-memory wording carries the AGENTS.md authoring bar
ok - fm-brief.sh: --herdr-lab emits the complete hard safety contract
ok - fm-brief.sh: --herdr-lab uses its quoted Firstmate-owned helper path
ok - fm-brief.sh: ship and scout scaffolds make omitted Herdr intent fail-visible
ok - fm-brief.sh: Herdr lab contract covers scouts and rejects secondmate misuse
ok - fm-brief.sh: --no-projects scaffolds a project-less charter and guards misuse
ok - fm-brief.sh: marked requests avoid generic acknowledgements and preserve material reporting
ok - fm-brief.sh: relative directory inputs ignore CDPATH, render stable absolute charter paths, or fail loudly
ok - fm-brief.sh: custom pause verb renders in every scaffold
ok - fm-brief.sh: investigation and visual-review completions load the shared decision policy
ok - fm-brief: scout and secondmate code paths still scaffold well-formed briefs
ok - fm-brief.sh: ordinary ship and scout briefs include Todo tracking, while secondmate charters omit it. Fixes option parser validation and explicit mode/yolo overrides.

Ospeto and others added 7 commits August 2, 2026 08:57
* fix(bin): preserve full task contract in no-mistakes intent (kunchenguid#1447)

* Preserve task contract in no-mistakes intent

* no-mistakes(review): Preserve complete current task contract in no-mistakes intent

* fix(bin): parse punctuated secondmate registry entries safely (kunchenguid#1452)

* fix: centralize secondmate registry parsing

* no-mistakes(review): Centralize secondmate registry binding validation

* no-mistakes(review): Harden registry EOF and symlink validation

* no-mistakes(review): Reject unreadable registries before parsing

* no-mistakes(document): Document punctuation-safe secondmate registry validation

* no-mistakes: apply CI fixes

* feat: route brief research and specialist reviews

* fix: keep review guidance within delivery authority

* fix: authorize specialist review and inspect full range

* test: make gamma delivery mode explicit

* fix: reject malformed project mode tokens

* feat: standardize crewmate specialist workflow

* fix: tighten brief and mode contracts

---------

Co-authored-by: Kun Chen <3233006+kunchenguid@users.noreply.github.com>
* feat(dispatch): add role-aware quota dispatch and recovery

* no-mistakes(document): Document dispatch, recovery, and registry contracts

* no-mistakes(test): Added missing pi harness fixture; focused dispatch test passes

* test(dispatch): preserve delivery contract after rebase

* fix(spawn): remove Perl timeout dependency

* fix(spawn): preserve native preflight bounds

* test(spawn): cover compatible timeout selection

* fix(spawn): require descendant-safe timeout
Add a concise mandatory # Todo tracking section to generated ordinary
ship and scout briefs in bin/fm-brief.sh. Instructs spawned workers to
derive a useful checklist from # Task, create items with todo, keep
exactly one item in progress, and complete items immediately.

Excludes persistent secondmate charters. Adds unit test assertions in
tests/fm-brief.test.sh. Fixes bin/fm-spawn.sh option parser validation
for --mode, --yolo, and --traceparent.
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: closing this as stale. It has been waiting on a contributor update for 14+ days with no author push or comment. Reopen if you want to pick it back up.

@jabesr

jabesr commented Nov 5, 2026

Copy link
Copy Markdown

Notes for reviewers

  • Payload. data is the body of GET /v1/processes/{process_code}. The process is read by id through the tenant-scoped ProcessRepository, which caches it under its code too, and the GET's own GetProcessByCdProcess then builds the body from that cache. The body carries process_finish (profit values included) for a finished process, exactly as the GET already returns it to the same organization, so the webhook exposes nothing the ConnectAPI does not.
  • Fields from other tables are not covered. process_finish and quotations_codes come from other tables (processfinish, salesprocess); a change there does not save the process, so it publishes no event. The next process save carries the current values.
  • Legacy export coexists unchanged. Process.Exportable() still returns !SkipExport, and every write that reaches the callback still upserts smart.export as before. The webhook decision is separate: SkipExport does not suppress the webhook, and an internal-only write (for example a whole-obinfos write that leaves TpSubModality alone) keeps its legacy export and sends no webhook (pinned by webhook_export_process_test.go).
  • Fail-open. An update on a Process struct that never came from a full load has no baseline, so it publishes, as before the gate existed. The whole-obinfos writes found in app/model load the process first.
  • Raw SQL. The three house-sync UPDATEs that write exported columns (stprocess, iduseroperation, idsubstatus) now filter IS DISTINCT FROM, return idprocess, idoffice, and publish through core.PublishWebhookExportAfterRawUpdate, which resolves the tenant once per office. The dttrackinguntil sync and the courier-transmission obinfos key write no exported column and are unchanged.
  • table_process.go unlinkByIdMainProcess. It filters by idmainprocess and clears that same column, so a post-UPDATE reload would find nothing. It needs no change: idmainprocess is not exported, and its Model is a *[]Process, which the callback does not treat as a model. The batch rule (filter by primary key, never by a written column) is in .docs/workflows/hub-webhook-export.md.
  • job registers no GORM callbacks, so its Process writes publish nothing, unchanged.

Out of scope: what onboarding Process will need

  • A smart.webhookendpoint row per organization for the Process entity (identity 6600ed5d-ed3e-4eb5-bd61-e32330c72850).
  • OrganizationWebhookExportEnabled switched on for that organization.
  • In the webhook settings screen (smart-ui-vue): an i18n label and entry for the process entity, which WebhookExportEntities now lists from smart.entity.

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.

3 participants