Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
665 commits
Select commit Hold shift + click to select a range
86c36fb
docs(ensinio-mind): create feature requests backlog (7 features)
Mar 14, 2026
04b2395
feat: add complete project config template system
Mar 15, 2026
d0e2077
feat: harden /new-project with pre-flight validation, decision tree, …
Mar 16, 2026
ce0b0bb
feat: complete Phase 2 hardening for /new-project
Mar 16, 2026
b24917e
feat: complete Phase 3 hardening for /new-project (10/10)
Mar 16, 2026
96ae32a
docs: update checkpoint with Fase 3 completion (10/10 achieved)
Mar 16, 2026
81cbe34
refactor: consolidate /new-project and /new-project-full into single …
Mar 16, 2026
0b64730
backup: 2026-03-15 21:56
Mar 16, 2026
8d16baf
feat: add error signals (🚨 ❌) to backup script
Mar 16, 2026
bdbb143
fix: remove deprecated hooks array from /new-project template
Mar 16, 2026
5ae0aa9
backup: 2026-03-15 22:37
Mar 16, 2026
b178768
backup: 2026-03-15 22:46
Mar 16, 2026
9acc85c
backup: 2026-03-15 22:54
Mar 16, 2026
d0ffcbd
feat: auto-create symlink to global skills in HYBRID projects
Mar 16, 2026
b35d922
feat: add skills symlink validation script
Mar 16, 2026
159efda
feat: create global resources symlinks in HYBRID projects
Mar 16, 2026
9197a21
docs: update checkpoint with global resources symlinks
Mar 16, 2026
424680e
backup: 2026-03-16 11:02
Mar 16, 2026
f083b84
feat: add auto-reindex hook for ACTIVE.md
Mar 16, 2026
9e9e268
docs: update S1.1 progress (85% complete) + checkpoint
Mar 16, 2026
403504d
feat(ensinio): add background send scripts with Evolution API
Mar 16, 2026
8dbe652
feat: add automatic port management system for AIOX projects
Mar 16, 2026
238edc0
fix(ensinio): corrige split de mensagens (despedidas removidas)
Mar 16, 2026
44f8f62
chore: migrate ensinio-whatsapp-prospector to HYBRID project
Mar 16, 2026
52f7200
docs: update ensinio-whatsapp-prospector status (HARD-P0-001 Done)
Mar 16, 2026
2b2adb6
chore: checkpoint session (ensinio workflow + squad-architect)
Mar 17, 2026
032f881
feat: add automatic settings.json format validation
Mar 17, 2026
9b91b00
chore: update ensinio-whatsapp-prospector status (workflow + copy)
Mar 17, 2026
894b1df
chore: delete research-only projects (luiz-fosc-mentoria + luiz-fosc-…
Mar 17, 2026
0ff8afb
chore: update ACTIVE.md - ensinio-whatsapp-prospector Wave 3 complete
Mar 17, 2026
ebcd975
chore: add luiz-fosc-palestras-negocio to ACTIVE projects
Mar 17, 2026
9992020
docs: update ACTIVE.md - ensinio-whatsapp-prospector Wave 4 complete …
Mar 17, 2026
77fcdde
feat: create luiz-fosc-palestras-negocio project (HYBRID)
Mar 17, 2026
cec5a0f
feat: add STORY-1.0 benchmarking concorrentes
Mar 17, 2026
43504fd
chore: checkpoint session luiz-fosc-palestras-negocio
Mar 17, 2026
5852b96
docs: update Tathi Deandhela README to v2.0.0 (complete)
Mar 18, 2026
c4c4b28
feat: create high-ticket-mastery fusion squad v1.2.0 (score 8.0/10)
Mar 18, 2026
216575b
chore: checkpoint session renan-vieira (squad creation complete)
Mar 18, 2026
8fbd447
feat: handoff ecosystem-index story to @dev [PO]
Mar 18, 2026
adf0be8
feat: implement ecosystem index automation [Story Complete]
Mar 18, 2026
a700e6f
feat: add @thiago_finch BOOKEND to /squad skill (TRIO complete)
Mar 18, 2026
42520f6
qa: handoff ecosystem-index to @devops [QA PASS 10/10]
Mar 18, 2026
1ba97b5
chore: update session state and ecosystem index
Mar 18, 2026
6c0bafe
chore: mark qa-to-devops handoff as consumed
Mar 18, 2026
5c9460e
backup: 2026-03-18 01:09
Mar 18, 2026
cd89466
chore: mark ensinio-whatsapp-prospector as FINALIZADO
Mar 18, 2026
fd3f397
chore: update ACTIVE.md - ensinio-whatsapp-prospector back to active …
Mar 18, 2026
5eec833
chore: normalize mind clone locations across ecosystem [MINDS-1]
Mar 18, 2026
61b34f9
feat: harden audit-project-config skill (Sprint 1 complete)
Mar 18, 2026
4dfc7d9
feat: add ecosystem-audit skill with auto-fix capabilities
Mar 18, 2026
671160a
docs: add ecosystem-audit session handoff
Mar 18, 2026
86f21c9
chore: mark audit-project-config hardening story as Done (10/10 ACs)
Mar 19, 2026
fc4f9f6
docs: fix 8 P1 ecosystem audit items — add missing SKILL.md and READM…
Mar 19, 2026
a3bd5ac
chore: track all squads in git — remove blanket squads/* ignore
Mar 19, 2026
6e95995
fix: make audit-project-memory and bootstrap-project-memory executable
Mar 19, 2026
a4af78f
feat: implement Memory System v2.0 — Phases 1-3 (Foundation + Read + …
Mar 19, 2026
91bad8f
refactor: harden ecosystem-audit validator — reduce false positives, …
Mar 19, 2026
9d38318
feat: complete Memory System v2.0 — Phases 4-5 (Checkpoints + Auto-Load)
Mar 19, 2026
9de5e22
feat: track all 63 squads in version control
Mar 19, 2026
0d757ae
feat: complete memory coverage — 15 remaining projects + aios-master
Mar 19, 2026
5d72ff2
feat: close 3 remaining memory gaps — write protocol, cleanup, checkp…
Mar 19, 2026
99ae263
feat: add memory-health-check tool + fix aios-master write protocol
Mar 19, 2026
cb3a4f9
feat: add /memory-audit skill — persistent health check for Memory Sy…
Mar 19, 2026
795be8f
fix: remove large media files and add gitignore rules for audio/video
Mar 19, 2026
0422029
chore: ecosystem audit + fix 3 incomplete squads
Mar 19, 2026
5f317e2
feat: propagate memory-protocol.md to all 18 HYBRID projects
Mar 19, 2026
7e275f3
fix: prevent mind-clone-governance hook false positives on doc files
Mar 19, 2026
af0f66e
chore: cleanup ACTIVE.md + fix tool permissions
Mar 19, 2026
32be59d
docs: checkpoint session — Memory System v2.0 complete
Mar 19, 2026
b1cc099
chore: deep cleanup — remove rogue paths, backup, broken symlinks
Mar 19, 2026
1003043
backup: 2026-03-19 13:36
Mar 19, 2026
79688a4
backup: 2026-03-20 22:55
Mar 21, 2026
6565719
backup: 2026-03-21 23:56
Mar 22, 2026
9a76ff6
backup: 2026-03-22 00:03
Mar 22, 2026
1838cdf
feat: add politica-app skill — swarm intelligence opinion simulator
Mar 24, 2026
c1cadf8
chore: register politica-app as AIOS slash command
Mar 24, 2026
ef02c59
refactor: rename politica-app to politica-simulation-mirofish
Mar 24, 2026
e789123
refactor: consolidate 3 LP skills into unified lp-generator v3
Mar 24, 2026
96e8a77
chore: update-squads — re-auditoria + merge squad-creators + DNA enri…
Mar 26, 2026
7904315
chore: checkpoint session update-squads — 4/10 ações concluídas
Mar 26, 2026
4884e38
chore: update-squads — ações #1, #6, #7, #8 concluídas (8/10)
Mar 26, 2026
065da34
chore: checkpoint session update-squads — 8/10 ações concluídas
Mar 26, 2026
c25c92d
chore: update-squads — ação #9 veto conditions nos SILVER (9/10)
Mar 26, 2026
508f58b
chore: update-squads — ação #10 mind clones top 5 (10/10 COMPLETO)
Mar 26, 2026
37711b1
feat: add Quest Pack Design System Forge + skill tooling
Mar 27, 2026
1687e7b
chore: update-squads — design, curator, kaizen-v2 + quest engine + sk…
Mar 27, 2026
c20e12c
fix: ESM imports in forge scripts + dissect-artifact timeout fix
Mar 27, 2026
d73281b
fix: domcontentloaded + YAML parser for dissect token format
Mar 27, 2026
df6b761
fix: scrape-references graceful handling of malformed JSON
Mar 27, 2026
1318a45
chore: update-squads fase 2 — SILVER→GOLD upgrade + rename squad-crea…
Mar 27, 2026
553cfcd
feat: add dashed path lines between quest map nodes
Mar 27, 2026
84f9109
feat(quest): replace generic "Builder" with personalized hero identity
Mar 27, 2026
4c9418e
feat(quest): Quest Master suggests epic titles instead of asking open…
Mar 27, 2026
26f65b5
chore: update-squads fase 2 — content-engine, viral-squad, dan-koe → …
Mar 27, 2026
1c185bb
feat(quest): add detail level toggle (Clean/Medium/Full) + fix font s…
Mar 27, 2026
f983963
chore: update-squads fase 2 — kaizen, affiliates, openclaw-manager → …
Mar 27, 2026
886eca2
feat(quest): enrich map with pack data for Full detail mode
Mar 27, 2026
7a6c6aa
chore: update-squads fase 2 — site-performance-audit, negotiation, pa…
Mar 27, 2026
67362e9
fix(quest): move full command text to tooltip, keep canvas labels clean
Mar 27, 2026
0059537
chore: update-squads fase 2 — icaro, ai-reels, claude-code-mastery → …
Mar 27, 2026
220ad64
feat(quest): add 4 map themes (Pixel/Cyber/Parchment/Minimal) + MAP l…
Mar 27, 2026
b0586a4
chore: update-squads fase 2 — 6 BRONZE → SILVER + MASTER.md atualizado
Mar 27, 2026
1cbe4f2
feat(design-system-forge): epic DSF2 complete + DSF3 bridge script
Mar 27, 2026
67e0788
feat(quest): add MVP Launch Guide ceremony on milestone phase completion
Mar 27, 2026
78db52b
feat(quest): add mandatory Integration Gate before phase unlock
Mar 27, 2026
87fc85d
docs: checkpoint sessão 5 — update-squads fase 2 (22 squads processados)
Mar 27, 2026
bcba2b5
fix(quest): add roundRect polyfill for older browsers
Mar 27, 2026
29f64fb
fix(quest): resolve 3 CRITICAL issues from PV + Kaizen audit
Mar 27, 2026
040485b
fix(quest): resolve 5 HIGH issues from PV + Kaizen audit
Mar 27, 2026
f1bc346
feat(quest): pre-load existing dots in calibrate tool + show needed c…
Mar 27, 2026
1a1d286
feat(quest): update calibrate tool for new 9-zone chronicles map
Mar 27, 2026
eb12ec2
fix(quest): add scroll/drag navigation to calibrate tool
Mar 27, 2026
a4001da
fix(quest): fix calibrate dots not rendering — canvas size mismatch
Mar 27, 2026
5e069db
feat(quest): switch to chronicles 9-zone map with 67 calibrated posit…
Mar 27, 2026
e8be7f1
feat(quest): split World 5 into 9-world structure + migrate quest-logs
Mar 27, 2026
15d39b2
fix(quest): correct quality_freak achievement reference after 9-world…
Mar 27, 2026
0e1b0ac
fix(quest): update index.html WORLDS to 9 + fix pack comments
Mar 27, 2026
290fde6
fix(quest): correct calibrate PHASE_EXPECTED for 9-world pack counts
Mar 27, 2026
62d8c2e
fix(quest): resolve 5 engine inconsistencies found by audit
Mar 28, 2026
69fbdc2
fix(quest): resolve 3 additional inconsistencies from second audit
Mar 28, 2026
b007093
fix(quest): separate base_item_xp from total_xp to fix achievement ev…
Mar 28, 2026
3874755
docs(quest): clarify that total_xp >= N condition uses base item XP
Mar 28, 2026
d72b970
feat(quest): elevate skill to 10/10 with 4 structural improvements
Mar 29, 2026
d7cc2d5
fix(quest): resolve 3 inconsistencies in elevation features
Mar 29, 2026
73bbcb5
fix(quest): connect expansion pack gate to entrypoint + validate pare…
Mar 29, 2026
d4ee0fa
test(quest): add 30 contract tests for spec consistency
Mar 29, 2026
a2de26a
audit: quest engine - audit of round 1 review
Mar 29, 2026
df3a865
feat(ping-pong): add visual emojis to skill output — severity, status…
Mar 29, 2026
9206a90
fix(ping-pong): sync emoji formatting to Codex and Gemini skill copies
Mar 29, 2026
fbadac4
fix(quest): resolve 3 issues from ping-pong round 5 review
Mar 29, 2026
55f5b9e
fix(quest): move detected-item promotion to persisted read flow + add…
Mar 29, 2026
815ee46
fix(quest): persist read-flow mutations, align scan counter, delegate…
Mar 29, 2026
a5fcef8
fix(quest): decouple last_updated from read flow, fix fallback YAML p…
Mar 29, 2026
96ab043
fix(ping-pong): skip copy-paste handoff block when cycle is COMPLETE
Mar 29, 2026
0b050b7
feat(quest): expand pack to 67 items, add unused status and sub-items
Mar 30, 2026
e9661e1
fix(quest): address round-1 code review findings across engine modules
Mar 31, 2026
83b4a39
docs(quest): add round-1-fixed.md for code review ping-pong
Mar 31, 2026
a75e5cd
fix(quest): address round-2 code review findings across engine modules
Mar 31, 2026
854a8bc
docs(quest): add round-2-fixed.md for code review ping-pong
Mar 31, 2026
5f13fa7
fix(quest): address round-3 code review findings across engine modules
Mar 31, 2026
ff6f21f
docs(quest): add round-3-fixed.md for code review ping-pong
Mar 31, 2026
caf24e6
fix(quest): address round-4 code review findings across engine modules
Mar 31, 2026
0423ca5
docs(quest): add round-4-fixed.md for code review ping-pong
Mar 31, 2026
b1bfa08
fix(quest): address round-5 code review findings across engine modules
Mar 31, 2026
1e1170b
docs(quest): add round-5-fixed.md for code review ping-pong
Mar 31, 2026
88bc403
fix(quest): address round-6 code review findings across engine modules
Mar 31, 2026
ddf92d5
docs(quest): add round-6-fixed.md for code review ping-pong
Mar 31, 2026
9456aa1
fix(quest): address round-7 code review findings across engine modules
Mar 31, 2026
5f6528c
docs(quest): add round-7-fixed.md for code review ping-pong
Mar 31, 2026
b8593ee
fix(quest): address round-8 code review findings across engine modules
Mar 31, 2026
baf7b94
docs(quest): add round-8-fixed.md for code review ping-pong
Mar 31, 2026
f3cbf5a
fix(quest): address round-9 code review findings across engine modules
Mar 31, 2026
19fd880
docs(quest): add round-9-fixed.md for code review ping-pong
Mar 31, 2026
af68d4c
fix(quest): address round-10 code review findings in SKILL.md
Mar 31, 2026
8eed7d4
docs(quest): add round-10-fixed.md for code review ping-pong
Mar 31, 2026
987a56a
fix(quest): address round-11 code review findings
Mar 31, 2026
3694193
docs(quest): add round-11-fixed.md for code review ping-pong
Mar 31, 2026
4f83f28
fix(quest): address round-12 code review findings
Mar 31, 2026
9a41a98
docs(quest): add round-12-fixed.md for code review ping-pong
Mar 31, 2026
2a86535
fix(quest): address round-13 code review findings
Mar 31, 2026
f67fee8
docs(quest): add round-13-fixed.md for code review ping-pong
Mar 31, 2026
f33a383
fix(quest): address round-14 code review findings
Mar 31, 2026
9629646
docs(quest): add round-14-fixed.md for code review ping-pong
Mar 31, 2026
e33294d
fix(quest): address round-15 code review findings
Mar 31, 2026
b7516be
docs(quest): add round-15-fixed.md for code review ping-pong
Mar 31, 2026
ef42d17
fix(quest): address round-15 code review findings
Mar 31, 2026
71fb844
docs(quest): add round-15-fixed.md for code review ping-pong
Mar 31, 2026
c428fb4
fix(quest): address round-1 code review findings
Mar 31, 2026
5e796ca
fix(quest): align integration-check schema and endpoint field reference
Mar 31, 2026
c7620e7
fix(quest): address round-3 code review findings
Mar 31, 2026
cb50907
fix(quest): defer migration write until ceremony provides hero identi…
Mar 31, 2026
18f11c8
fix(quest): address round-5 code review findings
Mar 31, 2026
d046817
fix(quest): scope progress bar to per-phase totals, bypass phase lock…
Apr 1, 2026
8ec1f19
fix(quest): address round-8 code review findings
Apr 1, 2026
31fcb3a
fix(quest): address round-9 code review findings
Apr 1, 2026
2024f42
fix(quest): address round-10 code review findings
Apr 1, 2026
fa96058
feat(forge+quest): architect Forge as universal executor with Quest g…
Apr 1, 2026
55b79ca
fix(quest): add condition_state field, deduplicate condition prompts,…
Apr 1, 2026
54ed59f
fix(quest): address round-1 code review findings
Apr 1, 2026
ccb214f
feat(squads): add db-sage, install etl-squad v2.0, remove etl-univers…
Apr 1, 2026
df24413
fix(quest+forge): contract audit fixes, pack version bumps, forge-que…
Apr 1, 2026
867987b
feat(ping-pong): 9 improvements + openai-api provider + model escalation
Apr 1, 2026
967db95
fix(quest): address round-1 code review findings
Apr 1, 2026
0cf5ab5
fix(quest): address round-2 code review findings
Apr 1, 2026
7ffbdd5
fix(quest): clarify total_base_xp naming and unused handling in strea…
Apr 1, 2026
192be9b
fix(quest): align progress bar rounding and clarify hero_name resolution
Apr 1, 2026
458c1ed
fix(quest): address round-2 code review findings
Apr 1, 2026
03ea8d8
docs(quest): add round-2-fixed.md code review report
Apr 1, 2026
2851833
fix(quest): address round-3 code review findings
Apr 1, 2026
798a8c8
docs(quest): add round-3-fixed.md code review report
Apr 1, 2026
d8a005c
fix(quest): address round-4 code review findings
Apr 1, 2026
0231d25
docs(quest): add round-4-fixed.md code review report
Apr 1, 2026
5000727
fix(quest): address round-5 code review findings
Apr 1, 2026
07e8e21
docs(quest): add round-5-fixed.md code review report
Apr 1, 2026
3b2c58e
fix(quest): address round-6 code review findings
Apr 1, 2026
71a2fae
docs(quest): add round-6-fixed.md code review report
Apr 1, 2026
b039bd4
fix(quest): address round-7 code review findings
Apr 1, 2026
3943737
docs(quest): add round-7-fixed.md code review report
Apr 1, 2026
3f13891
fix(quest): address round-8 code review findings
Apr 1, 2026
0fe5002
docs(quest): add round-8-fixed.md code review report
Apr 1, 2026
d6ebb54
fix(quest): address round-9 code review findings
Apr 1, 2026
71a0248
docs(quest): add round-9-fixed.md code review report
Apr 1, 2026
ce40e41
fix(quest): address round-10 code review findings
Apr 1, 2026
7cf8d48
docs(quest): add round-10-fixed.md code review report
Apr 1, 2026
ea06fd4
fix(quest): address round-11 code review findings
Apr 1, 2026
de5f516
docs(quest): add round-11-fixed.md code review report
Apr 1, 2026
6d61d46
fix(quest): address round-12 code review findings
Apr 1, 2026
04ccd06
docs(quest): add round-12-fixed.md code review report
Apr 1, 2026
3c9d89c
fix(quest): add ceremony.md §7 to unused items contract enforcement list
Apr 1, 2026
e7ab5c4
docs(quest): add round-13-fixed.md code review report
Apr 1, 2026
f4ccffc
fix(quest): address round-14 code review findings
Apr 1, 2026
331b9a7
docs(quest): add round-14-fixed.md code review report
Apr 1, 2026
48ebd89
fix(quest): address round-15 code review findings
Apr 1, 2026
1f6b89c
docs(quest): add round-15-fixed.md code review report
Apr 1, 2026
2027b43
feat(forge): add smart tech decisions with auto-defaults in Phase 0
Apr 3, 2026
0896a68
feat(synapse): add workflow-forge domain for Forge pipeline rules
Apr 3, 2026
4859756
feat(forge): add plugin system + 9 evolution features
Apr 4, 2026
c2d9b5d
docs(quest): align forge reconciliation spec and conditional item guards
Apr 7, 2026
764b027
test(quest): add forge reconciliation contract tests (20 tests)
Apr 7, 2026
bf5336c
feat(quest): add forge-reconciler runtime module + 24 integration tests
Apr 7, 2026
5df57ca
feat(quest): wire forge-reconciler into /quest resumption flow
Apr 7, 2026
751315e
chore: remove .DS_Store files from git tracking
Apr 7, 2026
e24fee3
chore: remove deprecated squads (squad-creator, squad-creator-pro, mm…
Apr 7, 2026
d4c9e3f
chore: remove tech-search skill (replaced by tech-research) and clean…
Apr 7, 2026
7c8dadf
feat(forge): update phases, plugins, workflows and documentation
Apr 7, 2026
95ef0dd
feat(quest): add dashboard updates, code reviews and new modules
Apr 7, 2026
b29fae0
feat(skills): update lp-generator, design-system, code-review and oth…
Apr 7, 2026
896be1d
feat(squads): update agents across advisor-board, kaizen-v2, copywrit…
Apr 7, 2026
66a7406
chore: update configs, commands, docs and framework data
Apr 7, 2026
22a82ec
feat: add new skills (content-forge, carrossel-instagram, forge-quick…
Apr 7, 2026
3eb4297
feat: content forge ecosystem + viral-squad brand-agnostic
Apr 7, 2026
053593d
fix(forge): resolve 5 spec gaps found by stress-test + add self-test …
Apr 8, 2026
ff46087
fix(quest,content-forge): resolve stress-test findings across orchest…
Apr 8, 2026
4387ae0
fix(forge,quest,content-forge): resolve P0 findings from Tiers 3-5 st…
Apr 8, 2026
b185136
fix(forge,quest,content-forge): resolve all remaining WARN/FAIL from …
Apr 8, 2026
f10c4e6
feat(forge,quest): add stress-test workflow + quest pack for health c…
Apr 8, 2026
32a5aac
fix(content-forge): resolve 3 regressions found in code review
Apr 8, 2026
b84dd5e
fix: resolve 7 issues from Codex QA review
Apr 8, 2026
72af71f
fix: Codex QA round 2 — null guards + test coverage
Apr 8, 2026
40b63ab
test(content-forge): add 56 tests for classifier + planner
Apr 8, 2026
e384823
chore: standardize frontmatter across ecosystem (health 18→85)
Apr 8, 2026
d4e72a8
chore: enrich 197 agent descriptions from generic to content-extracted
Apr 8, 2026
3a7eac1
chore: frontmatter final pass — 0 HIGH, 0 MEDIUM, health 98/100
Apr 8, 2026
7ac1393
feat(kaizen-v2): integrate frontmatter health into daily sensing
Apr 8, 2026
3631e8f
fix(skill-stress-test): resolve 11 issues from code review ping-pong
Apr 8, 2026
50720d0
chore(code-review): archive ping-pong session for skill-stress-test
Apr 8, 2026
4d3e48e
feat: install critica + learning-extractor skills with Forge plugins …
Apr 8, 2026
2ed3eed
feat(forge): isolate stories by run_id in subfolders
Apr 8, 2026
f00fba9
chore(code-review): archive ping-pong sessions for critica/learning-e…
Apr 8, 2026
785abd3
fix(catalog): resolve symlink depth, block scalar parsing, and agent …
Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
607 changes: 607 additions & 0 deletions .aios-core/cli/commands/config/index.js

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions .aios-core/cli/commands/context/auto.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/**
* Context Auto Command
* Auto-detect session context from project
*
* Usage: aios context auto [--dry-run]
*
* @module cli/commands/context/auto
*/

const SessionStateManager = require('../../../core/session/state-manager');
const ContextTracker = require('../../../core/session/context-tracker');
const readline = require('readline');

async function execute(args) {
const isDryRun = args.includes('--dry-run');

try {
// Create tracker and detect context
const tracker = new ContextTracker();
const detected = await tracker.detectContext();

// Display detected values
console.log('Auto-detected context:\n');

console.log(' Project:');
console.log(` Type: ${detected.project.type} (confidence: ${Math.round(detected.confidence.projectType * 100)}%)`);
console.log(` Name: ${detected.project.name}`);
console.log(` Emoji: ${detected.project.emoji}`);

if (detected.git.branch) {
console.log('\n Git Status:');
console.log(` Branch: ${detected.git.branch}`);
console.log(` Uncommitted Changes: ${detected.git.hasChanges ? 'yes' : 'no'} ${detected.git.emoji}`);
}

if (detected.status.phase) {
console.log('\n Status:');
console.log(` Phase: ${detected.status.phase} (confidence: ${Math.round(detected.confidence.phase * 100)}%)`);
if (detected.status.progress) {
const [current, total] = detected.status.progress.split('/').map(Number);
const percentage = Math.round((current / total) * 100);
console.log(` Progress: ${detected.status.progress} (${percentage}%)`);
}
}

// Dry run - stop here
if (isDryRun) {
console.log('\n🔍 Dry run - no changes made.');
return;
}

// Ask for confirmation
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});

const answer = await new Promise(resolve => {
rl.question('\nApply this context? [Y/n]: ', resolve);
});
rl.close();

if (answer.toLowerCase() === 'n' || answer.toLowerCase() === 'no') {
console.log('❌ Cancelled.');
process.exit(0);
}

// Apply detected context
const manager = SessionStateManager;
await manager.update({
project: detected.project,
status: {
phase: detected.status.phase,
progress: detected.status.progress,
emoji: detected.status.emoji || (detected.git.hasChanges ? '🟡' : '🟢'),
},
});

console.log('\n✓ Context updated');
} catch (error) {
console.error(`Error detecting context: ${error.message}`);
process.exit(1);
}
}

