Repository files navigation

Steergen

Write your AI steering docs once. Generate for every tool.

BuildNuGetLicense: MIT

Steergen is a .NET CLI tool that maintains a single set of steering and constitution documents, then generates the target-specific formats expected by tools like Kiro and Speckit. Change your guidance once; every downstream tool stays in sync.

For a full walkthrough — including greenfield setup, CI integration, and writing rules — see the Getting Started guide.


Table of Contents


Requirements


Installation

dotnet tool install --global aabs.steergen

To upgrade an existing installation:

dotnet tool update --global aabs.steergen

Verify the install:

steergen --version

Quick Start

1. Initialise a project for the targets you want to use:

steergen init . --target kiro --target copilot-agent

This creates steering/global/, steering/project/, steergen.config.yaml, and the target-native output folders.

2. Write a steering document under steering/project/:

---id: engineering-baselinetitle: Engineering Baseline---# Engineering Baseline
:::rule id="CORE-001" mandatory="true" category="quality" tags="quality,reviews"
Prefer small, composable changes that are easy to review and easy to revert.
:::

3. Generate outputs for all registered targets:

steergen run

4. Validate source documents without regenerating:

steergen validate

That's it. For more scenarios — shared policy collections, custom output paths, MSBuild integration, CI setup — see the Getting Started guide.


Supported Targets

TargetDefault output path
kiro.kiro/steering/
speckit.specify/memory/
copilot-agent.github/
kiro-agent.kiro/agents/

Add or remove targets at any time:

steergen target add speckit
steergen target remove kiro

Command Reference

CommandPurpose
steergen init [root] [--target <id>...]Bootstrap config and target folders
steergen run [options]Generate output files for all registered targets
steergen validate [options]Validate source documents and template packs
steergen inspect [--templates] [--rules]Print resolved model, template chain, or rules pack info
steergen target add <id>Register a new target (built-in or pack-provided)
steergen target remove <id>Unregister a target
steergen purge [options]Remove generated files managed by steergen
steergen update [--templates] [--rules] [--force]Re-download configured packs
steergen template-pack add <source> [--ref <ref>] [--path <localPath>]Add a template pack
steergen template-pack upgrade --selector <source|entryKey> [--tag <tag>]Upgrade the configured template pack reference
steergen template-pack removeRemove the configured template pack
steergen rules-pack add <source> [--ref <ref>] [--path <subdir>] [--scope <scope>]Add a rules pack
steergen rules-pack upgrade --selector <source|path> [--tag <tag>]Upgrade one configured rules pack reference
steergen rules-pack remove <name>Remove a rules pack by name
steergen rules-pack listList configured rules packs with status

Commonly used run options:

--config <path> Path to steergen.config.yaml
--project <dir> Override projectRoot
--output <dir> Override generationRoot
--target <id> Generate for one target only (repeatable)
--quiet Suppress informational output
--verbose Show detailed output

Configuration

Steergen looks for steergen.config.yaml in the current directory (or the path given by --config).

A minimal config file:

projectRoot: steering/projectgenerationRoot: .registeredTargets:
- kiro
- copilot-agent

A config with template pack and rules packs:

projectRoot: steering/projectgenerationRoot: .templatePack:
source: "github:acme-corp/steergen-templates"ref: "v2.1.0"rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"registeredTargets:
- kiro
- copilot-agent

Key fields:

FieldPurpose
projectRootSource folder for project-specific steering docs
generationRootBase folder for all generated output
registeredTargetsList of targets to generate by default
templatePackTemplate pack source configuration (see Template Packs)
rulesPacksList of rules pack entries (see Rules Packs)
activeProfilesProfile names (legacy; retained for backward compatibility)

Note: The globalRoot field has been removed. If your config still contains globalRoot, Steergen will report error CFG001 and exit with code 2. See the migration guide for how to convert existing global rules to a rules pack.

For full configuration options and advanced routing, see Section 5 and Section 6 of the Getting Started guide.


Template Packs

Template packs let you override the built-in Scriban templates that Steergen uses to render output, or provide complete target definitions for new external targets. Packs can be sourced from a local directory or a public GitHub repository.

Adding a template pack from GitHub

steergen template-pack add github:acme-corp/steergen-templates --ref v2.1.0

This writes the source to steergen.config.yaml and downloads the pack to the local cache at ~/.steergen/packs/acme-corp/steergen-templates/v2.1.0/.

Adding a local template override path

steergen template-pack add --path ./custom-templates

Local overrides take the highest precedence in the resolution chain.

Template resolution precedence

When rendering, Steergen resolves templates in this order:

  1. Local override path (templatePack.localPath) — highest precedence
  2. Cached GitHub pack (templatePack.source) — middle precedence
  3. Built-in embedded templates — fallback

Updating a template pack

Re-download the configured GitHub pack to pick up changes:

steergen update --templates

On success, displays the pack name, version, and number of template files. If the pack is pinned to a 40-character SHA, re-download is skipped unless --force is specified:

steergen update --templates --force

If no template pack is configured, the command exits with code 0 and reports that no pack source is configured.

Upgrade a specific template pack reference and persist a deterministic (tag, commitSha) tuple:

steergen template-pack upgrade --selector "github:acme-corp/steergen-templates|templates/default" --tag v2.1.0

When --tag is omitted, the command runs in latest-refresh mode, snapshots cache, purges the targeted cache copy, and refetches.

Inspecting the template chain

See which templates come from which source:

steergen inspect --templates

Displays the active resolution chain showing the source (local override, cached GitHub pack, or built-in) for each template.

Removing a template pack

steergen template-pack remove

Removes the template pack configuration from steergen.config.yaml.

Configuration reference

templatePack:
source: "github:acme-corp/steergen-templates"# GitHub sourceref: "v2.1.0"# Tag, branch, or 40-char SHA# OR use a local path instead:# localPath: "./custom-templates"

Rules Packs

Rules packs are shared governance rule sets published to GitHub repositories. They let teams share steering documents across projects without copying files. Each pack declares a scope that determines its merge precedence relative to project-local rules.

To create and publish your own rules pack, see the Authoring a Rules Pack guide.

Adding a rules pack

steergen rules-pack add github:acme-corp/baseline-rules --ref v1.0.0 --scope global

Options:

OptionPurpose
--ref <ref>Git tag, branch, or 40-character SHA
--path <subdir>Subdirectory within the repo (for multi-pack repos)
--scope <scope>Override the pack's manifest scope (global, supplemental, or project)

The command appends the pack to the rulesPacks list in steergen.config.yaml and downloads it to ~/.steergen/rules/{owner}/{repo}/{ref}/.

Scope-based merge precedence

When multiple rule sources define the same rule ID, Steergen resolves conflicts using scope-based precedence:

  1. Project-local rules — highest precedence (your projectRoot documents)
  2. Project-scoped packs — rules packs with scope: project
  3. Supplemental-scoped packs — rules packs with scope: supplemental
  4. Global-scoped packs — rules packs with scope: global (lowest precedence)

Within the same scope level, packs declared earlier in the rulesPacks list take precedence. Duplicate rule IDs at the same scope emit a diagnostic warning.

The --scope option on rules-pack add overrides the scope declared in the pack's own manifest, letting consumers elevate or demote a pack's precedence.

Listing configured rules packs

steergen rules-pack list

Displays all configured rules packs with their source, ref, scope, and cache status.

Updating rules packs

Re-download all configured rules packs:

steergen update --rules

SHA-pinned packs are skipped unless --force is specified:

steergen update --rules --force

Upgrade exactly one configured rules pack reference by canonical selector:

steergen rules-pack upgrade --selector "github:acme-corp/team-rules|backend-team" --tag v1.1.0

Selector escaping rules:

  • Use \\| for a literal | inside either selector component.
  • Use \\\\ for a literal backslash.

Inspecting rules packs

steergen inspect --rules

Displays all configured rules packs with their name, version, source, scope, and number of rules loaded.

Removing a rules pack

steergen rules-pack remove acme-baseline-rules

Removes the matching entry from the rulesPacks list in steergen.config.yaml.

Configuration reference

rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"# Pinned SHA (recommended)scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"# Subdirectory within repo
- source: "github:acme-corp/security-rules"ref: "main"# Branch (pinning recommended)scope: supplemental

Tip: Pin rules packs to a tag or full SHA for deterministic builds. Branch refs work but Steergen will recommend pinning in diagnostic output.


Exit Codes

CodeMeaning
0Success
1Validation errors in source documents
2Configuration or I/O error
3Generation or purge error
5Output conflict (file already exists with different content)

Contributing

Contributions are welcome. To get started locally:

git clone https://github.com/aabs/steergen.git
cd steergen
dotnet build
dotnet test

For an overview of how the codebase is structured, see the developer guide or load the code tour in VS Code with the CodeTour extension.

Please open an issue before submitting a pull request for significant changes.


Troubleshooting

steergen not found after install Ensure ~/.dotnet/tools (Linux/macOS) or %USERPROFILE%\.dotnet\tools (Windows) is on your PATH.

No output files generated Run steergen validate first — generation is skipped when source documents contain errors.

Generated files differ between machines Check that projectRoot points to the same content on each machine and that rules packs are pinned to the same ref. Use steergen inspect to compare the resolved model.

Something else? Open an issue at https://github.com/aabs/steergen/issues.


License

MIT

About

A CLI tool for sharing steering files across multiple SDD tools

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

Steergen

Write your AI steering docs once. Generate for every tool.

BuildNuGetLicense: MIT

Steergen is a .NET CLI tool that maintains a single set of steering and constitution documents, then generates the target-specific formats expected by tools like Kiro and Speckit. Change your guidance once; every downstream tool stays in sync.

For a full walkthrough — including greenfield setup, CI integration, and writing rules — see the Getting Started guide.


Table of Contents


Requirements


Installation

dotnet tool install --global aabs.steergen

To upgrade an existing installation:

dotnet tool update --global aabs.steergen

Verify the install:

steergen --version

Quick Start

1. Initialise a project for the targets you want to use:

steergen init . --target kiro --target copilot-agent

This creates steering/global/, steering/project/, steergen.config.yaml, and the target-native output folders.

2. Write a steering document under steering/project/:

---id: engineering-baselinetitle: Engineering Baseline---# Engineering Baseline
:::rule id="CORE-001" mandatory="true" category="quality" tags="quality,reviews"
Prefer small, composable changes that are easy to review and easy to revert.
:::

3. Generate outputs for all registered targets:

steergen run

4. Validate source documents without regenerating:

steergen validate

That's it. For more scenarios — shared policy collections, custom output paths, MSBuild integration, CI setup — see the Getting Started guide.


Supported Targets

TargetDefault output path
kiro.kiro/steering/
speckit.specify/memory/
copilot-agent.github/
kiro-agent.kiro/agents/

Add or remove targets at any time:

steergen target add speckit
steergen target remove kiro

Command Reference

CommandPurpose
steergen init [root] [--target <id>...]Bootstrap config and target folders
steergen run [options]Generate output files for all registered targets
steergen validate [options]Validate source documents and template packs
steergen inspect [--templates] [--rules]Print resolved model, template chain, or rules pack info
steergen target add <id>Register a new target (built-in or pack-provided)
steergen target remove <id>Unregister a target
steergen purge [options]Remove generated files managed by steergen
steergen update [--templates] [--rules] [--force]Re-download configured packs
steergen template-pack add <source> [--ref <ref>] [--path <localPath>]Add a template pack
steergen template-pack upgrade --selector <source|entryKey> [--tag <tag>]Upgrade the configured template pack reference
steergen template-pack removeRemove the configured template pack
steergen rules-pack add <source> [--ref <ref>] [--path <subdir>] [--scope <scope>]Add a rules pack
steergen rules-pack upgrade --selector <source|path> [--tag <tag>]Upgrade one configured rules pack reference
steergen rules-pack remove <name>Remove a rules pack by name
steergen rules-pack listList configured rules packs with status

Commonly used run options:

--config <path> Path to steergen.config.yaml
--project <dir> Override projectRoot
--output <dir> Override generationRoot
--target <id> Generate for one target only (repeatable)
--quiet Suppress informational output
--verbose Show detailed output

Configuration

Steergen looks for steergen.config.yaml in the current directory (or the path given by --config).

A minimal config file:

projectRoot: steering/projectgenerationRoot: .registeredTargets:
- kiro
- copilot-agent

A config with template pack and rules packs:

projectRoot: steering/projectgenerationRoot: .templatePack:
source: "github:acme-corp/steergen-templates"ref: "v2.1.0"rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"registeredTargets:
- kiro
- copilot-agent

Key fields:

FieldPurpose
projectRootSource folder for project-specific steering docs
generationRootBase folder for all generated output
registeredTargetsList of targets to generate by default
templatePackTemplate pack source configuration (see Template Packs)
rulesPacksList of rules pack entries (see Rules Packs)
activeProfilesProfile names (legacy; retained for backward compatibility)

Note: The globalRoot field has been removed. If your config still contains globalRoot, Steergen will report error CFG001 and exit with code 2. See the migration guide for how to convert existing global rules to a rules pack.

For full configuration options and advanced routing, see Section 5 and Section 6 of the Getting Started guide.


Template Packs

Template packs let you override the built-in Scriban templates that Steergen uses to render output, or provide complete target definitions for new external targets. Packs can be sourced from a local directory or a public GitHub repository.

Adding a template pack from GitHub

steergen template-pack add github:acme-corp/steergen-templates --ref v2.1.0

This writes the source to steergen.config.yaml and downloads the pack to the local cache at ~/.steergen/packs/acme-corp/steergen-templates/v2.1.0/.

Adding a local template override path

steergen template-pack add --path ./custom-templates

Local overrides take the highest precedence in the resolution chain.

Template resolution precedence

When rendering, Steergen resolves templates in this order:

  1. Local override path (templatePack.localPath) — highest precedence
  2. Cached GitHub pack (templatePack.source) — middle precedence
  3. Built-in embedded templates — fallback

Updating a template pack

Re-download the configured GitHub pack to pick up changes:

steergen update --templates

On success, displays the pack name, version, and number of template files. If the pack is pinned to a 40-character SHA, re-download is skipped unless --force is specified:

steergen update --templates --force

If no template pack is configured, the command exits with code 0 and reports that no pack source is configured.

Upgrade a specific template pack reference and persist a deterministic (tag, commitSha) tuple:

steergen template-pack upgrade --selector "github:acme-corp/steergen-templates|templates/default" --tag v2.1.0

When --tag is omitted, the command runs in latest-refresh mode, snapshots cache, purges the targeted cache copy, and refetches.

Inspecting the template chain

See which templates come from which source:

steergen inspect --templates

Displays the active resolution chain showing the source (local override, cached GitHub pack, or built-in) for each template.

Removing a template pack

steergen template-pack remove

Removes the template pack configuration from steergen.config.yaml.

Configuration reference

templatePack:
source: "github:acme-corp/steergen-templates"# GitHub sourceref: "v2.1.0"# Tag, branch, or 40-char SHA# OR use a local path instead:# localPath: "./custom-templates"

Rules Packs

Rules packs are shared governance rule sets published to GitHub repositories. They let teams share steering documents across projects without copying files. Each pack declares a scope that determines its merge precedence relative to project-local rules.

To create and publish your own rules pack, see the Authoring a Rules Pack guide.

Adding a rules pack

steergen rules-pack add github:acme-corp/baseline-rules --ref v1.0.0 --scope global

Options:

OptionPurpose
--ref <ref>Git tag, branch, or 40-character SHA
--path <subdir>Subdirectory within the repo (for multi-pack repos)
--scope <scope>Override the pack's manifest scope (global, supplemental, or project)

The command appends the pack to the rulesPacks list in steergen.config.yaml and downloads it to ~/.steergen/rules/{owner}/{repo}/{ref}/.

Scope-based merge precedence

When multiple rule sources define the same rule ID, Steergen resolves conflicts using scope-based precedence:

  1. Project-local rules — highest precedence (your projectRoot documents)
  2. Project-scoped packs — rules packs with scope: project
  3. Supplemental-scoped packs — rules packs with scope: supplemental
  4. Global-scoped packs — rules packs with scope: global (lowest precedence)

Within the same scope level, packs declared earlier in the rulesPacks list take precedence. Duplicate rule IDs at the same scope emit a diagnostic warning.

The --scope option on rules-pack add overrides the scope declared in the pack's own manifest, letting consumers elevate or demote a pack's precedence.

Listing configured rules packs

steergen rules-pack list

Displays all configured rules packs with their source, ref, scope, and cache status.

Updating rules packs

Re-download all configured rules packs:

steergen update --rules

SHA-pinned packs are skipped unless --force is specified:

steergen update --rules --force

Upgrade exactly one configured rules pack reference by canonical selector:

steergen rules-pack upgrade --selector "github:acme-corp/team-rules|backend-team" --tag v1.1.0

Selector escaping rules:

  • Use \\| for a literal | inside either selector component.
  • Use \\\\ for a literal backslash.

Inspecting rules packs

steergen inspect --rules

Displays all configured rules packs with their name, version, source, scope, and number of rules loaded.

Removing a rules pack

steergen rules-pack remove acme-baseline-rules

Removes the matching entry from the rulesPacks list in steergen.config.yaml.

Configuration reference

rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"# Pinned SHA (recommended)scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"# Subdirectory within repo
- source: "github:acme-corp/security-rules"ref: "main"# Branch (pinning recommended)scope: supplemental

Tip: Pin rules packs to a tag or full SHA for deterministic builds. Branch refs work but Steergen will recommend pinning in diagnostic output.


Exit Codes

CodeMeaning
0Success
1Validation errors in source documents
2Configuration or I/O error
3Generation or purge error
5Output conflict (file already exists with different content)

Contributing

Contributions are welcome. To get started locally:

git clone https://github.com/aabs/steergen.git
cd steergen
dotnet build
dotnet test

For an overview of how the codebase is structured, see the developer guide or load the code tour in VS Code with the CodeTour extension.

Please open an issue before submitting a pull request for significant changes.


Troubleshooting

steergen not found after install Ensure ~/.dotnet/tools (Linux/macOS) or %USERPROFILE%\.dotnet\tools (Windows) is on your PATH.

No output files generated Run steergen validate first — generation is skipped when source documents contain errors.

Generated files differ between machines Check that projectRoot points to the same content on each machine and that rules packs are pinned to the same ref. Use steergen inspect to compare the resolved model.

Something else? Open an issue at https://github.com/aabs/steergen/issues.


License

MIT

About

A CLI tool for sharing steering files across multiple SDD tools

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Steergen

