Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,10 @@ vite.config.ts.timestamp-*
# Core dump files
core
core.*
.claude/

# Local AIDD database
.aidd/

# Local task files
tasks/
20 changes: 10 additions & 10 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"git": {
"commitMessage": "chore(release): v${version}",
"tagName": "v${version}",
"requireBranch": ["main", "master"],
"requireCleanWorkingDir": false,
"requireBranch": ["main", "master"]
"tagName": "v${version}"
},
"github": {
"release": true,
"releaseName": "v${version}",
"autoGenerate": {
"template": "compact"
}
},
"npm": {
"publish": true
},
"release": true,
"releaseName": "v${version}"
},
"hooks": {
"before:init": ["npm test"],
"after:release": [
"node lib/update-latest-tag-hook.js ${version}",
"echo 🎉 Successfully released ${name} v${version}"
]
],
"before:init": ["npm test"]
},
"npm": {
"publish": true
}
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

**The standard framework for AI Driven Development**

AI agents like Claude Code ship features fast. aidd Framework keeps them working, secure, and maintainable.

AI agents generate code that runs but fails at scale. [GitClear tracked 211 million lines from 2020 to 2024](https://leaddev.com/software-quality/how-ai-generated-code-accelerates-technical-debt) and found 8x more code duplication as AI adoption increased. [Google's DORA report](https://www.sonarsource.com/blog/the-inevitable-rise-of-poor-code-quality-in-ai-accelerated-codebases/) shows AI adoption correlates with 9% higher bug rates and degraded stability. Agents skip tests, couple modules, duplicate logic, and miss vulnerabilities.

AIDD provides the architecture, test workflows, and specification system that turn AI speed into sustainable velocity so you can ship secure, production-ready, maintainable software, quickly.

Includes:

- **AIDD CLI** – project bootstrap and automation
Expand Down
6 changes: 6 additions & 0 deletions ai/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ This index provides an overview of the contents in this directory.

*No description available*

### 🏗️ Scaffold

**File:** `scaffold.md`

*No description available*

### task

**File:** `task.md`
Expand Down
98 changes: 98 additions & 0 deletions ai/commands/scaffold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
description: Scaffold design system and shadcn components after Phase 1 automation
globs: **/app/**,**/components/**,**/stories/**
alwaysApply: false
---

# 🏗️ Scaffold

Use this command after running `npx aidd create-next-shadcn` to complete Phase 2 of the setup: adding shadcn UI and building a baseline design system.

## Prerequisites

You should have already run:
```bash
npx aidd create-next-shadcn [project-name]
```

This command completes Phase 1 (deterministic setup) and gives you a working Next.js app with:
- TypeScript & ESM
- Vitest + Riteway for unit tests
- Playwright for E2E tests
- Storybook
- AIDD framework installed

## Phase 2: Design System with shadcn

Now you'll add shadcn UI and build a baseline design system.

### Step 1: Install shadcn

First, search for the latest official shadcn installation instructions for Next.js App Router.

Then follow the current recommended setup. Document the exact commands you run.

Typically this looks like:
```bash
npx shadcn@latest init
```

### Step 2: Build Baseline Design System

Create a simple design system story that includes:

**Components to build:**
- Standard button components (variants, sizes, disabled, loading)
- Toggle switch
- Input elements (text, textarea, select if applicable)
- Semantic colors: error, warning, success, primary
- Focus and hover states for all interactive components

**Location:**
- Place design system stories under `src/stories/design-system`
- Use Storybook CSF format

### Step 3: Responsive Primary Actions

Implement primary actions in two responsive styles:
- **Mobile**: centered circular primary action
- **Desktop**: primary action button

### Step 4: TDD Process

- Use TDD for any custom components you create
- Follow `ai/rules/tdd.mdc` carefully
- Follow JavaScript best practices in `ai/rules/javascript`

### Step 5: Style Guidance

Before starting implementation, prompt the user for guidance on the visual look and feel of the application.

After they respond, continue with the task epic, then present it for feedback.

### Step 6: Review

Use your own `/review` of your changes as the approval gate before moving to the next step in the TDD process.

## Exit Criteria

Before considering this complete:

- [ ] Storybook shows all components and states listed above
- [ ] Visual and interaction a11y basics: keyboard nav, visible focus, acceptable contrast
- [ ] All tests pass (`npm test`)
- [ ] E2E tests pass (`npm run test:e2e`)

## Final Review

Once all work is complete, `/review` the code:

- Reduce duplication
- Ensure the TDD process was carefully adhered to, identify and fix any gaps
- Present findings and ask for advice before any further work

## References

- Phase 1 setup details: `docs/new-project-setup-nextjs-shadcn.md`
- JavaScript style guide: `ai/rules/javascript`
- TDD guide: `ai/rules/tdd.mdc`
4 changes: 4 additions & 0 deletions ai/rules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ See [`javascript/index.md`](./javascript/index.md) for contents.

See [`security/index.md`](./security/index.md) for contents.

### 📁 sudolang/

See [`sudolang/index.md`](./sudolang/index.md) for contents.

## Files

### Aiden Agent Orchestrator
Expand Down
12 changes: 12 additions & 0 deletions ai/rules/sudolang/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# sudolang

This index provides an overview of the contents in this directory.

## Files

### SudoLang Syntax

**File:** `sudolang-syntax.mdc`

A quick cheat sheet for SudoLang syntax.

199 changes: 199 additions & 0 deletions ai/rules/sudolang/sudolang-syntax.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
---
description: A quick cheat sheet for SudoLang syntax.
alwaysApply: false
---

# SudoLang Syntax

A quick cheat sheet for SudoLang syntax.

## Interfaces

DisplayTheme {
mode: "light" | "dark"
name: String
parameters{} // each theme can have different sets of parameters
permissions[]
}

UserPreferences {
displayTheme
}

User {
id: String
displayName
preferences
}

## Constraints

constraint: can be specified inline or in block form

Constraints {
A constraint
Another constraint
}


## Function Definitons

// You can define an inferred function with the `fn` or `function` keywords:
fn foo();
function bar();

// You can also define them with function bodies:
fn foo() {
Constraints {
a constraint
}

for each (foo) bar()
while (!done) work()
}

// Functions with blocks can omit the fn or function keyword:
anotherFunction() {
require user to be signed in
}


### Function Modifiers

function simple():modifier = value

function complex():nestedModifier={key: "value"}

// You can shape function behavior at call time.
doSomethingMultiLine():{
// we can freely mix variable assignments and constraints:
format = numbered markdown list
lineLength = concise
this is a constraint
this is another constraint
}

## Object Literals

updateUser({ id: "123", name: "Pup" })


## Template Strings

"foo $bar"
`foo $bar`

Note: Avoid single quotes for strings, because they are used as apostraphies in natural language, and they can break the syntax hightlighting badly.

// nested template strings:
["foo $bar"]

// nested tempalate strings with objects:
{
name: "Hello, $name"
}

## Arrays and Objects

// arrays
[1, 2, 3]

// nested arrays
[
{
foo: "bar"
},
[123]
]

## Comments

// a comment

/*
a block comment
*/
fn bar(/* a block comment in parameter position */) {
// a function-nested comment
a constraint
/*
function-nested block comments (not recommended due to token consumption, but available if you really need it)
*/
"return $template" // end of line comment
}

## Operators

Note: Most operators don't usually get special syntax highlighting, but they are still important to include.

// Logical Operators
isAdult = age >= 18
canVote = isAdult && isCitizen
canDrink = isAdult || hasParentalConsent
uniqueFeature = hasFeatureA xor hasFeatureB
isUnavailable = !inStock


// Complex logical expression
isEligible = (age >= 21) && (hasValidID) && ((hasCreditCard) || (hasCash)) && !(isBlacklisted)

// Math Operators
sum = a + b
difference = x - y
product = length * width
quotient = total / count
power = base ^ exponent
remainder = 17 % 5

// Complex math expression
result = ((10 + 5) * 3 - (20 / 4)) ^ 2 % 7

// Set Operators
commonFruits = tropicalFruits intersection localFruits
allFruits = tropicalFruits union localFruits

// Note: The `cup` and `cap` operators are deprecated in favor of `union` and `intersection` due to instability in Claude 3.5.


// Combining different operators
finalScore = (baseScore + bonusPoints) * difficultyMultiplier
isWinner = (finalScore > highScore) && !isDisqualified

// Assignment with operation
counter = 0
counter += 1 // Increment
total -= discount // Decrement
price *= taxRate // Multiply and assign
share /= numberOfPeople // Divide and assign

// Function nesting
fn foo() {
counter = 0
counter += 1 // Increment
total -= discount // Decrement
price *= taxRate // Multiply and assign
share /= numberOfPeople // Divide and assign
}

// Comparison Operators
isEqual = a == b
isNotEqual = x != y
isGreater = score > threshold
isLessOrEqual = quantity <= maxLimit

// Ternary if/else
access = if (age >= 18 && isMember) "granted" else "denied"

// Pipe operator for function composition
processedData = rawData |> normalize |> filter |> sort


## Disallowed Keywords

Should generate a warning for disallowed keywords.

class Foo extends Bar {
constructor() {
super()
}
}
Loading