@llipe.com/dev-tasks 0.6.4 → 0.6.6
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.
- package/.claude/agents/developer.md +294 -0
- package/.claude/agents/github-ops.md +407 -0
- package/.claude/agents/housekeeping.md +109 -0
- package/.claude/agents/technical-writer.md +390 -0
- package/.claude/agents/ux-engineer.md +184 -0
- package/.claude/agents/verifier.md +276 -0
- package/.claude/commands/developer.md +272 -0
- package/.claude/commands/github-ops.md +10 -0
- package/.claude/commands/housekeeping.md +10 -0
- package/.claude/commands/planner.md +506 -0
- package/.claude/commands/product-engineer.md +263 -0
- package/.claude/commands/technical-writer.md +10 -0
- package/.claude/commands/ux-engineer.md +10 -0
- package/.claude/commands/verifier-audit.md +10 -0
- package/.claude/commands/verifier-design.md +10 -0
- package/.claude/hooks/git-guard.sh +95 -0
- package/.claude/skills/activity-contract-test-design/SKILL.md +122 -0
- package/.claude/skills/activity-drift-reconciliation/SKILL.md +133 -0
- package/.claude/skills/activity-e2e-test-design/SKILL.md +124 -0
- package/.claude/skills/activity-edge-case-refinement/SKILL.md +146 -0
- package/.claude/skills/activity-generate-spec/SKILL.md +137 -0
- package/.claude/skills/activity-generate-stories/SKILL.md +243 -0
- package/.claude/skills/activity-init/SKILL.md +162 -0
- package/.claude/skills/activity-publish-github/SKILL.md +116 -0
- package/.claude/skills/activity-random-test-tactics/SKILL.md +181 -0
- package/.claude/skills/activity-refine/SKILL.md +236 -0
- package/.claude/skills/git-ops/SKILL.md +221 -0
- package/.claude/skills/implement/SKILL.md +129 -0
- package/.claude/skills/memo-cli-usage/REFERENCE.md +798 -0
- package/.claude/skills/memo-cli-usage/SKILL.md +144 -0
- package/.claude/skills/plan/SKILL.md +145 -0
- package/.claude/skills/webapp-mockup/SKILL.md +76 -0
- package/.claude/skills/webapp-mockup/scripts/scaffold-mockup.sh +469 -0
- package/.github/agents/developer.agent.md +293 -0
- package/.github/agents/github-ops.agent.md +416 -0
- package/.github/agents/housekeeping.agent.md +109 -0
- package/.github/agents/planner.agent.md +496 -0
- package/.github/agents/product-engineer.agent.md +262 -0
- package/.github/agents/technical-writer.agent.md +389 -0
- package/.github/agents/ux-engineer.agent.md +183 -0
- package/.github/agents/verifier.agent.md +275 -0
- package/.github/instructions/domain/nextjs-pages-components.instructions.md +375 -0
- package/.github/instructions/implement.instructions.md +128 -0
- package/.github/instructions/plan.instructions.md +144 -0
- package/.github/prompts/developer-execute.prompt.md +13 -0
- package/.github/prompts/github-ops.prompt.md +16 -0
- package/.github/prompts/housekeeping.prompt.md +16 -0
- package/.github/prompts/planner-resume.prompt.md +13 -0
- package/.github/prompts/planner.prompt.md +18 -0
- package/.github/prompts/product-engineer-feature.prompt.md +21 -0
- package/.github/prompts/product-engineer-init.prompt.md +16 -0
- package/.github/prompts/product-engineer-issue.prompt.md +19 -0
- package/.github/prompts/technical-writer.prompt.md +21 -0
- package/.github/prompts/ux-engineer.prompt.md +14 -0
- package/.github/prompts/verifier-audit.prompt.md +33 -0
- package/.github/prompts/verifier-design.prompt.md +28 -0
- package/.github/skills/activity-contract-test-design/SKILL.md +117 -0
- package/.github/skills/activity-drift-reconciliation/SKILL.md +128 -0
- package/.github/skills/activity-e2e-test-design/SKILL.md +119 -0
- package/.github/skills/activity-edge-case-refinement/SKILL.md +141 -0
- package/.github/skills/activity-generate-spec/SKILL.md +132 -0
- package/.github/skills/activity-generate-stories/SKILL.md +238 -0
- package/.github/skills/activity-init/SKILL.md +157 -0
- package/.github/skills/activity-publish-github/SKILL.md +111 -0
- package/.github/skills/activity-random-test-tactics/SKILL.md +176 -0
- package/.github/skills/activity-refine/SKILL.md +231 -0
- package/.github/skills/git-ops/SKILL.md +216 -0
- package/.github/skills/memo-cli-usage/REFERENCE.md +798 -0
- package/.github/skills/memo-cli-usage/SKILL.md +144 -0
- package/.github/skills/webapp-mockup/SKILL.md +71 -0
- package/.github/skills/webapp-mockup/scripts/scaffold-mockup.sh +469 -0
- package/.kiro/agents/developer.md +305 -0
- package/.kiro/agents/github-ops.md +428 -0
- package/.kiro/agents/housekeeping.md +122 -0
- package/.kiro/agents/planner.md +530 -0
- package/.kiro/agents/product-engineer.md +294 -0
- package/.kiro/agents/technical-writer.md +408 -0
- package/.kiro/agents/ux-engineer.md +200 -0
- package/.kiro/agents/verifier.md +275 -0
- package/.kiro/hooks/git-guard.json +16 -0
- package/.kiro/hooks/scripts/git-guard.sh +116 -0
- package/.kiro/skills/activity-contract-test-design/SKILL.md +122 -0
- package/.kiro/skills/activity-drift-reconciliation/SKILL.md +133 -0
- package/.kiro/skills/activity-e2e-test-design/SKILL.md +124 -0
- package/.kiro/skills/activity-edge-case-refinement/SKILL.md +146 -0
- package/.kiro/skills/activity-generate-spec/SKILL.md +137 -0
- package/.kiro/skills/activity-generate-stories/SKILL.md +243 -0
- package/.kiro/skills/activity-init/SKILL.md +162 -0
- package/.kiro/skills/activity-publish-github/SKILL.md +116 -0
- package/.kiro/skills/activity-random-test-tactics/SKILL.md +181 -0
- package/.kiro/skills/activity-refine/SKILL.md +236 -0
- package/.kiro/skills/git-ops/SKILL.md +221 -0
- package/.kiro/skills/memo-cli-usage/REFERENCE.md +798 -0
- package/.kiro/skills/memo-cli-usage/SKILL.md +144 -0
- package/.kiro/skills/webapp-mockup/SKILL.md +76 -0
- package/.kiro/steering/git-guard-notice.md +11 -0
- package/.kiro/steering/implement.md +129 -0
- package/.kiro/steering/nextjs-pages-components.md +376 -0
- package/.kiro/steering/plan.md +145 -0
- package/AGENTS.md +122 -0
- package/CHANGELOG.md +28 -2
- package/CLAUDE.md +94 -0
- package/README.md +6 -6
- package/dist/adapters/cli/extract-all.js +4 -4
- package/dist/adapters/cli/extract-component.d.ts +1 -1
- package/dist/adapters/cli/extract-component.js +4 -4
- package/dist/adapters/cli/parse-args.d.ts +1 -0
- package/dist/adapters/cli/parse-args.d.ts.map +1 -1
- package/dist/adapters/cli/parse-args.js +19 -8
- package/dist/adapters/cli/parse-args.js.map +1 -1
- package/dist/bin/dev-tasks.js +23 -9
- package/dist/bin/dev-tasks.js.map +1 -1
- package/dist/bin/dt.js +3 -3
- package/dist/core/distribution/index.d.ts +5 -3
- package/dist/core/distribution/index.d.ts.map +1 -1
- package/dist/core/distribution/index.js +3 -2
- package/dist/core/distribution/index.js.map +1 -1
- package/dist/core/distribution/install.d.ts +20 -8
- package/dist/core/distribution/install.d.ts.map +1 -1
- package/dist/core/distribution/install.js +76 -36
- package/dist/core/distribution/install.js.map +1 -1
- package/dist/core/distribution/manifest.d.ts +25 -2
- package/dist/core/distribution/manifest.d.ts.map +1 -1
- package/dist/core/distribution/manifest.js +29 -2
- package/dist/core/distribution/manifest.js.map +1 -1
- package/dist/core/distribution/migrate.d.ts +6 -3
- package/dist/core/distribution/migrate.d.ts.map +1 -1
- package/dist/core/distribution/migrate.js +21 -19
- package/dist/core/distribution/migrate.js.map +1 -1
- package/dist/core/distribution/profiles.d.ts +30 -0
- package/dist/core/distribution/profiles.d.ts.map +1 -0
- package/dist/core/distribution/profiles.js +57 -0
- package/dist/core/distribution/profiles.js.map +1 -0
- package/dist/core/distribution/update.d.ts +6 -4
- package/dist/core/distribution/update.d.ts.map +1 -1
- package/dist/core/distribution/update.js +22 -22
- package/dist/core/distribution/update.js.map +1 -1
- package/dist/core/extract/component.d.ts +9 -9
- package/dist/core/extract/component.js +5 -5
- package/dist/core/extract/report.d.ts +1 -1
- package/dist/core/extract/report.js +1 -1
- package/package.json +15 -2
- package/skills/.gitkeep +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memo-cli-usage
|
|
3
|
+
description: "Read and write architectural decisions to the shared memo-cli knowledge base. Use when recording or restoring cross-session context."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# memo-cli Usage — Quick Reference
|
|
7
|
+
|
|
8
|
+
Operate `memo-cli` for reading and writing architectural decisions in a shared Qdrant vector database. For full CLI documentation (all flags, configuration, admin operations, schema details), see [`REFERENCE.md`](./REFERENCE.md).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Setup Validation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
memo setup validate # exit 0 = configured correctly
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
If validation fails, run: `memo setup init --repo <repo> --org <org> --domain <domain>`
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Session Start — Restore Context
|
|
23
|
+
|
|
24
|
+
Run before writing any code:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
memo list --limit 20 --json
|
|
28
|
+
memo tags list --sort frequency --json
|
|
29
|
+
memo search "<current task description>" --limit 10 --json
|
|
30
|
+
memo search "<key contract or dependency>" --scope related --limit 5 --json
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Synthesize findings into:
|
|
34
|
+
|
|
35
|
+
- Constraints to preserve
|
|
36
|
+
- Rejected alternatives to avoid
|
|
37
|
+
- Contracts/boundaries that must remain stable
|
|
38
|
+
- Sensitive files/modules to treat carefully
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Writing Entries
|
|
43
|
+
|
|
44
|
+
### Intent Entry (before starting a story/task)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
memo write \
|
|
48
|
+
--rationale "Context: Starting ISSUE-<##> because <trigger>. Decision: implement via <approach>, preserving <constraints>. Impact: affects <modules/contracts>." \
|
|
49
|
+
--tags "<domain>,issue-<number>,intent,<impact-tag>" \
|
|
50
|
+
--entry-type decision \
|
|
51
|
+
--source agent \
|
|
52
|
+
--story "ISSUE-<number>" \
|
|
53
|
+
--on-duplicate consolidate \
|
|
54
|
+
--json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Outcome Entry (after completing a story/task)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
memo write \
|
|
61
|
+
--rationale "Context: Completed ISSUE-<##>. Delivery: shipped <behavior>, deviations <none|details>, AC <x/y> verified. Impact: quality gates test=<p/f>; lint=<p/f>; format:check=<p/f>; typecheck=<p/f>; audit=<p/f>." \
|
|
62
|
+
--tags "<domain>,issue-<number>,outcome,gates-pass" \
|
|
63
|
+
--entry-type decision \
|
|
64
|
+
--source agent \
|
|
65
|
+
--commit "$(git rev-parse HEAD)" \
|
|
66
|
+
--story "ISSUE-<number>" \
|
|
67
|
+
--files "<key files modified>" \
|
|
68
|
+
--on-duplicate consolidate \
|
|
69
|
+
--json
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Decision Entry (architectural choices)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
memo write \
|
|
76
|
+
--rationale "Context: <situation>. Decision: <what was chosen>. Rationale: <why this over alternatives>." \
|
|
77
|
+
--tags "<domain>,<technology>,decision" \
|
|
78
|
+
--entry-type decision \
|
|
79
|
+
--source agent \
|
|
80
|
+
--json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Entry Types
|
|
86
|
+
|
|
87
|
+
| Type | Use For |
|
|
88
|
+
| ------------------- | --------------------------------------------- |
|
|
89
|
+
| `decision` | Architectural/design choices, intent, outcome |
|
|
90
|
+
| `integration_point` | Cross-service contracts, API boundaries |
|
|
91
|
+
| `structure` | Module layout, naming conventions |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Tag Rules
|
|
96
|
+
|
|
97
|
+
- Kebab-case only: `rate-limiting` not `rateLimiting`
|
|
98
|
+
- 4-5 tags per entry across layers: domain, work-item, lifecycle, impact, boundary
|
|
99
|
+
- Check existing tags first: `memo tags list --sort frequency --json`
|
|
100
|
+
- Reuse over inventing new tags
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## When to Write
|
|
105
|
+
|
|
106
|
+
- Choosing a library, framework, or architecture pattern
|
|
107
|
+
- Changing config files (explain why)
|
|
108
|
+
- Modifying core abstractions, schemas, entry points
|
|
109
|
+
- Establishing naming/layout conventions
|
|
110
|
+
- Discovering constraints (API limits, platform quirks)
|
|
111
|
+
- Starting/completing a story (intent/outcome)
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## When to Search
|
|
116
|
+
|
|
117
|
+
- Before making design choices: `memo search "<topic>" --json`
|
|
118
|
+
- Before touching unfamiliar files: `memo search "<filename>" --json`
|
|
119
|
+
- Cross-repo context: `memo search "<query>" --scope related --json`
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Agent Mode Rules
|
|
124
|
+
|
|
125
|
+
- Always pass `--json` for parseable output
|
|
126
|
+
- Always pass `--on-duplicate consolidate` for writes
|
|
127
|
+
- Never log API keys or secrets
|
|
128
|
+
- Bulk delete is blocked in `--json` mode (safety guard)
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Quick Command Card
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
memo setup validate # Verify config
|
|
136
|
+
memo write --rationale "..." --tags "a,b,c" --json # Record decision
|
|
137
|
+
memo search "query" [--scope related] --json # Semantic search
|
|
138
|
+
memo list [--limit N] --json # Browse recent
|
|
139
|
+
memo tags list [--sort frequency] --json # Discover tags
|
|
140
|
+
memo inspect --json # Global facets
|
|
141
|
+
memo delete --id <uuid> --json # Delete entry
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
> For full flag documentation, admin operations, environment setup, and detailed examples, read [`REFERENCE.md`](./REFERENCE.md).
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Webapp Mockup Skill
|
|
2
|
+
|
|
3
|
+
Purpose
|
|
4
|
+
|
|
5
|
+
- Generate consistent, runnable React mockups for feature discovery and UI/functionality gap analysis.
|
|
6
|
+
- Produce partial, high-signal mockups with realistic UI artifacts: components, texts, transitions, popups, warnings, inputs, and validations.
|
|
7
|
+
|
|
8
|
+
When to use
|
|
9
|
+
|
|
10
|
+
- User asks to visualize a potential UI before full implementation.
|
|
11
|
+
- Team needs a browsable prototype to identify missing requirements.
|
|
12
|
+
- A feature section is still exploratory and should not include full backend flow.
|
|
13
|
+
|
|
14
|
+
Required behavior
|
|
15
|
+
|
|
16
|
+
1. Folder layout
|
|
17
|
+
|
|
18
|
+
- Create mockups only under:
|
|
19
|
+
- /mockups/mockup-<feature>-<num>
|
|
20
|
+
- Keep each mockup self-contained and runnable with npm scripts.
|
|
21
|
+
|
|
22
|
+
2. Color palette rule
|
|
23
|
+
|
|
24
|
+
- If the project or user has not defined a palette, ask for one.
|
|
25
|
+
- Default fallback palette source:
|
|
26
|
+
- https://colorhunt.co/palette/281c594e8d9c85c79aedf7bd
|
|
27
|
+
|
|
28
|
+
3. UI coverage requirements
|
|
29
|
+
|
|
30
|
+
- Include:
|
|
31
|
+
- Core components (cards, buttons, inputs, labels)
|
|
32
|
+
- Meaningful UI text and microcopy
|
|
33
|
+
- Transition behavior (section reveal, popup open/close)
|
|
34
|
+
- Popup/dialog examples
|
|
35
|
+
- Warning and error states
|
|
36
|
+
- Input validation states and messages
|
|
37
|
+
- No need to complete entire flow.
|
|
38
|
+
- If only a section is implemented, add a visible banner with instructions indicating this is a partial mockup and where to continue.
|
|
39
|
+
|
|
40
|
+
4. CSS references
|
|
41
|
+
|
|
42
|
+
- Ensure CSS files are referenced correctly from app entry/components.
|
|
43
|
+
- Keep any additional stylesheet imports explicit.
|
|
44
|
+
|
|
45
|
+
5. Consistency via scaffold script
|
|
46
|
+
|
|
47
|
+
- Use:
|
|
48
|
+
- ./.github/skills/webapp-mockup/scripts/scaffold-mockup.sh <feature> <num> [palette_url]
|
|
49
|
+
- This script must be the default path for creating new mockups to keep structure and baseline behavior consistent.
|
|
50
|
+
- The scaffold path must remain non-interactive so agents can run it without manual terminal confirmation.
|
|
51
|
+
|
|
52
|
+
Operational workflow
|
|
53
|
+
|
|
54
|
+
1. Confirm feature slug and mockup number.
|
|
55
|
+
2. Confirm palette or apply fallback URL.
|
|
56
|
+
3. Run scaffold script.
|
|
57
|
+
|
|
58
|
+
- The script is designed to run non-interactively in agent terminal sessions.
|
|
59
|
+
|
|
60
|
+
4. Implement or adjust the specific mockup section requested.
|
|
61
|
+
5. Verify app runs with npm run dev.
|
|
62
|
+
6. Summarize what is mocked vs intentionally not implemented.
|
|
63
|
+
|
|
64
|
+
Acceptance checklist
|
|
65
|
+
|
|
66
|
+
- Mockup path follows /mockups/mockup-<feature>-<num>
|
|
67
|
+
- App is runnable locally
|
|
68
|
+
- Palette is user-defined or fallback applied
|
|
69
|
+
- Banner exists for partial implementation
|
|
70
|
+
- Includes inputs + validations + warnings + popup + transitions
|
|
71
|
+
- CSS references are present and valid
|
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Scaffolds a consistent React + shadcn-style mockup app at:
|
|
5
|
+
# /mockups/mockup-<feature>-<num>
|
|
6
|
+
|
|
7
|
+
usage() {
|
|
8
|
+
cat <<'USAGE'
|
|
9
|
+
Usage:
|
|
10
|
+
./.github/skills/webapp-mockup/scripts/scaffold-mockup.sh <feature> <num> [palette_url]
|
|
11
|
+
|
|
12
|
+
Examples:
|
|
13
|
+
./.github/skills/webapp-mockup/scripts/scaffold-mockup.sh onboarding 1
|
|
14
|
+
./.github/skills/webapp-mockup/scripts/scaffold-mockup.sh billing 2 https://colorhunt.co/palette/281c594e8d9c85c79aedf7bd
|
|
15
|
+
USAGE
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if [[ $# -lt 2 || $# -gt 3 ]]; then
|
|
19
|
+
usage
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
FEATURE_RAW="$1"
|
|
24
|
+
NUM_RAW="$2"
|
|
25
|
+
PALETTE_URL="${3:-https://colorhunt.co/palette/281c594e8d9c85c79aedf7bd}"
|
|
26
|
+
|
|
27
|
+
if ! [[ "$NUM_RAW" =~ ^[0-9]+$ ]]; then
|
|
28
|
+
echo "Error: <num> must be an integer."
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
FEATURE="$(echo "$FEATURE_RAW" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9-')"
|
|
33
|
+
if [[ -z "$FEATURE" ]]; then
|
|
34
|
+
echo "Error: <feature> produced an empty slug."
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
39
|
+
REPO_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
|
|
40
|
+
MOCKUPS_ROOT="$REPO_ROOT/mockups"
|
|
41
|
+
APP_DIR="$MOCKUPS_ROOT/mockup-${FEATURE}-${NUM_RAW}"
|
|
42
|
+
|
|
43
|
+
if [[ -d "$APP_DIR" ]]; then
|
|
44
|
+
echo "Error: target already exists: $APP_DIR"
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
mkdir -p "$MOCKUPS_ROOT"
|
|
49
|
+
|
|
50
|
+
echo "Creating app at: $APP_DIR"
|
|
51
|
+
CI=1 npm_config_yes=true npm create vite@latest "$APP_DIR" -- --template react-ts
|
|
52
|
+
|
|
53
|
+
pushd "$APP_DIR" >/dev/null
|
|
54
|
+
|
|
55
|
+
npm install
|
|
56
|
+
npm install class-variance-authority clsx tailwind-merge lucide-react @radix-ui/react-dialog
|
|
57
|
+
npm install -D tailwindcss postcss autoprefixer tailwindcss-animate
|
|
58
|
+
npx --yes tailwindcss init -p
|
|
59
|
+
|
|
60
|
+
cat > tailwind.config.js <<'EOF'
|
|
61
|
+
/** @type {import('tailwindcss').Config} */
|
|
62
|
+
module.exports = {
|
|
63
|
+
darkMode: ["class"],
|
|
64
|
+
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
65
|
+
theme: {
|
|
66
|
+
extend: {
|
|
67
|
+
borderRadius: {
|
|
68
|
+
lg: "var(--radius)",
|
|
69
|
+
md: "calc(var(--radius) - 2px)",
|
|
70
|
+
sm: "calc(var(--radius) - 4px)",
|
|
71
|
+
},
|
|
72
|
+
colors: {
|
|
73
|
+
background: "hsl(var(--background))",
|
|
74
|
+
foreground: "hsl(var(--foreground))",
|
|
75
|
+
card: "hsl(var(--card))",
|
|
76
|
+
cardForeground: "hsl(var(--card-foreground))",
|
|
77
|
+
primary: "hsl(var(--primary))",
|
|
78
|
+
primaryForeground: "hsl(var(--primary-foreground))",
|
|
79
|
+
secondary: "hsl(var(--secondary))",
|
|
80
|
+
secondaryForeground: "hsl(var(--secondary-foreground))",
|
|
81
|
+
accent: "hsl(var(--accent))",
|
|
82
|
+
accentForeground: "hsl(var(--accent-foreground))",
|
|
83
|
+
warning: "hsl(var(--warning))",
|
|
84
|
+
warningForeground: "hsl(var(--warning-foreground))",
|
|
85
|
+
border: "hsl(var(--border))",
|
|
86
|
+
input: "hsl(var(--input))",
|
|
87
|
+
ring: "hsl(var(--ring))",
|
|
88
|
+
},
|
|
89
|
+
keyframes: {
|
|
90
|
+
fadeIn: {
|
|
91
|
+
from: { opacity: "0", transform: "translateY(8px)" },
|
|
92
|
+
to: { opacity: "1", transform: "translateY(0)" },
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
animation: {
|
|
96
|
+
fadeIn: "fadeIn 220ms ease-out",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
plugins: [require("tailwindcss-animate")],
|
|
101
|
+
}
|
|
102
|
+
EOF
|
|
103
|
+
|
|
104
|
+
mkdir -p src/components/ui src/lib
|
|
105
|
+
|
|
106
|
+
cat > src/lib/utils.ts <<'EOF'
|
|
107
|
+
import { type ClassValue, clsx } from "clsx"
|
|
108
|
+
import { twMerge } from "tailwind-merge"
|
|
109
|
+
|
|
110
|
+
export function cn(...inputs: ClassValue[]) {
|
|
111
|
+
return twMerge(clsx(inputs))
|
|
112
|
+
}
|
|
113
|
+
EOF
|
|
114
|
+
|
|
115
|
+
cat > src/components/ui/button.tsx <<'EOF'
|
|
116
|
+
import * as React from "react"
|
|
117
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
118
|
+
import { cn } from "../../lib/utils"
|
|
119
|
+
|
|
120
|
+
const buttonVariants = cva(
|
|
121
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
122
|
+
{
|
|
123
|
+
variants: {
|
|
124
|
+
variant: {
|
|
125
|
+
default: "bg-primary text-primaryForeground hover:opacity-90",
|
|
126
|
+
outline: "border border-border bg-background hover:bg-secondary hover:text-secondaryForeground",
|
|
127
|
+
ghost: "hover:bg-secondary hover:text-secondaryForeground",
|
|
128
|
+
warning: "bg-warning text-warningForeground hover:opacity-90",
|
|
129
|
+
},
|
|
130
|
+
size: {
|
|
131
|
+
default: "h-10 px-4 py-2",
|
|
132
|
+
sm: "h-9 rounded-md px-3",
|
|
133
|
+
lg: "h-11 rounded-md px-8",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
defaultVariants: {
|
|
137
|
+
variant: "default",
|
|
138
|
+
size: "default",
|
|
139
|
+
},
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
export interface ButtonProps
|
|
144
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
145
|
+
VariantProps<typeof buttonVariants> {}
|
|
146
|
+
|
|
147
|
+
export function Button({ className, variant, size, ...props }: ButtonProps) {
|
|
148
|
+
return <button className={cn(buttonVariants({ variant, size, className }))} {...props} />
|
|
149
|
+
}
|
|
150
|
+
EOF
|
|
151
|
+
|
|
152
|
+
cat > src/components/ui/input.tsx <<'EOF'
|
|
153
|
+
import * as React from "react"
|
|
154
|
+
import { cn } from "../../lib/utils"
|
|
155
|
+
|
|
156
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
157
|
+
|
|
158
|
+
export const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => {
|
|
159
|
+
return (
|
|
160
|
+
<input
|
|
161
|
+
ref={ref}
|
|
162
|
+
className={cn(
|
|
163
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
164
|
+
className
|
|
165
|
+
)}
|
|
166
|
+
{...props}
|
|
167
|
+
/>
|
|
168
|
+
)
|
|
169
|
+
})
|
|
170
|
+
Input.displayName = "Input"
|
|
171
|
+
EOF
|
|
172
|
+
|
|
173
|
+
cat > src/components/ui/dialog.tsx <<'EOF'
|
|
174
|
+
import * as React from "react"
|
|
175
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog"
|
|
176
|
+
import { X } from "lucide-react"
|
|
177
|
+
import { cn } from "../../lib/utils"
|
|
178
|
+
|
|
179
|
+
export const Dialog = DialogPrimitive.Root
|
|
180
|
+
export const DialogTrigger = DialogPrimitive.Trigger
|
|
181
|
+
export const DialogClose = DialogPrimitive.Close
|
|
182
|
+
|
|
183
|
+
export function DialogContent({ className, ...props }: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>) {
|
|
184
|
+
return (
|
|
185
|
+
<DialogPrimitive.Portal>
|
|
186
|
+
<DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out" />
|
|
187
|
+
<DialogPrimitive.Content
|
|
188
|
+
className={cn(
|
|
189
|
+
"fixed left-1/2 top-1/2 z-50 w-[92vw] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-card p-6 shadow-lg",
|
|
190
|
+
className
|
|
191
|
+
)}
|
|
192
|
+
{...props}
|
|
193
|
+
>
|
|
194
|
+
{props.children}
|
|
195
|
+
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-80 transition-opacity hover:opacity-100">
|
|
196
|
+
<X className="h-4 w-4" />
|
|
197
|
+
<span className="sr-only">Close</span>
|
|
198
|
+
</DialogPrimitive.Close>
|
|
199
|
+
</DialogPrimitive.Content>
|
|
200
|
+
</DialogPrimitive.Portal>
|
|
201
|
+
)
|
|
202
|
+
}
|
|
203
|
+
EOF
|
|
204
|
+
|
|
205
|
+
cat > src/components/ui/alert.tsx <<'EOF'
|
|
206
|
+
import * as React from "react"
|
|
207
|
+
import { cn } from "../../lib/utils"
|
|
208
|
+
|
|
209
|
+
export function Alert({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
|
|
210
|
+
return <div className={cn("rounded-md border border-warning bg-warning/15 p-3 text-sm", className)} {...props} />
|
|
211
|
+
}
|
|
212
|
+
EOF
|
|
213
|
+
|
|
214
|
+
cat > src/index.css <<'EOF'
|
|
215
|
+
@tailwind base;
|
|
216
|
+
@tailwind components;
|
|
217
|
+
@tailwind utilities;
|
|
218
|
+
|
|
219
|
+
/* Default palette source:
|
|
220
|
+
https://colorhunt.co/palette/281c594e8d9c85c79aedf7bd
|
|
221
|
+
*/
|
|
222
|
+
:root {
|
|
223
|
+
--radius: 0.6rem;
|
|
224
|
+
|
|
225
|
+
--background: 46 73% 95%; /* #EDF7BD */
|
|
226
|
+
--foreground: 258 53% 23%; /* #281C59 */
|
|
227
|
+
|
|
228
|
+
--card: 0 0% 100%;
|
|
229
|
+
--card-foreground: 258 53% 23%;
|
|
230
|
+
|
|
231
|
+
--primary: 258 53% 23%; /* #281C59 */
|
|
232
|
+
--primary-foreground: 0 0% 100%;
|
|
233
|
+
|
|
234
|
+
--secondary: 191 34% 46%; /* #4E8D9C */
|
|
235
|
+
--secondary-foreground: 0 0% 100%;
|
|
236
|
+
|
|
237
|
+
--accent: 96 40% 64%; /* #85C79A */
|
|
238
|
+
--accent-foreground: 258 53% 20%;
|
|
239
|
+
|
|
240
|
+
--warning: 12 88% 59%;
|
|
241
|
+
--warning-foreground: 0 0% 100%;
|
|
242
|
+
|
|
243
|
+
--border: 191 20% 78%;
|
|
244
|
+
--input: 191 20% 78%;
|
|
245
|
+
--ring: 191 34% 46%;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
* {
|
|
249
|
+
@apply border-border;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
body {
|
|
253
|
+
@apply min-h-screen bg-background text-foreground antialiased;
|
|
254
|
+
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
|
|
255
|
+
}
|
|
256
|
+
EOF
|
|
257
|
+
|
|
258
|
+
cat > src/mockup.css <<'EOF'
|
|
259
|
+
.mockup-enter {
|
|
260
|
+
animation: fadeUp 220ms ease-out;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
@keyframes fadeUp {
|
|
264
|
+
from {
|
|
265
|
+
opacity: 0;
|
|
266
|
+
transform: translateY(8px);
|
|
267
|
+
}
|
|
268
|
+
to {
|
|
269
|
+
opacity: 1;
|
|
270
|
+
transform: translateY(0);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
EOF
|
|
274
|
+
|
|
275
|
+
cat > src/App.tsx <<'EOF'
|
|
276
|
+
import { useMemo, useState } from "react"
|
|
277
|
+
import "./mockup.css"
|
|
278
|
+
import { Alert } from "./components/ui/alert"
|
|
279
|
+
import { Button } from "./components/ui/button"
|
|
280
|
+
import { Dialog, DialogContent, DialogTrigger } from "./components/ui/dialog"
|
|
281
|
+
import { Input } from "./components/ui/input"
|
|
282
|
+
|
|
283
|
+
type FormState = {
|
|
284
|
+
fullName: string
|
|
285
|
+
email: string
|
|
286
|
+
company: string
|
|
287
|
+
accepted: boolean
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
type FormErrors = Partial<Record<keyof FormState, string>>
|
|
291
|
+
|
|
292
|
+
function validateForm(values: FormState): FormErrors {
|
|
293
|
+
const errors: FormErrors = {}
|
|
294
|
+
|
|
295
|
+
if (!values.fullName.trim()) {
|
|
296
|
+
errors.fullName = "Full name is required."
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (!values.email.trim()) {
|
|
300
|
+
errors.email = "Email is required."
|
|
301
|
+
} else if (!/^\S+@\S+\.\S+$/.test(values.email)) {
|
|
302
|
+
errors.email = "Use a valid email format."
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (!values.company.trim()) {
|
|
306
|
+
errors.company = "Company is required."
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (!values.accepted) {
|
|
310
|
+
errors.accepted = "You must accept terms to continue."
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return errors
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export default function App() {
|
|
317
|
+
const [form, setForm] = useState<FormState>({
|
|
318
|
+
fullName: "",
|
|
319
|
+
email: "",
|
|
320
|
+
company: "",
|
|
321
|
+
accepted: false,
|
|
322
|
+
})
|
|
323
|
+
const [errors, setErrors] = useState<FormErrors>({})
|
|
324
|
+
const [submitted, setSubmitted] = useState(false)
|
|
325
|
+
|
|
326
|
+
const hasErrors = useMemo(() => Object.keys(errors).length > 0, [errors])
|
|
327
|
+
|
|
328
|
+
const onSubmit = (event: React.FormEvent) => {
|
|
329
|
+
event.preventDefault()
|
|
330
|
+
const nextErrors = validateForm(form)
|
|
331
|
+
setErrors(nextErrors)
|
|
332
|
+
setSubmitted(Object.keys(nextErrors).length === 0)
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
return (
|
|
336
|
+
<main className="mx-auto max-w-4xl px-4 py-10 md:px-6">
|
|
337
|
+
<header className="mockup-enter mb-8 rounded-xl border bg-card p-5 shadow-sm">
|
|
338
|
+
<p className="mb-2 text-xs font-semibold uppercase tracking-wide text-secondary">Mockup Banner</p>
|
|
339
|
+
<h1 className="text-2xl font-semibold">Mockup Workspace</h1>
|
|
340
|
+
<p className="mt-2 text-sm text-foreground/80">
|
|
341
|
+
This is a partial mockup section. Extend this area with additional flows and link each new section from here.
|
|
342
|
+
</p>
|
|
343
|
+
<p className="mt-1 text-xs text-foreground/70">
|
|
344
|
+
Palette source: PLACEHOLDER_PALETTE_URL
|
|
345
|
+
</p>
|
|
346
|
+
</header>
|
|
347
|
+
|
|
348
|
+
<section className="mockup-enter grid gap-6 md:grid-cols-[1.1fr_0.9fr]">
|
|
349
|
+
<form onSubmit={onSubmit} className="rounded-xl border bg-card p-5 shadow-sm">
|
|
350
|
+
<h2 className="text-lg font-semibold">Lead Capture Section</h2>
|
|
351
|
+
<p className="mt-1 text-sm text-foreground/80">
|
|
352
|
+
Includes inputs, validations, warning states, confirmation popup, and transition-ready UI blocks.
|
|
353
|
+
</p>
|
|
354
|
+
|
|
355
|
+
<div className="mt-5 space-y-4">
|
|
356
|
+
<div>
|
|
357
|
+
<label htmlFor="fullName" className="mb-1 block text-sm font-medium">Full name</label>
|
|
358
|
+
<Input
|
|
359
|
+
id="fullName"
|
|
360
|
+
value={form.fullName}
|
|
361
|
+
onChange={(event) => setForm((prev) => ({ ...prev, fullName: event.target.value }))}
|
|
362
|
+
aria-invalid={Boolean(errors.fullName)}
|
|
363
|
+
/>
|
|
364
|
+
{errors.fullName && <p className="mt-1 text-xs text-warning">{errors.fullName}</p>}
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
<div>
|
|
368
|
+
<label htmlFor="email" className="mb-1 block text-sm font-medium">Work email</label>
|
|
369
|
+
<Input
|
|
370
|
+
id="email"
|
|
371
|
+
type="email"
|
|
372
|
+
value={form.email}
|
|
373
|
+
onChange={(event) => setForm((prev) => ({ ...prev, email: event.target.value }))}
|
|
374
|
+
aria-invalid={Boolean(errors.email)}
|
|
375
|
+
/>
|
|
376
|
+
{errors.email && <p className="mt-1 text-xs text-warning">{errors.email}</p>}
|
|
377
|
+
</div>
|
|
378
|
+
|
|
379
|
+
<div>
|
|
380
|
+
<label htmlFor="company" className="mb-1 block text-sm font-medium">Company</label>
|
|
381
|
+
<Input
|
|
382
|
+
id="company"
|
|
383
|
+
value={form.company}
|
|
384
|
+
onChange={(event) => setForm((prev) => ({ ...prev, company: event.target.value }))}
|
|
385
|
+
aria-invalid={Boolean(errors.company)}
|
|
386
|
+
/>
|
|
387
|
+
{errors.company && <p className="mt-1 text-xs text-warning">{errors.company}</p>}
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
<label className="flex items-start gap-3 rounded-md border p-3">
|
|
391
|
+
<input
|
|
392
|
+
type="checkbox"
|
|
393
|
+
checked={form.accepted}
|
|
394
|
+
onChange={(event) => setForm((prev) => ({ ...prev, accepted: event.target.checked }))}
|
|
395
|
+
className="mt-1"
|
|
396
|
+
/>
|
|
397
|
+
<span className="text-sm">I accept terms and understand this is a mockup-only workflow.</span>
|
|
398
|
+
</label>
|
|
399
|
+
{errors.accepted && <p className="mt-1 text-xs text-warning">{errors.accepted}</p>}
|
|
400
|
+
|
|
401
|
+
<div className="flex flex-wrap gap-3">
|
|
402
|
+
<Button type="submit">Validate inputs</Button>
|
|
403
|
+
|
|
404
|
+
<Dialog>
|
|
405
|
+
<DialogTrigger asChild>
|
|
406
|
+
<Button type="button" variant="outline">Open confirmation popup</Button>
|
|
407
|
+
</DialogTrigger>
|
|
408
|
+
<DialogContent>
|
|
409
|
+
<h3 className="text-lg font-semibold">Mockup Confirmation</h3>
|
|
410
|
+
<p className="mt-2 text-sm text-foreground/80">
|
|
411
|
+
This popup demonstrates a future confirmation step. Connect this to a real action in implementation.
|
|
412
|
+
</p>
|
|
413
|
+
<div className="mt-4 flex gap-2">
|
|
414
|
+
<Button type="button">Confirm</Button>
|
|
415
|
+
<Button type="button" variant="outline">Cancel</Button>
|
|
416
|
+
</div>
|
|
417
|
+
</DialogContent>
|
|
418
|
+
</Dialog>
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
</form>
|
|
422
|
+
|
|
423
|
+
<aside className="rounded-xl border bg-card p-5 shadow-sm">
|
|
424
|
+
<h3 className="text-lg font-semibold">Status + Warnings</h3>
|
|
425
|
+
|
|
426
|
+
{hasErrors ? (
|
|
427
|
+
<Alert className="mt-4">
|
|
428
|
+
Some fields need attention before progressing. This warning block should remain visible on invalid submit.
|
|
429
|
+
</Alert>
|
|
430
|
+
) : (
|
|
431
|
+
<div className="mt-4 rounded-md border border-accent bg-accent/20 p-3 text-sm">
|
|
432
|
+
No current validation warnings.
|
|
433
|
+
</div>
|
|
434
|
+
)}
|
|
435
|
+
|
|
436
|
+
{submitted && (
|
|
437
|
+
<div className="mockup-enter mt-4 rounded-md border border-secondary bg-secondary/15 p-3 text-sm">
|
|
438
|
+
Validation passed. Next flow step intentionally not implemented in this partial mockup.
|
|
439
|
+
</div>
|
|
440
|
+
)}
|
|
441
|
+
|
|
442
|
+
<div className="mt-4 rounded-md border p-3 text-sm">
|
|
443
|
+
<p className="font-medium">Transition Notes</p>
|
|
444
|
+
<ul className="mt-2 list-disc space-y-1 pl-5 text-foreground/80">
|
|
445
|
+
<li>Use entrance animations for newly revealed sections.</li>
|
|
446
|
+
<li>Animate warning visibility when validation state changes.</li>
|
|
447
|
+
<li>Use popup transitions for confirmations and destructive actions.</li>
|
|
448
|
+
</ul>
|
|
449
|
+
</div>
|
|
450
|
+
</aside>
|
|
451
|
+
</section>
|
|
452
|
+
</main>
|
|
453
|
+
)
|
|
454
|
+
}
|
|
455
|
+
EOF
|
|
456
|
+
|
|
457
|
+
# Set palette reference in App banner line.
|
|
458
|
+
sed -i '' "s|PLACEHOLDER_PALETTE_URL|$PALETTE_URL|g" src/App.tsx
|
|
459
|
+
|
|
460
|
+
# Remove default starter styles if present.
|
|
461
|
+
rm -f src/App.css
|
|
462
|
+
|
|
463
|
+
echo
|
|
464
|
+
echo "Done. Mockup app created at: $APP_DIR"
|
|
465
|
+
echo "Run it with:"
|
|
466
|
+
echo " cd $APP_DIR"
|
|
467
|
+
echo " npm run dev"
|
|
468
|
+
|
|
469
|
+
popd >/dev/null
|