project

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Steering

func Steering(specsDir string) string

Steering reads <specsDir>/steering.md, the project-level directives to every agent working on the repository. A file that is missing, a symlink, empty, over the size bound, or that holds only the placeholder or the bare heading is nothing, and the result is "".

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

func DetectProfile(root string) Profile

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

func (p Profile) AuditTasks(content map[string]any) error

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) Known

func (p Profile) Known() bool

Known reports whether detection found anything.

func (Profile) LanguageBlock

func (p Profile) LanguageBlock() string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL