loki-mode 6.27.2 → 6.29.0

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/autonomy/run.sh CHANGED
@@ -3629,6 +3629,11 @@ except:
3629
3629
 
3630
3630
  # Clear current-task.json
3631
3631
  echo "{}" > .loki/queue/current-task.json
3632
+
3633
+ # Write-back completed BMAD stories to source artifacts (v6.29.0)
3634
+ if [ "$exit_code" = "0" ]; then
3635
+ bmad_write_back
3636
+ fi
3632
3637
  }
3633
3638
 
3634
3639
  start_status_monitor() {
@@ -8198,6 +8203,9 @@ if not stories:
8198
8203
  print("No BMAD stories found to queue", file=sys.stderr)
8199
8204
  sys.exit(0)
8200
8205
 
8206
+ # Sort stories by priority_weight (MVP=1 first, then phase2=2, then phase3=3)
8207
+ stories.sort(key=lambda s: s.get("priority_weight", 2) if isinstance(s, dict) else 2)
8208
+
8201
8209
  # Filter out completed stories from sprint-status
8202
8210
  skipped_count = 0
8203
8211
  if completed_stories:
@@ -8269,6 +8277,45 @@ BMAD_QUEUE_EOF
8269
8277
  log_info "BMAD queue population complete"
8270
8278
  }
8271
8279
 
8280
+ # Write-back completed BMAD stories to sprint-status.yml and epics.md
8281
+ # Called after each iteration to sync completion state back to BMAD artifacts
8282
+ bmad_write_back() {
8283
+ # Skip if not a BMAD project
8284
+ local bmad_project="${BMAD_PROJECT_PATH:-}"
8285
+ if [[ -z "$bmad_project" ]]; then
8286
+ return 0
8287
+ fi
8288
+
8289
+ # Skip if no completed stories file
8290
+ local completed_file=".loki/bmad-completed-stories.json"
8291
+ if [[ ! -f "$completed_file" ]]; then
8292
+ return 0
8293
+ fi
8294
+
8295
+ # Skip if completed stories file is empty or just []
8296
+ local story_count
8297
+ story_count=$(python3 -c "import json; data=json.load(open('$completed_file')); print(len(data))" 2>/dev/null || echo "0")
8298
+ if [[ "$story_count" -eq 0 ]]; then
8299
+ return 0
8300
+ fi
8301
+
8302
+ # Find the adapter script
8303
+ local adapter_script="${SCRIPT_DIR}/bmad-adapter.py"
8304
+ if [[ ! -f "$adapter_script" ]]; then
8305
+ log_warn "BMAD adapter not found, skipping write-back"
8306
+ return 0
8307
+ fi
8308
+
8309
+ # Run write-back (warn on failure, never crash)
8310
+ if python3 "$adapter_script" "$bmad_project" \
8311
+ --write-back \
8312
+ --completed-stories-file "$completed_file" 2>/dev/null; then
8313
+ log_info "BMAD write-back: synced completed stories to source artifacts"
8314
+ else
8315
+ log_warn "BMAD write-back failed (non-fatal)"
8316
+ fi
8317
+ }
8318
+
8272
8319
  #===============================================================================
8273
8320
  # OpenSpec Task Queue Population
8274
8321
  #===============================================================================
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "6.27.2"
10
+ __version__ = "6.29.0"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -2,7 +2,7 @@
2
2
 
