fix: prevent sentinel whitespace drift on regeneration#52
Open
aommi wants to merge 8 commits into
Open
Conversation
… (MCP-T5) Closes MCP parity gaps — all 8 pipeline capabilities now have MCP tools. Package actions (3 new helpers): - generate_answers_for_job(): form answer drafting with append semantics - critique_package_for_job(): recruiter review, strongest-model selection - generate_questions_for_job(): per-stage STAR questions, append mode MCP tools: answer_questions(job_id, questions), critique_package(job_id), generate_questions(job_id, stage, count) CLI refactored: critique/questions are thin wrappers; answer delegates to helper. Critique model constants (_CRITIQUE_MODELS) centralized in package_actions. Tests: 14 new (job_not_found, package_missing, config_error, success for each tool). Parity guard updated to 8 pairs. Full suite: 275P/12S — no regressions. Docs: README tools table + example prompts, architecture/MCP.md surface table.
Supersedes earlier Python-engine-extraction approach. Key decisions: - Pipeline orchestrator IS a skill (markdown), not Python code - Deterministic tools (scrape, clean, render, assemble) keep execution sharp - Eval gate: 20 real URLs with measured consistency before shipping - Fallback: thin Python orchestrator only if eval gate fails - Removed obsolete V1 and V2 execution plans
…e test after setup)
Moved to docs/planning/two-product-strategy/: - TWO_PRODUCT_STRATEGY.md (pitch) - TWO_PRODUCT_EXECUTION.md (plan) - applycling-two-products.pptx (10-slide deck) - build_deck.js (deck builder) - REVIEW.md (external agent review) - RESPONSE.md (my response to review) - README.md (directory summary + open questions) 5 unresolved questions captured for next session.
Normalize suffix after sentinel block — strip overlapping newline between block's trailing \n and post-sentinel content. Confirmed in the wild during jane-interview-coach bootstrap. Same fix applied there in PR #4.
- Copy latest generate.py, adapters/, templates/, eval/ from agent-memory-kit - Regenerate AGENTS.md with candidates.md/rejected.md + Stage→Graduate flow - Add memory/candidates.md and memory/candidates.rejected.md (tracked) - Add candidates paths to project.yaml memory.files - All checks pass — no drift
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.
Fix the known
.lstrip("\n")pitfall inwrite_managed_section().Root cause: line 80 concatenates
block(which ends with\n) withexisting[end_idx + len(SENTINEL_END):]without normalizing the overlapping newline. Every regeneration appended an extra blank line after<!-- amk:end -->.Confirmed in the wild during jane-interview-coach bootstrap (PR aommi/jane-interview-coach#4).
Fix: strip leading
\nfrom suffix before concatenation — same approach documented in agent-memory-kit-management skill pitfalls.