MGS1031: a project's output is another project's source
One project declares a file as an output. A different project's source glob also claims it. Both declarations are individually reasonable, and together they arm a report that blames the wrong project.
[advice] output-is-another-projects-source: 11 declared output(s) are also another
project's source
libs/testlayout/MAGUS.md is libs/testlayout's output and .'s source
Why it matters only later
Nothing misbehaves while the file's content is stable. The moment it changes:
- the owning project's
generaterewrites it, which is exactly its job - the claiming project is running a target that declared the same path as a source
- that target sees a declared input move underneath it and reports MGS4007 - an undeclared source mutation
The report is true about the write and wrong about the cause. The file is generated by definition, and the project named in the message never wrote it.
This is why the check is static. The conflict lives in the declarations, so it can be
answered before anything runs - and it is present for as long as the two globs overlap,
not only on the day some content drifts. In magus's own tree it sat on four projects'
MAGUS.md files for as long as the markdown spell has claimed **/*.md, and only the
one whose bytes went stale ever surfaced it.
What to do
Decide which project owns the file, then make the declarations say so:
- Narrow the claiming glob. Usually right when the claim is incidental - a broad
**/*.mdfrom a spell sweeping up a nested project's generated index. - Move the file into the owning project's tree, if it is only claimed because of where it sits.
- Leave it, deliberately. A file genuinely read by one project and written by another is a real relationship; declare the dependency so the ordering is explicit rather than incidental.
It is advice, not a failure, for the reason MGS1028 is: which project owns a file is the workspace's judgment, and a check that failed on it would be dictating a layout it cannot see the reasons for.
Exact paths only
The check compares an exact output path against the other project's globs. Whether two
globs can overlap is not decidable in general - the same line
MGS4002 draws - but whether a pattern matches one literal path
is. An output declared as a pattern (dist/**) is not reported.