feat: restructure main.md generation for reliable single-agent AI consumption#2
Merged
trmquang93 merged 1 commit intomainfrom Mar 15, 2026
Merged
Conversation
…sumption Rewrites generateMainMd() so AIs reading only main.md still consult the full spec files instead of implementing from the summary alone. Key changes: - Add "Instruction Files" table prominently before the roster with a "same directory" callout so the AI knows where to find sibling files - Replace "Your Role as Orchestrator" (which told the AI to skip detail files) with dual-mode "How to Use These Instructions" section that works for both single-agent and multi-agent workflows - Add "Planning Requirements" section requiring AI plans to include screen ID, image path, spec reference, and connection list per screen, so file references survive the context shift from planning to coding - Add "Spec" column to Screen Roster table pointing to each screen's section in screens.md - Replace Sub-Agent Contract fenced code block with proper H3-headed "Implementation Workflow" markdown (6 named steps) so AI treats it as instructions to follow, not a template to emit - Add explicit failure mode warning to Delegation section - Rename "Orchestrator Responsibilities" to "Final Integration" - Remove bottom "File Reference" section (absorbed into Instruction Files table)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
generateMainMd()so an AI given onlymain.mdstill reads the full spec files (screens.md,navigation.md,build-guide.md,images/) instead of implementing from the summary alonescreens.mdTest plan
main.mdtab shows "Instruction Files" table before the Screen RosterSpeccolumn withscreens.md > SCR-XXXXXXXXreferencesmain.mdto an AI and confirm it creates plans that include spec file references per screen