@buba_71/levit 0.4.0 → 0.8.2

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.
Files changed (74) hide show
  1. package/README.md +182 -10
  2. package/dist/bin/cli.js +58 -48
  3. package/dist/src/commands/decision.js +34 -19
  4. package/dist/src/commands/feature.js +117 -19
  5. package/dist/src/commands/handoff.js +34 -12
  6. package/dist/src/commands/index.js +3 -1
  7. package/dist/src/commands/init.js +53 -39
  8. package/dist/src/commands/validate.js +84 -0
  9. package/dist/src/core/error_helper.js +93 -0
  10. package/dist/src/core/errors.js +25 -0
  11. package/dist/src/core/frontmatter.js +62 -0
  12. package/dist/src/core/logger.js +77 -0
  13. package/dist/src/core/table.js +63 -0
  14. package/dist/src/init.js +9 -0
  15. package/dist/src/readers/decision_reader.js +47 -0
  16. package/dist/src/readers/feature_reader.js +48 -0
  17. package/dist/src/readers/handoff_reader.js +47 -0
  18. package/dist/src/services/decision_service.js +49 -0
  19. package/dist/src/services/feature_service.js +89 -0
  20. package/dist/src/services/handoff_service.js +37 -0
  21. package/dist/src/services/manifest_service.js +89 -0
  22. package/dist/src/services/project_service.js +39 -0
  23. package/dist/src/services/validation_service.js +461 -0
  24. package/dist/src/types/domain.js +2 -0
  25. package/dist/src/types/index.js +2 -0
  26. package/dist/src/types/manifest.js +26 -0
  27. package/dist/tests/{init.test.js → cli/integration.test.js} +79 -39
  28. package/dist/tests/services/decision_service.test.js +27 -0
  29. package/dist/tests/services/feature_service.test.js +42 -0
  30. package/dist/tests/services/handoff_service.test.js +28 -0
  31. package/dist/tests/services/manifest_service.test.js +189 -0
  32. package/dist/tests/services/validation_service.test.js +196 -0
  33. package/package.json +7 -2
  34. package/templates/default/.github/workflows/README.md +56 -0
  35. package/templates/default/.github/workflows/levit-validate.yml +93 -0
  36. package/templates/default/.gitlab-ci.yml +73 -0
  37. package/templates/default/.levit/AGENT_CONTRACT.md +34 -0
  38. package/templates/default/.levit/AGENT_ONBOARDING.md +5 -4
  39. package/templates/default/.levit/decisions/.gitkeep +0 -0
  40. package/templates/default/{features → .levit/features}/INTENT.md +9 -0
  41. package/templates/default/{features → .levit/features}/README.md +2 -2
  42. package/templates/default/.levit/handoff/.gitkeep +0 -0
  43. package/templates/default/HUMAN_AGENT_MANAGER.md +654 -0
  44. package/templates/default/MIGRATION_GUIDE.md +597 -0
  45. package/templates/default/README.md +26 -7
  46. package/templates/symfony/.github/workflows/README.md +56 -0
  47. package/templates/symfony/.github/workflows/levit-validate.yml +82 -0
  48. package/templates/symfony/.gitlab-ci.yml +62 -0
  49. package/templates/symfony/.levit/AGENT_CONTRACT.md +34 -0
  50. package/templates/symfony/.levit/AGENT_ONBOARDING.md +124 -0
  51. package/templates/symfony/.levit/decisions/.gitkeep +0 -0
  52. package/templates/symfony/.levit/features/INTENT.md +32 -0
  53. package/templates/symfony/.levit/features/README.md +11 -0
  54. package/templates/symfony/.levit/handoff/.gitkeep +0 -0
  55. package/templates/symfony/.levit/prompts/global-rules.md +10 -0
  56. package/templates/symfony/.levit/prompts/refactoring-guidelines.md +9 -0
  57. package/templates/symfony/.levit/workflows/example-task.md +9 -0
  58. package/templates/symfony/.levit/workflows/submit-for-review.md +18 -0
  59. package/templates/symfony/HUMAN_AGENT_MANAGER.md +654 -0
  60. package/templates/symfony/MIGRATION_GUIDE.md +597 -0
  61. package/templates/symfony/README.md +101 -0
  62. package/templates/symfony/SOCIAL_CONTRACT.md +34 -0
  63. package/templates/default/.levit/decision-record.md +0 -19
  64. package/templates/default/package.json +0 -11
  65. /package/templates/default/{agents → .levit/agents}/AGENTS.md +0 -0
  66. /package/templates/default/{agents → .levit/agents}/boundaries.md +0 -0
  67. /package/templates/default/{docs → .levit/docs}/architecture.md +0 -0
  68. /package/templates/default/{evals → .levit/evals}/README.md +0 -0
  69. /package/templates/default/{evals → .levit/evals}/conformance.eval.ts +0 -0
  70. /package/templates/default/{pipelines → .levit/pipelines}/README.md +0 -0
  71. /package/templates/default/{roles → .levit/roles}/README.md +0 -0
  72. /package/templates/default/{roles → .levit/roles}/devops.md +0 -0
  73. /package/templates/default/{roles → .levit/roles}/qa.md +0 -0
  74. /package/templates/default/{roles → .levit/roles}/security.md +0 -0
@@ -0,0 +1,597 @@
1
+ # Migration Guide: Adopting levit-kit in Existing Projects
2
+
3
+ > **For teams with existing projects**: This guide helps you migrate your project to use levit-kit's AIDD governance structure.
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ 1. [Should You Migrate?](#should-you-migrate)
10
+ 2. [Migration Strategies](#migration-strategies)
11
+ 3. [Step-by-Step Migration](#step-by-step-migration)
12
+ 4. [Migrating Existing Features](#migrating-existing-features)
13
+ 5. [Migrating Existing Decisions](#migrating-existing-decisions)
14
+ 6. [Updating Your Workflow](#updating-your-workflow)
15
+ 7. [Team Adoption](#team-adoption)
16
+ 8. [Troubleshooting](#troubleshooting)
17
+
18
+ ---
19
+
20
+ ## Should You Migrate?
21
+
22
+ ### When Migration Makes Sense
23
+
24
+ ✅ **Migrate if**:
25
+ - You're already using AI agents (Cursor, Antigravity, Windsurf, etc.)
26
+ - You want standardized governance for AI collaboration
27
+ - You have multiple developers working with AI
28
+ - You want better traceability of features and decisions
29
+ - You're starting a new major feature or refactoring
30
+
31
+ ❌ **Don't migrate if**:
32
+ - Your project is near end-of-life
33
+ - You have no plans to use AI agents
34
+ - The migration effort outweighs the benefits
35
+ - Your team is resistant to new processes
36
+
37
+ ### Benefits of Migration
38
+
39
+ - **Standardized Structure**: Consistent project organization
40
+ - **Better AI Collaboration**: Clear protocols for agent interaction
41
+ - **Improved Traceability**: All features and decisions documented
42
+ - **Team Alignment**: Shared understanding of project state
43
+ - **Future-Proof**: Ready for evolving AI development practices
44
+
45
+ ---
46
+
47
+ ## Migration Strategies
48
+
49
+ ### Strategy 1: Gradual Adoption (Recommended)
50
+
51
+ **Best for**: Active projects with ongoing development
52
+
53
+ - Migrate one feature at a time
54
+ - Keep existing code structure
55
+ - Add levit-kit governance incrementally
56
+ - Low risk, minimal disruption
57
+
58
+ ### Strategy 2: Fresh Start
59
+
60
+ **Best for**: New features or major refactoring
61
+
62
+ - Initialize levit-kit in a new branch
63
+ - Migrate features as you work on them
64
+ - Gradually adopt the full structure
65
+ - Clean slate approach
66
+
67
+ ### Strategy 3: Full Migration
68
+
69
+ **Best for**: Projects starting a new phase
70
+
71
+ - Migrate all features at once
72
+ - Restructure project completely
73
+ - Requires team buy-in and planning
74
+ - Highest effort, most complete result
75
+
76
+ ---
77
+
78
+ ## Step-by-Step Migration
79
+
80
+ ### Phase 1: Preparation
81
+
82
+ 1. **Backup Your Project**
83
+ ```bash
84
+ git checkout -b migration/levit-kit
85
+ git commit -m "Pre-migration backup"
86
+ ```
87
+
88
+ 2. **Review Current State**
89
+ - List existing features/requirements
90
+ - Identify documented decisions
91
+ - Note current project structure
92
+ - Document any existing governance
93
+
94
+ 3. **Team Alignment**
95
+ - Discuss migration with team
96
+ - Set expectations and timeline
97
+ - Assign migration owner
98
+ - Plan training session
99
+
100
+ ### Phase 2: Initialize levit-kit
101
+
102
+ 1. **Install levit-kit Structure**
103
+ ```bash
104
+ # In your project root
105
+ npx @buba_71/levit init . --template default
106
+ ```
107
+
108
+ **Note**: If your project root is not empty, you may need to:
109
+ ```bash
110
+ # Create a temporary directory
111
+ mkdir temp-levit
112
+ cd temp-levit
113
+ npx @buba_71/levit init temp-project
114
+
115
+ # Copy .levit directory to your project
116
+ cp -r temp-project/.levit /path/to/your/project/
117
+ cp temp-project/levit.json /path/to/your/project/
118
+ cp temp-project/SOCIAL_CONTRACT.md /path/to/your/project/
119
+ cp temp-project/HUMAN_AGENT_MANAGER.md /path/to/your/project/
120
+
121
+ # Clean up
122
+ rm -rf temp-levit
123
+ ```
124
+
125
+ 2. **Customize Governance**
126
+ - Edit `SOCIAL_CONTRACT.md` to match your team's values
127
+ - Update `.levit/prompts/global-rules.md` with your coding standards
128
+ - Configure `levit.json` with project-specific constraints
129
+
130
+ 3. **Validate Structure**
131
+ ```bash
132
+ levit validate
133
+ ```
134
+
135
+ ### Phase 3: Migrate Content
136
+
137
+ 1. **Migrate Features** (see [Migrating Existing Features](#migrating-existing-features))
138
+ 2. **Migrate Decisions** (see [Migrating Existing Decisions](#migrating-existing-decisions))
139
+ 3. **Update Documentation**
140
+ 4. **Sync Manifest**
141
+ ```bash
142
+ levit validate # This syncs the manifest automatically
143
+ ```
144
+
145
+ ### Phase 4: Team Onboarding
146
+
147
+ 1. **Share Documentation**
148
+ - Point team to `HUMAN_AGENT_MANAGER.md`
149
+ - Review `SOCIAL_CONTRACT.md` together
150
+ - Explain the new workflow
151
+
152
+ 2. **Training Session**
153
+ - Demo: Creating a feature
154
+ - Demo: Making a decision
155
+ - Demo: Creating a handoff
156
+ - Demo: Reviewing agent work
157
+
158
+ 3. **Update Processes**
159
+ - Update PR templates
160
+ - Update team documentation
161
+ - Update onboarding docs
162
+
163
+ ---
164
+
165
+ ## Migrating Existing Features
166
+
167
+ ### Identifying Features to Migrate
168
+
169
+ Look for:
170
+ - User stories in issue trackers
171
+ - Requirements documents
172
+ - Feature branches
173
+ - Product backlog items
174
+ - API endpoints or modules
175
+
176
+ ### Migration Process
177
+
178
+ 1. **Create Feature File**
179
+ ```bash
180
+ levit feature new --title "Your Feature Name" --slug your-feature-name
181
+ ```
182
+
183
+ 2. **Extract Information**
184
+ From your existing documentation, extract:
185
+ - **Vision**: Why does this feature exist?
186
+ - **Success Criteria**: How do we know it's done?
187
+ - **Boundaries**: What's explicitly out of scope?
188
+ - **Technical Constraints**: Dependencies, performance, security
189
+
190
+ 3. **Fill Feature Template**
191
+ Open `.levit/features/XXX-your-feature-name.md` and populate:
192
+ ```markdown
193
+ ## 1. Vision (The "Why")
194
+ - **User Story**: [from your existing docs]
195
+ - **Priority**: [High/Medium/Low/Critical]
196
+
197
+ ## 2. Success Criteria (The "What")
198
+ - [ ] Criterion 1
199
+ - [ ] Criterion 2
200
+
201
+ ## 3. Boundaries (The "No")
202
+ - Not in scope: X
203
+ - Not in scope: Y
204
+
205
+ ## 4. Technical Constraints
206
+ - [your constraints]
207
+
208
+ ## 5. Agent Task
209
+ - [implementation guidance]
210
+ ```
211
+
212
+ 4. **Link to Code**
213
+ - Reference the feature ID in code comments
214
+ - Update PR templates to reference features
215
+ - Link issues to features
216
+
217
+ ### Example: Migrating a User Authentication Feature
218
+
219
+ **Before (Issue Tracker)**:
220
+ ```
221
+ Issue #42: User Authentication
222
+ - Users should be able to login
223
+ - Need password reset
224
+ - OAuth later
225
+ ```
226
+
227
+ **After (levit-kit Feature)**:
228
+ ```bash
229
+ levit feature new --title "User Authentication" --slug user-authentication
230
+ ```
231
+
232
+ Then edit `.levit/features/001-user-authentication.md`:
233
+ ```markdown
234
+ ## 1. Vision (The "Why")
235
+ - **User Story**: As a user, I want to authenticate with email/password so I can access my account.
236
+ - **Priority**: High
237
+
238
+ ## 2. Success Criteria (The "What")
239
+ - [ ] User can register with email and password
240
+ - [ ] User can login with valid credentials
241
+ - [ ] Session persists across requests
242
+ - [ ] Invalid credentials show clear errors
243
+
244
+ ## 3. Boundaries (The "No")
245
+ - **Not in scope**: OAuth providers (Google, GitHub) - future feature
246
+ - **Not in scope**: Password reset flow - separate feature (Issue #43)
247
+ - **Not in scope**: Two-factor authentication - future feature
248
+
249
+ ## 4. Technical Constraints
250
+ - Use JWT for sessions (see ADR-002)
251
+ - Password hashing with bcrypt
252
+ - Rate limiting on login endpoint
253
+
254
+ ## 5. Agent Task
255
+ - Implement `/api/auth/register` and `/api/auth/login` endpoints
256
+ - Create user model with email, password_hash fields
257
+ - Add validation middleware
258
+ - Write integration tests
259
+ ```
260
+
261
+ ---
262
+
263
+ ## Migrating Existing Decisions
264
+
265
+ ### Identifying Decisions to Migrate
266
+
267
+ Look for:
268
+ - Architecture documents
269
+ - Technical design docs
270
+ - Team meeting notes
271
+ - Code comments explaining "why"
272
+ - README files with technical choices
273
+
274
+ ### Migration Process
275
+
276
+ 1. **Create ADR**
277
+ ```bash
278
+ levit decision new --title "Use PostgreSQL" --feature .levit/features/001-auth.md
279
+ ```
280
+
281
+ 2. **Document Context**
282
+ Edit the ADR file and include:
283
+ - **Context**: Why was this decision needed?
284
+ - **Decision**: What was chosen?
285
+ - **Consequences**: What are the implications?
286
+ - **Alternatives**: What else was considered?
287
+
288
+ 3. **Link to Features**
289
+ - Reference ADRs in feature files
290
+ - Update code comments to reference ADRs
291
+
292
+ ### Example: Migrating a Database Decision
293
+
294
+ **Before (README)**:
295
+ ```
296
+ We use PostgreSQL because it's reliable and the team knows it.
297
+ ```
298
+
299
+ **After (levit-kit ADR)**:
300
+ ```bash
301
+ levit decision new --title "Use PostgreSQL for User Data" --feature .levit/features/001-auth.md
302
+ ```
303
+
304
+ Then edit `.levit/decisions/ADR-001-use-postgresql-for-user-data.md`:
305
+ ```markdown
306
+ # ADR-001: Use PostgreSQL for User Data
307
+
308
+ ## Context
309
+ We needed persistent storage for user accounts. Options considered:
310
+ - PostgreSQL (relational, ACID, mature)
311
+ - MongoDB (NoSQL, flexible schema)
312
+ - SQLite (file-based, simple)
313
+
314
+ ## Decision
315
+ Use PostgreSQL because:
316
+ - ACID guarantees for financial data
317
+ - Strong ecosystem and tooling
318
+ - Team familiarity
319
+ - Production-ready reliability
320
+
321
+ ## Consequences
322
+ - Need to set up PostgreSQL instance
323
+ - ORM required (see ADR-002)
324
+ - Migration strategy needed
325
+ - Connection pooling required
326
+
327
+ ## Status
328
+ Active - Decision made 2024-01-15
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Updating Your Workflow
334
+
335
+ ### Before Migration
336
+
337
+ ```
338
+ 1. Create issue in tracker
339
+ 2. Discuss in meeting
340
+ 3. Implement feature
341
+ 4. Code review
342
+ 5. Merge
343
+ ```
344
+
345
+ ### After Migration
346
+
347
+ ```
348
+ 1. Create feature: levit feature new
349
+ 2. Create decisions: levit decision new (if needed)
350
+ 3. Create handoff: levit handoff new
351
+ 4. Agent implements
352
+ 5. Validate: levit validate
353
+ 6. Review feature status
354
+ 7. Code review
355
+ 8. Merge
356
+ ```
357
+
358
+ ### Updating PR Templates
359
+
360
+ **Add to your PR template**:
361
+ ```markdown
362
+ ## Feature Reference
363
+ - Feature: `.levit/features/XXX-feature-name.md`
364
+ - Status: [ ] Draft [ ] Active [ ] Completed
365
+
366
+ ## Decisions
367
+ - ADRs referenced: ADR-XXX, ADR-YYY
368
+
369
+ ## Validation
370
+ - [ ] `levit validate` passes
371
+ - [ ] Feature status updated
372
+ ```
373
+
374
+ ### Updating CI/CD
375
+
376
+ See [CI/CD Integration](#cicd-integration) section below.
377
+
378
+ ---
379
+
380
+ ## Team Adoption
381
+
382
+ ### Communication Plan
383
+
384
+ 1. **Announce Migration**
385
+ - Explain why (benefits)
386
+ - Show timeline
387
+ - Address concerns
388
+
389
+ 2. **Provide Resources**
390
+ - Link to `HUMAN_AGENT_MANAGER.md`
391
+ - Create quick reference card
392
+ - Record training session
393
+
394
+ 3. **Start Small**
395
+ - Migrate one feature together
396
+ - Get team feedback
397
+ - Iterate on process
398
+
399
+ 4. **Celebrate Wins**
400
+ - Share success stories
401
+ - Highlight improvements
402
+ - Recognize adopters
403
+
404
+ ### Common Concerns and Responses
405
+
406
+ **"This is too much overhead"**
407
+ - Response: Start with critical features only
408
+ - Show time saved in review cycles
409
+ - Emphasize long-term benefits
410
+
411
+ **"We don't use AI agents"**
412
+ - Response: Structure helps humans too
413
+ - Better documentation and traceability
414
+ - Future-proof your project
415
+
416
+ **"Our project is too complex"**
417
+ - Response: Start with one module/feature
418
+ - Gradual adoption is fine
419
+ - Structure helps manage complexity
420
+
421
+ **"We don't have time"**
422
+ - Response: Migrate as you work on features
423
+ - No need to migrate everything at once
424
+ - Incremental approach is valid
425
+
426
+ ---
427
+
428
+ ## Troubleshooting
429
+
430
+ ### Problem: Init Fails in Non-Empty Directory
431
+
432
+ **Solution**: Initialize in temp directory, copy `.levit/` folder
433
+ ```bash
434
+ mkdir temp && cd temp
435
+ npx @buba_71/levit init temp-project
436
+ cp -r temp-project/.levit /path/to/your/project/
437
+ cp temp-project/levit.json /path/to/your/project/
438
+ ```
439
+
440
+ ### Problem: Existing Features Don't Match Template
441
+
442
+ **Solution**: Create features manually, don't force fit
443
+ - Extract what you can
444
+ - Don't worry about perfect match
445
+ - Focus on future features
446
+
447
+ ### Problem: Team Resistance
448
+
449
+ **Solution**:
450
+ - Start with volunteers
451
+ - Show concrete benefits
452
+ - Make it optional initially
453
+ - Gather feedback and adjust
454
+
455
+ ### Problem: Validation Fails
456
+
457
+ **Solution**:
458
+ ```bash
459
+ # Check what's wrong
460
+ levit validate
461
+
462
+ # Fix structural issues
463
+ # Update constraints if needed
464
+ # Re-run validation
465
+ ```
466
+
467
+ ### Problem: Too Many Features to Migrate
468
+
469
+ **Solution**:
470
+ - Prioritize active features
471
+ - Migrate as you work on them
472
+ - Archive old features
473
+ - Don't migrate everything at once
474
+
475
+ ---
476
+
477
+ ## CI/CD Integration
478
+
479
+ ### GitHub Actions
480
+
481
+ Create `.github/workflows/levit-validate.yml`:
482
+
483
+ ```yaml
484
+ name: Validate Levit Project
485
+
486
+ on:
487
+ push:
488
+ branches: [ main, develop ]
489
+ pull_request:
490
+ branches: [ main, develop ]
491
+
492
+ jobs:
493
+ validate:
494
+ runs-on: ubuntu-latest
495
+
496
+ steps:
497
+ - name: Checkout code
498
+ uses: actions/checkout@v3
499
+
500
+ - name: Setup Node.js
501
+ uses: actions/setup-node@v3
502
+ with:
503
+ node-version: '20'
504
+
505
+ - name: Validate levit-kit structure
506
+ run: |
507
+ npx @buba_71/levit validate --json > validation.json || true
508
+
509
+ - name: Check validation results
510
+ run: |
511
+ if [ -f validation.json ]; then
512
+ # Parse JSON and check for errors
513
+ ERRORS=$(node -e "const v=require('./validation.json'); console.log(v.metrics?.errors || 0)")
514
+ if [ "$ERRORS" -gt 0 ]; then
515
+ echo "Validation failed with $ERRORS errors"
516
+ cat validation.json
517
+ exit 1
518
+ fi
519
+ else
520
+ echo "Validation passed"
521
+ fi
522
+ ```
523
+
524
+ ### GitLab CI
525
+
526
+ Create `.gitlab-ci.yml` (add to existing or create new):
527
+
528
+ ```yaml
529
+ levit-validate:
530
+ image: node:20
531
+ script:
532
+ - npm install -g @buba_71/levit
533
+ - levit validate --json > validation.json || true
534
+ - |
535
+ if [ -f validation.json ]; then
536
+ ERRORS=$(node -e "const v=require('./validation.json'); console.log(v.metrics?.errors || 0)")
537
+ if [ "$ERRORS" -gt 0 ]; then
538
+ echo "Validation failed with $ERRORS errors"
539
+ cat validation.json
540
+ exit 1
541
+ fi
542
+ fi
543
+ only:
544
+ - merge_requests
545
+ - main
546
+ - develop
547
+ ```
548
+
549
+ ---
550
+
551
+ ## Checklist
552
+
553
+ ### Pre-Migration
554
+ - [ ] Team aligned on migration
555
+ - [ ] Backup created
556
+ - [ ] Migration strategy chosen
557
+ - [ ] Timeline set
558
+
559
+ ### Migration
560
+ - [ ] levit-kit structure initialized
561
+ - [ ] Governance customized
562
+ - [ ] Features migrated (at least active ones)
563
+ - [ ] Decisions migrated (at least recent ones)
564
+ - [ ] Validation passes
565
+
566
+ ### Post-Migration
567
+ - [ ] Team trained
568
+ - [ ] Documentation updated
569
+ - [ ] CI/CD updated
570
+ - [ ] PR templates updated
571
+ - [ ] Workflow documented
572
+
573
+ ---
574
+
575
+ ## Next Steps
576
+
577
+ After migration:
578
+
579
+ 1. **Read the Human-Agent Manager Guide**
580
+ - `HUMAN_AGENT_MANAGER.md` has best practices
581
+ - Learn effective agent management
582
+ - Avoid common pitfalls
583
+
584
+ 2. **Start Using the Workflow**
585
+ - Create features for new work
586
+ - Document decisions as you make them
587
+ - Create handoffs for agents
588
+
589
+ 3. **Iterate and Improve**
590
+ - Gather team feedback
591
+ - Adjust governance as needed
592
+ - Refine your process
593
+
594
+ ---
595
+
596
+ *This guide is part of levit-kit v0.8.1. For updates, see the [changelog](../changelog.md).*
597
+
@@ -0,0 +1,101 @@
1
+ # Symfony Project Overview
2
+
3
+ This project structure was initialized with **Levit-Kit** for Symfony development.
4
+ It provides a **hybrid workspace** where Human vision leads and AI execution follows.
5
+
6
+ > **Note**: This template provides only the **AIDD governance structure**, not a complete Symfony project.
7
+ > You should create your Symfony project separately (e.g., using `composer create-project symfony/skeleton`)
8
+ > and integrate it with this structure.
9
+
10
+ ## 🚀 Quick Start: Human Operator Guide
11
+
12
+ ### 📖 Start Here: Read the Guides
13
+
14
+ **New to managing AI agents?** Start with the comprehensive guide:
15
+ - **[HUMAN_AGENT_MANAGER.md](./HUMAN_AGENT_MANAGER.md)**: Complete guide on managing AI agents effectively
16
+
17
+ **Migrating an existing project?** Check out:
18
+ - **[MIGRATION_GUIDE.md](./MIGRATION_GUIDE.md)**: Step-by-step guide for adopting levit-kit in existing projects
19
+
20
+ **Setting up CI/CD?** See:
21
+ - **[.github/workflows/README.md](./.github/workflows/README.md)**: GitHub Actions workflows
22
+ - **[.gitlab-ci.yml](./.gitlab-ci.yml)**: GitLab CI configuration
23
+
24
+ ### 1. The Day One Setup
25
+
26
+ **Step 1: Create your Symfony project**
27
+ ```bash
28
+ # Create Symfony skeleton
29
+ composer create-project symfony/skeleton .
30
+
31
+ # Or if you prefer the webapp template
32
+ composer create-project symfony/website-skeleton .
33
+ ```
34
+
35
+ **Step 2: Integrate with Levit-Kit structure**
36
+ - The `.levit/` directory is already in place for AI governance
37
+ - The `.levit/features/`, `.levit/roles/`, `.levit/evals/` directories are ready for AIDD workflow
38
+ - Adjust governance: Open `SOCIAL_CONTRACT.md` and tweak the principles to match your vision
39
+ - Define standards: Open `.levit/prompts/global-rules.md` to set your technical expectations (PHP version, Symfony conventions, coding standards)
40
+
41
+ ### 2. The "Intent-First" Workflow
42
+ When building a new feature, do not start with code:
43
+ 1. **Declare Intent**: Run `levit feature new` and follow the prompts.
44
+ 2. **Define Boundaries**: Open the generated file in `.levit/features/` and refine the "User Story" and "Boundaries" section.
45
+ 3. **Create ADR**: Use `levit decision new` to document technical decisions (e.g., "Use Doctrine ORM", "Implement API Platform").
46
+
47
+ ### 3. Leading your Agents
48
+ When using an AI agent (Antigravity, Cursor, etc.):
49
+ 1. **Onboard the Agent**: Direct it to read `.levit/AGENT_ONBOARDING.md` in your first prompt.
50
+ 2. **Assign the Task**: Point it to your new intent file in `.levit/features/`.
51
+ 3. **Review the Output**: Follow the guides in `.levit/workflows/submit-for-review.md`.
52
+
53
+ ### 4. Symfony-Specific Guidelines
54
+
55
+ When working with Symfony, follow these conventions (documented in `.levit/AGENT_ONBOARDING.md`):
56
+ - **Controllers**: Place in `src/Controller/`
57
+ - **Entities**: Use Doctrine ORM in `src/Entity/`
58
+ - **Services**: Business logic in `src/Service/`
59
+ - **Tests**: PHPUnit tests in `tests/`
60
+ - **Configuration**: YAML configs in `config/`
61
+ - **Public Assets**: Static files in `public/`
62
+
63
+ ---
64
+
65
+ ## 🏛️ Project Principles
66
+
67
+ This repository is built for **clarity over automation**:
68
+ - **Explicit Structure**: No hidden magic.
69
+ - **Human Sovereignty**: You make the final decisions.
70
+ - **Traceability**: All technical choices are documented (run `levit decision new` to create a record in `.levit/decisions/`).
71
+ - **Symfony Best Practices**: Follow Symfony conventions and coding standards.
72
+
73
+ ## 📂 Navigation
74
+
75
+ **Levit-Kit Structure (AIDD Governance):**
76
+ - `HUMAN_AGENT_MANAGER.md`: **Complete guide for managing AI agents** (start here!)
77
+ - `SOCIAL_CONTRACT.md`: Your ethical and operational foundations.
78
+ - `.levit/`: The AI's workspace (all AIDD governance in one place).
79
+ - `.levit/features/`: The project roadmap and active intents.
80
+ - `.levit/evals/`: Technical quality tests for AI outputs.
81
+ - `.levit/roles/`, `.levit/agents/`, `.levit/pipelines/`, `.levit/docs/`: Additional AIDD conventions.
82
+ - `.levit/decisions/`: Architecture Decision Records (ADRs).
83
+ - `.levit/handoff/`: Agent handoff briefs.
84
+
85
+ **Symfony Structure (created separately):**
86
+ - `src/`: Symfony application source code (created by Symfony)
87
+ - `config/`: Symfony configuration files (created by Symfony)
88
+ - `tests/`: PHPUnit test suite (created by Symfony)
89
+ - `public/`: Web-accessible directory (created by Symfony)
90
+
91
+ ## 🔧 Next Steps
92
+
93
+ 1. **Create your Symfony project** using `composer create-project symfony/skeleton .`
94
+ 2. **Review `.levit/AGENT_ONBOARDING.md`** for Symfony-specific guidelines
95
+ 3. **Start defining features** with `levit feature new`
96
+ 4. **Follow Symfony best practices** as documented in the agent onboarding guide
97
+
98
+ ---
99
+
100
+ *Generated by Levit-Kit - Elevating Human-AI Collaboration for Symfony.*
101
+