Commit Graph

11 Commits

Author SHA1 Message Date
a0697c0b0f Reduce daemon cycle frequency to 100/day
Change cycle_interval_seconds from 86.4s to 864s (~14 min between cycles)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:51:02 +01:00
699a35a1ad Add daemon start/stop endpoints for autonomous semiosis
- Add /daemon/start POST endpoint to launch autonomous cycle loop
- Add /daemon/stop POST endpoint to stop the daemon
- Add _autonomous_loop() async function with configurable interval (~86s/cycle)
- Add _generate_rumination_content() and _generate_corpus_content() helpers
- Track daemon_running state in DaemonStatusResponse
- Default config: 1000 cycles/day, 50% rumination, 30% corpus, 20% unresolved

Autonomous mode generates random philosophical themes for internal semiosis.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:49:16 +01:00
9177ac66ce Add /daemon/status documentation to README2
- Document daemon status endpoint with JSON response example
- Add mode interpretation guide (idle/conversation/autonomous)
- Update endpoints table with /daemon/status

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:44:00 +01:00
ab5e979c38 Add /daemon/status endpoint to track internal semiosis
- Add daemon state tracking globals (mode, is_ruminating, cycles_by_type)
- Track trigger type and timestamp on each /cycle call
- Add DaemonStatusResponse model
- Add GET /daemon/status endpoint returning:
  - mode: idle | conversation | autonomous
  - is_ruminating: true when in rumination_free or corpus cycles
  - last_trigger: type and timestamp
  - cycles_breakdown: count by trigger type
  - cycles_since_last_user: autonomous cycles since last user interaction
  - time_since_last_user_seconds: elapsed time

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:38:44 +01:00
a9d6d3c7fb Update README2 with API documentation and tensor computation details
- Add API REST section with all endpoints
- Document /profile endpoint response format
- Explain Ikario tensor computation (StateVector + thoughts)
- Explain David tensor computation (messages + declared profile)
- Add category-to-dimension mapping table
- Add Express integration notes
- Update roadmap: Phase 9 complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:32:44 +01:00
aeab17af2a Add /profile endpoint with StateTensor v2 integration
- Add /profile GET endpoint returning Ikario + David projections on 100 directions
- Compute Ikario state from Weaviate StateVector v1 + 113 thoughts
- Compute David tensor from user messages (SQLite) + declared profile
- Map direction categories to StateTensor dimensions via CATEGORY_TO_DIMENSION
- Calculate david_similarity as average cosine across 8 dimensions
- Result: 60.93% Ikario-David similarity (vs 100% when initialized from same source)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:30:19 +01:00
3bfca60bbe Add FastAPI endpoint for Ikario v2 architecture
- api.py: REST API exposing LatentEngine via FastAPI
  - POST /cycle: Execute semiotic cycle
  - POST /translate: Translate state to language
  - GET /state, /vigilance, /metrics, /health
  - Loads embedding model and David profile at startup
  - ~1.3s per cycle (embedding + dissonance + fixation)

- README2.md: Complete documentation of v2 architecture
  - StateTensor 8x1024 explanation
  - Module descriptions with code examples
  - Amendments compliance
  - Usage instructions

Start with: uvicorn ikario_processual.api:app --port 8100

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:30:19 +01:00
f6fe71e2f7 Add Ikario Architecture v2 - Phases 1-8 complete
Implements the processual architecture based on Whitehead's Process
Philosophy and Peirce's Semiotics. Core paradigm: "L'espace latent
pense. Le LLM traduit." (The latent space thinks. The LLM translates.)

Phase 1-4: Core semiotic cycle
- StateTensor 8x1024 (8 Peircean dimensions)
- Dissonance computation with hard negatives
- Fixation via 4 Peircean methods (Tenacity, Authority, A Priori, Science)
- LatentEngine orchestrating the full cycle

Phase 5: StateToLanguage
- LLM as pure translator (zero-reasoning, T=0)
- Projection on interpretable directions
- Reasoning markers detection (Amendment #4)

Phase 6: Vigilance
- x_ref (David) as guard-rail, NOT attractor
- Drift detection per dimension and globally
- Alerts: ok, warning, critical

Phase 7: Autonomous Daemon
- Two modes: CONVERSATION (always verbalize), AUTONOMOUS (~1000 cycles/day)
- Amendment #5: 50% probability on unresolved impacts
- TriggerGenerator with weighted random selection

Phase 8: Integration & Metrics
- ProcessMetrics for daily/weekly reports
- Health status monitoring
- Integration tests validating all modules

297 tests passing, version 0.7.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:30:19 +01:00
05fc6a3994 Fix OccasionLog dataclass field ordering and Unicode encoding
- Reorder dataclass fields: required fields before default fields
- Replace Unicode arrow (→) with ASCII (->) for cp1252 compatibility
- Fixes Python dataclass initialization errors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 17:17:04 +01:00
6af52866ed Add Phases 3-5: State transformation, OccasionLogger, OccasionManager
Phase 3 - State Transformation:
- transform_state() function with alpha/beta parameters
- compute_adaptive_params() for dynamic transformation
- StateTransformer class for state management

Phase 4 - Occasion Logger:
- OccasionLog dataclass for structured logging
- OccasionLogger for JSON file storage
- Profile evolution tracking and statistics

Phase 5 - Occasion Manager:
- Full cycle: Prehension → Concrescence → Satisfaction
- Search integration (thoughts, library)
- State creation and logging orchestration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 17:09:36 +01:00
21f5676c7b Add ikario_processual with David profile and embedding script
- david_profile_declared.json: David's declared profile values from questionnaire
- scripts/embed_david.py: Python script to generate embeddings using BGE-M3 model
- questionnaire_david.md: Questionnaire template for profile values

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 16:57:03 +01:00