Write your AI steering docs once. Generate for every tool.

BuildNuGetLicense: MIT

Steergen is a .NET CLI tool that maintains a single set of steering and constitution documents, then generates the target-specific formats expected by tools like Kiro and Speckit. Change your guidance once; every downstream tool stays in sync.

For a full walkthrough — including greenfield setup, CI integration, and writing rules — see the Getting Started guide.


Table of Contents


Requirements


Installation

dotnet tool install --global aabs.steergen

To upgrade an existing installation:

dotnet tool update --global aabs.steergen

Verify the install:

steergen --version

Quick Start

1. Initialise a project for the targets you want to use:

steergen init . --target kiro --target copilot-agent

This creates steering/global/, steering/project/, steergen.config.yaml, and the target-native output folders.

2. Write a steering document under steering/project/:

---id: engineering-baselinetitle: Engineering Baseline---# Engineering Baseline
:::rule id="CORE-001" mandatory="true" category="quality" tags="quality,reviews"
Prefer small, composable changes that are easy to review and easy to revert.
:::

3. Generate outputs for all registered targets:

steergen run

4. Validate source documents without regenerating:

steergen validate

That's it. For more scenarios — shared policy collections, custom output paths, MSBuild integration, CI setup — see the Getting Started guide.


Supported Targets

TargetDefault output path
kiro.kiro/steering/
speckit.specify/memory/
copilot-agent.github/
kiro-agent.kiro/agents/

Add or remove targets at any time:

steergen target add speckit
steergen target remove kiro

Command Reference

CommandPurpose
steergen init [root] [--target <id>...]Bootstrap config and target folders
steergen run [options]Generate output files for all registered targets
steergen validate [options]Validate source documents and template packs
steergen inspect [--templates] [--rules]Print resolved model, template chain, or rules pack info
steergen target add <id>Register a new target (built-in or pack-provided)
steergen target remove <id>Unregister a target
steergen purge [options]Remove generated files managed by steergen
steergen update [--templates] [--rules] [--force]Re-download configured packs
steergen template-pack add <source> [--ref <ref>] [--path <localPath>]Add a template pack
steergen template-pack upgrade --selector <source|entryKey> [--tag <tag>]Upgrade the configured template pack reference
steergen template-pack removeRemove the configured template pack
steergen rules-pack add <source> [--ref <ref>] [--path <subdir>] [--scope <scope>]Add a rules pack
steergen rules-pack upgrade --selector <source|path> [--tag <tag>]Upgrade one configured rules pack reference
steergen rules-pack remove <name>Remove a rules pack by name
steergen rules-pack listList configured rules packs with status

Commonly used run options:

--config <path> Path to steergen.config.yaml
--project <dir> Override projectRoot
--output <dir> Override generationRoot
--target <id> Generate for one target only (repeatable)
--quiet Suppress informational output
--verbose Show detailed output

Configuration

Steergen looks for steergen.config.yaml in the current directory (or the path given by --config).

A minimal config file:

projectRoot: steering/projectgenerationRoot: .registeredTargets:
- kiro
- copilot-agent

A config with template pack and rules packs:

projectRoot: steering/projectgenerationRoot: .templatePack:
source: "github:acme-corp/steergen-templates"ref: "v2.1.0"rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"registeredTargets:
- kiro
- copilot-agent

Key fields:

FieldPurpose
projectRootSource folder for project-specific steering docs
generationRootBase folder for all generated output
registeredTargetsList of targets to generate by default
templatePackTemplate pack source configuration (see Template Packs)
rulesPacksList of rules pack entries (see Rules Packs)
activeProfilesProfile names (legacy; retained for backward compatibility)

Note: The globalRoot field has been removed. If your config still contains globalRoot, Steergen will report error CFG001 and exit with code 2. See the migration guide for how to convert existing global rules to a rules pack.

For full configuration options and advanced routing, see Section 5 and Section 6 of the Getting Started guide.


Template Packs

Template packs let you override the built-in Scriban templates that Steergen uses to render output, or provide complete target definitions for new external targets. Packs can be sourced from a local directory or a public GitHub repository.

Adding a template pack from GitHub

steergen template-pack add github:acme-corp/steergen-templates --ref v2.1.0

This writes the source to steergen.config.yaml and downloads the pack to the local cache at ~/.steergen/packs/acme-corp/steergen-templates/v2.1.0/.

Adding a local template override path

steergen template-pack add --path ./custom-templates

Local overrides take the highest precedence in the resolution chain.

Template resolution precedence

When rendering, Steergen resolves templates in this order:

  1. Local override path (templatePack.localPath) — highest precedence
  2. Cached GitHub pack (templatePack.source) — middle precedence
  3. Built-in embedded templates — fallback

Updating a template pack

Re-download the configured GitHub pack to pick up changes:

steergen update --templates

On success, displays the pack name, version, and number of template files. If the pack is pinned to a 40-character SHA, re-download is skipped unless --force is specified:

steergen update --templates --force

If no template pack is configured, the command exits with code 0 and reports that no pack source is configured.

Upgrade a specific template pack reference and persist a deterministic (tag, commitSha) tuple:

steergen template-pack upgrade --selector "github:acme-corp/steergen-templates|templates/default" --tag v2.1.0

When --tag is omitted, the command runs in latest-refresh mode, snapshots cache, purges the targeted cache copy, and refetches.

Inspecting the template chain

See which templates come from which source:

steergen inspect --templates

Displays the active resolution chain showing the source (local override, cached GitHub pack, or built-in) for each template.

Removing a template pack

steergen template-pack remove

Removes the template pack configuration from steergen.config.yaml.

Configuration reference

templatePack:
source: "github:acme-corp/steergen-templates"# GitHub sourceref: "v2.1.0"# Tag, branch, or 40-char SHA# OR use a local path instead:# localPath: "./custom-templates"

Rules Packs

Rules packs are shared governance rule sets published to GitHub repositories. They let teams share steering documents across projects without copying files. Each pack declares a scope that determines its merge precedence relative to project-local rules.

To create and publish your own rules pack, see the Authoring a Rules Pack guide.

Adding a rules pack

steergen rules-pack add github:acme-corp/baseline-rules --ref v1.0.0 --scope global

Options:

OptionPurpose
--ref <ref>Git tag, branch, or 40-character SHA
--path <subdir>Subdirectory within the repo (for multi-pack repos)
--scope <scope>Override the pack's manifest scope (global, supplemental, or project)

The command appends the pack to the rulesPacks list in steergen.config.yaml and downloads it to ~/.steergen/rules/{owner}/{repo}/{ref}/.

Scope-based merge precedence

When multiple rule sources define the same rule ID, Steergen resolves conflicts using scope-based precedence:

  1. Project-local rules — highest precedence (your projectRoot documents)
  2. Project-scoped packs — rules packs with scope: project
  3. Supplemental-scoped packs — rules packs with scope: supplemental
  4. Global-scoped packs — rules packs with scope: global (lowest precedence)

Within the same scope level, packs declared earlier in the rulesPacks list take precedence. Duplicate rule IDs at the same scope emit a diagnostic warning.

The --scope option on rules-pack add overrides the scope declared in the pack's own manifest, letting consumers elevate or demote a pack's precedence.

Listing configured rules packs

steergen rules-pack list

Displays all configured rules packs with their source, ref, scope, and cache status.

Updating rules packs

Re-download all configured rules packs:

steergen update --rules

SHA-pinned packs are skipped unless --force is specified:

steergen update --rules --force

Upgrade exactly one configured rules pack reference by canonical selector:

steergen rules-pack upgrade --selector "github:acme-corp/team-rules|backend-team" --tag v1.1.0

Selector escaping rules:

  • Use \\| for a literal | inside either selector component.
  • Use \\\\ for a literal backslash.

Inspecting rules packs

steergen inspect --rules

Displays all configured rules packs with their name, version, source, scope, and number of rules loaded.

Removing a rules pack

steergen rules-pack remove acme-baseline-rules

Removes the matching entry from the rulesPacks list in steergen.config.yaml.

Configuration reference

rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"# Pinned SHA (recommended)scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"# Subdirectory within repo
- source: "github:acme-corp/security-rules"ref: "main"# Branch (pinning recommended)scope: supplemental

Tip: Pin rules packs to a tag or full SHA for deterministic builds. Branch refs work but Steergen will recommend pinning in diagnostic output.


Exit Codes

CodeMeaning
0Success
1Validation errors in source documents
2Configuration or I/O error
3Generation or purge error
5Output conflict (file already exists with different content)

Contributing

Contributions are welcome. To get started locally:

git clone https://github.com/aabs/steergen.git
cd steergen
dotnet build
dotnet test

For an overview of how the codebase is structured, see the developer guide or load the code tour in VS Code with the CodeTour extension.

Please open an issue before submitting a pull request for significant changes.


Troubleshooting

steergen not found after install Ensure ~/.dotnet/tools (Linux/macOS) or %USERPROFILE%\.dotnet\tools (Windows) is on your PATH.

No output files generated Run steergen validate first — generation is skipped when source documents contain errors.

Generated files differ between machines Check that projectRoot points to the same content on each machine and that rules packs are pinned to the same ref. Use steergen inspect to compare the resolved model.

Something else? Open an issue at https://github.com/aabs/steergen/issues.


License

MIT

About

A CLI tool for sharing steering files across multiple SDD tools

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Steergen

Write your AI steering docs once. Generate for every tool.

BuildNuGetLicense: MIT

Steergen is a .NET CLI tool that maintains a single set of steering and constitution documents, then generates the target-specific formats expected by tools like Kiro and Speckit. Change your guidance once; every downstream tool stays in sync.

For a full walkthrough — including greenfield setup, CI integration, and writing rules — see the Getting Started guide.


Table of Contents


Requirements


Installation

dotnet tool install --global aabs.steergen

To upgrade an existing installation:

dotnet tool update --global aabs.steergen

Verify the install:

steergen --version

Quick Start

1. Initialise a project for the targets you want to use:

steergen init . --target kiro --target copilot-agent

This creates steering/global/, steering/project/, steergen.config.yaml, and the target-native output folders.

2. Write a steering document under steering/project/:

---id: engineering-baselinetitle: Engineering Baseline---# Engineering Baseline
:::rule id="CORE-001" mandatory="true" category="quality" tags="quality,reviews"
Prefer small, composable changes that are easy to review and easy to revert.
:::

3. Generate outputs for all registered targets:

steergen run

4. Validate source documents without regenerating:

steergen validate

That's it. For more scenarios — shared policy collections, custom output paths, MSBuild integration, CI setup — see the Getting Started guide.


Supported Targets

TargetDefault output path
kiro.kiro/steering/
speckit.specify/memory/
copilot-agent.github/
kiro-agent.kiro/agents/

Add or remove targets at any time:

steergen target add speckit
steergen target remove kiro

Command Reference

CommandPurpose
steergen init [root] [--target <id>...]Bootstrap config and target folders
steergen run [options]Generate output files for all registered targets
steergen validate [options]Validate source documents and template packs
steergen inspect [--templates] [--rules]Print resolved model, template chain, or rules pack info
steergen target add <id>Register a new target (built-in or pack-provided)
steergen target remove <id>Unregister a target
steergen purge [options]Remove generated files managed by steergen
steergen update [--templates] [--rules] [--force]Re-download configured packs
steergen template-pack add <source> [--ref <ref>] [--path <localPath>]Add a template pack
steergen template-pack upgrade --selector <source|entryKey> [--tag <tag>]Upgrade the configured template pack reference
steergen template-pack removeRemove the configured template pack
steergen rules-pack add <source> [--ref <ref>] [--path <subdir>] [--scope <scope>]Add a rules pack
steergen rules-pack upgrade --selector <source|path> [--tag <tag>]Upgrade one configured rules pack reference
steergen rules-pack remove <name>Remove a rules pack by name
steergen rules-pack listList configured rules packs with status

Commonly used run options:

--config <path> Path to steergen.config.yaml
--project <dir> Override projectRoot
--output <dir> Override generationRoot
--target <id> Generate for one target only (repeatable)
--quiet Suppress informational output
--verbose Show detailed output

Configuration

Steergen looks for steergen.config.yaml in the current directory (or the path given by --config).

A minimal config file:

projectRoot: steering/projectgenerationRoot: .registeredTargets:
- kiro
- copilot-agent

A config with template pack and rules packs:

projectRoot: steering/projectgenerationRoot: .templatePack:
source: "github:acme-corp/steergen-templates"ref: "v2.1.0"rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"registeredTargets:
- kiro
- copilot-agent

Key fields:

FieldPurpose
projectRootSource folder for project-specific steering docs
generationRootBase folder for all generated output
registeredTargetsList of targets to generate by default
templatePackTemplate pack source configuration (see Template Packs)
rulesPacksList of rules pack entries (see Rules Packs)
activeProfilesProfile names (legacy; retained for backward compatibility)

Note: The globalRoot field has been removed. If your config still contains globalRoot, Steergen will report error CFG001 and exit with code 2. See the migration guide for how to convert existing global rules to a rules pack.

For full configuration options and advanced routing, see Section 5 and Section 6 of the Getting Started guide.


Template Packs

Template packs let you override the built-in Scriban templates that Steergen uses to render output, or provide complete target definitions for new external targets. Packs can be sourced from a local directory or a public GitHub repository.

Adding a template pack from GitHub

steergen template-pack add github:acme-corp/steergen-templates --ref v2.1.0

This writes the source to steergen.config.yaml and downloads the pack to the local cache at ~/.steergen/packs/acme-corp/steergen-templates/v2.1.0/.

Adding a local template override path

steergen template-pack add --path ./custom-templates

Local overrides take the highest precedence in the resolution chain.

Template resolution precedence

When rendering, Steergen resolves templates in this order:

  1. Local override path (templatePack.localPath) — highest precedence
  2. Cached GitHub pack (templatePack.source) — middle precedence
  3. Built-in embedded templates — fallback

Updating a template pack

Re-download the configured GitHub pack to pick up changes:

steergen update --templates

On success, displays the pack name, version, and number of template files. If the pack is pinned to a 40-character SHA, re-download is skipped unless --force is specified:

steergen update --templates --force

If no template pack is configured, the command exits with code 0 and reports that no pack source is configured.

Upgrade a specific template pack reference and persist a deterministic (tag, commitSha) tuple:

steergen template-pack upgrade --selector "github:acme-corp/steergen-templates|templates/default" --tag v2.1.0

When --tag is omitted, the command runs in latest-refresh mode, snapshots cache, purges the targeted cache copy, and refetches.

Inspecting the template chain

See which templates come from which source:

steergen inspect --templates

Displays the active resolution chain showing the source (local override, cached GitHub pack, or built-in) for each template.

Removing a template pack

steergen template-pack remove

Removes the template pack configuration from steergen.config.yaml.

Configuration reference

templatePack:
source: "github:acme-corp/steergen-templates"# GitHub sourceref: "v2.1.0"# Tag, branch, or 40-char SHA# OR use a local path instead:# localPath: "./custom-templates"

Rules Packs

Rules packs are shared governance rule sets published to GitHub repositories. They let teams share steering documents across projects without copying files. Each pack declares a scope that determines its merge precedence relative to project-local rules.

To create and publish your own rules pack, see the Authoring a Rules Pack guide.

Adding a rules pack

steergen rules-pack add github:acme-corp/baseline-rules --ref v1.0.0 --scope global

Options:

OptionPurpose
--ref <ref>Git tag, branch, or 40-character SHA
--path <subdir>Subdirectory within the repo (for multi-pack repos)
--scope <scope>Override the pack's manifest scope (global, supplemental, or project)

The command appends the pack to the rulesPacks list in steergen.config.yaml and downloads it to ~/.steergen/rules/{owner}/{repo}/{ref}/.

Scope-based merge precedence

When multiple rule sources define the same rule ID, Steergen resolves conflicts using scope-based precedence:

  1. Project-local rules — highest precedence (your projectRoot documents)
  2. Project-scoped packs — rules packs with scope: project
  3. Supplemental-scoped packs — rules packs with scope: supplemental
  4. Global-scoped packs — rules packs with scope: global (lowest precedence)

Within the same scope level, packs declared earlier in the rulesPacks list take precedence. Duplicate rule IDs at the same scope emit a diagnostic warning.

The --scope option on rules-pack add overrides the scope declared in the pack's own manifest, letting consumers elevate or demote a pack's precedence.

Listing configured rules packs

steergen rules-pack list

Displays all configured rules packs with their source, ref, scope, and cache status.

Updating rules packs

Re-download all configured rules packs:

steergen update --rules

SHA-pinned packs are skipped unless --force is specified:

steergen update --rules --force

Upgrade exactly one configured rules pack reference by canonical selector:

steergen rules-pack upgrade --selector "github:acme-corp/team-rules|backend-team" --tag v1.1.0

Selector escaping rules:

  • Use \\| for a literal | inside either selector component.
  • Use \\\\ for a literal backslash.

Inspecting rules packs

steergen inspect --rules

Displays all configured rules packs with their name, version, source, scope, and number of rules loaded.

Removing a rules pack

steergen rules-pack remove acme-baseline-rules

Removes the matching entry from the rulesPacks list in steergen.config.yaml.

Configuration reference

rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"# Pinned SHA (recommended)scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"# Subdirectory within repo
- source: "github:acme-corp/security-rules"ref: "main"# Branch (pinning recommended)scope: supplemental

Tip: Pin rules packs to a tag or full SHA for deterministic builds. Branch refs work but Steergen will recommend pinning in diagnostic output.


Exit Codes

CodeMeaning
0Success
1Validation errors in source documents
2Configuration or I/O error
3Generation or purge error
5Output conflict (file already exists with different content)

Contributing

Contributions are welcome. To get started locally:

git clone https://github.com/aabs/steergen.git
cd steergen
dotnet build
dotnet test

For an overview of how the codebase is structured, see the developer guide or load the code tour in VS Code with the CodeTour extension.

Please open an issue before submitting a pull request for significant changes.


Troubleshooting

steergen not found after install Ensure ~/.dotnet/tools (Linux/macOS) or %USERPROFILE%\.dotnet\tools (Windows) is on your PATH.

No output files generated Run steergen validate first — generation is skipped when source documents contain errors.

Generated files differ between machines Check that projectRoot points to the same content on each machine and that rules packs are pinned to the same ref. Use steergen inspect to compare the resolved model.

Something else? Open an issue at https://github.com/aabs/steergen/issues.


License

MIT

About

A CLI tool for sharing steering files across multiple SDD tools

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

Steergen

Write your AI steering docs once. Generate for every tool.

BuildNuGetLicense: MIT

