Standards and project config
A global standard, a project standard and a project override, and the files each phase gets.
This is an illustrative run on the sample project my-api. It shows how global and project standards and the two config.yaml files decide what each command reads.
The files
<home> is the folder theway path prints. Four files are added to the shipped content:
-
<home>/standards/test-first.md, a global standard for the develop phase only:--- applies_to: [develop] --- # Test First Write the failing test before the code it covers. -
<home>/projects/-home-you-code-my-api/standards/api-style.md, a project standard with no frontmatter:# API Style Every error response is JSON: {"error": "<message>"}. -
<home>/config.yaml, the shipped file with one value changed, which enables the opt-inqualitystandard for every project:standards: quality: enabled: true -
<home>/projects/-home-you-code-my-api/config.yaml, which turns it off again formy-api:standards: quality: enabled: false
What each phase gets
/theway:engineering, with or without --light, loads the engineering phase:
$ theway standards engineering
<home>/projects/-home-you-code-my-api/standards/api-style.md/theway:workflow loads the develop phase:
$ theway standards develop
<home>/standards/test-first.md
<home>/projects/-home-you-code-my-api/standards/api-style.mdWhy each file is or is not listed:
api-style.mdhas noapplies_to, so it applies to every phase. A user standard is enabled by default (api_style: true).test-first.mdis listed for develop only: itsapplies_tonames only that phase. Global files come before the project's.quality.mdis listed in neither: the global config enables it, but the project config overrides the key withfalse.core-principles.md,sre.mdandweb-development.mdare shipped opt-in standards that nothing enables.develop.md,interaction.mdandauthority.mdare never listed: the commands read them by path,authority.mdthroughtheway authority. A globalauthority.mdthat.shipped.jsondoes not list is your own standard, and is listed. Neither arecommits.mdandgit-host.md, the convention standardstheway workflowresolves.
The context a command loads
A command's first step runs theway context, which prints the same standards list next to the config it uses:
$ theway context develop add-x
home: <home>
project: -home-you-code-my-api
project_dir: <home>/projects/-home-you-code-my-api
change_dir: <home>/projects/-home-you-code-my-api/changes/add-x
standards:
- <home>/standards/test-first.md
- <home>/projects/-home-you-code-my-api/standards/api-style.md
config:
standards:
core_principles:
enabled: false
sre:
enabled: false
web_development:
enabled: false
quality:
enabled: false
api_style:
enabled: true
test_first:
enabled: true
workflow:
defaults: {}change_dir is printed even though add-x has no folder yet. Every agent of /theway:workflow gets the two paths of standards, and its reports name them: test-first.md, api-style.md.
See Configuration for every key.