feat: intake formalise mode — retroactively header the backlog#33
Merged
Conversation
formalise (once codenamed repair; renamed because raw prompts are intended word-vomit awaiting conception, not defects) selects census records with missing header fields and inserts the derived lines in place: Type/Target from the taxonomy folder (authoritative), Difficulty/Autonomy/Priority via the same sizing-faculty path used at conception. Every existing line survives byte-verbatim — including CRLF files, which are read newline-preserving and written back with their own endings. Work-type disagreements become re-home suggestions; files are never moved or deleted. Optional path-prefix scopes the run; dry-run proposes, --apply writes; re-runs are no-ops. Closes #32. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ttFH96vcXuCVZfSBZEytf
There was a problem hiding this comment.
Pull request overview
This PR adds an intake formalise mode to the Intake (Conception) Agent to retroactively insert missing prompt header fields for backlog prompts flagged by the census, while keeping the taxonomy folder authoritative and avoiding any file moves. It also updates the Intake CLI help and documentation to reflect the new subcommand and the rename from the previous “repair” codename.
Changes:
- Add
formaliseimplementation in the Intake agent to derive missing header fields via the same sizing-faculty path used at conception and optionally write them in-place under--apply. - Wire
formaliseinto theintake.shfront door and extend help output. - Update Intake docs (skill + agent docs + taxonomy) to document
formalise, its guarantees, and its CLI surface.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/intake/intake.md | Documents the new intake formalise CLI mode in the skill command. |
| agents/conductors/intake/intake.sh | Adds formalise to help text and subcommand routing. |
| agents/conductors/intake/INTAKE_TAXONOMY.md | Documents the formalise mode semantics and insertion rules. |
| agents/conductors/intake/AGENTS.md | Updates the Intake agent mode table and run examples to include formalise. |
| agents/conductors/intake/_intake.py | Implements field derivation, insertion, application, and reporting for formalise. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+515
to
+517
| first = next((i for i, ln in enumerate(lines) if ln.strip()), 0) | ||
| if lines and lines[first].lstrip().startswith("#"): | ||
| lines[first + 1:first + 1] = [""] + field_lines |
Comment on lines
+554
to
+557
| if "formalised retroactively" not in new: | ||
| nl = "\r\n" if "\r\n" in new else "\n" | ||
| new = new.rstrip("\r\n") + nl + nl + stamp + nl | ||
| path.write_text(new, encoding="utf-8", newline="") |
Comment on lines
+564
to
+566
| "generated": _dt.date.today().isoformat(), | ||
| "scanned": c["total"], | ||
| "formalised": len(proposals), |
This was referenced Jul 8, 2026
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
Adds
intake formalise— retroactive conception for the backlog. It selects the census records with missing header fields and inserts the derivedField: valuelines in place:Type:/Target:from the taxonomy folder (authoritative),Difficulty:/Autonomy:/Priority:via the same sizing-faculty path used at conception,Status: formalised. Every existing line survives byte-verbatim — including CRLF files, read newline-preserving and written back with their own endings. Work-type disagreements between the body classifier and the folder become re-home suggestions; the mode never moves or deletes a file.Renamed from the
repaircodename: raw prompts are intended word-vomit awaiting conception, not defects — andformaliseis the verb the agent already stamps (Status: formalised).Closes #32.
API Changes
CLI surface only — no Python API consumed downstream.
bin/pyauto-brain intake formalise [prefix]— dry-run proposes per prompt;--applywrites; optional path-prefix (bug/) scopes the run;--jsonsupported; re-runs are no-ops.See full details below.
Test Plan
Repos:/Milestone:untouched), headerless with heading, headerless word-vomit (derived# title), complete file byte-identical, CRLF file byte-preserved, prefix filter, idempotent re-run.classify/ideas/census/dashboardunchanged;bash -n+py_compileclean.Full API Changes (for automation & release notes)
Removed
Added
_intake.py::formalise(mind, prefix="", apply=False)— census-driven selection; writes only under--apply._intake.py::_derive_fields(text, work_type, target)— folder-authoritative header derivation via the sizing faculty._intake.py::_insert_fields(text, add, has_header, title)— byte-verbatim insertion (partial block / below heading / derived title), line-ending preserving._intake.py::emit_formalise(result)— terminal report incl. re-home suggestions.intake.sh—formalisesubcommand routed; help updated.Migration
repair→formalisenaming only affected docs (repairnever shipped).🤖 Generated with Claude Code
https://claude.ai/code/session_016ttFH96vcXuCVZfSBZEytf