Skip to content

refactor: POC unified filesystem structure#127

Open
d-pamneja wants to merge 2 commits intomainfrom
refactor/unified-filesystem-poc
Open

refactor: POC unified filesystem structure#127
d-pamneja wants to merge 2 commits intomainfrom
refactor/unified-filesystem-poc

Conversation

@d-pamneja
Copy link
Copy Markdown
Contributor

Summary

Proof-of-concept migration of 3 entries to the new unified filesystem spec (RFC v0.3.0 by Aman). Demonstrates how templates, bundles, and kits look under the new structure.

What's migrated

Type Old Path New Path
Template templates/rag-chatbot/ kits/rag-chatbot/
Bundle bundles/knowledge-chatbot/ kits/knowledge-chatbot/
Kit kits/sample/content-generation/ kits/content-generation/

Structural changes demonstrated

  • config.json (kit metadata) → lamatic.config.ts (typed project config)
  • flows/<name>/config.json (folder-based) → flows/<name>.ts (flat file)
  • Inline prompts → prompts/system.md (externalized)
  • New directories: constitutions/default.md, flows/flows.md
  • Sidecar convention: <name>.ts + <name>.inputs.json + <name>.meta.json

New structure per project

<project>/
├── flows/
│   ├── flows.md              # Human + agent readable flow index
│   ├── <flow>.ts             # Flow definition (flat file)
│   ├── <flow>.inputs.json    # Input schema
│   └── <flow>.meta.json      # Metadata
├── prompts/                  # Externalized prompts
├── constitutions/            # Guardrails / rules
├── lamatic.config.ts         # Project config (replaces config.json)
├── .env.example              # Env vars (bundles + kits)
├── app/                      # Next.js UI (kits only)
├── components/               # React components (kits only)
├── actions/                  # Server actions (kits only)
├── package.json              # Dependencies (kits only)
└── README.md

What's NOT changed

  • Old locations (templates/, bundles/, kits/sample/) are untouched — this is additive
  • No existing files modified
  • Full migration happens after this POC is approved

Decision needed

  • app/ vs apps/: Next.js requires app/ for App Router. Kept as app/ for now.

Test plan

  • Review kits/rag-chatbot/ — minimal template with externalized prompt
  • Review kits/knowledge-chatbot/ — 9 flat flow files, any-of selection in config
  • Review kits/content-generation/ — full Next.js kit with flows, constitutions, actions
  • Verify lamatic.config.ts fields match old config.json / meta.json
  • Verify flow .ts files contain correct nodes/edges from original config.json

🤖 Generated with Claude Code

…late)

Proof-of-concept migration of three entries to the new unified
filesystem spec (RFC v0.3.0). All entries now live under kits/<name>/
with flat flow files, lamatic.config.ts, constitutions, and prompts.

Migrated entries:
- Template: kits/rag-chatbot/ (from templates/rag-chatbot/)
- Bundle: kits/knowledge-chatbot/ (from bundles/knowledge-chatbot/)
- Kit: kits/content-generation/ (from kits/sample/content-generation/)

Key structural changes demonstrated:
- config.json → lamatic.config.ts (typed project config)
- flows/<name>/config.json → flows/<name>.ts (flat files, not folders)
- Inline prompts → prompts/system.md (externalized)
- New: constitutions/default.md, flows/flows.md

Old locations are NOT deleted — this is additive for review purposes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 6, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • agentkit-challenge

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 27c85432-eb37-4c30-9677-520b6d4d8334

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/unified-filesystem-poc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Each flow .ts now contains meta + inputs + references + nodes + edges
in ONE file. No more separate .inputs.json / .meta.json sidecars.

Inline prompts extracted to prompts/ directory and replaced with
@prompts/<name>.md references in flow configs. Constitutions
referenced via @constitutions/default.md.

Reference convention:
  @prompts/<name>.md        → prompts/<name>.md
  @constitutions/<name>.md  → constitutions/<name>.md
  @tools/<name>             → tools/<name>.ts (future)
  @mcp/<name>               → mcp/<name>.ts (future)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@amanintech amanintech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/component should be inside /app

Copy link
Copy Markdown
Member

@amanintech amanintech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename /actions to /orchestrator


export function useIsMobile() {
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not applicable / should be in app

@@ -0,0 +1,191 @@
'use client'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not applicable / should be in app

@@ -0,0 +1,11 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be confusing / should be in app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants