Skip to content

Commit fe350e7

Browse files
author
bgagent
committed
chore(project): update docs
1 parent d5d6cf5 commit fe350e7

9 files changed

Lines changed: 225 additions & 49 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/zizmor.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# zizmor: https://docs.zizmor.sh/configuration/
2+
rules:
3+
# Default since v1.20 is hash-pin for all actions; we require tag/branch/SHA pins.
4+
unpinned-uses:
5+
config:
6+
policies:
7+
"*": ref-pin
8+
# Minimal pull_request_target job (PR title only); trigger is intentional for forks.
9+
dangerous-triggers:
10+
ignore:
11+
- pull-request-lint.yml

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ Run `mise tasks --all` (with `MISE_EXPERIMENTAL=1`) for the full list. Common co
104104
- **`mise run security:secrets`** — Gitleaks at repo root.
105105
- **`mise run security:sast`** — Semgrep on the repo (root; includes **`agent/`** Python among paths).
106106
- **`mise run security:deps`** — OSV Scanner on **`yarn.lock`** (all JS workspaces) and **`agent/uv.lock`**.
107-
- **`mise run security`** — Runs **`security:secrets`** then **`security:sast`**.
107+
- **`mise run security`** — Runs **`security:secrets`**, **`security:deps`**, **`security:sast`**, **`security:grype`**, **`security:retire`**, **`security:gh-actions`**, and **`//agent:security`**.
108108
- **`mise run security:retire`** — Retire.js on CDK, CLI, and docs packages.
109+
- **`mise run security:gh-actions`** — Static analysis of GitHub Actions under **`.github/`** ([zizmor](https://github.com/zizmorcore/zizmor)).
109110
- **`mise run hooks:install`** — Re-install **[prek](https://github.com/j178/prek)** git hooks (also run automatically at the end of **`mise run install`** inside a Git checkout). See [CONTRIBUTING.md](./CONTRIBUTING.md) if `core.hooksPath` blocks install.
110111
- **`mise run hooks:run`** — Run the same **pre-commit** and **pre-push** hook stages on all files (local verification).
111112

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ When planning edits, use **[AGENTS.md](./AGENTS.md)** at the repo root for **whe
4242

4343
This repository uses [mise](https://mise.jdx.dev/) for tool versions and tasks. The root **`mise.toml`** enables [monorepo tasks](https://mise.jdx.dev/tasks/monorepo.html) with **`[monorepo].config_roots`** for **`cdk`**, **`agent`**, **`cli`**, and **`docs`**.
4444

45-
- After cloning, run **`mise trust`** in the repository root (and in **`agent/`** if you use tasks there in isolation) so mise will load **`mise.toml`** files. See [mise trust](https://mise.jdx.dev/cli/trust.html).
45+
- After cloning, run **`mise trust`** in the repository root (and in **`agent/`** if you use tasks there in isolation) so mise will load **`mise.toml`** files. See [mise trust](https://mise.jdx.dev/cli/trust.html). **New to mise?** Activate it in your shell first ([`eval "$(mise activate zsh)"`](https://mise.jdx.dev/getting-started.html) or the bash equivalent in `~/.zshrc` / `~/.bashrc`), run **`mise install`**, then enable **Yarn** with **`corepack enable`** and **`corepack prepare yarn@1.22.22 --activate`** before **`mise run install`** (otherwise **`yarn: command not found`** is common). Full sequence and troubleshooting: [Developer guide — Installation](./docs/guides/DEVELOPER_GUIDE.md#installation).
4646
- Set **`export MISE_EXPERIMENTAL=1`** in your shell (or add it to your environment) when using **namespaced tasks** such as **`mise //cdk:build`** or **`mise run //agent:install`**. Root tasks like **`mise run install`** and **`mise run build`** work without cross-package references and are enough for most workflows.
4747
- From the repo root: **`mise run install`** runs **`yarn install`** and **`mise run install`** in **`agent/`**. **`mise run build`** runs **`//agent:quality`** first (the CDK stack bundles the agent image), then **`//cdk:build`**, **`//cli:build`**, and **`//docs:build`** in order.
4848

docs/guides/DEVELOPER_GUIDE.md

Lines changed: 100 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,14 @@ Keep each repo you onboard **clear and automatable**: documented build/test comm
6767

6868
## Installation
6969

70-
Clone the repository and open the project root (commands below assume your shell is at the repo root).
71-
72-
```bash
73-
git clone https://github.com/aws-samples/sample-autonomous-cloud-coding-agents.git
74-
cd sample-autonomous-cloud-coding-agents
75-
```
70+
Commands below assume your shell is at the repo root after you clone.
7671

7772
### Pre-requisites
7873

79-
- An AWS account. We recommend you deploy this solution in a new account
80-
- [AWS CLI](https://aws.amazon.com/cli/): configure your credentials
74+
**Install and configure yourself (not provided by this repository’s mise files):**
75+
76+
- An AWS account (we recommend a dedicated account for this solution).
77+
- [AWS CLI](https://aws.amazon.com/cli/) with credentials configured, for example:
8178

8279
```
8380
aws configure --profile [your-profile]
@@ -87,13 +84,21 @@ Default region name [None]: us-east-1
8784
Default output format [None]: json
8885
```
8986

90-
- [Node](https://nodejs.org/en) >= v22.0.0
91-
- [AWS CDK](https://github.com/aws/aws-cdk/releases/tag/v2.233.0) >= 2.233.0
92-
- [Python](https://www.python.org/downloads/) >=3.9
93-
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/cli/install/) >= 1.22.19
94-
- [mise](https://mise.jdx.dev/getting-started.html) (required for local agent Python tasks and checks)
95-
- [Docker](https://docs.docker.com/engine/install/)
96-
- A **GitHub personal access token** (PAT) with permission to access every repository you onboard (clone, push to branches, create and update pull requests)—often a fine-grained token scoped to **your fork** of `awslabs/agent-plugins` if you follow the fork workflow under **Repository preparation** at the start of this guide. After deployment, store it in the Secrets Manager secret the stack creates ([Post-deployment setup](#post-deployment-setup)); for local agent runs, export `GITHUB_TOKEN` (see **Local testing** below). Required scopes are documented in `agent/README.md`.
87+
- [Docker](https://docs.docker.com/engine/install/) — for local agent runs and CDK asset builds.
88+
- [mise](https://mise.jdx.dev/getting-started.html) — task runner and version manager for Node, security tools, and (under `agent/`) Python. Install from the official guide; it is **not** installed via npm.
89+
- **AWS CDK CLI** ≥ 2.233.0 — install globally with npm **after** mise is active so it uses the same Node as this repo (see [Set up your toolchain](#set-up-your-toolchain)): `npm install -g aws-cdk`.
90+
- A **GitHub personal access token** (PAT) with permission to access every repository you onboard (clone, push to branches, create and update pull requests)—often a fine-grained token scoped to **your fork** of `awslabs/agent-plugins` if you follow the fork workflow under **Repository preparation**. After deployment, store it in the Secrets Manager secret the stack creates ([Post-deployment setup](#post-deployment-setup)); for local agent runs, export `GITHUB_TOKEN` (see **Local testing**). Required scopes are documented in `agent/README.md`.
91+
92+
**Versions this repo pins via mise (no separate Node/Yarn/Python install needed for the standard path):**
93+
94+
| Tool | Where it is defined | When it is installed |
95+
|------|---------------------|----------------------|
96+
| **Node.js** 22.x | Root `mise.toml` | `mise install` from the repo root |
97+
| **Yarn Classic** (1.22.x) | Not in mise — use Corepack with Node (see below) | After `corepack enable` and `corepack prepare yarn@…` |
98+
| **Python** + **uv** | `agent/mise.toml` | `mise run install` (runs `mise run install` inside `agent/`) |
99+
| gitleaks, semgrep, osv-scanner, grype, zizmor, prek, … | Root `mise.toml` | `mise install` from the repo root |
100+
101+
You do **not** need standalone installs of Node or Yarn from nodejs.org or the Yarn website if you follow [Set up your toolchain](#set-up-your-toolchain).
97102

98103
#### One-time AWS account setup
99104

@@ -105,21 +110,93 @@ aws xray update-trace-segment-destination --destination CloudWatchLogs
105110

106111
Without this, `cdk deploy` will fail with: *"X-Ray Delivery Destination is supported with CloudWatch Logs as a Trace Segment Destination."*
107112

108-
Install [mise](https://mise.jdx.dev/getting-started.html) using the official guide; it is not installed via npm. For the Node-based CLIs, run:
113+
### Set up your toolchain
109114

110-
```bash
111-
npm install -g npm aws-cdk
112-
```
115+
1. **Install mise** — follow [Getting started](https://mise.jdx.dev/getting-started.html).
116+
117+
2. **Activate mise in your shell** so `node`, task tools, and project tasks resolve correctly. Add one line to `~/.zshrc` or `~/.bashrc`:
118+
119+
```bash
120+
eval "$(mise activate zsh)" # or: eval "$(mise activate bash)"
121+
```
122+
123+
Reload the file (`source ~/.zshrc`) or open a new terminal. Without this step, your shell may keep using a system Node (or no `yarn`), and `mise run install` can fail with **`yarn: command not found`**.
124+
125+
3. **Clone the repository** and change into it:
126+
127+
```bash
128+
git clone https://github.com/aws-samples/sample-autonomous-cloud-coding-agents.git
129+
cd sample-autonomous-cloud-coding-agents
130+
```
131+
132+
4. **Trust this repository’s mise config.** Mise refuses to apply project-local settings until you trust them (security feature):
133+
134+
```bash
135+
mise trust
136+
```
137+
138+
5. **Install tools from the root `mise.toml`** (Node 22, security scanners, prek, etc.):
113139

114-
Install repository dependencies and run an initial build before making changes:
140+
```bash
141+
mise install
142+
```
143+
144+
6. **Enable Yarn via Corepack.** Node ships with Corepack, but Yarn is not on your PATH until Corepack is enabled. This monorepo uses **Yarn Classic** (1.x) workspaces:
145+
146+
```bash
147+
corepack enable
148+
corepack prepare yarn@1.22.22 --activate
149+
```
150+
151+
The `prepare` line installs a 1.22.x release compatible with the workspace (`yarn.lock` / engines expectations). If `yarn` is still missing, confirm step 2 (shell activation) and that `which node` points into your mise shims.
152+
153+
7. **Sanity check** (optional):
154+
155+
```bash
156+
node --version # expect v22.x
157+
yarn --version # expect 1.22.x
158+
```
159+
160+
8. **Install the AWS CDK CLI** using the same Node as mise:
161+
162+
```bash
163+
npm install -g aws-cdk
164+
```
165+
166+
9. **Install workspace dependencies and build.** Namespaced mise tasks require experimental mode:
167+
168+
```bash
169+
export MISE_EXPERIMENTAL=1
170+
mise run install
171+
mise run build
172+
```
173+
174+
`mise run install` runs `yarn install` for the Yarn workspaces (`cdk`, `cli`, `docs`), then `mise run install` in `agent/` for Python dependencies, and installs [prek](https://github.com/j178/prek) git hooks when you are inside a Git checkout.
175+
176+
### First time with mise? Troubleshooting
177+
178+
Use this section if **`mise run install`** fails or versions look wrong.
179+
180+
| Symptom | What to check |
181+
|---------|----------------|
182+
| **`yarn: command not found`** | Mise shell activation (step 2), then `corepack enable` and `corepack prepare yarn@1.22.22 --activate` (step 6). |
183+
| **`node` is not v22** | Shell activation (step 2); run `mise install` in the repo root (step 5). |
184+
| Mise errors about **untrusted** config | From the repo root: `mise trust`, then `mise install` again. |
185+
| **`MISE_EXPERIMENTAL` required** | Export `MISE_EXPERIMENTAL=1` for tasks like `mise //cdk:build` (see [CONTRIBUTING.md](../../CONTRIBUTING.md)). |
186+
187+
Minimal recovery sequence:
115188

116189
```bash
190+
eval "$(mise activate zsh)" # or bash; add permanently to your shell rc file
191+
cd /path/to/sample-autonomous-cloud-coding-agents
192+
mise trust
193+
mise install
194+
corepack enable
195+
corepack prepare yarn@1.22.22 --activate
196+
export MISE_EXPERIMENTAL=1
117197
mise run install
118-
mise run build
119198
```
120199

121-
`mise run install` runs `yarn install` for the workspaces and `mise run install` in `agent/` for Python dependencies.
122-
123200
### Suggested development flow
124201

125202
Use this order to iterate quickly and catch issues early:

docs/src/content/docs/developer-guide/Contributing.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)