Steergen is a .NET CLI tool that maintains a single set of steering and constitution documents, then generates the target-specific formats expected by tools like Kiro and Speckit. Change your guidance once; every downstream tool stays in sync.

For a full walkthrough — including greenfield setup, CI integration, and writing rules — see the Getting Started guide.


Table of Contents


Requirements


Installation

dotnet tool install --global aabs.steergen

To upgrade an existing installation:

dotnet tool update --global aabs.steergen

Verify the install:

steergen --version

Quick Start

1. Initialise a project for the targets you want to use:

steergen init . --target kiro --target copilot-agent

This creates steering/global/, steering/project/, steergen.config.yaml, and the target-native output folders.

2. Write a steering document under steering/project/:

---id: engineering-baselinetitle: Engineering Baseline---# Engineering Baseline
:::rule id="CORE-001" mandatory="true" category="quality" tags="quality,reviews"
Prefer small, composable changes that are easy to review and easy to revert.
:::

3. Generate outputs for all registered targets:

steergen run

4. Validate source documents without regenerating:

steergen validate

That's it. For more scenarios — shared policy collections, custom output paths, MSBuild integration, CI setup — see the Getting Started guide.


Supported Targets

TargetDefault output path
kiro.kiro/steering/
speckit.specify/memory/
copilot-agent.github/
kiro-agent.kiro/agents/

Add or remove targets at any time:

steergen target add speckit
steergen target remove kiro

Command Reference

CommandPurpose
steergen init [root] [--target <id>...]Bootstrap config and target folders
steergen run [options]Generate output files for all registered targets
steergen validate [options]Validate source documents and template packs
steergen inspect [--templates] [--rules]Print resolved model, template chain, or rules pack info
steergen target add <id>Register a new target (built-in or pack-provided)
steergen target remove <id>Unregister a target
steergen purge [options]Remove generated files managed by steergen
steergen update [--templates] [--rules] [--force]Re-download configured packs
steergen template-pack add <source> [--ref <ref>] [--path <localPath>]Add a template pack
steergen template-pack upgrade --selector <source|entryKey> [--tag <tag>]Upgrade the configured template pack reference
steergen template-pack removeRemove the configured template pack
steergen rules-pack add <source> [--ref <ref>] [--path <subdir>] [--scope <scope>]Add a rules pack
steergen rules-pack upgrade --selector <source|path> [--tag <tag>]Upgrade one configured rules pack reference
steergen rules-pack remove <name>Remove a rules pack by name
steergen rules-pack listList configured rules packs with status

Commonly used run options:

--config <path> Path to steergen.config.yaml
--project <dir> Override projectRoot
--output <dir> Override generationRoot
--target <id> Generate for one target only (repeatable)
--quiet Suppress informational output
--verbose Show detailed output

Configuration

Steergen looks for steergen.config.yaml in the current directory (or the path given by --config).

A minimal config file:

projectRoot: steering/projectgenerationRoot: .registeredTargets:
- kiro
- copilot-agent

A config with template pack and rules packs:

projectRoot: steering/projectgenerationRoot: .templatePack:
source: "github:acme-corp/steergen-templates"ref: "v2.1.0"rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"registeredTargets:
- kiro
- copilot-agent

Key fields:

FieldPurpose
projectRootSource folder for project-specific steering docs
generationRootBase folder for all generated output
registeredTargetsList of targets to generate by default
templatePackTemplate pack source configuration (see Template Packs)
rulesPacksList of rules pack entries (see Rules Packs)
activeProfilesProfile names (legacy; retained for backward compatibility)

Note: The globalRoot field has been removed. If your config still contains globalRoot, Steergen will report error CFG001 and exit with code 2. See the migration guide for how to convert existing global rules to a rules pack.

For full configuration options and advanced routing, see Section 5 and Section 6 of the Getting Started guide.


Template Packs

Template packs let you override the built-in Scriban templates that Steergen uses to render output, or provide complete target definitions for new external targets. Packs can be sourced from a local directory or a public GitHub repository.

Adding a template pack from GitHub

steergen template-pack add github:acme-corp/steergen-templates --ref v2.1.0

This writes the source to steergen.config.yaml and downloads the pack to the local cache at ~/.steergen/packs/acme-corp/steergen-templates/v2.1.0/.

Adding a local template override path

steergen template-pack add --path ./custom-templates

Local overrides take the highest precedence in the resolution chain.

Template resolution precedence

When rendering, Steergen resolves templates in this order:

  1. Local override path (templatePack.localPath) — highest precedence
  2. Cached GitHub pack (templatePack.source) — middle precedence
  3. Built-in embedded templates — fallback

Updating a template pack

Re-download the configured GitHub pack to pick up changes:

steergen update --templates

On success, displays the pack name, version, and number of template files. If the pack is pinned to a 40-character SHA, re-download is skipped unless --force is specified:

steergen update --templates --force

If no template pack is configured, the command exits with code 0 and reports that no pack source is configured.

Upgrade a specific template pack reference and persist a deterministic (tag, commitSha) tuple:

steergen template-pack upgrade --selector "github:acme-corp/steergen-templates|templates/default" --tag v2.1.0

When --tag is omitted, the command runs in latest-refresh mode, snapshots cache, purges the targeted cache copy, and refetches.

Inspecting the template chain

See which templates come from which source:

steergen inspect --templates

Displays the active resolution chain showing the source (local override, cached GitHub pack, or built-in) for each template.

Removing a template pack

steergen template-pack remove

Removes the template pack configuration from steergen.config.yaml.

Configuration reference

templatePack:
source: "github:acme-corp/steergen-templates"# GitHub sourceref: "v2.1.0"# Tag, branch, or 40-char SHA# OR use a local path instead:# localPath: "./custom-templates"

Rules Packs

Rules packs are shared governance rule sets published to GitHub repositories. They let teams share steering documents across projects without copying files. Each pack declares a scope that determines its merge precedence relative to project-local rules.

To create and publish your own rules pack, see the Authoring a Rules Pack guide.

Adding a rules pack

steergen rules-pack add github:acme-corp/baseline-rules --ref v1.0.0 --scope global

Options:

OptionPurpose
--ref <ref>Git tag, branch, or 40-character SHA
--path <subdir>Subdirectory within the repo (for multi-pack repos)
--scope <scope>Override the pack's manifest scope (global, supplemental, or project)

The command appends the pack to the rulesPacks list in steergen.config.yaml and downloads it to ~/.steergen/rules/{owner}/{repo}/{ref}/.

Scope-based merge precedence

When multiple rule sources define the same rule ID, Steergen resolves conflicts using scope-based precedence:

  1. Project-local rules — highest precedence (your projectRoot documents)
  2. Project-scoped packs — rules packs with scope: project
  3. Supplemental-scoped packs — rules packs with scope: supplemental
  4. Global-scoped packs — rules packs with scope: global (lowest precedence)

Within the same scope level, packs declared earlier in the rulesPacks list take precedence. Duplicate rule IDs at the same scope emit a diagnostic warning.

The --scope option on rules-pack add overrides the scope declared in the pack's own manifest, letting consumers elevate or demote a pack's precedence.

Listing configured rules packs

steergen rules-pack list

Displays all configured rules packs with their source, ref, scope, and cache status.

Updating rules packs

Re-download all configured rules packs:

steergen update --rules

SHA-pinned packs are skipped unless --force is specified:

steergen update --rules --force

Upgrade exactly one configured rules pack reference by canonical selector:

steergen rules-pack upgrade --selector "github:acme-corp/team-rules|backend-team" --tag v1.1.0

Selector escaping rules:

  • Use \\| for a literal | inside either selector component.
  • Use \\\\ for a literal backslash.

Inspecting rules packs

steergen inspect --rules

Displays all configured rules packs with their name, version, source, scope, and number of rules loaded.

Removing a rules pack

steergen rules-pack remove acme-baseline-rules

Removes the matching entry from the rulesPacks list in steergen.config.yaml.

Configuration reference

rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"# Pinned SHA (recommended)scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"# Subdirectory within repo
- source: "github:acme-corp/security-rules"ref: "main"# Branch (pinning recommended)scope: supplemental

Tip: Pin rules packs to a tag or full SHA for deterministic builds. Branch refs work but Steergen will recommend pinning in diagnostic output.


Exit Codes

CodeMeaning
0Success
1Validation errors in source documents
2Configuration or I/O error
3Generation or purge error
5Output conflict (file already exists with different content)

Contributing

Contributions are welcome. To get started locally:

git clone https://github.com/aabs/steergen.git
cd steergen
dotnet build
dotnet test

For an overview of how the codebase is structured, see the developer guide or load the code tour in VS Code with the CodeTour extension.

Please open an issue before submitting a pull request for significant changes.


Troubleshooting

steergen not found after install Ensure ~/.dotnet/tools (Linux/macOS) or %USERPROFILE%\.dotnet\tools (Windows) is on your PATH.

No output files generated Run steergen validate first — generation is skipped when source documents contain errors.

Generated files differ between machines Check that projectRoot points to the same content on each machine and that rules packs are pinned to the same ref. Use steergen inspect to compare the resolved model.

Something else? Open an issue at https://github.com/aabs/steergen/issues.


License

MIT

About

A CLI tool for sharing steering files across multiple SDD tools

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Steergen

Write your AI steering docs once. Generate for every tool.

BuildNuGetLicense: MIT

