Skip to content

docs: add optional TweetClaw launch signals#6

Open
kriptoburak wants to merge 4 commits into
Ckokoski:mainfrom
kriptoburak:codex/add-tweetclaw-launch-signals
Open

docs: add optional TweetClaw launch signals#6
kriptoburak wants to merge 4 commits into
Ckokoski:mainfrom
kriptoburak:codex/add-tweetclaw-launch-signals

Conversation

@kriptoburak

@kriptoburak kriptoburak commented May 18, 2026

Copy link
Copy Markdown

Summary

  • Add optional TweetClaw launch-signal guidance to AuthorAgent marketing research.
  • Keep imported output limited to reviewed summaries, public identifiers, and decisions.
  • Repair clean installs by synchronizing package-lock.json with package.json.
  • Reject mixed-separator path traversal on every platform and make its test portable.
  • Remove a duplicate marketing-research trigger.

Validation

  • npm ci --ignore-scripts --no-audit --no-fund
  • npm run check - 22 files and 443 tests pass.
  • git diff --check upstream/main...HEAD
  • Verified the TweetClaw repository and current npm package are public.
  • Verified all marketing-research triggers are unique.
  • Verified a clean merge with the current upstream main.

Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.

pshort05 added a commit to pshort05/bookclaw that referenced this pull request Jun 7, 2026
…ind vocabulary; reject name on single kinds; await editor open (review Ckokoski#6/Ckokoski#8/Ckokoski#9/Ckokoski#10)
pshort05 added a commit to pshort05/bookclaw that referenced this pull request Jul 2, 2026
…limits

Full-codebase bug review (docs/BUG-REVIEW-2026-07-02.md): every finding verified,
all medium-or-higher fixed with TDD. Full unit suite 1323/1323, MCP 34/34, smoke
all-pass, tsc clean (gateway + mcp + studio).

Security / auth (HIGH):
- #1 auth-gate case bypass: gates matched /api/ case-sensitively while Express
  routes case-insensitively, so /API/... skipped auth. All gates + the 404
  handler now use a case-insensitive API_PATH_RE. Smoke test asserts it.
- Ckokoski#6 /api/author-os/format path traversal: confinement was the repo root, so
  ../.env (vault key + auth token) leaked. Confine to the workspace; drop the
  repo-root search candidate.
- Ckokoski#11 MCP escape-hatch bypass: guard ran on the raw path; %2e%2e / backslash
  dot-segments normalized to the approve route on the wire. Normalize via
  new URL(...).pathname before the checks.
- Ckokoski#3 Telegram bridge fail-closed: an empty allowedUsers authorized everyone
  (internet-reachable via long-polling). Empty allowlist now rejects all; loud
  startup warning.

Manuscript data-loss / concurrency (HIGH):
- Ckokoski#2/Ckokoski#5/Ckokoski#8 shared per-project drive lock on ProjectEngine
  (tryStartDriving/stopDriving), claimed by /auto-execute, /execute, the bridge
  autoRunProject + web-chat "continue", and the review-resolver/headless sweep —
  no two runners drive the same step (double spend + overwritten chapters). Chat
  "continue" also gains the project.review 409 guard.
- Ckokoski#7 POST /projects/:id/execute now writes the step .md (strip-meta parity), so a
  chapter run individually no longer vanishes from disk-based assembly.
- Ckokoski#4 word-target continuation now anchors each pass on the draft-so-far tail
  (continuationAnchor) instead of restarting the chapter blind.
- Ckokoski#9 export-docx rejects a non-.md source (was overwriting the source with DOCX).
- Ckokoski#10 context-engine JSON recovery uses jsonrepair, no longer mangling "word:"
  inside string values (dropped chapter summaries/entities).

AI router (MEDIUM):
- #13 Claude thinking budget added ON TOP of the output budget (was subtracted).
- #14 completeClaude throws on an empty completion so fallback fires.
- #15 max_tokens clamped to the provider cap (DeepSeek 8192).
- #16 CostTracker.setLimits(): spend-limit changes take effect live (constructor-
  only before), wired into /api/config/update.

Other MEDIUM:
- Ckokoski#12 fallback-provider success path now persists to durable memory + recall.
- #17 chapter-summary numbering/keying (chapterSummaryTarget, shared by both
  hooks): number by the step's chapterNumber; polish replaces write.
- #18 plot-promise/structure-check re-hydrate truncated step results first.
- #19 MCP export_docx sends the required filename body param.
- #20 document upload/delete/project-upload wrapped in asyncHandler (no hang).
- #21 library skill import clears the dest dir (no stale steps.json on override).
- #22 auto consistency audit claims the job registry (no ledger-corrupting race).
- #23 proposeWorldDocs reads .text (router shape), not .content — ranking worked.
- #24 memory search indexes EVERY book's data dir with a per-directory watermark.
- #25 RepullPanel keyed on the active slug so a book switch remounts it.