3
3
  The flagship product of [Autonomi](https://www.autonomi.dev/). Complete installation instructions for all platforms and use cases.
4
4
 
5
- **Version:** v6.27.2
5
+ **Version:** v6.29.0
6
6
 
7
7
  ---
8
8
 
package/mcp/__init__.py CHANGED
@@ -57,4 +57,4 @@ try:
57
57
  except ImportError:
58
58
  __all__ = ['mcp']
59
59
 
60
- __version__ = '6.27.0'
60
+ __version__ = '6.29.0'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loki-mode",
3
- "version": "6.27.2",
3
+ "version": "6.29.0",
4
4
  "description": "Loki Mode by Autonomi - Multi-agent autonomous startup system for Claude Code, Codex CLI, and Gemini CLI",
5
5
  "keywords": [
6
6
  "agent",
@@ -0,0 +1,42 @@
1
+ # PRD: Analytics Dashboard
2
+
3
+ ## Overview
4
+ A real-time analytics dashboard that visualizes key business metrics with interactive charts, filterable data tables, and customizable dashboard layouts.
5
+
6
+ ## Target Users
7
+ - Product managers tracking feature adoption and user engagement
8
+ - Business analysts monitoring KPIs and trends
9
+ - Operations teams watching system health and performance metrics
10
+
11
+ ## Core Features
12
+ 1. **Interactive Charts** - Line, bar, pie, and area charts with hover tooltips and click-to-drill-down
13
+ 2. **Data Tables** - Sortable, filterable, and paginated tables with column visibility controls
14
+ 3. **Date Range Picker** - Filter all dashboard data by custom date ranges with preset shortcuts
15
+ 4. **Real-Time Updates** - WebSocket connection for live metric updates without page refresh
16
+ 5. **Dashboard Layouts** - Drag-and-drop widget arrangement with save and load layout presets
17
+ 6. **Export** - Export charts as PNG images and tables as CSV files
18
+ 7. **Responsive Design** - Fully functional on desktop, tablet, and mobile screen sizes
19
+
20
+ ## Technical Requirements
21
+ - React 18 with TypeScript
22
+ - Recharts or Chart.js for data visualization
23
+ - TanStack Table for data tables
24
+ - WebSocket for real-time updates
25
+ - TailwindCSS for styling
26
+ - Express backend serving mock data API
27
+ - LocalStorage for saved layouts
28
+
29
+ ## Quality Gates
30
+ - Unit tests for data transformation and formatting utilities
31
+ - Component tests for chart and table rendering
32
+ - E2E tests for date filtering and layout persistence (Playwright)
33
+ - Responsive design tested at 3 breakpoints (mobile, tablet, desktop)
34
+ - Accessibility: all charts have aria labels, tables are keyboard navigable
35
+
36
+ ## Success Metrics
37
+ - Dashboard loads with sample data and renders all chart types
38
+ - Date range filter updates all widgets simultaneously
39
+ - Real-time updates reflect in charts within 2 seconds
40
+ - Drag-and-drop layout changes persist across page reloads
41
+ - CSV and PNG exports contain accurate data
42
+ - All tests pass
@@ -0,0 +1,42 @@
1
+ # PRD: Data Pipeline
2
+
3
+ ## Overview
4
+ An ETL data pipeline that ingests data from multiple sources, transforms it through configurable processing steps, and loads results into a target data store with monitoring and error recovery.
5
+
6
+ ## Target Users
7
+ - Data engineers building batch or streaming pipelines
8
+ - Analysts automating data transformation workflows
9
+ - Teams consolidating data from multiple sources
10
+
11
+ ## Core Features
12
+ 1. **Multi-Source Ingestion** - Read from CSV files, JSON APIs, PostgreSQL databases, and S3 buckets
13
+ 2. **Configurable Transforms** - Chain transformation steps: filter, map, aggregate, join, and deduplicate
14
+ 3. **Schema Validation** - Validate incoming data against defined schemas, quarantine invalid records
15
+ 4. **Incremental Processing** - Track watermarks for incremental loads, skip already-processed records
16
+ 5. **Error Recovery** - Dead letter queue for failed records, automatic retry with configurable policies
17
+ 6. **Pipeline Monitoring** - Metrics for records processed, errors, throughput, and pipeline duration
18
+ 7. **Scheduling** - Cron-based scheduling with dependency management between pipeline stages
19
+
20
+ ## Technical Requirements
21
+ - Python 3.10+ with type hints
22
+ - Pydantic for schema validation
23
+ - SQLAlchemy for database connections
24
+ - Click for CLI interface
25
+ - YAML pipeline definitions
26
+ - SQLite for pipeline state and metadata
27
+ - Structured JSON logging
28
+
29
+ ## Quality Gates
30
+ - Unit tests for each transform function
31
+ - Integration tests with sample datasets
32
+ - Schema validation tested with valid and invalid records
33
+ - Incremental processing verified across multiple runs
34
+ - Dead letter queue captures all failure categories
35
+
36
+ ## Success Metrics
37
+ - Pipeline processes sample dataset end-to-end without errors
38
+ - Invalid records quarantined with descriptive error messages
39
+ - Incremental runs process only new records
40
+ - Metrics accurately reflect processing statistics
41
+ - Pipeline resumes correctly after interruption
42
+ - All tests pass
@@ -0,0 +1,42 @@
1
+ # PRD: Browser Game
2
+
3
+ ## Overview
4
+ A browser-based 2D game with player controls, enemy AI, scoring, levels, and persistent high scores. Runs entirely client-side with no server required.
5
+
6
+ ## Target Users
7
+ - Casual gamers looking for a quick browser-based experience
8
+ - Game developers learning 2D game architecture patterns
9
+ - Developers exploring canvas-based rendering and game loops
10
+
11
+ ## Core Features
12
+ 1. **Player Controls** - Keyboard input for movement and actions with configurable key bindings
13
+ 2. **Game Loop** - Fixed-timestep update loop with requestAnimationFrame rendering at 60fps
14
+ 3. **Enemy AI** - Multiple enemy types with distinct movement patterns and difficulty scaling
15
+ 4. **Collision Detection** - Axis-aligned bounding box (AABB) collision between sprites
16
+ 5. **Scoring and Levels** - Point system with level progression, increasing difficulty per level
17
+ 6. **High Scores** - Persistent leaderboard stored in localStorage with name entry
18
+ 7. **Sound Effects** - Audio feedback for actions, collisions, and level completion using Web Audio API
19
+
20
+ ## Technical Requirements
21
+ - HTML5 Canvas for rendering
22
+ - Vanilla TypeScript (no game engine dependency)
23
+ - Web Audio API for sound
24
+ - LocalStorage for high scores and settings
25
+ - Asset pipeline for sprites and audio files
26
+ - Responsive canvas sizing
27
+ - No server required (static files only)
28
+
29
+ ## Quality Gates
30
+ - Unit tests for collision detection, scoring, and level progression logic
31
+ - Game loop maintains consistent frame timing under load
32
+ - All sprite assets load without errors
33
+ - Controls responsive on both keyboard and touch (mobile)
34
+ - No memory leaks during extended play sessions
35
+
36
+ ## Success Metrics
37
+ - Game starts, plays, and ends with proper state transitions
38
+ - Player can move, shoot, and interact with enemies
39
+ - Score increments correctly and persists in high score table
40
+ - Level progression increases difficulty noticeably
41
+ - Game runs at stable 60fps on modern browsers
42
+ - All tests pass
@@ -0,0 +1,43 @@
1
+ # PRD: Microservice
2
+
3
+ ## Overview
4
+ A containerized microservice with health checks, structured logging, graceful shutdown, and observability. Follows twelve-factor app principles for cloud-native deployment.
5
+
6
+ ## Target Users
7
+ - Backend engineers building distributed systems
8
+ - Teams decomposing monoliths into microservices
9
+ - DevOps engineers designing cloud-native architectures
10
+
11
+ ## Core Features
12
+ 1. **HTTP API** - RESTful endpoints with request validation, error handling, and content negotiation
13
+ 2. **Health Checks** - Liveness and readiness probe endpoints for container orchestration
14
+ 3. **Structured Logging** - JSON-formatted logs with correlation IDs, log levels, and context fields
15
+ 4. **Graceful Shutdown** - Handle SIGTERM/SIGINT with connection draining and cleanup
16
+ 5. **Configuration** - Environment-variable-based configuration with validation on startup
17
+ 6. **Database Integration** - Connection pooling, migrations, and repository pattern for data access
18
+ 7. **Observability** - Prometheus metrics endpoint with request duration, error rate, and custom counters
19
+
20
+ ## Technical Requirements
21
+ - Node.js with Express and TypeScript
22
+ - Docker and docker-compose for local development
23
+ - Prisma ORM with PostgreSQL
24
+ - Prometheus client for metrics
25
+ - pino for structured logging
26
+ - Dockerfile with multi-stage build
27
+ - Health check middleware
28
+
29
+ ## Quality Gates
30
+ - Unit tests for business logic and middleware
31
+ - Integration tests with test database
32
+ - Docker image builds and starts successfully
33
+ - Health check endpoints return correct status codes
34
+ - Graceful shutdown completes within timeout
35
+ - Metrics endpoint serves valid Prometheus format
36
+
37
+ ## Success Metrics
38
+ - Service starts in Docker and responds to API requests
39
+ - Health probes return healthy status after startup
40
+ - Logs are valid JSON with correlation IDs across requests
41
+ - Graceful shutdown drains connections without dropping requests
42
+ - Prometheus can scrape metrics endpoint
43
+ - All tests pass
@@ -0,0 +1,43 @@
1
+ # PRD: npm Library
2
+
3
+ ## Overview
4
+ A well-structured npm package with TypeScript support, comprehensive documentation, tree-shakeable exports, and automated publishing. Designed as a reusable utility library.
5
+
6
+ ## Target Users
7
+ - JavaScript and TypeScript developers looking for reusable utilities
8
+ - Teams standardizing shared logic across multiple projects
9
+ - Open source contributors publishing packages to npm
10
+
11
+ ## Core Features
12
+ 1. **TypeScript First** - Written in TypeScript with generated .d.ts declaration files
13
+ 2. **Dual Format** - Publish both ESM and CommonJS builds for maximum compatibility
14
+ 3. **Tree Shaking** - Named exports with proper sideEffects configuration for optimal bundling
15
+ 4. **Comprehensive Docs** - Auto-generated API documentation from TSDoc comments
16
+ 5. **Semantic Versioning** - Automated changelog generation and version bumping
17
+ 6. **Zero Dependencies** - No runtime dependencies for minimal install footprint
18
+ 7. **Playground** - Interactive examples in a docs site for trying the library
19
+
20
+ ## Technical Requirements
21
+ - TypeScript 5+ with strict mode
22
+ - tsup for dual ESM/CJS builds
23
+ - Vitest for testing
24
+ - typedoc for API documentation generation
25
+ - changesets for version management
26
+ - GitHub Actions for CI/CD and npm publishing
27
+ - package.json exports map for subpath exports
28
+
29
+ ## Quality Gates
30
+ - Unit tests with 90%+ code coverage
31
+ - Type tests verifying public API type signatures
32
+ - Bundle size tracked and budgeted (fail CI if over limit)
33
+ - ESM and CJS builds both importable in Node.js
34
+ - TypeScript declarations compile cleanly in consuming projects
35
+ - Documentation generated without warnings
36
+
37
+ ## Success Metrics
38
+ - Package installs and imports correctly in ESM and CJS projects
39
+ - All public functions have TSDoc comments and generated docs
40
+ - Test coverage exceeds 90% across all modules
41
+ - Bundle size stays under defined budget
42
+ - Changelog accurately reflects changes between versions
43
+ - All tests pass
@@ -0,0 +1,42 @@
1
+ # PRD: Slack Bot
2
+
3
+ ## Overview
4
+ A Slack bot that responds to commands, processes events, and integrates with external services. Supports slash commands, interactive messages, and scheduled notifications.
5
+
6
+ ## Target Users
7
+ - Teams automating workflows through Slack
8
+ - Developers building internal tools for Slack workspaces
9
+ - Organizations standardizing team communication and processes
10
+
11
+ ## Core Features
12
+ 1. **Slash Commands** - Register and handle custom slash commands with argument parsing
13
+ 2. **Event Handling** - Listen for message events, reactions, channel joins, and user mentions
14
+ 3. **Interactive Messages** - Send messages with buttons, menus, and modals for user input
15
+ 4. **Scheduled Messages** - Schedule recurring notifications and reminders with cron syntax
16
+ 5. **External Integrations** - Connect to REST APIs and databases to fetch and display data
17
+ 6. **Help System** - Built-in help command listing all available commands and their usage
18
+ 7. **Error Reporting** - Log errors and send admin notifications when commands fail
19
+
20
+ ## Technical Requirements
21
+ - Node.js with TypeScript
22
+ - Bolt for Slack SDK (official Slack framework)
23
+ - Express for webhook endpoints
24
+ - SQLite for persistent storage (schedules, user preferences)
25
+ - Environment-based configuration for tokens and signing secrets
26
+ - Structured logging with request context
27
+ - Socket Mode for development, HTTP for production
28
+
29
+ ## Quality Gates
30
+ - Unit tests for command handlers and argument parsers
31
+ - Integration tests with Slack API mocks
32
+ - Interactive message flows tested end-to-end
33
+ - Error handling verified for invalid inputs and API failures
34
+ - Rate limiting compliance with Slack API limits
35
+
36
+ ## Success Metrics
37
+ - Bot responds to all registered slash commands
38
+ - Event handlers process messages and reactions correctly
39
+ - Interactive modals collect and persist user input
40
+ - Scheduled messages fire at configured times
41
+ - Error notifications reach admin channel
42
+ - All tests pass
@@ -0,0 +1,42 @@
1
+ # PRD: Web Scraper Tool
2
+
3
+ ## Overview
4
+ A configurable web scraping tool that extracts structured data from websites, handles pagination, respects robots.txt, and exports results in multiple formats.
5
+
6
+ ## Target Users
7
+ - Data analysts collecting web data for research
8
+ - Developers building data pipelines from web sources
9
+ - Marketers monitoring competitor pricing or content
10
+
11
+ ## Core Features
12
+ 1. **Configurable Extraction** - Define scraping targets with CSS selectors or XPath expressions in a config file
13
+ 2. **Pagination Handling** - Automatically follow next-page links or infinite scroll patterns
14
+ 3. **Rate Limiting** - Configurable request delays and concurrent connection limits to avoid blocking
15
+ 4. **Robots.txt Compliance** - Parse and respect robots.txt rules, with override flag for allowed domains
16
+ 5. **Multi-Format Export** - Export scraped data as JSON, CSV, or SQLite database
17
+ 6. **Retry and Error Handling** - Automatic retry with exponential backoff for failed requests
18
+ 7. **Proxy Support** - Rotate through proxy list for distributed scraping
19
+
20
+ ## Technical Requirements
21
+ - Python 3.10+ with async/await
22
+ - httpx for async HTTP requests
23
+ - BeautifulSoup4 and lxml for HTML parsing
24
+ - SQLite for persistent storage
25
+ - YAML configuration files
26
+ - CLI interface with argparse
27
+ - Structured logging
28
+
29
+ ## Quality Gates
30
+ - Unit tests for parser, config loader, and export functions
31
+ - Integration tests with mock HTTP server
32
+ - Robots.txt parser tested against edge cases
33
+ - Rate limiter verified with timing assertions
34
+ - Export format validation for JSON, CSV, and SQLite
35
+
36
+ ## Success Metrics
37
+ - Scraper extracts data matching CSS selector configuration
38
+ - Pagination follows links and collects all pages
39
+ - Rate limiting maintains configured request interval
40
+ - Robots.txt rules correctly block disallowed paths
41
+ - All export formats contain valid, complete data
42
+ - All tests pass