module.exports = { execute };
41 changes: 41 additions & 0 deletions .aios-core/cli/commands/context/clear.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Context Clear Command
* Reset session context to defaults
*
* Usage: aios context clear [--archive]
*
* @module cli/commands/context/clear
*/

const SessionStateManager = require('../../../core/session/state-manager');
const path = require('path');

async function execute(args) {
const shouldArchive = args.includes('--archive');

try {
const manager = SessionStateManager;

// Get current session for archive filename
const currentSession = await manager.read();

// Clear (which archives automatically if session has data)
await manager.clear();


// Show confirmation
console.log('✓ Context cleared');

// If session was archived, show path
if (shouldArchive && currentSession.project.name) {
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
const archivePath = path.join('.aios', 'sessions', 'history', `session-${timestamp}.json`);
console.log(` Session archived to: ${archivePath}`);
}
} catch (error) {
console.error(`Error clearing context: ${error.message}`);
process.exit(1);
}
}

module.exports = { execute };
101 changes: 101 additions & 0 deletions .aios-core/cli/commands/context/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/**
* Context Command Router
* Routes aios context subcommands to appropriate handlers
*
* @module cli/commands/context
*/

const set = require('./set');
const show = require('./show');
const clear = require('./clear');
const auto = require('./auto');
const setEpic = require('./set-epic');
const setStory = require('./set-story');
const setTask = require('./set-task');

