Open
feat: add examples directory with five self-contained example projects#1
Conversation
Agent-Logs-Url: https://github.com/tasteee/dooz/sessions/40b2a2ca-7123-4293-825e-69ad9d7f0580 Co-authored-by: tasteee <94029138+tasteee@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tasteee/dooz/sessions/40b2a2ca-7123-4293-825e-69ad9d7f0580 Co-authored-by: tasteee <94029138+tasteee@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
tasteee
May 15, 2026 06:42
View session
tasteee
marked this pull request as ready for review
May 15, 2026 06:45
There was a problem hiding this comment.
Pull request overview
Adds a new examples/ area with multiple standalone projects intended to demonstrate dooz features end-to-end (config discovery, pattern matching, filters, resolvers, validators, dry/explain).
Changes:
- Introduces
examples/README.mdas an index + common “how to run” instructions. - Adds five example projects (
simple-scripts,monorepo-workspace,docker-deploy,git-workflow,full-featured) with their ownREADME.mdand dooz configs/extensions. - Demonstrates extension authoring via
dooz.js(custom filters/validators/resolvers) alongside config-only examples.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/README.md | Adds a top-level index and shared instructions for running examples. |
| examples/simple-scripts/README.md | Documents the minimal “single dooz.yaml” example and its commands. |
| examples/simple-scripts/dooz.yaml | Adds basic command aliases plus variadic passthrough patterns. |
| examples/monorepo-workspace/README.md | Documents pnpm workspace usage, specificity ranking, and a validator. |
| examples/monorepo-workspace/dooz.yaml | Adds pnpm workspace command patterns using captures + variadics + validator hooks. |
| examples/monorepo-workspace/dooz.js | Implements a packageExists validator. |
| examples/docker-deploy/README.md | Documents Docker workflow commands, filters, and validator behavior. |
| examples/docker-deploy/dooz.yaml | Adds Docker build/run/push/compose patterns and validator usage. |
| examples/docker-deploy/dooz.js | Implements a tagIsNotLatest validator. |
| examples/git-workflow/README.md | Documents .dooz/ discovery, a kebab filter, semver validation, and ranking. |
| examples/git-workflow/.dooz/dooz.yaml | Adds git workflow patterns (branching, commit, push/pull, tags, stash, log). |
| examples/git-workflow/.dooz/dooz.js | Implements kebab filter and isSemanticVersion validator. |
| examples/full-featured/README.md | Documents a comprehensive example covering all major dooz capabilities. |
| examples/full-featured/dooz.yaml | Adds patterns using resolvers/validators/filters, plus “filter demo” commands. |
| examples/full-featured/dooz.js | Implements resolvers (packageKind, environmentInfo), validators, and filters (kebab, truncate). |
|
|
||
| The simplest possible dooz setup: a single `dooz.yaml` with no extension file. | ||
|
|
||
| Every command is a short alias for a longer `npm` or tool invocation. No resolvers, no validators, no captures — just clean pattern-to-command mappings. |
| ## Features shown | ||
|
|
||
| - **Built-in `lower` filter** — `{{service | lower}}` normalises casing without any extension code. | ||
| - **Specificity ranking** — `build <service> <tag>` wins over `build <service>` when two tokens follow `build`. |
Comment on lines
+10
to
+26
| - description: Run a service container interactively | ||
| input: run <service> [...rest] | ||
| output: docker run --rm {{rest}} {{service | lower}} | ||
|
|
||
| - description: Push a versioned image to the registry | ||
| input: push <service> <tag> | ||
| output: docker push {{service | lower}}:{{tag}} | ||
| validates: [tagIsNotLatest] | ||
|
|
||
| - description: View logs for a running container | ||
| input: logs <service> [...rest] | ||
| output: docker logs {{service}} {{rest}} | ||
|
|
||
| - description: Stop a named running container | ||
| input: stop <service> | ||
| output: docker stop {{service}} | ||
|
|
|
|
||
| - description: Print deployment metadata for an environment | ||
| input: info <environment> | ||
| output: echo "Region{{':'}} {{region}}, Cluster{{':'}} {{cluster}}" |
|
|
||
| - description: Print extra args joined with a separator | ||
| input: flags <name> [...rest] | ||
| output: echo "{{name}} -> {{rest | join(' | ')}}" |
| - description: Deploy a service to an environment | ||
| input: deploy <environment> <service> | ||
| output: ./scripts/deploy.sh {{environment}} {{service | lower}} | ||
| uses: [environmentInfo] |
| - **`environmentInfo` resolver** — reads `environment`, returns `region` and `cluster` for use in the template. | ||
| - **Three validators** — `packageExists`, `environmentExists`, `serviceExists` each have a clear `description` used as the failure message. | ||
| - **`kebab` custom filter** — converts space-separated words to a lowercase hyphenated slug. | ||
| - **`truncate` custom filter** — shortens a value to a max character count and appends `…`; takes a numeric argument: `{{name | truncate(10)}}`. |
Owner
|
@copilot please see comments and apply fixes |
Agent-Logs-Url: https://github.com/tasteee/dooz/sessions/c15381f0-9c8e-46a3-a9b4-97181ab868e4 Co-authored-by: tasteee <94029138+tasteee@users.noreply.github.com>
Author
Done in af85d01. Here's a summary of every fix applied:
|
tasteee
approved these changes
May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an
examples/directory containing five standalone dooz project examples. Each one demonstrates a distinct set of features from the README so users can see exactly how each capability is used in practice.Examples
simple-scriptsThe floor-level setup: a single
dooz.yaml, no extension file. Covers literal patterns and variadic passthrough ([...rest]). Good for teams that only need short command aliases.monorepo-workspaceA pnpm monorepo setup with workspace-scoped commands and a
packageExistsvalidator. Demonstrates:build allbeatsbuild <name>for the literal tokenallpnpm --filterdooz.js) that rejects unknown package names before any command runsdocker-deployDocker build / run / push / compose commands under dooz. Demonstrates:
lowerfilter to normalise service name casingbuild <service> <tag>beatsbuild <service>when two tokens followbuildtagIsNotLatestvalidator that blocks accidentaldocker push api:latestgit-workflowUses a
.dooz/subdirectory layout instead of a root-leveldooz.yaml, keeping the project root clean. Demonstrates:.dooz/config discoverykebabfilter ("Add User Auth"→feature/add-user-auth)isSemanticVersionvalidator that enforcesMAJOR.MINOR.PATCHon release branches and tagspush tagsbeatspush [...rest]full-featuredA comprehensive example that exercises every dooz capability in one place:
packageKindderiveskindfromname;environmentInfoderivesregionandclusterfromenvironmentdeploygates on bothenvironmentExistsandserviceExistskebabandtruncatealongside built-inlower,upper,join,jsonChanges
examples/README.md— index table linking all five examplesexamples/simple-scripts/dooz.yaml+README.mdexamples/monorepo-workspace/dooz.yaml+dooz.js+README.mdexamples/docker-deploy/dooz.yaml+dooz.js+README.mdexamples/git-workflow/.dooz/dooz.yaml+.dooz/dooz.js+README.mdexamples/full-featured/dooz.yaml+dooz.js+README.md