Low findings (#26-#31) verified present; left unfixed per scope (verify-only).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pshort05 added a commit to pshort05/bookclaw that referenced this pull request Jul 11, 2026
…he 2026-07-10 review

Addresses all remaining findings in docs/BOOK-GENERATION-REVIEW-2026-07-10.md
(criticals #1-5 shipped separately in f491415). Each fix TDD'd (failing test →
fix → green), fanned out across disjoint files, then per-batch code-reviewed with
all medium+ findings fixed. Full tsc clean; 140 new/extended bug-fix unit tests.

High (Ckokoski#6-13):
- Ckokoski#6 /execute now honors the review + cadence gates (was a gate bypass); a stale
  review-approve can no longer clobber an already-completed step.
- Ckokoski#7 retry/restart/skip/resume refuse (409) while a project is driving.
- Ckokoski#8 a project with a 'failed' step no longer auto-completes / fires hooks
  (completeStep + skipStep).
- Ckokoski#9 Gemini high-reasoning no longer starves output (thinking budget added on top
  of maxOutputTokens, shared effectiveMaxOutputTokens helper).
- Ckokoski#10 truncation detected + surfaced (truncated/finishReason on CompletionResponse)
  across all 3 providers; DeepSeek clamp warns.
- Ckokoski#11 EPUB mimetype now stored + first (OCF-valid).
- Ckokoski#12 a failed author-load no longer blanks the current author identity
  (compose-into-locals).
- #13 regenerating an early chapter no longer leaks the finale/later chapters as
  "previous chapter" / "earlier events".

Medium (#14-28):
- #14 council in /execute runs under the drive lock (no double-bill).
- #15 edit/regenerate on a pipeline-gate honored (not silent-approve).
- #16 adaptive interview transcript normalized user-first (Claude/Gemini no longer
  reject turn 2); #17 done gated on essential seeds (no blank review).
- #18 writing-phase context keeps the current chapter's outline beats; default
  context bounded.
- #19 rolling-summary reserves budget for the entity registry.
- #20 word-count meta: whole-book/planning labels stripped always, per-scene
  estimates preserved on non-prose deliverables.
- #21 write-gate fails closed on an unreadable manifest; setAppendix gated.
- #22 repull clears stale files; series pipeline pull updates pipelineSequence;
  all sequence pipelines repullable.
- #23 manuscript hub counts each step once (words from file_saved, steps from
  step_completed).
- #24 mapRunnerPath rejects dot-segment/.. paths (no .versions overwrite).
- #25 provider route persists; template writes guarded.
- #26 legacy no-book delete scoped to the project's own files.
- #27 router/library reinit build-local-then-swap (no empty-collection window).
- #28 orchestrator: health-restart works, spawn errors emit + auto-restart,
  atomic config persist, BOOKCLAW_AUTH_TOKEN stripped from spawned scripts.

Low (#29-36):
- #29 Gemini joins all response parts; o-series/OpenRouter reasoning headroom.
- #30 skipping a parked council step clears the selection (no phantom gate).
- #31 /council/select rejects an unknown candidateId.
- #32 skip research for a real-but-unnamed place; council fallback labels
  characters correctly.
- #33 beat math monotonic/gap-free for any chapter count; phase label no longer
  leaks as the book title.
- #34 export polish: no phantom title chapter; stray --- not a scene break;
  ####/blockquote handled; conservative italics; revision rewrite supersedes polish.
- #35 honest cache stat; opt-in paid-Gemini cost; retry Anthropic 529; no swap of a
  pinned deepseek-chat; budget-vs-config error; book_bible budget 12288->16384.
- #36 interpolate warns on unknown vars; throttle limit<=0 clamped; deterministic
  canon selection; pipeline schema-validated on load; local daily-cost boundary;
  claimSlug cleaned up on create() failure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pshort05 added a commit to pshort05/bookclaw that referenced this pull request Jul 12, 2026
…AuthorAgent fork

- Ckokoski#4 prose-evolver: GEPA score->reflect->revise loop over WritingJudge; POST /api/prose/evolve + MCP evolve_prose
- Ckokoski#5 reader-panel: marketing-copy ranking with anti-slop guards; POST /api/reader-panel/run + MCP run_reader_panel
- Ckokoski#6 conductor: opt-in dependency-DAG bounded scheduler (dependsOn + deriveDependencies + conductorDrive); legacy 23-book path byte-identical (gated on pipeline.conductor && no parallelGroup)
- Ckokoski#7 learning: fold recurring craft/dialogue/continuity flags into deduped LessonStore lessons; completion hook + POST /api/projects/:id/learn
- Ckokoski#8 writing-stats: persisted streak/week/total via heartbeat addWords; GET /api/writing/stats + POST /api/writing/log-words
- Ckokoski#9 archival-recall: splice memory-search FTS hits into the chat system prompt (chat-only via !isEphemeralChannel), persona-scoped, fail-soft
- 46 new unit tests + tests/tier2-features-smoke.sh (11/11 on Mercury); tsc clean root+mcp; Opus code review, all medium+ findings fixed
- spec/plan under docs/superpowers/; deployed to Mercury
@kriptoburak
kriptoburak force-pushed the codex/add-tweetclaw-launch-signals branch from 4c2011c to e473237 Compare July 18, 2026 05:24
@kriptoburak

Copy link
Copy Markdown
Author

Rebased this PR onto the current AuthorAgent main and resolved the conflict.

I also repaired 3 independent repository issues found during validation:

  • synchronized the stale lockfile so npm ci works again
  • normalized mixed path separators before resolution, closing the POSIX backslash traversal gap
  • made the path test platform-neutral and removed a duplicate marketing trigger

Validation now passes: clean install, TypeScript, 22 test files, 443 tests, diff checks, unique-trigger audit, public TweetClaw links, and a clean merge simulation.

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