Steergen is a .NET CLI tool that maintains a single set of steering and constitution documents, then generates the target-specific formats expected by tools like Kiro and Speckit. Change your guidance once; every downstream tool stays in sync.

For a full walkthrough — including greenfield setup, CI integration, and writing rules — see the Getting Started guide.


Table of Contents


Requirements


Installation

dotnet tool install --global aabs.steergen

To upgrade an existing installation:

dotnet tool update --global aabs.steergen

Verify the install:

steergen --version

Quick Start

1. Initialise a project for the targets you want to use:

steergen init . --target kiro --target copilot-agent

This creates steering/global/, steering/project/, steergen.config.yaml, and the target-native output folders.

2. Write a steering document under steering/project/:

---id: engineering-baselinetitle: Engineering Baseline---# Engineering Baseline
:::rule id="CORE-001" mandatory="true" category="quality" tags="quality,reviews"
Prefer small, composable changes that are easy to review and easy to revert.
:::

3. Generate outputs for all registered targets:

steergen run

4. Validate source documents without regenerating:

steergen validate

That's it. For more scenarios — shared policy collections, custom output paths, MSBuild integration, CI setup — see the Getting Started guide.


Supported Targets

TargetDefault output path
kiro.kiro/steering/
speckit.specify/memory/
copilot-agent.github/
kiro-agent.kiro/agents/

Add or remove targets at any time:

steergen target add speckit
steergen target remove kiro

Command Reference

CommandPurpose
steergen init [root] [--target <id>...]Bootstrap config and target folders
steergen run [options]Generate output files for all registered targets
steergen validate [options]Validate source documents and template packs
steergen inspect [--templates] [--rules]Print resolved model, template chain, or rules pack info
steergen target add <id>Register a new target (built-in or pack-provided)
steergen target remove <id>Unregister a target
steergen purge [options]Remove generated files managed by steergen
steergen update [--templates] [--rules] [--force]Re-download configured packs
steergen template-pack add <source> [--ref <ref>] [--path <localPath>]Add a template pack
steergen template-pack upgrade --selector <source|entryKey> [--tag <tag>]Upgrade the configured template pack reference
steergen template-pack removeRemove the configured template pack
steergen rules-pack add <source> [--ref <ref>] [--path <subdir>] [--scope <scope>]Add a rules pack
steergen rules-pack upgrade --selector <source|path> [--tag <tag>]Upgrade one configured rules pack reference
steergen rules-pack remove <name>Remove a rules pack by name
steergen rules-pack listList configured rules packs with status

Commonly used run options:

--config <path> Path to steergen.config.yaml
--project <dir> Override projectRoot
--output <dir> Override generationRoot
--target <id> Generate for one target only (repeatable)
--quiet Suppress informational output
--verbose Show detailed output

Configuration

Steergen looks for steergen.config.yaml in the current directory (or the path given by --config).

A minimal config file:

projectRoot: steering/projectgenerationRoot: .registeredTargets:
- kiro
- copilot-agent

A config with template pack and rules packs:

projectRoot: steering/projectgenerationRoot: .templatePack:
source: "github:acme-corp/steergen-templates"ref: "v2.1.0"rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"registeredTargets:
- kiro
- copilot-agent

Key fields:

FieldPurpose
projectRootSource folder for project-specific steering docs
generationRootBase folder for all generated output
registeredTargetsList of targets to generate by default
templatePackTemplate pack source configuration (see Template Packs)
rulesPacksList of rules pack entries (see Rules Packs)
activeProfilesProfile names (legacy; retained for backward compatibility)

Note: The globalRoot field has been removed. If your config still contains globalRoot, Steergen will report error CFG001 and exit with code 2. See the migration guide for how to convert existing global rules to a rules pack.

For full configuration options and advanced routing, see Section 5 and Section 6 of the Getting Started guide.


Template Packs

Template packs let you override the built-in Scriban templates that Steergen uses to render output, or provide complete target definitions for new external targets. Packs can be sourced from a local directory or a public GitHub repository.

Adding a template pack from GitHub

steergen template-pack add github:acme-corp/steergen-templates --ref v2.1.0

This writes the source to steergen.config.yaml and downloads the pack to the local cache at ~/.steergen/packs/acme-corp/steergen-templates/v2.1.0/.

Adding a local template override path

steergen template-pack add --path ./custom-templates

Local overrides take the highest precedence in the resolution chain.

Template resolution precedence

When rendering, Steergen resolves templates in this order:

  1. Local override path (templatePack.localPath) — highest precedence
  2. Cached GitHub pack (templatePack.source) — middle precedence
  3. Built-in embedded templates — fallback

Updating a template pack

Re-download the configured GitHub pack to pick up changes:

steergen update --templates

On success, displays the pack name, version, and number of template files. If the pack is pinned to a 40-character SHA, re-download is skipped unless --force is specified:

steergen update --templates --force

If no template pack is configured, the command exits with code 0 and reports that no pack source is configured.

Upgrade a specific template pack reference and persist a deterministic (tag, commitSha) tuple:

steergen template-pack upgrade --selector "github:acme-corp/steergen-templates|templates/default" --tag v2.1.0

When --tag is omitted, the command runs in latest-refresh mode, snapshots cache, purges the targeted cache copy, and refetches.

Inspecting the template chain

See which templates come from which source:

steergen inspect --templates

Displays the active resolution chain showing the source (local override, cached GitHub pack, or built-in) for each template.

Removing a template pack

steergen template-pack remove

Removes the template pack configuration from steergen.config.yaml.

Configuration reference

templatePack:
source: "github:acme-corp/steergen-templates"# GitHub sourceref: "v2.1.0"# Tag, branch, or 40-char SHA# OR use a local path instead:# localPath: "./custom-templates"

Rules Packs

Rules packs are shared governance rule sets published to GitHub repositories. They let teams share steering documents across projects without copying files. Each pack declares a scope that determines its merge precedence relative to project-local rules.

To create and publish your own rules pack, see the Authoring a Rules Pack guide.

Adding a rules pack

steergen rules-pack add github:acme-corp/baseline-rules --ref v1.0.0 --scope global

Options:

OptionPurpose
--ref <ref>Git tag, branch, or 40-character SHA
--path <subdir>Subdirectory within the repo (for multi-pack repos)
--scope <scope>Override the pack's manifest scope (global, supplemental, or project)

The command appends the pack to the rulesPacks list in steergen.config.yaml and downloads it to ~/.steergen/rules/{owner}/{repo}/{ref}/.

Scope-based merge precedence

When multiple rule sources define the same rule ID, Steergen resolves conflicts using scope-based precedence:

  1. Project-local rules — highest precedence (your projectRoot documents)
  2. Project-scoped packs — rules packs with scope: project
  3. Supplemental-scoped packs — rules packs with scope: supplemental
  4. Global-scoped packs — rules packs with scope: global (lowest precedence)

Within the same scope level, packs declared earlier in the rulesPacks list take precedence. Duplicate rule IDs at the same scope emit a diagnostic warning.

The --scope option on rules-pack add overrides the scope declared in the pack's own manifest, letting consumers elevate or demote a pack's precedence.

Listing configured rules packs

steergen rules-pack list

Displays all configured rules packs with their source, ref, scope, and cache status.

Updating rules packs

Re-download all configured rules packs:

steergen update --rules

SHA-pinned packs are skipped unless --force is specified:

steergen update --rules --force

Upgrade exactly one configured rules pack reference by canonical selector:

steergen rules-pack upgrade --selector "github:acme-corp/team-rules|backend-team" --tag v1.1.0

Selector escaping rules:

  • Use \\| for a literal | inside either selector component.
  • Use \\\\ for a literal backslash.

Inspecting rules packs

steergen inspect --rules

Displays all configured rules packs with their name, version, source, scope, and number of rules loaded.

Removing a rules pack

steergen rules-pack remove acme-baseline-rules

Removes the matching entry from the rulesPacks list in steergen.config.yaml.

Configuration reference

rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"# Pinned SHA (recommended)scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"# Subdirectory within repo
- source: "github:acme-corp/security-rules"ref: "main"# Branch (pinning recommended)scope: supplemental

Tip: Pin rules packs to a tag or full SHA for deterministic builds. Branch refs work but Steergen will recommend pinning in diagnostic output.


Exit Codes

CodeMeaning
0Success
1Validation errors in source documents
2Configuration or I/O error
3Generation or purge error
5Output conflict (file already exists with different content)

Contributing

Contributions are welcome. To get started locally:

git clone https://github.com/aabs/steergen.git
cd steergen
dotnet build
dotnet test

For an overview of how the codebase is structured, see the developer guide or load the code tour in VS Code with the CodeTour extension.

Please open an issue before submitting a pull request for significant changes.


Troubleshooting

steergen not found after install Ensure ~/.dotnet/tools (Linux/macOS) or %USERPROFILE%\.dotnet\tools (Windows) is on your PATH.

No output files generated Run steergen validate first — generation is skipped when source documents contain errors.

Generated files differ between machines Check that projectRoot points to the same content on each machine and that rules packs are pinned to the same ref. Use steergen inspect to compare the resolved model.

Something else? Open an issue at https://github.com/aabs/steergen/issues.


License

MIT

About

A CLI tool for sharing steering files across multiple SDD tools

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Steergen

Write your AI steering docs once. Generate for every tool.

BuildNuGetLicense: MIT

