requirements-finalizer
Skill1 starsChanged 55 days agoMITView on GitHub
Author phase-F per-file `requirements.md` for ONE mainframe or IBM i (AS400) source from its prepared section drafts. LLM-driven. USE FOR: assemble IBM i or mainframe technical requirements, stitch REQ sections, and phase-F finalization. DO NOT USE FOR: per-section authoring, index/complete, QA, or portal build.
In this repository17 other files it gives its agents.
- chunk-text-extractionSkill
- cobol-chunkingSkill
- cobol-facts-extractionSkill
- diagram-rendererSkill
- facts-slicingSkill
- functional-analysis-finalizerSkill
- functional-analysis-group-finalizerSkill
- functional-analysis-group-writerSkill
- functional-analysis-writerSkill
- group-doc-finalizerSkill
- qa-reviewerSkill
- requirements-group-finalizerSkill
- requirements-group-writerSkill
- requirements-writerSkill
- section-doc-finalizerSkill
- section-doc-writerSkill
- technical-analysis-writerSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Never require or create an unrequested English edition or intermediate.
- Very specific: line 26
Every per-section requirements draft for the file has been authored and passed qa-reviewer (kind: "requirements").
- Distinctive: line 32
Do not use this skill for:
- Distinctive: line 66
When multiple languages are requested, align heading structure, requirement ids, table row count, and consolidated footnote ids 1:1 across …
- Very specific: line 76
Tombstone check: If _req-bundles/_skipped.json exists, the file is opted out of phase F entirely.
- Very specific: line 107
Never re-derive output paths — use bundle.output_paths verbatim.
- Very specific: line 108
Never load facts.json / profile.yaml / per-section drafts directly at runtime — every byte lives in the bundle.
- Very specific: line 134
Front-matter fabrication: Every {{PLACEHOLDER}} MUST resolve from bundle.front_matter_values.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Requirements Finalizer (per-file, phase F)
LLM-driven phase-F finalizer. For ONE source file, stitches the per-section
requirements drafts written by requirements-writer
into a single, complete requirements.md for exactly bundle.languages, in
declared order at bundle.output_paths, co-finalised in the same LLM call.
Never require or create an unrequested English edition or intermediate.
Status: implemented. The contract and bundle schema are pinned, and the requirements-specific packager under scripts/ is implemented.
This is the per-file scope of the requirements family. The per-section
requirements-writer skill explicitly forbids authoring the final stitched
document; that scope lives here. The same agent
(requirements-writer.agent.md) handles both scopes — only the bundle input
differs.
When to Use
- Every per-section requirements draft for the file has been authored and
passed
qa-reviewer(kind: "requirements"). - The user asks to "build requirements.md", "finalize the ATE", "stitch the requirements sections", "produce the per-language requirements document for DEMO100".
Do not use this skill for:
- Per-section drafts (
_req-sections/<lang>/*.md) — owned byrequirements-writerper-section. - Phase G functional-analysis — owned by
functional-analysis-finalizer. - Phase C
index.md/complete.md— owned bysection-doc-finalizer. - File-level overview
.mmddiagrams — owned bydiagram-renderer. - Per-file QA review — owned by
qa-reviewer. - Portal aggregation across files — owned by phase N.
Output Contract
For file <basename-with-ext> and each language <lang>:
docs/<lang>/<basename-with-ext>/requirements.mdThe document MUST:
- Open with the H1 banner from
profile.front_matter.title_pattern(or theheadersection spec) with placeholders substituted frombundle.front_matter_values. - Render the classification + metadata tables from
profile.front_matterwhenshow_classification/show_metadata_tableare true. - Concatenate every per-section draft from
bundle.section_drafts.<lang>in profile order. - Replace missing optional sections with the section heading followed by a
single paragraph containing exactly
profile.section.optional_marker. - Renumber per-section
[^src-N]footnotes into ONE consolidated## Sourcesblock at the end of the document. - Append the footer from
profile.footerverbatim when present. - When multiple languages are requested, align heading structure, requirement ids, table row count, and consolidated footnote ids 1:1 across those languages only.
Procedure
- Resolve inputs. Required under
docs/_shared/<basename-with-ext>/:_req-bundles/_finalize.bundle.json(+.mdview)._req-sections/<lang>/<section_id>.mdfor every required section inprofile.sections× every requested language. On any miss: exit4and report exactly which drafts are missing.
- Tombstone check. If
_req-bundles/_skipped.jsonexists, the file is opted out of phase F entirely. Exit0without writing. - Stale-input check. Re-hash
_req-bundles/_finalize.bundle.json::manifest_shaagainst the on-disk source sha. Mismatch → exit5and prompt to re-run phase A. - Assemble the bundle. Invoke scripts/assemble-inputs.py.
- Author. The
requirements-writeragent reads the bundle and writesrequirements.mdper language at the exact path declared underbundle.output_paths. - Validate mechanically. Invoke
qa-reviewer--kind requirementsper language.
Bundle Schema
Mirror of the functional-analysis-finalizer bundle. See
functional-analysis-finalizer/SKILL.md
substituting _fa- → _req- and functional-analysis.md → requirements.md.
Key fields: bundle_version, scope: "per-file", source_path, source_kind,
manifest_sha, profile_name, profile_path, profile, profile_sha,
front_matter_values, languages, ordered_sections, section_drafts.<lang>,
missing_sections.<lang>, output_paths.<lang>.
Determinism Rules
- The bundle packager is fully deterministic: re-running on unchanged inputs emits a byte-identical bundle (per-section drafts hashed individually).
- The LLM finalisation step is NOT deterministic — that is expected. What IS
deterministic is the shape: same section order, same consolidated
footnote numbering, same
optional_markerfor missing sections, same front-matter substitutions, same requirement-id sequence. - Forbidden re-derivations from the finalisation path:
- Never re-derive output paths — use
bundle.output_pathsverbatim. - Never load
facts.json/profile.yaml/ per-section drafts directly at runtime — every byte lives in the bundle.
- Never re-derive output paths — use
Resources
- scripts/assemble-inputs.py — deterministic per-file finalizer bundle packager.
requirements-writer— sibling per-section authoring skill.
Pipeline Wiring
config/pipeline-dag.yaml phase F lists requirements-writer at per-file
scope as the finalizer step, immediately after every per-section authoring call
has completed and been QA'd. The qa-reviewer per-file step
(kind: "requirements") closes phase F per language.
Common Pitfalls
- Out-of-order stitching. Section order MUST come from
bundle.ordered_sections, never from filesystem enumeration of_req-sections/<lang>/*.md. - Footnote collision. Each per-section draft restarts
[^src-N]from 1; the finalizer MUST re-number across the consolidated document. - Requirement-id collision. REQ-NNN / NFR-NNN ids MUST be globally unique across the consolidated document. The qa-reviewer flags duplicates.
- Optional-section drift. A required section missing from
_req-sections/is anerror— never silently fill it withoptional_marker. - Front-matter fabrication. Every
{{PLACEHOLDER}}MUST resolve frombundle.front_matter_values.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