async function run(args) {
const subcommand = args[3] || 'show'; // Default to 'show'

switch (subcommand) {
case 'set':
await set.execute(args.slice(4));
break;
case 'set-epic':
await setEpic.execute(args.slice(4));
break;
case 'set-story':
await setStory.execute(args.slice(4));
break;
case 'set-task':
await setTask.execute(args.slice(4));
break;
case 'show':
await show.execute(args.slice(4));
break;
case 'clear':
await clear.execute(args.slice(4));
break;
case 'auto':
await auto.execute(args.slice(4));
break;
case 'help':
case '--help':
case '-h':
showHelp();
break;
default:
console.error(`Unknown subcommand: ${subcommand}`);
console.log('Run "aios context help" for usage');
process.exit(1);
}
}

function showHelp() {
console.log(`
Usage: aios context <command> [options]

Commands:
set <name> Set context manually
set-epic <epic> Set epic (main context - always visible)
set-story <story> Set story (mid-level context)
set-task <task> Set task (momentary context)
show Display current context (default)
clear Reset context
auto Auto-detect context from project

Options for 'set':
--emoji <emoji> Project emoji
--type <type> Project type (framework/squad/app/tool/design-system)
--status <emoji> Status emoji
--phase <phase> Work phase
--progress <n/m> Progress (e.g., "2/5")
--agent <agent> Active agent
--story <story> Story ID

Options for 'set-epic', 'set-story', 'set-task':
--clear Clear the epic/story/task

Options for 'show':
--json Output as JSON

Options for 'clear':
--archive Archive session before clearing

Options for 'auto':
--dry-run Show detection without applying

Examples:
aios context set "aios-core" --emoji 🏗️ --progress 2/5
aios context set-epic "Baixar vídeos YouTube"
aios context set-story "Implementar playlist"
aios context set-task "Commit GitHub"
aios context set-task --clear
aios context show
aios context show --json
aios context clear --archive
aios context auto
aios context auto --dry-run
`);
}

module.exports = { run };
129 changes: 129 additions & 0 deletions .aios-core/cli/commands/context/set-context.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
#!/usr/bin/env node
/**
* AIOS Context Setter
* Updates session context to display in terminal tab title and status bar
*
* Usage:
* aios context set <text>
* aios context set epic "Epic name"
* aios context set story "Story name"
* aios context set task "Task name"
* aios context clear
*/

const fs = require('fs').promises;
const path = require('path');
const { execSync } = require('child_process');

const SESSION_FILE = '.aios/session.json';

async function setContext(args) {
const projectRoot = process.cwd();
const sessionPath = path.join(projectRoot, SESSION_FILE);

try {
// Read current session
let session = {};
try {
session = JSON.parse(await fs.readFile(sessionPath, 'utf-8'));
} catch (error) {
if (error.code !== 'ENOENT') throw error;
// Create default session if doesn't exist
session = {
version: '1.0.0',
pid: process.pid,
sessionId: `session-${Date.now()}`,
project: {
type: 'unknown',
name: path.basename(projectRoot),
emoji: '📦',
},
status: {
phase: 'active',
progress: '',
currentTask: '',
emoji: '',
},
context: {},
metadata: {
startedAt: new Date().toISOString(),
lastUpdatedAt: new Date().toISOString(),
},
};
}

// Parse arguments
const [type, ...valueParts] = args;
const value = valueParts.join(' ');

if (!session.context) {
session.context = {};
}

// Handle different commands
if (type === 'clear') {
session.context = {};
console.log('✅ Context cleared');
} else if (type === 'epic' || type === 'story' || type === 'task') {
if (!value) {
console.error(`❌ Error: Please provide a ${type} name`);
process.exit(1);
}
session.context[type] = value;
console.log(`✅ ${type} set: ${value}`);
} else {
// Default: set as current task
const contextText = [type, ...valueParts].join(' ');
session.context.task = contextText;
console.log(`✅ Context set: ${contextText}`);
}

// Update timestamp
session.metadata = session.metadata || {};
session.metadata.lastUpdatedAt = new Date().toISOString();

// Write back
await fs.writeFile(sessionPath, JSON.stringify(session, null, 2), 'utf-8');

// Show current context
const contextParts = [
session.context.epic,
session.context.story,
session.context.task,
].filter(Boolean);

if (contextParts.length > 0) {
console.log(`📍 Current context: ${contextParts.join(' → ')}`);
}

} catch (error) {
console.error('❌ Error setting context:', error.message);
process.exit(1);
}
}

// Get arguments (skip node and script name)
const args = process.argv.slice(2);

if (args.length === 0) {
console.log(`
AIOS Context Setter

Usage:
aios context set <text> Set context as current task
aios context set epic "Epic name" Set epic level context
aios context set story "Story name" Set story level context
aios context set task "Task name" Set task level context
aios context clear Clear all context

Examples:
aios context set "Landing Page Help"
aios context set epic "Q1 2026 Features"
aios context set story "User Authentication"
aios context set task "Implement login form"
aios context clear
`);
process.exit(0);
}

setContext(args);
Loading