Steergen is a .NET CLI tool that maintains a single set of steering and constitution documents, then generates the target-specific formats expected by tools like Kiro and Speckit. Change your guidance once; every downstream tool stays in sync.

For a full walkthrough — including greenfield setup, CI integration, and writing rules — see the Getting Started guide.


Table of Contents


Requirements


Installation

dotnet tool install --global aabs.steergen

To upgrade an existing installation:

dotnet tool update --global aabs.steergen

Verify the install:

steergen --version

Quick Start

1. Initialise a project for the targets you want to use:

steergen init . --target kiro --target copilot-agent

This creates steering/global/, steering/project/, steergen.config.yaml, and the target-native output folders.

2. Write a steering document under steering/project/:

---id: engineering-baselinetitle: Engineering Baseline---# Engineering Baseline
:::rule id="CORE-001" mandatory="true" category="quality" tags="quality,reviews"
Prefer small, composable changes that are easy to review and easy to revert.
:::

3. Generate outputs for all registered targets:

steergen run

4. Validate source documents without regenerating:

steergen validate

That's it. For more scenarios — shared policy collections, custom output paths, MSBuild integration, CI setup — see the Getting Started guide.


Supported Targets

TargetDefault output path
kiro.kiro/steering/
speckit.specify/memory/
copilot-agent.github/
kiro-agent.kiro/agents/

Add or remove targets at any time:

steergen target add speckit
steergen target remove kiro

Command Reference

CommandPurpose
steergen init [root] [--target <id>...]Bootstrap config and target folders
steergen run [options]Generate output files for all registered targets
steergen validate [options]Validate source documents and template packs
steergen inspect [--templates] [--rules]Print resolved model, template chain, or rules pack info
steergen target add <id>Register a new target (built-in or pack-provided)
steergen target remove <id>Unregister a target
steergen purge [options]Remove generated files managed by steergen
steergen update [--templates] [--rules] [--force]Re-download configured packs
steergen template-pack add <source> [--ref <ref>] [--path <localPath>]Add a template pack
steergen template-pack upgrade --selector <source|entryKey> [--tag <tag>]Upgrade the configured template pack reference
steergen template-pack removeRemove the configured template pack
steergen rules-pack add <source> [--ref <ref>] [--path <subdir>] [--scope <scope>]Add a rules pack
steergen rules-pack upgrade --selector <source|path> [--tag <tag>]Upgrade one configured rules pack reference
steergen rules-pack remove <name>Remove a rules pack by name
steergen rules-pack listList configured rules packs with status

Commonly used run options:

--config <path> Path to steergen.config.yaml
--project <dir> Override projectRoot
--output <dir> Override generationRoot
--target <id> Generate for one target only (repeatable)
--quiet Suppress informational output
--verbose Show detailed output

Configuration

Steergen looks for steergen.config.yaml in the current directory (or the path given by --config).

A minimal config file:

projectRoot: steering/projectgenerationRoot: .registeredTargets:
- kiro
- copilot-agent

A config with template pack and rules packs:

projectRoot: steering/projectgenerationRoot: .templatePack:
source: "github:acme-corp/steergen-templates"ref: "v2.1.0"rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"registeredTargets:
- kiro
- copilot-agent

Key fields:

FieldPurpose
projectRootSource folder for project-specific steering docs
generationRootBase folder for all generated output
registeredTargetsList of targets to generate by default
templatePackTemplate pack source configuration (see Template Packs)
rulesPacksList of rules pack entries (see Rules Packs)
activeProfilesProfile names (legacy; retained for backward compatibility)

Note: The globalRoot field has been removed. If your config still contains globalRoot, Steergen will report error CFG001 and exit with code 2. See the migration guide for how to convert existing global rules to a rules pack.

For full configuration options and advanced routing, see Section 5 and Section 6 of the Getting Started guide.


Template Packs

Template packs let you override the built-in Scriban templates that Steergen uses to render output, or provide complete target definitions for new external targets. Packs can be sourced from a local directory or a public GitHub repository.

Adding a template pack from GitHub

steergen template-pack add github:acme-corp/steergen-templates --ref v2.1.0

This writes the source to steergen.config.yaml and downloads the pack to the local cache at ~/.steergen/packs/acme-corp/steergen-templates/v2.1.0/.

Adding a local template override path

steergen template-pack add --path ./custom-templates

Local overrides take the highest precedence in the resolution chain.

Template resolution precedence

When rendering, Steergen resolves templates in this order:

  1. Local override path (templatePack.localPath) — highest precedence
  2. Cached GitHub pack (templatePack.source) — middle precedence
  3. Built-in embedded templates — fallback

Updating a template pack

Re-download the configured GitHub pack to pick up changes:

steergen update --templates

On success, displays the pack name, version, and number of template files. If the pack is pinned to a 40-character SHA, re-download is skipped unless --force is specified:

steergen update --templates --force

If no template pack is configured, the command exits with code 0 and reports that no pack source is configured.

Upgrade a specific template pack reference and persist a deterministic (tag, commitSha) tuple:

steergen template-pack upgrade --selector "github:acme-corp/steergen-templates|templates/default" --tag v2.1.0

When --tag is omitted, the command runs in latest-refresh mode, snapshots cache, purges the targeted cache copy, and refetches.

Inspecting the template chain

See which templates come from which source:

steergen inspect --templates

Displays the active resolution chain showing the source (local override, cached GitHub pack, or built-in) for each template.

Removing a template pack

steergen template-pack remove

Removes the template pack configuration from steergen.config.yaml.

Configuration reference

templatePack:
source: "github:acme-corp/steergen-templates"# GitHub sourceref: "v2.1.0"# Tag, branch, or 40-char SHA# OR use a local path instead:# localPath: "./custom-templates"

Rules Packs

Rules packs are shared governance rule sets published to GitHub repositories. They let teams share steering documents across projects without copying files. Each pack declares a scope that determines its merge precedence relative to project-local rules.

To create and publish your own rules pack, see the Authoring a Rules Pack guide.

Adding a rules pack

steergen rules-pack add github:acme-corp/baseline-rules --ref v1.0.0 --scope global

Options:

OptionPurpose
--ref <ref>Git tag, branch, or 40-character SHA
--path <subdir>Subdirectory within the repo (for multi-pack repos)
--scope <scope>Override the pack's manifest scope (global, supplemental, or project)

The command appends the pack to the rulesPacks list in steergen.config.yaml and downloads it to ~/.steergen/rules/{owner}/{repo}/{ref}/.

Scope-based merge precedence

When multiple rule sources define the same rule ID, Steergen resolves conflicts using scope-based precedence:

  1. Project-local rules — highest precedence (your projectRoot documents)
  2. Project-scoped packs — rules packs with scope: project
  3. Supplemental-scoped packs — rules packs with scope: supplemental
  4. Global-scoped packs — rules packs with scope: global (lowest precedence)

Within the same scope level, packs declared earlier in the rulesPacks list take precedence. Duplicate rule IDs at the same scope emit a diagnostic warning.

The --scope option on rules-pack add overrides the scope declared in the pack's own manifest, letting consumers elevate or demote a pack's precedence.

Listing configured rules packs

steergen rules-pack list

Displays all configured rules packs with their source, ref, scope, and cache status.

Updating rules packs

Re-download all configured rules packs:

steergen update --rules

SHA-pinned packs are skipped unless --force is specified:

steergen update --rules --force

Upgrade exactly one configured rules pack reference by canonical selector:

steergen rules-pack upgrade --selector "github:acme-corp/team-rules|backend-team" --tag v1.1.0

Selector escaping rules:

  • Use \\| for a literal | inside either selector component.
  • Use \\\\ for a literal backslash.

Inspecting rules packs

steergen inspect --rules

Displays all configured rules packs with their name, version, source, scope, and number of rules loaded.

Removing a rules pack

steergen rules-pack remove acme-baseline-rules

Removes the matching entry from the rulesPacks list in steergen.config.yaml.

Configuration reference

rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"# Pinned SHA (recommended)scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"# Subdirectory within repo
- source: "github:acme-corp/security-rules"ref: "main"# Branch (pinning recommended)scope: supplemental

Tip: Pin rules packs to a tag or full SHA for deterministic builds. Branch refs work but Steergen will recommend pinning in diagnostic output.


Exit Codes

CodeMeaning
0Success
1Validation errors in source documents
2Configuration or I/O error
3Generation or purge error
5Output conflict (file already exists with different content)

Contributing

Contributions are welcome. To get started locally:

git clone https://github.com/aabs/steergen.git
cd steergen
dotnet build
dotnet test

For an overview of how the codebase is structured, see the developer guide or load the code tour in VS Code with the CodeTour extension.

Please open an issue before submitting a pull request for significant changes.


Troubleshooting

steergen not found after install Ensure ~/.dotnet/tools (Linux/macOS) or %USERPROFILE%\.dotnet\tools (Windows) is on your PATH.

No output files generated Run steergen validate first — generation is skipped when source documents contain errors.

Generated files differ between machines Check that projectRoot points to the same content on each machine and that rules packs are pinned to the same ref. Use steergen inspect to compare the resolved model.

Something else? Open an issue at https://github.com/aabs/steergen/issues.


License

MIT

About

A CLI tool for sharing steering files across multiple SDD tools

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

Steergen

Write your AI steering docs once. Generate for every tool.

BuildNuGetLicense: MIT

