Documentation
¶
Overview ¶
Package project detects what a repository is written in and how it is checked, so that a plan naming another ecosystem's tooling can be refused in code rather than found in review.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Profile ¶
type Profile struct {
// Language is the ecosystem, or "" when it could not be determined.
Language string
// AllTests and Linter are the project's real commands.
AllTests string
Linter string
// Manifest is the file the detection was made from, for the message.
Manifest string
// StubMarker is the language's spelling of "not implemented", which the
// integration task is meant to search for.
StubMarker string // Also are the other ecosystems whose manifests are present beside the
// primary one (a package.json frontend in a Go repository).
Also []string
}
Profile is what this repository is written in and how it is checked.
It exists to make the skill's "post-generation language audit" a mechanism instead of a chore. The skill asks a human to read tasks.json afterwards and check that test_commands names the project's real runner, because a model asked to plan work in a repository it did not look at will reach for whichever ecosystem its training favours and write `pytest` into a Go project. Detecting the answer in Go and refusing a mismatched submission turns that from a review item into a repair the model performs before the file is ever written.
func DetectProfile ¶
DetectProfile reads the repository and reports what it is written in.
The Makefile is consulted for the commands but never for the language: a project that ships `make check` has answered "how do I check this", and the manifest has answered "what is this written in". Conflating them would make a Go repository with a Makefile look like a project with no language.
func (Profile) AuditTasks ¶
AuditTasks checks a submitted tasks artifact against the detected project.
It refuses exactly one thing: a test command whose program belongs to a different, known ecosystem. That is narrow on purpose. `go test ./...` in a Python project is unambiguously wrong and mechanically detectable; a command this table has never heard of might be `./scripts/ci.sh`, which is legitimate and which a stricter check would reject.
The returned error is read by the model, so it names both what was submitted and what the project actually uses.
func (Profile) LanguageBlock ¶
LanguageBlock is the section of a generation prompt that tells the model what the project is. It is the positive half of the audit above: saying it up front is cheaper than refusing a submission afterwards.