@rodush/grait 0.0.0-stage → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +174 -2
  3. package/dist/cli.mjs +448 -0
  4. package/package.json +58 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Roman Dushko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,175 @@
1
- # Temporary Holding Version
1
+ # GRAIT
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **GitHub Repository for AI Tooling** <!-- markdownlint-disable-line MD036 -->
4
+
5
+ ![grait-banner](/grait-banner.jpeg#center)
6
+
7
+ <!-- prettier-ignore -->
8
+ *Great engineering, augmented by AI.*
9
+
10
+ An opinionated, GitHub-native foundation for AI-augmented software engineering.
11
+
12
+ GRAIT provides reusable agent instructions, skills, tooling configurations, and automated workflows to bring consistency, quality, and engineering discipline to AI-assisted software development.
13
+
14
+ **GitHub-native. Language-agnostic. Opinionated by design.**
15
+
16
+ **Start with the [installation and configuration guide](docs/installation.md): [new repository](docs/installation.md#new-repository), [existing repository](docs/installation.md#existing-repository), [upgrade](docs/installation.md#upgrade-an-existing-grait-installation), or [someone else's repository](docs/installation.md#ownership-and-access).**
17
+
18
+ ## Philosophy
19
+
20
+ AI can accelerate software development, but faster code generation does not automatically produce better software.
21
+
22
+ Good software engineering still requires sound architecture, clear requirements, maintainable code, automated testing, security, and thoughtful technical decisions.
23
+
24
+ GRAIT is built around a few principles:
25
+
26
+ - **Engineering fundamentals come first.** Established computer science and software engineering principles apply regardless of whether code is written by humans or generated by AI.
27
+ - **AI augments, humans own.** AI agents assist with implementation, analysis, reviews, and automation. Humans remain accountable for decisions and outcomes.
28
+ - **Simplicity over complexity.** Prefer pragmatic, maintainable solutions over unnecessary abstractions, premature optimization, and overengineering.
29
+ - **Quality is built in.** Testing, security, observability, and maintainability are part of the development process, not afterthoughts.
30
+ - **Automate what makes sense.** Use deterministic automation for predictable tasks and AI-powered workflows where reasoning adds value.
31
+ - **Conventions over repeated decisions.** Establish sensible defaults to reduce repetitive setup and improve consistency across repositories.
32
+
33
+ Your local Codex CLI, Claude Code, or GitHub Copilot CLI session acts as the orchestrator and delegates specialists in worktrees on your machine or your own remote host. Changes are pushed to GitHub PRs; humans approve, merge, and release.
34
+
35
+ ## Quick start
36
+
37
+ Use the prebuilt GRAIT CLI in a new or existing GitHub application checkout. The host needs Git, Node.js 24 or newer, npm 11.10.0 or newer, GitHub CLI, and Codex CLI, Claude Code, or GitHub Copilot CLI. Adoption requires no GRAIT source checkout, application npm manifest, or local build.
38
+
39
+ ### Public npm registry
40
+
41
+ Choose an exact public release. With npm's default registry configuration, install it without a package-download token. [GRAIT on npm](https://www.npmjs.com/package/@rodush/grait)
42
+
43
+ ```sh
44
+ npm install --global --ignore-scripts @rodush/grait@VERSION
45
+ grait --version
46
+ ```
47
+
48
+ In the target checkout, use an integration branch and run `grait init --plan`. GRAIT verifies the installed release and displays the full source SHA. [Public npm installation and verification](docs/installation.md#install-from-the-public-npm-registry)
49
+
50
+ ### GitHub Packages
51
+
52
+ Choose an exact version from GitHub Packages. Sign in with your GitHub username and enter a classic personal access token with `read:packages` at the password prompt. [GRAIT package](https://github.com/rodush/grait/pkgs/npm/grait)
53
+
54
+ ```sh
55
+ npm login --scope=@rodush --auth-type=legacy --registry=https://npm.pkg.github.com
56
+ npm install --global --ignore-scripts @rodush/grait@VERSION
57
+ grait --version
58
+ ```
59
+
60
+ Replace `VERSION` with the chosen version. Keep npm signed in when you create an integration branch in the target checkout and run `grait init --plan`. Setup fetches the same package version to verify its source SHA and displays that SHA in the preview. If npm reports a global executable conflict, check for the older unscoped package before retrying. [Registry installation and verification](docs/installation.md#install-from-github-packages) · [Global package migration](docs/installation.md#replace-an-older-global-install)
61
+
62
+ ### Pinned Git commit
63
+
64
+ ```sh
65
+ GRAIT_REVISION=de8f47e87eea5e68c861e2dbf4855fbda5c56249
66
+ npm exec --yes --allow-git=all --ignore-scripts \
67
+ --package="git+https://github.com/rodush/grait.git#$GRAIT_REVISION" -- \
68
+ grait init --plan --repo OWNER/REPOSITORY --revision "$GRAIT_REVISION" --harness codex
69
+ ```
70
+
71
+ Replace `OWNER/REPOSITORY` with your target. Choose a reviewed GRAIT commit and keep its full SHA for preview, apply, and activation. Use `--harness claude` for Claude Code or `--harness copilot` for GitHub Copilot CLI.
72
+
73
+ The preview leaves the application checkout untouched. Follow the guide to apply as a repository administrator, open a configuration PR, and activate after human merge and successful CI. [Installation and activation](docs/installation.md#guided-configuration)
74
+
75
+ ## What you get
76
+
77
+ | Component | Purpose |
78
+ | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
79
+ | [Operate GRAIT](docs/operations.md) | Native Codex/Claude/Copilot roles for coordination, triage, testing, implementation, review, and fixes |
80
+ | [Shared engineering policy](AGENTS.md) | Language-neutral conventions, scoped changes, and human authority |
81
+ | [Project workflow](docs/workflow.md) | Backlog → Ready → In Progress → Review → Done, native blockers, and at most five active stories |
82
+ | [Worktrees and tester-first delivery](docs/tdd.md) | Separate orchestrator checkout, sequential tester/implementer ownership, independent validation |
83
+ | [PR review](docs/review-guidelines.md) | Separate publishing identity, inline findings, formal decisions, and bounded fix loops |
84
+ | [Deterministic CI](.github/workflows/ci.yml) | Configuration, generated-adapter drift, tests, formatting, and Markdown checks |
85
+ | [Operator releases](docs/operations.md#optional-releases) | Optional deterministic release workflow with human approval |
86
+
87
+ ## Subscription and execution
88
+
89
+ Use the official harness with your own eligible subscription. Native sub-agents share its usage allowance; the default is five concurrent workers. GRAIT does not request provider API keys, run AI agents in GitHub Actions, or supply a separate LLM service. Model inference still uses the provider's servers. See [subscription setup](docs/setup.md#subscription-authentication).
90
+
91
+ GitHub Apps identify **who publishes**, independently of where agents execute. One writer App pushes branches and opens PRs; one reviewer App publishes reviews. Tester and implementer do not need separate GitHub accounts. Neither App receives permission to bypass configured human merge gates. GitHub rulesets are optional server-side enforcement; when unavailable, setup offers an [explicit acknowledgement to continue without enforcement](docs/installation.md#ruleset-configuration-fallback). Agents must still leave PR approval and merge to humans.
92
+
93
+ ## Getting Started
94
+
95
+ ### 1. Create your repository
96
+
97
+ Create or clone your application repository and install GRAIT with the pinned CLI. If your repository already uses the GRAIT template, follow [packaged migration](docs/installation.md#existing-template-based-repository).
98
+
99
+ ### 2. Review the defaults
100
+
101
+ Before using the configurations, review:
102
+
103
+ - Agent instructions and engineering conventions
104
+ - Model selection and agent permissions
105
+ - Available skills and specialized agents
106
+ - Local harness roles and deterministic GitHub Actions
107
+ - Host-side publishing credentials, Project access, and required GitHub permissions
108
+
109
+ ### 3. Customize for your project
110
+
111
+ GRAIT provides the common foundation. Extend it with project-specific context, including:
112
+
113
+ - Technology stack and architecture
114
+ - Project-specific coding standards
115
+ - Build and test commands
116
+ - Deployment and infrastructure requirements
117
+ - Domain-specific constraints
118
+
119
+ ### 4. Start building
120
+
121
+ Use your configured coding agents and GitHub workflows to develop software while maintaining established engineering standards.
122
+
123
+ ## Maintain the starter
124
+
125
+ Follow [GRAIT development](docs/grait-development.md) when changing the starter tooling, including inside an adopting project. GRAIT's automation uses Node.js 24; your application may use any language. Edit canonical roles under `automation/`, then run:
126
+
127
+ ```sh
128
+ npm ci
129
+ npm run harness:generate
130
+ npm run check
131
+ npm test
132
+ npm run format:check
133
+ npm run lint:md
134
+ ```
135
+
136
+ Read [setup](docs/setup.md) for configuration, [operations](docs/operations.md) for commands and recovery, and [CONTRIBUTING.md](CONTRIBUTING.md) for changes.
137
+
138
+ ## Technology and Platform Support
139
+
140
+ **Technology stack:** Agnostic by design.
141
+
142
+ GRAIT does not prescribe programming languages, frameworks, application architectures, or infrastructure platforms.
143
+
144
+ **Repository platform:** GitHub.
145
+
146
+ GRAIT intentionally relies on GitHub-native capabilities, including GitHub Actions for deterministic CI, plus issues, Projects, PRs, and reviews.
147
+
148
+ **Coding agents:** Initially optimized for OpenAI Codex.
149
+
150
+ Claude Code and GitHub Copilot CLI are also selectable local harnesses and have matching skill and agent adapters, sharing the same engineering principles and workflow policies.
151
+
152
+ ## What GRAIT Is Not
153
+
154
+ GRAIT is not:
155
+
156
+ - An application boilerplate or framework starter.
157
+ - A replacement for engineering judgment or architectural decisions.
158
+ - A guarantee that AI-generated code is correct, secure, or production-ready.
159
+ - A universal configuration that should be applied without reviewing project requirements.
160
+
161
+ GRAIT provides an opinionated foundation, not a substitute for understanding the system you're building.
162
+
163
+ ## Guiding Principle
164
+
165
+ > AI changes how we write software. It does not invalidate the principles of good software engineering.
166
+
167
+ ## Contributing
168
+
169
+ Contributions, suggestions, and discussions are welcome.
170
+
171
+ Changes should align with GRAIT's core philosophy: pragmatic engineering, minimal unnecessary complexity, clear conventions, and responsible AI augmentation.
172
+
173
+ ## License
174
+
175
+ See [LICENSE](LICENSE) for details.