Steergen is a .NET CLI tool that maintains a single set of steering and constitution documents, then generates the target-specific formats expected by tools like Kiro and Speckit. Change your guidance once; every downstream tool stays in sync.

For a full walkthrough — including greenfield setup, CI integration, and writing rules — see the Getting Started guide.


Table of Contents


Requirements


Installation

dotnet tool install --global aabs.steergen

To upgrade an existing installation:

dotnet tool update --global aabs.steergen

Verify the install:

steergen --version

Quick Start

1. Initialise a project for the targets you want to use:

steergen init . --target kiro --target copilot-agent

This creates steering/global/, steering/project/, steergen.config.yaml, and the target-native output folders.

2. Write a steering document under steering/project/:

---id: engineering-baselinetitle: Engineering Baseline---# Engineering Baseline
:::rule id="CORE-001" mandatory="true" category="quality" tags="quality,reviews"
Prefer small, composable changes that are easy to review and easy to revert.
:::

3. Generate outputs for all registered targets:

steergen run

4. Validate source documents without regenerating:

steergen validate

That's it. For more scenarios — shared policy collections, custom output paths, MSBuild integration, CI setup — see the Getting Started guide.


Supported Targets

TargetDefault output path
kiro.kiro/steering/
speckit.specify/memory/
copilot-agent.github/
kiro-agent.kiro/agents/

Add or remove targets at any time:

steergen target add speckit
steergen target remove kiro

Command Reference

CommandPurpose
steergen init [root] [--target <id>...]Bootstrap config and target folders
steergen run [options]Generate output files for all registered targets
steergen validate [options]Validate source documents and template packs
steergen inspect [--templates] [--rules]Print resolved model, template chain, or rules pack info
steergen target add <id>Register a new target (built-in or pack-provided)
steergen target remove <id>Unregister a target
steergen purge [options]Remove generated files managed by steergen
steergen update [--templates] [--rules] [--force]Re-download configured packs
steergen template-pack add <source> [--ref <ref>] [--path <localPath>]Add a template pack
steergen template-pack upgrade --selector <source|entryKey> [--tag <tag>]Upgrade the configured template pack reference
steergen template-pack removeRemove the configured template pack
steergen rules-pack add <source> [--ref <ref>] [--path <subdir>] [--scope <scope>]Add a rules pack
steergen rules-pack upgrade --selector <source|path> [--tag <tag>]Upgrade one configured rules pack reference
steergen rules-pack remove <name>Remove a rules pack by name
steergen rules-pack listList configured rules packs with status

Commonly used run options:

--config <path> Path to steergen.config.yaml
--project <dir> Override projectRoot
--output <dir> Override generationRoot
--target <id> Generate for one target only (repeatable)
--quiet Suppress informational output
--verbose Show detailed output

Configuration

Steergen looks for steergen.config.yaml in the current directory (or the path given by --config).

A minimal config file:

projectRoot: steering/projectgenerationRoot: .registeredTargets:
- kiro
- copilot-agent

A config with template pack and rules packs:

projectRoot: steering/projectgenerationRoot: .templatePack:
source: "github:acme-corp/steergen-templates"ref: "v2.1.0"rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"registeredTargets:
- kiro
- copilot-agent

Key fields:

FieldPurpose
projectRootSource folder for project-specific steering docs
generationRootBase folder for all generated output
registeredTargetsList of targets to generate by default
templatePackTemplate pack source configuration (see Template Packs)
rulesPacksList of rules pack entries (see Rules Packs)
activeProfilesProfile names (legacy; retained for backward compatibility)

Note: The globalRoot field has been removed. If your config still contains globalRoot, Steergen will report error CFG001 and exit with code 2. See the migration guide for how to convert existing global rules to a rules pack.

For full configuration options and advanced routing, see Section 5 and Section 6 of the Getting Started guide.


Template Packs

Template packs let you override the built-in Scriban templates that Steergen uses to render output, or provide complete target definitions for new external targets. Packs can be sourced from a local directory or a public GitHub repository.

Adding a template pack from GitHub

steergen template-pack add github:acme-corp/steergen-templates --ref v2.1.0

This writes the source to steergen.config.yaml and downloads the pack to the local cache at ~/.steergen/packs/acme-corp/steergen-templates/v2.1.0/.

Adding a local template override path

steergen template-pack add --path ./custom-templates

Local overrides take the highest precedence in the resolution chain.

Template resolution precedence

When rendering, Steergen resolves templates in this order:

  1. Local override path (templatePack.localPath) — highest precedence
  2. Cached GitHub pack (templatePack.source) — middle precedence
  3. Built-in embedded templates — fallback

Updating a template pack

Re-download the configured GitHub pack to pick up changes:

steergen update --templates

On success, displays the pack name, version, and number of template files. If the pack is pinned to a 40-character SHA, re-download is skipped unless --force is specified:

steergen update --templates --force

If no template pack is configured, the command exits with code 0 and reports that no pack source is configured.

Upgrade a specific template pack reference and persist a deterministic (tag, commitSha) tuple:

steergen template-pack upgrade --selector "github:acme-corp/steergen-templates|templates/default" --tag v2.1.0

When --tag is omitted, the command runs in latest-refresh mode, snapshots cache, purges the targeted cache copy, and refetches.

Inspecting the template chain

See which templates come from which source:

steergen inspect --templates

Displays the active resolution chain showing the source (local override, cached GitHub pack, or built-in) for each template.

Removing a template pack

steergen template-pack remove

Removes the template pack configuration from steergen.config.yaml.

Configuration reference

templatePack:
source: "github:acme-corp/steergen-templates"# GitHub sourceref: "v2.1.0"# Tag, branch, or 40-char SHA# OR use a local path instead:# localPath: "./custom-templates"

Rules Packs

Rules packs are shared governance rule sets published to GitHub repositories. They let teams share steering documents across projects without copying files. Each pack declares a scope that determines its merge precedence relative to project-local rules.

To create and publish your own rules pack, see the Authoring a Rules Pack guide.

Adding a rules pack

steergen rules-pack add github:acme-corp/baseline-rules --ref v1.0.0 --scope global

Options:

OptionPurpose
--ref <ref>Git tag, branch, or 40-character SHA
--path <subdir>Subdirectory within the repo (for multi-pack repos)
--scope <scope>Override the pack's manifest scope (global, supplemental, or project)

The command appends the pack to the rulesPacks list in steergen.config.yaml and downloads it to ~/.steergen/rules/{owner}/{repo}/{ref}/.

Scope-based merge precedence

When multiple rule sources define the same rule ID, Steergen resolves conflicts using scope-based precedence:

  1. Project-local rules — highest precedence (your projectRoot documents)
  2. Project-scoped packs — rules packs with scope: project
  3. Supplemental-scoped packs — rules packs with scope: supplemental
  4. Global-scoped packs — rules packs with scope: global (lowest precedence)

Within the same scope level, packs declared earlier in the rulesPacks list take precedence. Duplicate rule IDs at the same scope emit a diagnostic warning.

The --scope option on rules-pack add overrides the scope declared in the pack's own manifest, letting consumers elevate or demote a pack's precedence.

Listing configured rules packs

steergen rules-pack list

Displays all configured rules packs with their source, ref, scope, and cache status.

Updating rules packs

Re-download all configured rules packs:

steergen update --rules

SHA-pinned packs are skipped unless --force is specified:

steergen update --rules --force

Upgrade exactly one configured rules pack reference by canonical selector:

steergen rules-pack upgrade --selector "github:acme-corp/team-rules|backend-team" --tag v1.1.0

Selector escaping rules:

  • Use \\| for a literal | inside either selector component.
  • Use \\\\ for a literal backslash.

Inspecting rules packs

steergen inspect --rules

Displays all configured rules packs with their name, version, source, scope, and number of rules loaded.

Removing a rules pack

steergen rules-pack remove acme-baseline-rules

Removes the matching entry from the rulesPacks list in steergen.config.yaml.

Configuration reference

rulesPacks:
- source: "github:acme-corp/baseline-rules"ref: "abc123def456789012345678901234567890abcd"# Pinned SHA (recommended)scope: global
- source: "github:acme-corp/team-rules"ref: "v1.0.0"path: "backend-team"# Subdirectory within repo
- source: "github:acme-corp/security-rules"ref: "main"# Branch (pinning recommended)scope: supplemental

Tip: Pin rules packs to a tag or full SHA for deterministic builds. Branch refs work but Steergen will recommend pinning in diagnostic output.


Exit Codes

CodeMeaning
0Success
1Validation errors in source documents
2Configuration or I/O error
3Generation or purge error
5Output conflict (file already exists with different content)

Contributing

Contributions are welcome. To get started locally:

git clone https://github.com/aabs/steergen.git
cd steergen
dotnet build
dotnet test

For an overview of how the codebase is structured, see the developer guide or load the code tour in VS Code with the CodeTour extension.

Please open an issue before submitting a pull request for significant changes.


Troubleshooting

steergen not found after install Ensure ~/.dotnet/tools (Linux/macOS) or %USERPROFILE%\.dotnet\tools (Windows) is on your PATH.

No output files generated Run steergen validate first — generation is skipped when source documents contain errors.

Generated files differ between machines Check that projectRoot points to the same content on each machine and that rules packs are pinned to the same ref. Use steergen inspect to compare the resolved model.

Something else? Open an issue at https://github.com/aabs/steergen/issues.


License

MIT

About

A CLI tool for sharing steering files across multiple SDD tools

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages