also looking at this
chore(deps): upgrade vendored Stacks framework to 0.70.163
#29
224 files
+3516
-874
| @@ -35,6 +35,36 @@ const client = useAI() | ||
| 35 | 35 | // client... |
| 36 | 36 | ``` |
| 37 | 37 | |
| 38 | ## Compact project context | |
| 39 | ||
| 40 | Stacks conventions reduce the amount of application-owned code a coding model | |
| 41 | must generate. A model can describe domain shape once, use known Model-View-Action | |
| 42 | locations, and rely on framework traits and generators for migrations, validation, | |
| 43 | routes, API artifacts, and types where those paths are supported. Installed | |
| 44 | dependencies still exist, but their `node_modules` implementation is package-manager | |
| 45 | state, not application context an LLM should ingest or reproduce. | |
| 46 | ||
| 47 | Generate a deterministic context payload for any coding model or agent: | |
| 48 | ||
| 49 | ```bash | |
| 50 | buddy ai:context | |
| 51 | buddy ai:context --json | |
| 52 | buddy ai:context --json --output .stacks/ai-context.json | |
| 53 | buddy ai:context --max-chars 4000 --model claude-sonnet-4 | |
| 54 | ``` | |
| 55 | ||
| 56 | The versioned JSON contract identifies canonical source roles, instruction files, | |
| 57 | available application surfaces, safe package metadata, and representative source | |
| 58 | paths. It excludes dependency, build, cache, lock, environment, credential, key, | |
| 59 | and secret paths by default. Existing Buddy AI calls consume the same compact text | |
| 60 | representation. | |
| 61 | ||
| 62 | Output metrics include the enforced character budget and a heuristic token estimate. | |
| 63 | They also compare the payload with the previous unstructured context shape. This is | |
| 64 | evidence about prompt size only. It is not evidence that a particular model will | |
| 65 | write correct code, and exact billing tokens require the selected provider's | |
| 66 | tokenizer. | |
| 67 | ||
| 38 | 68 | Learn more in the docs. |
| 39 | 69 | |
| 40 | 70 | ## 🧪 Testing |