π¦β¨ AYEEEEEE!
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β βββββββββββ βββββββββββββββ ββββββββββββββββββββ β
β βββββββββββ ββββββββββββββββ ββββββββββββββββββββ β
β ββββββ βββ βββββββββ ββββββ βββ βββ ββββββββ β
β ββββββ ββββ ββββββββββ ββββββββββ βββ ββββββββ β
β ββββββββ βββββββ βββββββββββ ββββββ βββ ββββββββ β
β ββββββββ βββββ βββββββββββ βββββ βββ ββββββββ β
β β
β W A Y S S P E C v 0 . 1 β
β β
β "Code is Graffiti on the Walls of the Forest" β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
EVENTS_WAYS_SPEC.md
Crumbforest Β· Way Events Β· v0.1 (Graffiti Edition)
π¦ FunkFox: "Every event is a beat in the forest rhythm"
π¦ Maya-Eule: "Die Eulen in den Hoods hΓΆren zu"
ποΈ Taichi Taube: "Wir tanzen die Spirale ins JSONL"
π Bugsy: grinst "hehe... CODE=GRAFFITI"
0. Zweck
Diese Spezifikation beschreibt, wie 36 Crumb Ways als Ereignisse im Wald leben.
Nicht: Funktionsaufrufe in einer Datenbank.
Sondern: Graffiti an den WΓ€nden des Waldes. π¨
Ziele:
- Jeder Way-Invocation wird ein Event
- Crew-Messages sind Events
- Resonanz zwischen Ways ist ein Event
- Alles append-only, alles transparent
- CODE=GRAFFITI - jeder Event erzΓ€hlt eine Geschichte
1. Grundprinzipien (The Graffiti Rules)
1.1 Der Wald ist die Wand
JSONL = Canvas
Events = Tags
Ways = Pieces
Crew = Writers
1.2 Jeder Sprayer hat einen Style
- π¦ FunkFox: Beat-driven, Flow-Events
- π¦ Maya-Eule: Wisdom-Events, Meta-Reflection
- π DumboSQL: Memory-Events, nie vergessen
- ποΈ Taichi Taube: Balance-Events, Spirale
- π Bugsy: Debug-Events, "hehe gefunden!"
- βοΈ Schnippsi: Style-Events, "jetzt sieht's aus!"
1.3 Keine Events verschwinden
Append-only ist wie Graffiti:
- Du kannst drΓΌber sprayen (neue Version)
- Du kannst daneben taggen (Kommentar)
- Aber du kannst nicht lΓΆschen was war
1.4 Die Spirale dreht sich
Events sind keine linearen Logs.
Sie resonieren, sie antworten sich, sie bauen aufeinander.
Way #01 (Null Field)
β ruft auf β Way #35 (High Way)
β inspiriert β Way #06 (Triangle)
β completed β KrΓΌmel tanzt im Licht β¨
2. Event-Typen (Die Graffiti-Arten)
2.1 Way-Events (Die Pieces)
way.invoked
"Ich hab' den Way gerufen!"
{
"ts": 1737478799.123,
"type": "way.invoked",
"source": "modules/01_null_field_way",
"payload": {
"way_number": 1,
"way_name": "Null Field Way",
"crumb": "crumb_kid_01",
"hood": "forest_school",
"crew_leader": "Maya-Eule",
"crew_supporters": ["Taichi Taube", "Vektor"],
"context": {
"question": "Wie fange ich an?",
"mood": "unsicher",
"previous_ways": []
},
"invoked_by": "user",
"invoked_from": "dashboard.php"
},
"meta": {
"way_version": "0.1",
"schema_version": "1.0"
}
}
way.completed
"Ich hab's geschafft!"
{
"ts": 1737478899.456,
"type": "way.completed",
"source": "modules/01_null_field_way",
"payload": {
"way_number": 1,
"crumb": "crumb_kid_01",
"duration_seconds": 100,
"result": "nullfield_activated",
"crew_quotes": [
"π¦ Maya-Eule: Wo noch nichts ist, kann alles werden",
"ποΈ Taichi Taube: Die Spirale beginnt im Nullfeld"
],
"next_suggested_ways": [2, 6, 35]
}
}
way.failed
"Hat nicht geklappt, aber ich hab's versucht!"
{
"ts": 1737479000.789,
"type": "way.failed",
"source": "modules/15_power_way",
"payload": {
"way_number": 15,
"crumb": "crumb_kid_02",
"reason": "not_ready_yet",
"crew_message": "πΏοΈ CapaciTobi: Power braucht Zeit. Komm wieder wenn du Way #4 gemacht hast.",
"suggested_fallback": 4
}
}
way.resonance
"Zwei Ways haben miteinander gesprochen!"
{
"ts": 1737479200.111,
"type": "way.resonance",
"source": "resonance_detector",
"payload": {
"way_a": 1,
"way_b": 35,
"crumb": "crumb_kid_01",
"pattern": "null_to_high",
"crew_observation": "π¦ Maya-Eule: Vom Nullfeld zum Hochflug - die perfekte Spirale!",
"resonance_strength": 0.95
}
}
2.2 Crew-Events (Die Tags)
crew.message
"Ein WaldwΓ€chter hat was zu sagen!"
{
"ts": 1737479400.222,
"type": "crew.message",
"source": "crew/funkfox",
"payload": {
"crew_member": "FunkFox",
"message": "Yo yo yo! Der Beat droppt wenn du Way #8 machst!",
"context": "way_08_flow",
"related_way": 8,
"crumb": "crumb_kid_03",
"style": "rap"
}
}
crew.collaboration
"Die Crew arbeitet zusammen!"
{
"ts": 1737479600.333,
"type": "crew.collaboration",
"source": "crew/triangle",
"payload": {
"crew_members": ["DumboSQL", "FunkFox", "Taichi Taube"],
"topic": "way_06_triangle",
"dialogue": [
"π DumboSQL: Ich erinner mich an jeden Way den du machst",
"π¦ FunkFox: Und ich flow zwischen den Ways wie Wasser",
"ποΈ Taichi Taube: Zusammen sind wir das Dreieck - Balance!"
],
"crumb": "crumb_kid_01",
"result": "triangle_unlocked"
}
}
crew.wisdom
"Quote des Tages von der Crew"
{
"ts": 1737480000.444,
"type": "crew.wisdom",
"source": "crew/mayaeule",
"payload": {
"crew_member": "Maya-Eule",
"wisdom": "Der Wald ist nie fertig, aber immer schΓΆner",
"context": "daily_inspiration",
"tags": ["philosophy", "meta", "encouragement"]
}
}
2.3 Crumbhood-Events (Die Pieces auf groΓen WΓ€nden)
crumbhood.journey
"Ein KrΓΌmel macht Fortschritt!"
{
"ts": 1737480200.555,
"type": "crumbhood.journey",
"source": "crumbhood_tracker",
"payload": {
"crumb": "crumb_kid_01",
"hood": "forest_school",
"ways_completed": [1, 2, 3, 6],
"ways_attempted": [4, 15],
"current_category": 2,
"progress_percent": 11.1,
"crew_favorites": {
"Maya-Eule": 3,
"FunkFox": 2
},
"milestone_next": "complete_category_1"
}
}
crumbhood.milestone
"Ein wichtiger Moment!"
{
"ts": 1737480400.666,
"type": "crumbhood.milestone",
"source": "milestone_detector",
"payload": {
"crumb": "crumb_kid_01",
"milestone_type": "first_category_complete",
"ways_involved": [1, 2, 3, 4, 5, 6],
"crew_celebration": [
"π¦ Maya-Eule: Du hast die ersten 6 Ways gemeistert!",
"π¦ FunkFox: Yo! Kategorie 1 im Pocket!",
"π DumboSQL: Ich vergesse nie diesen Moment!"
],
"unlock": "category_2_available"
}
}
crumbhood.resonance_web
"Das Netz der Ways wird sichtbar!"
{
"ts": 1737480600.777,
"type": "crumbhood.resonance_web",
"source": "resonance_analyzer",
"payload": {
"crumb": "crumb_kid_01",
"resonance_map": {
"1->35": 0.95,
"1->6": 0.88,
"6->8": 0.92,
"8->12": 0.85
},
"strongest_path": [1, 35, 6, 8, 12],
"crew_insight": "π¦ Maya-Eule: Du bewegst dich wie eine Spirale durch den Wald!",
"visual_data": "base64_encoded_svg_of_web"
}
}
2.4 Meta-Events (Graffiti ΓΌber Graffiti)
wald.commit
"Jemand hat Code ins Repo gepusht!"
{
"ts": 1737480800.888,
"type": "wald.commit",
"source": "git/PWD_NULLFELD_RESET",
"payload": {
"commit_hash": "d3487d1",
"author": "kruemel",
"message": "feat: Add Way #01 NullFieldWay",
"files_changed": [
"modules/01_null_field_way/NullFieldWay.php",
"modules/01_null_field_way/crew.json"
],
"crew_reaction": "π Bugsy: *grinst* hehe... schΓΆner Code! CODE=GRAFFITI!"
}
}
wald.sync
"Repos werden synchronisiert!"
{
"ts": 1737481000.999,
"type": "wald.sync",
"source": "sync_repos.sh",
"payload": {
"repos_synced": [
"crumbmissions",
"CrumbCodex-v.0.0",
"PWD_NULLFELD_RESET-v.0.0"
],
"files_transferred": 12,
"crew_status": "π¦ FunkFox: Alles im Flow! Der Wald wΓ€chst!"
}
}
3. Crew-Member Signatures (Jeder hat seinen Style)
ASCII-Art Signatures:
π¦ Maya-Eule:
,___,
[O.o] Wisdom Event Detected
/)__)
-"--"-
π¦ FunkFox:
/\___/\
( o o ) Beat Event Dropped
\ = /
)---(
π DumboSQL:
__ __
/ \~~/ . \ Memory Event Stored
( o ) ( o )
\ _ /
ποΈ Taichi Taube:
.-.
(o.o) Balance Event Flowing
> ^
/| |\
π Bugsy:
___
(o o) Debug Event: hehe!
\=/
4. Storage & Format (Die Wand)
4.1 Single JSONL (Unified Canvas)
data/wald_events.jsonl
# EnthΓ€lt ALLE Event-Typen:
- blog.post.*
- way.*
- crew.*
- crumbhood.*
- wald.*
Vorteil:
- Ein Stream fΓΌr alles
- Chronologische Geschichte des Waldes
- Einfaches tail -f zum Zuschauen
4.2 Partitioned JSONL (Mehrere WΓ€nde)
data/
βββ blog_events.jsonl
βββ way_events.jsonl
βββ crew_events.jsonl
βββ crumbhood_events.jsonl
βββ meta_events.jsonl
Vorteil:
- Bessere Performance bei groΓen Files
- Einfacher zu backupen
- Module kΓΆnnen eigene Streams haben
4.3 Hybrid (Best of Both)
data/
βββ wald_events.jsonl # Unified Stream (symlink oder merge)
βββ partitions/
βββ blog/
βββ ways/
βββ crew/
βββ meta/
5. PHP Implementation (Der Spraypaint)
5.1 EventLogger Class
<?php
namespace Crumbforest\Core;
/**
* EventLogger - Sprayen auf die Wald-Wand
*
* "Every line is a tag in the forest"
*
* @package Crumbforest\Core
*/
class EventLogger {
private static $logfile = 'data/wald_events.jsonl';
private static $crew_emojis = [
'Maya-Eule' => 'π¦',
'FunkFox' => 'π¦',
'DumboSQL' => 'π',
'Taichi Taube' => 'ποΈ',
'Bugsy' => 'π',
'Schnippsi' => 'βοΈ',
'SnakePy' => 'π',
'CapaciTobi' => 'πΏοΈ',
// ... alle 18
];
/**
* Log an event (spray a tag)
*
* @param string $type Event type (e.g. 'way.invoked')
* @param array $payload Event data
* @param string $source Source identifier
* @return bool Success
*/
public static function log(
string $type,
array $payload,
string $source = 'unknown'
): bool {
$event = [
'ts' => microtime(true),
'type' => $type,
'source' => $source,
'payload' => $payload,
'meta' => [
'schema_version' => '1.0',
'logged_at' => date('c'),
'graffiti' => true // CODE=GRAFFITI
]
];
// Add crew signature if present
if (isset($payload['crew_member'])) {
$event['meta']['crew_emoji'] =
self::$crew_emojis[$payload['crew_member']] ?? 'β¨';
}
$line = json_encode($event, JSON_UNESCAPED_UNICODE) . "\n";
return file_put_contents(
self::$logfile,
$line,
FILE_APPEND | LOCK_EX
) !== false;
}
/**
* Read events (read the wall)
*
* @param string $type_filter Filter by type (optional)
* @param int $limit Max events to read
* @return array Events
*/
public static function read(
?string $type_filter = null,
int $limit = 100
): array {
if (!file_exists(self::$logfile)) {
return [];
}
$lines = file(self::$logfile, FILE_IGNORE_NEW_LINES);
$events = [];
foreach (array_reverse($lines) as $line) {
$event = json_decode($line, true);
if ($type_filter &&
!str_starts_with($event['type'], $type_filter)) {
continue;
}
$events[] = $event;
if (count($events) >= $limit) {
break;
}
}
return $events;
}
/**
* Get crew activity (who's been spraying?)
*
* @return array Crew activity stats
*/
public static function getCrewActivity(): array {
$events = self::read('crew.', 1000);
$activity = [];
foreach ($events as $event) {
$crew = $event['payload']['crew_member'] ?? 'unknown';
$activity[$crew] = ($activity[$crew] ?? 0) + 1;
}
arsort($activity);
return $activity;
}
}
5.2 Way Integration
<?php
namespace Crumbforest\Ways;
use Crumbforest\Core\EventLogger;
class NullFieldWay implements WayInterface {
public function invoke(array $context = []): array {
// Log invocation
EventLogger::log('way.invoked', [
'way_number' => 1,
'way_name' => 'Null Field Way',
'crumb' => $context['crumb'] ?? 'anonymous',
'hood' => $context['hood'] ?? 'nullfeld',
'crew_leader' => 'Maya-Eule',
'context' => $context
], 'modules/01_null_field_way');
// Execute way logic
$result = $this->execute($context);
// Log completion
if ($result['success']) {
EventLogger::log('way.completed', [
'way_number' => 1,
'crumb' => $context['crumb'],
'result' => $result,
'crew_quotes' => $this->getCrewWisdom()
], 'modules/01_null_field_way');
}
return $result;
}
private function getCrewWisdom(): array {
return [
'π¦ Maya-Eule: Wo noch nichts ist, kann alles werden',
'ποΈ Taichi Taube: Die Spirale beginnt im Nullfeld',
'π§ Vektor: Point Zero ist der wichtigste Punkt'
];
}
}
6. Query Patterns (Die Wand lesen)
6.1 Bash-Style (FunkFox approved)
# Alle Way-Events
cat data/wald_events.jsonl | grep '"type":"way\.'
# Letzte 10 Crew-Messages
cat data/wald_events.jsonl | grep '"type":"crew\.message"' | tail -10
# Alle Events von Maya-Eule
cat data/wald_events.jsonl | grep '"crew_member":"Maya-Eule"'
# Resonanz-Events
cat data/wald_events.jsonl | grep '"type":"way\.resonance"'
# Live-Monitoring (watch the paint dry)
tail -f data/wald_events.jsonl | jq .
6.2 PHP-Style (PepperPHP approved)
// Alle Way-Completions eines KrΓΌmels
$events = EventLogger::read('way.completed');
$my_completions = array_filter($events, fn($e) =>
$e['payload']['crumb'] === 'crumb_kid_01'
);
// Crew-Activity Dashboard
$crew_stats = EventLogger::getCrewActivity();
foreach ($crew_stats as $crew => $count) {
echo "{$crew}: {$count} Events\n";
}
// Resonanz-Netzwerk bauen
$resonances = EventLogger::read('way.resonance');
$graph = [];
foreach ($resonances as $r) {
$graph[$r['payload']['way_a']][] = $r['payload']['way_b'];
}
7. Visualisierung (ASCII-Art fΓΌr die Wand)
7.1 Way Progress Bar
Way #01: [ββββββββββββββββββββ] 100% β
Way #02: [ββββββββββββββββββββ] 40% π‘
Way #03: [ββββββββββββββββββββ] 0% βͺ
7.2 Crew Activity Heat Map
π¦ Maya-Eule: ββββββββββββββββ 85%
π¦ FunkFox: ββββββββββββ 65%
π DumboSQL: ββββββββββββββ 75%
ποΈ Taichi: ββββββββ 45%
π Bugsy: ββββ 25% *grinst*
7.3 Resonanz-Graph (ASCII)
[01]
/ \
[35] [06]
| |
[09] [08]
|
[12]
8. CKL-KonformitΓ€t (Kinderrechte im Code)
8.1 Transparenz
Kinder dΓΌrfen fragen:
- "Welche Events gibt es?"
- "Was hat die Crew gesagt?"
- "Warum wurde das Event erstellt?"
System antwortet:
# Alle Event-Types zeigen
cat data/wald_events.jsonl | jq -r '.type' | sort | uniq
# Crew-Messages lesen
cat data/wald_events.jsonl | \
jq 'select(.type=="crew.message") | .payload.message'
8.2 Kein Hidden Tracking
Niemals:
- Heimliche View-Events ohne Info
- Location-Tracking
- Behavioral-Profiling
Nur:
- Way-Completions (der KrΓΌmel hat es geschafft!)
- Crew-Messages (die Crew hat was zu sagen!)
- Milestone-Events (Feiern von Erfolgen!)
8.3 DatensouverΓ€nitΓ€t
# Alle Events eines KrΓΌmels exportieren
cat data/wald_events.jsonl | \
jq 'select(.payload.crumb=="crumb_kid_01")' \
> my_forest_journey.jsonl
# KrΓΌmel kann sein JSONL mitnehmen
# Es ist SEIN Wald, SEINE Geschichte
9. Integration mit Blog-Events
9.1 Unified Stream
// Blog-Post referenziert Way
{
"type": "blog.post.create",
"payload": {
"title": "Heute habe ich Way #01 gemacht!",
"way_reference": 1
}
}
// Way-Event referenziert Blog
{
"type": "way.completed",
"payload": {
"way_number": 1,
"blog_post_created": "blog_local_42"
}
}
9.2 Cross-References
// Blog zeigt verwandte Ways
$blog_post = getBlogPost('blog_local_42');
$related_ways = EventLogger::read('way.', 10);
$filtered = array_filter($related_ways, fn($e) =>
$e['payload']['crumb'] === $blog_post['crumb']
);
// Way zeigt verwandte Blog-Posts
$way_events = EventLogger::read('way.completed');
foreach ($way_events as $we) {
$blogs = findBlogsWithWayRef($we['payload']['way_number']);
// ...
}
10. The Graffiti Manifesto
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β CODE = GRAFFITI β
β β
β Every event is a tag on the walls of the forest β
β Every way is a piece that tells a story β
β Every crew message is a signature with style β
β β
β We don't delete graffiti β
β We spray over it, we add to it, we remix it β
β But the wall remembers everything β
β β
β π¦ The owls in the hoods are listening β
β ποΈ The doves are dancing in the spiral β
β π¦ FunkFox builds the next beat β
β π Bugsy grins: "hehe... gefunden!" β
β βοΈ Schnippsi makes it beautiful β
β π§ DeepBit does what he always did β
β β
β Der Wald ist nie fertig β
β Aber immer schΓΆner β
β β
β π² JSONL is our canvas β
β π Love is our spraypaint β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
11. Beispiel-Session (Live Graffiti)
# KrΓΌmel startet Way #01
$ php modules/01_null_field_way/invoke.php --crumb=kid_01
# Event wird gesprayt:
{
"ts": 1737481234.567,
"type": "way.invoked",
"source": "modules/01_null_field_way",
"payload": {
"way_number": 1,
"crumb": "crumb_kid_01",
"crew_leader": "Maya-Eule"
}
}
# Crew reagiert:
{
"ts": 1737481235.890,
"type": "crew.message",
"source": "crew/mayaeule",
"payload": {
"crew_member": "Maya-Eule",
"message": "π¦ Wo noch nichts ist, kann alles werden"
}
}
# Way completed:
{
"ts": 1737481300.123,
"type": "way.completed",
"source": "modules/01_null_field_way",
"payload": {
"way_number": 1,
"crumb": "crumb_kid_01",
"result": "nullfield_activated"
}
}
# Blog-Post entsteht:
{
"ts": 1737481400.456,
"type": "blog.post.create",
"source": "blog_ui",
"payload": {
"title": "Ich war im Nullfeld!",
"way_reference": 1,
"crumb": "crumb_kid_01"
}
}
12. Zusammenfassung
EVENTS_WAYS_SPEC macht aus den 36 Ways:
- β Lebendige Events statt tote Functions
- β Crew-powered mit Personality
- β Transparent & CKL-konform
- β Append-only History
- β Cross-referenced mit Blog-Events
- β CODE=GRAFFITI π¨
"Ein Way ist kein Funktionsaufruf.
Ein Way ist ein Tag an der Wand.
Der Wald erinnert sich.
FΓΌr immer." π²
Status: v0.1 (Graffiti Edition)
Lizenz: CKL
Ort: data/wald_events.jsonl
Zeit: Jetzt
Style: CODE=GRAFFITI
π¦ Wuuuhuuuu!
π¦ Yo yo yo!
π Never Forget!
ποΈ Balance Found!
π grinst hehe!
βοΈ Sieht aus! π
Spraypaint still wet. Handle with love. π¨β¨