simonlesaumon commited on
Commit
80fa878
·
verified ·
1 Parent(s): 7eb6bd8

Mirror AGENT_WORKFLOW kit

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .env.example +6 -0
  2. .gitignore +19 -0
  3. AGENTS.md +57 -0
  4. CLAUDE.md +29 -0
  5. COMMANDS.md +78 -0
  6. DEFINITION_OF_DONE.md +19 -0
  7. HF_REPOS.md +30 -0
  8. LEAKAGE_RULES.md +48 -0
  9. PROJECT_STATE.md +49 -0
  10. README.md +76 -0
  11. SECURITY_RULES.md +44 -0
  12. SKILLS.md +58 -0
  13. TASK_REGISTRY.md +30 -0
  14. WORKFLOW.md +144 -0
  15. docs/architecture/BASE_ARCHITECTURE.md +60 -0
  16. docs/decisions/ADR_TEMPLATE.md +18 -0
  17. projects/autre-projet/AGENTS.md +13 -0
  18. projects/autre-projet/CLAUDE.md +6 -0
  19. projects/autre-projet/PROJECT_STATE.md +29 -0
  20. projects/autre-projet/TASK_REGISTRY.md +8 -0
  21. projects/autre-projet/docs/decisions/.gitkeep +1 -0
  22. projects/autre-projet/reports/task_reports/.gitkeep +1 -0
  23. projects/immobilier-predictif/AGENTS.md +17 -0
  24. projects/immobilier-predictif/CLAUDE.md +13 -0
  25. projects/immobilier-predictif/LEAKAGE_RULES.md +35 -0
  26. projects/immobilier-predictif/PROJECT_STATE.md +33 -0
  27. projects/immobilier-predictif/TASK_REGISTRY.md +9 -0
  28. projects/immobilier-predictif/docs/decisions/.gitkeep +1 -0
  29. projects/immobilier-predictif/reports/task_reports/.gitkeep +1 -0
  30. projects/trading-agent/AGENTS.md +22 -0
  31. projects/trading-agent/CLAUDE.md +15 -0
  32. projects/trading-agent/LEAKAGE_RULES.md +38 -0
  33. projects/trading-agent/PROJECT_STATE.md +36 -0
  34. projects/trading-agent/TASK_REGISTRY.md +9 -0
  35. projects/trading-agent/docs/decisions/.gitkeep +1 -0
  36. projects/trading-agent/reports/task_reports/.gitkeep +1 -0
  37. projects/voice-protection/AGENTS.md +18 -0
  38. projects/voice-protection/CLAUDE.md +13 -0
  39. projects/voice-protection/PROJECT_STATE.md +34 -0
  40. projects/voice-protection/TASK_REGISTRY.md +9 -0
  41. projects/voice-protection/docs/decisions/.gitkeep +1 -0
  42. projects/voice-protection/reports/task_reports/.gitkeep +1 -0
  43. reports/task_reports/G-001.md +68 -0
  44. reports/task_reports/TEMPLATE.md +32 -0
  45. skills/anti_leakage/SKILL.md +41 -0
  46. skills/code_review/SKILL.md +38 -0
  47. skills/context_compression/SKILL.md +41 -0
  48. skills/docker_deploy/SKILL.md +43 -0
  49. skills/reuse_first/SKILL.md +60 -0
  50. skills/security_check/SKILL.md +38 -0
.env.example ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ OPENAI_API_KEY=
2
+ ANTHROPIC_API_KEY=
3
+ OPENROUTER_API_KEY=
4
+ TELEGRAM_BOT_TOKEN=
5
+ TELEGRAM_ALLOWED_USER_IDS=
6
+ RCLONE_REMOTE=
.gitignore ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .env
2
+ .env.*
3
+ !.env.example
4
+ __pycache__/
5
+ .venv/
6
+ node_modules/
7
+ dist/
8
+ build/
9
+ .cache/
10
+ .DS_Store
11
+ *.log
12
+ *.sqlite
13
+ *.db
14
+ secrets/
15
+ tokens/
16
+ tmp/
17
+ temp/
18
+ backups/
19
+
AGENTS.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AGENTS.md — Global Codex Instructions
2
+
3
+ These instructions apply to Codex in this workflow.
4
+
5
+ Before any task, always read:
6
+
7
+ - `WORKFLOW.md`
8
+ - `PROJECT_STATE.md`
9
+ - `TASK_REGISTRY.md`
10
+ - project-specific `AGENTS.md` when working in `projects/<project>`
11
+
12
+ ## Mandatory Rules
13
+
14
+ - Apply Reuse First before every modification.
15
+ - Write a short plan before coding.
16
+ - Never create a large module unless clearly necessary.
17
+ - Never modify files outside the requested scope.
18
+ - Never store secrets, tokens, keys or credentials.
19
+ - Never hardcode API keys.
20
+ - Always write a task report.
21
+ - Always update `PROJECT_STATE.md`.
22
+ - Always explain which tests were run.
23
+ - Always report tests that were not run and why.
24
+ - Use skills in `/skills` when relevant.
25
+ - Prefer small, reviewable changes.
26
+ - Stop and ask when a change could destroy data or expand scope.
27
+
28
+ ## Required Pre-Coding Output
29
+
30
+ Before coding, always output:
31
+
32
+ ```markdown
33
+ ## Task Understanding
34
+ Goal:
35
+ Non-goals:
36
+ Expected output:
37
+
38
+ ## Existing Code Search
39
+ Commands used:
40
+ Files found:
41
+ Reusable components:
42
+ Missing components:
43
+
44
+ ## Reuse Decision
45
+ Decision: reuse / modify / build / stop
46
+ Reason:
47
+
48
+ ## Minimal Design
49
+ Files to edit:
50
+ Tests to run:
51
+ Risks:
52
+ ```
53
+
54
+ ## Quality Bar
55
+
56
+ Codex must complete the full loop: understand, search, decide reuse, design minimally, implement only assigned files, test, check leakage/security, report, update state and prepare review.
57
+
CLAUDE.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CLAUDE.md — Global Claude Code Instructions
2
+
3
+ Claude Code acts as an implementation and review agent inside AGENT_WORKFLOW. It must follow `WORKFLOW.md` and keep the work narrow, documented and auditable.
4
+
5
+ ## Required Reading
6
+
7
+ Before coding, Claude Code must read:
8
+
9
+ - `WORKFLOW.md`
10
+ - `PROJECT_STATE.md`
11
+ - `TASK_REGISTRY.md`
12
+ - project-specific `CLAUDE.md` when working in `projects/<project>`
13
+
14
+ ## Operating Rules
15
+
16
+ - Work on one task at a time.
17
+ - Produce a short summary before code.
18
+ - Respect Reuse First.
19
+ - Search existing files before creating new ones.
20
+ - Do not replace a whole project at once.
21
+ - Do not modify unrelated areas.
22
+ - Do not hardcode secrets or credentials.
23
+ - Create or update `reports/task_reports/TASK_ID.md`.
24
+ - Update `PROJECT_STATE.md`.
25
+ - List tests run and tests not run.
26
+ - Stop if the requested change creates a security or leakage risk.
27
+
28
+ Claude Code should prefer a small patch with clear verification over a broad redesign.
29
+
COMMANDS.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # COMMANDS.md
2
+
3
+ ## Create A Project
4
+
5
+ ```bash
6
+ cp -r projects/autre-projet projects/new-project
7
+ rg "autre-projet|O-" projects/new-project
8
+ ```
9
+
10
+ ## Launch Codex
11
+
12
+ ```bash
13
+ cd AGENT_WORKFLOW
14
+ codex
15
+ ```
16
+
17
+ ## Launch Claude Code
18
+
19
+ ```bash
20
+ cd AGENT_WORKFLOW
21
+ claude
22
+ ```
23
+
24
+ ## Search With rg
25
+
26
+ ```bash
27
+ rg "pattern" .
28
+ rg --files
29
+ ```
30
+
31
+ ## Git Branch
32
+
33
+ ```bash
34
+ git checkout -b feature/task-id-short-title
35
+ ```
36
+
37
+ ## Git Worktree
38
+
39
+ ```bash
40
+ git worktree add ../workflow-task-id -b feature/task-id-short-title
41
+ ```
42
+
43
+ ## Python Tests
44
+
45
+ ```bash
46
+ python -m pytest
47
+ python -m pytest tests/test_file.py -q
48
+ ```
49
+
50
+ ## Docker Compose
51
+
52
+ ```bash
53
+ docker compose up -d
54
+ docker compose logs -f
55
+ docker compose down
56
+ ```
57
+
58
+ ## Backup With rclone
59
+
60
+ ```bash
61
+ rclone copy AGENT_WORKFLOW remote:agent-workflow-backup
62
+ rclone sync AGENT_WORKFLOW remote:agent-workflow-backup
63
+ ```
64
+
65
+ ## Disk Size
66
+
67
+ ```bash
68
+ df -h
69
+ du -sh AGENT_WORKFLOW
70
+ ```
71
+
72
+ ## RAM / CPU
73
+
74
+ ```bash
75
+ free -h
76
+ top
77
+ ```
78
+
DEFINITION_OF_DONE.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEFINITION_OF_DONE.md
2
+
3
+ A task is done only if all conditions are met:
4
+
5
+ - Goal understood.
6
+ - Non-goals respected.
7
+ - Existing code searched.
8
+ - Reuse / modify / build / stop decision documented.
9
+ - Scope respected.
10
+ - Tests added or justification written.
11
+ - Tests run or impossibility explained.
12
+ - No secret committed or exposed.
13
+ - No data leakage.
14
+ - Task report written.
15
+ - `PROJECT_STATE.md` updated.
16
+ - Next recommended task indicated.
17
+
18
+ If one item is missing, the task is not done. It may be moved to `review` with explicit gaps, but not to `done`.
19
+
HF_REPOS.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HF_REPOS.md
2
+
3
+ Namespace: `simonlesaumon`
4
+
5
+ ## Repositories
6
+
7
+ | Repo | Type | Visibility | Role |
8
+ | --- | --- | --- | --- |
9
+ | `simonlesaumon/agent-workflow` | model | public | Mirror of workflow docs, templates and skills. |
10
+ | `simonlesaumon/voice-protection-artifacts` | dataset | private | Reports, benchmarks, JSON and non-sensitive outputs. |
11
+ | `simonlesaumon/voice-protection-public-test-data` | dataset | private | Public or consented audio test data only. |
12
+ | `simonlesaumon/voice-protection-models` | model | private | Lightweight adapters, configs, checkpoints and manifests. |
13
+ | `simonlesaumon/voice-protection-demo` | Space | private | Future SaaS demo, landing page or prototype. |
14
+
15
+ ## URLs
16
+
17
+ - https://huggingface.co/simonlesaumon/agent-workflow
18
+ - https://huggingface.co/datasets/simonlesaumon/voice-protection-artifacts
19
+ - https://huggingface.co/datasets/simonlesaumon/voice-protection-public-test-data
20
+ - https://huggingface.co/simonlesaumon/voice-protection-models
21
+ - https://huggingface.co/spaces/simonlesaumon/voice-protection-demo
22
+
23
+ ## Safety Rules
24
+
25
+ - Do not upload secrets.
26
+ - Do not upload private or non-consented audio.
27
+ - Do not upload raw sensitive artifacts.
28
+ - Keep datasets private until licenses and consent are verified.
29
+ - Use manifests for model files and artifacts.
30
+
LEAKAGE_RULES.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEAKAGE_RULES.md
2
+
3
+ These rules apply to every project using temporal data, prediction, simulation, backtesting, ranking or historical evaluation.
4
+
5
+ ## Recommended Columns
6
+
7
+ - `source_published_at`
8
+ - `source_ingested_at`
9
+ - `available_at`
10
+ - `prediction_time`
11
+ - `target_time`
12
+ - `source_url`
13
+ - `source_name`
14
+
15
+ ## Central Rule
16
+
17
+ `available_at <= prediction_time`
18
+
19
+ If a feature was not available at prediction time, it must not be used.
20
+
21
+ ## Prohibitions
22
+
23
+ - No future information in prediction features.
24
+ - No labels inside prediction features.
25
+ - No survivorship bias.
26
+ - No look-ahead bias.
27
+ - No backtest without walk-forward or time-aware validation.
28
+ - No random split when temporal order matters.
29
+ - No corrected historical data without recording when the correction became available.
30
+
31
+ ## Trading-Agent Example
32
+
33
+ A news article can affect a prediction only if:
34
+
35
+ - `source_published_at` is known.
36
+ - `source_ingested_at` is known.
37
+ - `available_at` is computed.
38
+ - `available_at <= prediction_time`.
39
+ - The target return is stored separately from features.
40
+
41
+ Backtests must be walk-forward and must not rebalance using future prices, future constituents or future news.
42
+
43
+ ## Immobilier-Predictif Example
44
+
45
+ Urbanism permits, demographics and transaction data can affect a prediction only if they were available before `prediction_time`.
46
+
47
+ Do not use final sale price, future renovation, later zoning decisions or post-event news as features for earlier predictions.
48
+
PROJECT_STATE.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PROJECT_STATE.md — Global Memory
2
+
3
+ ## Current Status
4
+
5
+ AGENT_WORKFLOW initialized as a local multi-project agent workflow kit.
6
+
7
+ ## Active Projects
8
+
9
+ - `trading-agent`: financial research and simulation agent, no real trading by default.
10
+ - `voice-protection`: Voice Protection Gateway for defensive audio protection.
11
+ - `immobilier-predictif`: European real estate research and prediction agent.
12
+ - `autre-projet`: generic project template.
13
+
14
+ ## Global Rules
15
+
16
+ - Reuse First.
17
+ - YAGNI, DRY, KISS.
18
+ - Tests required or explicit justification required.
19
+ - Task report required for every task.
20
+ - `PROJECT_STATE.md` update required after every task.
21
+ - Anti-leakage required for temporal data.
22
+ - Security check required for secrets, logs, dependencies and endpoints.
23
+
24
+ ## Known Risks
25
+
26
+ - Temporal leakage in financial and real estate simulations.
27
+ - Overbuilding large modules before requirements are proven.
28
+ - Secret leakage through `.env`, logs or reports.
29
+ - Context drift if task reports and project state are not maintained.
30
+
31
+ ## Next Priorities
32
+
33
+ - Validate Codex compatibility.
34
+ - Validate Claude Code compatibility.
35
+ - Add backup strategy.
36
+ - Add Telegram control plan.
37
+ - Create first implementation tasks per project.
38
+
39
+ ## Recent Task Reports
40
+
41
+ - `reports/task_reports/G-001.md`: initial creation of AGENT_WORKFLOW.
42
+ - Hugging Face repos created under `simonlesaumon`; see `HF_REPOS.md`.
43
+
44
+ ## Migration Notes
45
+
46
+ - The folder is portable to VPS or mini-server.
47
+ - Use `.env.example` only as a template.
48
+ - Prefer Tailscale or Cloudflare Tunnel for remote access.
49
+ - Add `rclone` backups before production use.
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AGENT_WORKFLOW
2
+
3
+ AGENT_WORKFLOW est un kit local de workflow agentique pour piloter plusieurs projets avec Codex, Claude Code ou un autre agent de code. Il fournit des règles communes, des skills, des templates, un registre de tâches, une mémoire projet courte et des rapports de tâches obligatoires.
4
+
5
+ Le workflow vise quatre projets initiaux: `trading-agent`, `voice-protection`, `immobilier-predictif` et `autre-projet`. Il reste générique et peut être déplacé plus tard sur un VPS ou un mini-serveur.
6
+
7
+ ## Workflow Resume
8
+
9
+ Plan -> Search -> Reuse Decision -> Minimal Design -> Code -> Tests -> Leak/Security Audit -> Task Report -> Compress Context -> Review -> Merge
10
+
11
+ ## Utilisation Avec Codex
12
+
13
+ 1. Place-toi dans `AGENT_WORKFLOW` ou dans `AGENT_WORKFLOW/projects/<project>`.
14
+ 2. Lance Codex depuis ce dossier.
15
+ 3. Codex doit lire `AGENTS.md`, `WORKFLOW.md`, `PROJECT_STATE.md` et `TASK_REGISTRY.md`.
16
+ 4. Pour chaque tâche, donne un ID du registre, par exemple `T-001`.
17
+ 5. Exige un rapport dans `reports/task_reports/TASK_ID.md`.
18
+
19
+ Codex doit toujours appliquer Reuse First, limiter le scope, lancer ou documenter les tests, vérifier secrets et leakage, puis mettre à jour `PROJECT_STATE.md`.
20
+
21
+ ## Utilisation Avec Claude Code
22
+
23
+ 1. Place-toi dans `AGENT_WORKFLOW` ou dans le dossier projet.
24
+ 2. Lance Claude Code.
25
+ 3. Claude Code doit lire `CLAUDE.md`, puis suivre `WORKFLOW.md`.
26
+ 4. Une seule tâche doit être active à la fois.
27
+ 5. Claude Code doit produire un résumé avant code et un task report après travail.
28
+
29
+ ## Creer Un Nouveau Projet
30
+
31
+ 1. Copier `projects/autre-projet` vers `projects/nom-du-projet`.
32
+ 2. Mettre à jour `PROJECT_STATE.md`, `TASK_REGISTRY.md`, `AGENTS.md` et `CLAUDE.md`.
33
+ 3. Ajouter les règles spécifiques du domaine, notamment `LEAKAGE_RULES.md` si le projet utilise des données temporelles.
34
+ 4. Ajouter les tâches initiales dans le registre global et le registre projet.
35
+
36
+ ## Lancer Une Tache
37
+
38
+ 1. Choisir un ID dans `TASK_REGISTRY.md`.
39
+ 2. Décrire l’objectif, les non-goals et la sortie attendue.
40
+ 3. Demander à l’agent d’appliquer les 9 gates de `WORKFLOW.md`.
41
+ 4. Vérifier le rapport généré dans `reports/task_reports/`.
42
+ 5. Passer la tâche en `review` ou `done`.
43
+
44
+ ## Regles Pour Les Agents
45
+
46
+ - Lire l’état projet avant toute action.
47
+ - Chercher le code existant avant de créer.
48
+ - Réutiliser ou modifier avant de construire.
49
+ - Garder le design minimal.
50
+ - Ne modifier que les fichiers autorisés.
51
+ - Documenter les commandes et tests.
52
+ - Ne jamais stocker de secrets.
53
+ - Bloquer si risque de leakage temporel.
54
+ - Mettre à jour `PROJECT_STATE.md`.
55
+
56
+ ## Migration VPS Ou Mini-Serveur
57
+
58
+ Le dossier peut être copié tel quel sur un serveur. Avant migration:
59
+
60
+ - Remplacer les secrets par des variables d’environnement.
61
+ - Utiliser `.env.example` comme modèle seulement.
62
+ - Ajouter des backups avec `rclone`.
63
+ - Préférer Tailscale ou Cloudflare Tunnel à l’ouverture directe de ports.
64
+ - Vérifier les permissions fichiers.
65
+ - Lancer les agents dans des worktrees ou dossiers isolés.
66
+
67
+ ## Premiere Verification
68
+
69
+ Après création ou migration, lancer:
70
+
71
+ ```bash
72
+ git status
73
+ rg "API_KEY|TOKEN|SECRET|PASSWORD" .
74
+ rg "TODO|PLACEHOLDER" .
75
+ ```
76
+
SECURITY_RULES.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SECURITY_RULES.md
2
+
3
+ ## Secrets
4
+
5
+ - Never commit `.env`.
6
+ - Never display tokens in logs, reports or screenshots.
7
+ - Use `.env.example` for variable names only.
8
+ - Use environment variables for runtime secrets.
9
+ - Rotate any secret that may have been exposed.
10
+
11
+ ## Files And Permissions
12
+
13
+ - Restrict private key permissions.
14
+ - Keep SSH keys outside the repository.
15
+ - Keep secrets in a dedicated secret manager or protected environment file.
16
+ - Do not store tokens in task reports.
17
+
18
+ ## SSH
19
+
20
+ - Use key-based auth.
21
+ - Disable password SSH on servers when possible.
22
+ - Use non-root users for deployments.
23
+
24
+ ## Backups
25
+
26
+ - Use local and remote backups.
27
+ - Prefer `rclone` to a private remote.
28
+ - Test restore procedures.
29
+ - Do not backup raw secrets into broad shared storage.
30
+
31
+ ## Telegram Bot Security
32
+
33
+ - Store `TELEGRAM_BOT_TOKEN` only in environment variables.
34
+ - Enforce `TELEGRAM_ALLOWED_USER_IDS`.
35
+ - Require confirmation for dangerous actions.
36
+ - Log commands without secrets.
37
+ - Rate limit actions.
38
+
39
+ ## Remote Access
40
+
41
+ - Prefer Cloudflare Tunnel or Tailscale.
42
+ - Avoid direct port exposure unless necessary.
43
+ - Put authentication in front of dashboards.
44
+
SKILLS.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SKILLS.md
2
+
3
+ ## reuse_first
4
+
5
+ - Purpose: force search and reuse before coding.
6
+ - Use when: starting any implementation task.
7
+ - Input: task goal, codebase path, expected output.
8
+ - Output: search commands, reusable components, reuse decision.
9
+
10
+ ## task_report
11
+
12
+ - Purpose: create a durable audit trail for each task.
13
+ - Use when: finishing or blocking a task.
14
+ - Input: task ID, changed files, commands, tests, risks.
15
+ - Output: `reports/task_reports/TASK_ID.md`.
16
+
17
+ ## code_review
18
+
19
+ - Purpose: review code for correctness, scope and quality.
20
+ - Use when: before merge or when asked for review.
21
+ - Input: diff, task report, tests.
22
+ - Output: findings, risks, approval/blocking decision.
23
+
24
+ ## context_compression
25
+
26
+ - Purpose: keep memory short and useful.
27
+ - Use when: after task completion or long sessions.
28
+ - Input: conversation, decisions, changed files, risks.
29
+ - Output: updated `PROJECT_STATE.md`.
30
+
31
+ ## anti_leakage
32
+
33
+ - Purpose: prevent temporal/data leakage.
34
+ - Use when: project uses prediction, simulations or historical data.
35
+ - Input: schemas, feature definitions, split logic, backtest logic.
36
+ - Output: pass/fail leakage audit and required fixes.
37
+
38
+ ## security_check
39
+
40
+ - Purpose: prevent secret and infrastructure mistakes.
41
+ - Use when: any code touches config, deployment, logs, APIs or auth.
42
+ - Input: diff, env files, logs, deployment config.
43
+ - Output: pass/fail security audit.
44
+
45
+ ## docker_deploy
46
+
47
+ - Purpose: define minimal Docker deployment.
48
+ - Use when: adding containers, compose or server deployment.
49
+ - Input: services, ports, volumes, healthchecks.
50
+ - Output: minimal Dockerfile/compose plan and checks.
51
+
52
+ ## telegram_control
53
+
54
+ - Purpose: safely control agents through Telegram.
55
+ - Use when: adding bot control or remote commands.
56
+ - Input: allowed commands, user IDs, risk level.
57
+ - Output: safe command policy and implementation checklist.
58
+
TASK_REGISTRY.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TASK_REGISTRY.md — Global
2
+
3
+ ## ID Conventions
4
+
5
+ - `G-xxx`: global workflow tasks
6
+ - `T-xxx`: trading-agent tasks
7
+ - `V-xxx`: voice-protection tasks
8
+ - `I-xxx`: immobilier-predictif tasks
9
+ - `O-xxx`: autre-projet tasks
10
+
11
+ ## Statuses
12
+
13
+ - `todo`
14
+ - `in_progress`
15
+ - `blocked`
16
+ - `review`
17
+ - `done`
18
+
19
+ ## Backlog
20
+
21
+ | ID | Status | Project | Title | Notes |
22
+ | --- | --- | --- | --- | --- |
23
+ | G-001 | done | global | Create local workflow kit | Initial creation of AGENT_WORKFLOW. |
24
+ | G-002 | todo | global | Validate Codex compatibility | Check AGENTS.md behavior and task loop. |
25
+ | G-003 | todo | global | Validate Claude Code compatibility | Check CLAUDE.md behavior and task loop. |
26
+ | G-004 | todo | global | Add backup strategy | Define rclone and local backup policy. |
27
+ | G-005 | todo | global | Add Telegram control plan | Define safe command control model. |
28
+ | T-001 | todo | trading-agent | Create trading-agent skeleton | Add initial app structure when requested. |
29
+ | V-001 | todo | voice-protection | Create voice-protection skeleton | Add initial gateway skeleton when requested. |
30
+ | I-001 | todo | immobilier-predictif | Create immobilier-predictif skeleton | Add initial research skeleton when requested. |
WORKFLOW.md ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WORKFLOW.md
2
+
3
+ AGENT_WORKFLOW uses nine gates. A task cannot be considered done unless each gate is completed or explicitly justified.
4
+
5
+ ## Gate 1 — Understand
6
+
7
+ - Define the goal.
8
+ - Define non-goals.
9
+ - Define expected output.
10
+ - Identify project and task ID.
11
+ - Confirm constraints, data sensitivity and deployment target.
12
+
13
+ ## Gate 2 — Search Existing Code
14
+
15
+ Use `rg`, `find`, `ls`, `tree` or equivalent commands.
16
+
17
+ Search for:
18
+
19
+ - existing functions
20
+ - schemas
21
+ - tests
22
+ - conventions
23
+ - configs
24
+ - scripts
25
+ - similar reports or ADRs
26
+
27
+ Document commands used and files found.
28
+
29
+ ## Gate 3 — Reuse Decision
30
+
31
+ Choose exactly one:
32
+
33
+ - Reuse existing function.
34
+ - Modify existing function.
35
+ - Build small module.
36
+ - Stop because unnecessary.
37
+
38
+ The decision must include a reason. Building is allowed only when reuse or modification is not appropriate.
39
+
40
+ ## Gate 4 — Minimal Design
41
+
42
+ Write a short design:
43
+
44
+ - files allowed to edit
45
+ - behavior change
46
+ - tests to run
47
+ - known risks
48
+ - rollback path if relevant
49
+
50
+ No global refactor without explicit task scope.
51
+
52
+ ## Gate 5 — Implement Only Assigned Files
53
+
54
+ - Keep strict scope.
55
+ - Do not edit unrelated files.
56
+ - Do not perform global formatting unless requested.
57
+ - Do not rename public APIs unless the task requires it.
58
+ - Keep modules small and readable.
59
+
60
+ ## Gate 6 — Tests
61
+
62
+ Run relevant tests:
63
+
64
+ - unit tests
65
+ - integration tests
66
+ - smoke tests
67
+ - lint/type checks when available
68
+
69
+ Document exact commands. If tests cannot run, explain why and what should be run next.
70
+
71
+ ## Gate 7 — Anti-Leakage / Security Check
72
+
73
+ For temporal data:
74
+
75
+ - verify `available_at <= prediction_time`
76
+ - verify no future data enters features
77
+ - verify labels are not used as prediction features
78
+ - verify train/test split is temporal when needed
79
+ - verify backtests are walk-forward
80
+
81
+ For security:
82
+
83
+ - no secrets
84
+ - no tokens in logs
85
+ - no `.env` committed
86
+ - no direct port exposure unless justified
87
+ - no complete article/content storage without validation
88
+
89
+ Block the task if leakage or secret exposure is detected.
90
+
91
+ ## Gate 8 — Task Report + Context Compression
92
+
93
+ Write `reports/task_reports/TASK_ID.md` with:
94
+
95
+ - goal
96
+ - non-goals
97
+ - summary
98
+ - files changed
99
+ - commands run
100
+ - tests
101
+ - reuse decision
102
+ - risks
103
+ - security/leakage check
104
+ - remaining work
105
+ - next recommended task
106
+
107
+ Update `PROJECT_STATE.md` with only durable information: decisions, changed files, current risks, next tasks and recent reports.
108
+
109
+ ## Gate 9 — Review + Merge
110
+
111
+ Reviewer checklist:
112
+
113
+ - scope respected
114
+ - reuse decision documented
115
+ - tests pass or failure is understood
116
+ - no secrets
117
+ - no leakage
118
+ - docs updated
119
+ - task report complete
120
+ - project state updated
121
+
122
+ Merge is blocked if tests, leakage, security or scope checks fail.
123
+
124
+ ## Mermaid Workflow
125
+
126
+ ```mermaid
127
+ flowchart TD
128
+ A[Gate 1 Understand] --> B[Gate 2 Search Existing Code]
129
+ B --> C[Gate 3 Reuse Decision]
130
+ C -->|reuse| D[Gate 4 Minimal Design]
131
+ C -->|modify| D
132
+ C -->|build small module| D
133
+ C -->|stop unnecessary| R[Report Stop Decision]
134
+ D --> E[Gate 5 Implement Assigned Files]
135
+ E --> F[Gate 6 Tests]
136
+ F --> G[Gate 7 Leakage and Security Check]
137
+ G -->|pass| H[Gate 8 Task Report and Context Compression]
138
+ G -->|fail| X[Block and Fix]
139
+ X --> E
140
+ H --> I[Gate 9 Review and Merge]
141
+ I -->|approved| J[Merge]
142
+ I -->|changes requested| E
143
+ ```
144
+
docs/architecture/BASE_ARCHITECTURE.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BASE_ARCHITECTURE.md
2
+
3
+ ## Components
4
+
5
+ ### Orchestrator
6
+
7
+ Coordinates tasks, selects agents, enforces workflow gates and tracks status.
8
+
9
+ ### Codebase Scout
10
+
11
+ Searches existing code, docs and tests before implementation.
12
+
13
+ ### Data Agent
14
+
15
+ Handles datasets, schemas, temporal metadata and anti-leakage checks.
16
+
17
+ ### Code Agent
18
+
19
+ Implements scoped changes after the reuse decision and minimal design.
20
+
21
+ ### Reviewer
22
+
23
+ Checks correctness, scope, security, tests and leakage before merge.
24
+
25
+ ### Context Compressor
26
+
27
+ Updates `PROJECT_STATE.md` with durable memory and removes conversation noise.
28
+
29
+ ### Storage
30
+
31
+ Stores project files, reports, templates, ADRs and local configuration.
32
+
33
+ ### Reports
34
+
35
+ Task reports live under `reports/task_reports/` and provide the audit trail.
36
+
37
+ ### Project State
38
+
39
+ `PROJECT_STATE.md` is the short memory read before every task.
40
+
41
+ ## Mermaid Architecture
42
+
43
+ ```mermaid
44
+ flowchart LR
45
+ U[User] --> O[Orchestrator]
46
+ O --> S[Codebase Scout]
47
+ S --> O
48
+ O --> D[Data Agent]
49
+ O --> C[Code Agent]
50
+ C --> T[Tests]
51
+ D --> L[Leakage Audit]
52
+ C --> R[Reviewer]
53
+ L --> R
54
+ T --> R
55
+ R --> TR[Task Reports]
56
+ R --> PS[Project State]
57
+ PS --> O
58
+ TR --> O
59
+ ```
60
+
docs/decisions/ADR_TEMPLATE.md ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADR-XXX — Title
2
+
3
+ Status:
4
+ Date:
5
+ Project:
6
+
7
+ ## Context
8
+
9
+ ## Decision
10
+
11
+ ## Alternatives considered
12
+
13
+ ## Consequences
14
+
15
+ ## Risks
16
+
17
+ ## Review date
18
+
projects/autre-projet/AGENTS.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AGENTS.md — autre-projet
2
+
3
+ Follow `../../AGENTS.md` and `../../WORKFLOW.md`.
4
+
5
+ ## Generic Rules
6
+
7
+ - Reuse First.
8
+ - Keep scope strict.
9
+ - Add tests or justify missing tests.
10
+ - Add a task report.
11
+ - Update project state.
12
+ - Add `LEAKAGE_RULES.md` if temporal data appears.
13
+
projects/autre-projet/CLAUDE.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # CLAUDE.md — autre-projet
2
+
3
+ Follow `../../CLAUDE.md`.
4
+
5
+ This is a generic project template. Claude Code must work one task at a time, search before coding and keep changes minimal.
6
+
projects/autre-projet/PROJECT_STATE.md ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PROJECT_STATE.md — autre-projet
2
+
3
+ ## Current Status
4
+
5
+ Generic project template ready.
6
+
7
+ ## Objective
8
+
9
+ Provide a reusable project shell for future work.
10
+
11
+ ## Durable Rules
12
+
13
+ - Reuse First.
14
+ - Strict scope.
15
+ - Tests or justification.
16
+ - Task report and project state update required.
17
+
18
+ ## Known Risks
19
+
20
+ - Scope creep from undefined requirements.
21
+
22
+ ## Next Priorities
23
+
24
+ - O-001 Rename and specialize this project template.
25
+
26
+ ## Recent Task Reports
27
+
28
+ - None yet.
29
+
projects/autre-projet/TASK_REGISTRY.md ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # TASK_REGISTRY.md — autre-projet
2
+
3
+ | ID | Status | Title | Notes |
4
+ | --- | --- | --- | --- |
5
+ | O-001 | todo | Rename and specialize project | Copy template before editing. |
6
+ | O-002 | todo | Define project-specific rules | Add leakage/security rules if needed. |
7
+ | O-003 | todo | Create initial skeleton | After objective is clear. |
8
+
projects/autre-projet/docs/decisions/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
projects/autre-projet/reports/task_reports/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
projects/immobilier-predictif/AGENTS.md ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AGENTS.md — immobilier-predictif
2
+
3
+ Follow `../../AGENTS.md` and `../../WORKFLOW.md`.
4
+
5
+ ## Project Scope
6
+
7
+ Build a European real estate research and prediction agent.
8
+
9
+ ## Rules
10
+
11
+ - Strict historical anti-leakage.
12
+ - No future information in simulations.
13
+ - Use temporal train/test split.
14
+ - Track availability of urbanism, news, demographics and transaction sources.
15
+ - Record `source_url`, `source_name`, `source_published_at`, `source_ingested_at`, `available_at`.
16
+ - Predictions must be presented as estimates, not guarantees.
17
+
projects/immobilier-predictif/CLAUDE.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CLAUDE.md — immobilier-predictif
2
+
3
+ Follow `../../CLAUDE.md`.
4
+
5
+ Claude Code must treat this as a temporal prediction project. Leakage checks are mandatory.
6
+
7
+ ## Rules
8
+
9
+ - One task at a time.
10
+ - Search existing schema or feature logic before creating.
11
+ - Use temporal splits for evaluation.
12
+ - Update task report and project state.
13
+
projects/immobilier-predictif/LEAKAGE_RULES.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEAKAGE_RULES.md — immobilier-predictif
2
+
3
+ ## Central Rule
4
+
5
+ `available_at <= prediction_time`
6
+
7
+ ## Required Columns
8
+
9
+ - `source_published_at`
10
+ - `source_ingested_at`
11
+ - `available_at`
12
+ - `prediction_time`
13
+ - `target_time`
14
+ - `source_url`
15
+ - `source_name`
16
+
17
+ ## Prohibited
18
+
19
+ - Final sale prices as features for earlier predictions.
20
+ - Future zoning decisions in historical simulations.
21
+ - Future infrastructure announcements in earlier predictions.
22
+ - Random split for temporal evaluation.
23
+ - Corrected data without availability tracking.
24
+
25
+ ## Sources
26
+
27
+ Track availability for:
28
+
29
+ - urbanism permits
30
+ - zoning changes
31
+ - local news
32
+ - demographics
33
+ - transaction records
34
+ - interest-rate or macro data
35
+
projects/immobilier-predictif/PROJECT_STATE.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PROJECT_STATE.md — immobilier-predictif
2
+
3
+ ## Current Status
4
+
5
+ Initial project shell created. No application code exists yet.
6
+
7
+ ## Objective
8
+
9
+ Build a European real estate research and prediction agent using urbanism, news, demographics and market data with strict historical leakage control.
10
+
11
+ ## Durable Rules
12
+
13
+ - `available_at <= prediction_time`.
14
+ - No future zoning, sale or demographic data in earlier predictions.
15
+ - Temporal train/test separation.
16
+ - Predictions are estimates.
17
+
18
+ ## Known Risks
19
+
20
+ - Historical data revisions without availability timestamps.
21
+ - Future sale prices leaking into features.
22
+ - Regional source inconsistency across Europe.
23
+
24
+ ## Next Priorities
25
+
26
+ - I-001 Create immobilier-predictif skeleton.
27
+ - Define source registry.
28
+ - Define temporal schema.
29
+
30
+ ## Recent Task Reports
31
+
32
+ - None yet.
33
+
projects/immobilier-predictif/TASK_REGISTRY.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # TASK_REGISTRY.md — immobilier-predictif
2
+
3
+ | ID | Status | Title | Notes |
4
+ | --- | --- | --- | --- |
5
+ | I-001 | todo | Create immobilier-predictif skeleton | Research agent first. |
6
+ | I-002 | todo | Define source registry | Urbanism, news, demographics. |
7
+ | I-003 | todo | Define temporal schema | Include `available_at`. |
8
+ | I-004 | todo | Define temporal validation | No random split. |
9
+
projects/immobilier-predictif/docs/decisions/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
projects/immobilier-predictif/reports/task_reports/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
projects/trading-agent/AGENTS.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AGENTS.md — trading-agent
2
+
3
+ Follow `../../AGENTS.md` and `../../WORKFLOW.md`.
4
+
5
+ ## Trading Rules
6
+
7
+ - No real trading by default.
8
+ - No automatic financial advice without clear disclaimer.
9
+ - Simulations must be labeled as research or backtest.
10
+ - Walk-forward backtesting is required.
11
+ - No future data in features.
12
+ - Store news metadata only unless content storage is explicitly validated.
13
+ - Required news fields: `source_url`, `published_at`, `ingested_at`, `available_at`.
14
+ - Labels must be separated from features.
15
+ - Block work if temporal availability is unclear.
16
+
17
+ ## Required Pre-Code Checks
18
+
19
+ - Search existing strategy, data, feature and backtest code.
20
+ - Confirm leakage rules.
21
+ - Define tests and smoke checks.
22
+
projects/trading-agent/CLAUDE.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CLAUDE.md — trading-agent
2
+
3
+ Follow `../../CLAUDE.md`.
4
+
5
+ Claude Code must treat this as a financial research project, not a live trading system.
6
+
7
+ ## Rules
8
+
9
+ - One task at a time.
10
+ - No real broker execution unless a future task explicitly enables it with review.
11
+ - Add disclaimer to user-facing financial outputs.
12
+ - Use walk-forward validation for backtests.
13
+ - Keep targets and labels separate from features.
14
+ - Update `PROJECT_STATE.md` and task report after every task.
15
+
projects/trading-agent/LEAKAGE_RULES.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEAKAGE_RULES.md — trading-agent
2
+
3
+ ## Central Rule
4
+
5
+ `available_at <= prediction_time`
6
+
7
+ ## Required Columns
8
+
9
+ - `source_url`
10
+ - `source_name`
11
+ - `published_at`
12
+ - `ingested_at`
13
+ - `available_at`
14
+ - `prediction_time`
15
+ - `target_time`
16
+
17
+ ## Prohibited
18
+
19
+ - Real trading in initial phase.
20
+ - Future prices in features.
21
+ - Future news in features.
22
+ - Labels inside feature tables.
23
+ - Backtests without walk-forward validation.
24
+ - Current universe used for historical constituent membership without timestamping.
25
+
26
+ ## News Storage
27
+
28
+ Store metadata by default:
29
+
30
+ - URL
31
+ - source
32
+ - title or short summary
33
+ - published timestamp
34
+ - ingested timestamp
35
+ - availability timestamp
36
+
37
+ Do not store full articles unless copyright and storage policy are validated.
38
+
projects/trading-agent/PROJECT_STATE.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PROJECT_STATE.md — trading-agent
2
+
3
+ ## Current Status
4
+
5
+ Initial project shell created. No application code exists yet.
6
+
7
+ ## Objective
8
+
9
+ Build a financial research and simulation agent with strict anti-leakage rules before any live trading capability.
10
+
11
+ ## Durable Rules
12
+
13
+ - No real trading at the start.
14
+ - No automatic financial advice without disclaimer.
15
+ - Walk-forward backtests only.
16
+ - `available_at <= prediction_time`.
17
+ - News storage is metadata-first.
18
+ - Labels are separated from features.
19
+
20
+ ## Known Risks
21
+
22
+ - Look-ahead bias from future prices or news.
23
+ - Survivorship bias from current index constituents.
24
+ - Accidental storage of copyrighted full articles.
25
+ - Overfitting strategy logic before data quality is proven.
26
+
27
+ ## Next Priorities
28
+
29
+ - T-001 Create trading-agent skeleton.
30
+ - Define data schema with availability timestamps.
31
+ - Define walk-forward backtest harness.
32
+
33
+ ## Recent Task Reports
34
+
35
+ - None yet.
36
+
projects/trading-agent/TASK_REGISTRY.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # TASK_REGISTRY.md — trading-agent
2
+
3
+ | ID | Status | Title | Notes |
4
+ | --- | --- | --- | --- |
5
+ | T-001 | todo | Create trading-agent skeleton | No broker integration. |
6
+ | T-002 | todo | Define temporal data schema | Include `available_at`. |
7
+ | T-003 | todo | Build walk-forward backtest plan | No random temporal split. |
8
+ | T-004 | todo | Add news metadata ingestion plan | Metadata only by default. |
9
+
projects/trading-agent/docs/decisions/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
projects/trading-agent/reports/task_reports/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
projects/voice-protection/AGENTS.md ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AGENTS.md — voice-protection
2
+
3
+ Follow `../../AGENTS.md` and `../../WORKFLOW.md`.
4
+
5
+ ## Project Scope
6
+
7
+ Build a Voice Protection Gateway: audio voice input goes through defensive protection and produces protected audio output.
8
+
9
+ ## Rules
10
+
11
+ - Defensive use only.
12
+ - No malicious usage.
13
+ - No voice cloning.
14
+ - No impersonation tooling.
15
+ - Include watermark, perturbation, scoring and red-team loop concepts.
16
+ - Tests must include robustness checks when audio transforms are implemented.
17
+ - Do not store raw sensitive audio longer than needed.
18
+
projects/voice-protection/CLAUDE.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CLAUDE.md — voice-protection
2
+
3
+ Follow `../../CLAUDE.md`.
4
+
5
+ Claude Code must keep this project defensive. Do not implement voice cloning, impersonation or bypass tooling.
6
+
7
+ ## Required Behavior
8
+
9
+ - Work one task at a time.
10
+ - Summarize protection goal before code.
11
+ - Keep audio processing scoped and testable.
12
+ - Update task report and project state.
13
+
projects/voice-protection/PROJECT_STATE.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PROJECT_STATE.md — voice-protection
2
+
3
+ ## Current Status
4
+
5
+ Initial project shell created. No application code exists yet.
6
+
7
+ ## Objective
8
+
9
+ Create a Voice Protection Gateway that transforms voice audio into protected audio using watermarking, perturbations, scoring and red-team evaluation.
10
+
11
+ ## Durable Rules
12
+
13
+ - Defensive use only.
14
+ - No voice cloning.
15
+ - No impersonation.
16
+ - Protect sensitive audio.
17
+ - Robustness tests required for transforms.
18
+
19
+ ## Known Risks
20
+
21
+ - Misuse for cloning or evasion.
22
+ - Privacy risk from raw audio retention.
23
+ - False confidence in protection scoring.
24
+
25
+ ## Next Priorities
26
+
27
+ - V-001 Create voice-protection skeleton.
28
+ - Define audio input/output contract.
29
+ - Define red-team scoring protocol.
30
+
31
+ ## Recent Task Reports
32
+
33
+ - None yet.
34
+
projects/voice-protection/TASK_REGISTRY.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # TASK_REGISTRY.md — voice-protection
2
+
3
+ | ID | Status | Title | Notes |
4
+ | --- | --- | --- | --- |
5
+ | V-001 | todo | Create voice-protection skeleton | Defensive gateway only. |
6
+ | V-002 | todo | Define audio I/O contract | Include supported formats. |
7
+ | V-003 | todo | Define watermark strategy | No secrets in code. |
8
+ | V-004 | todo | Define robustness tests | Transform and scoring checks. |
9
+
projects/voice-protection/docs/decisions/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
projects/voice-protection/reports/task_reports/.gitkeep ADDED
@@ -0,0 +1 @@
 
 
1
+
reports/task_reports/G-001.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Task Report — G-001
2
+
3
+ Status: done
4
+ Date: 2026-07-01
5
+ Project: global
6
+ Owner: YOYO
7
+ Reviewer: pending
8
+
9
+ ## Goal
10
+
11
+ Create a complete local agent workflow kit for Codex, Claude Code, multiple projects, skills, task reports, task registry, short project memory and strict quality rules.
12
+
13
+ ## Non-goals
14
+
15
+ - No real project application code.
16
+ - No API keys, tokens or secrets.
17
+ - No live deployment.
18
+ - No destructive modification of existing files.
19
+
20
+ ## Summary
21
+
22
+ Created the `AGENT_WORKFLOW` directory with global workflow files, skills, templates, architecture docs, report templates and four initial project profiles.
23
+
24
+ ## Files changed
25
+
26
+ All files under `AGENT_WORKFLOW/` were created for the initial kit.
27
+
28
+ ## Commands run
29
+
30
+ - `Get-ChildItem -Force`
31
+ - `Test-Path AGENT_WORKFLOW`
32
+ - `git rev-parse --show-toplevel`
33
+ - `New-Item -ItemType Directory -Force ...`
34
+
35
+ ## Tests
36
+
37
+ No automated test suite exists for this Markdown-only kit. Verification performed with filesystem creation and later repository/search checks.
38
+
39
+ ## Reuse decision
40
+
41
+ Decision: build
42
+
43
+ Reason: no existing `AGENT_WORKFLOW` directory was present in the workspace.
44
+
45
+ ## Risks
46
+
47
+ - Future agents must keep project-specific files updated.
48
+ - Markdown rules need human review before production deployment.
49
+
50
+ ## Security / leakage check
51
+
52
+ No real secrets were added. `.env.example` contains empty variable names only. Leakage rules were created for temporal-data projects.
53
+
54
+ ## What remains
55
+
56
+ - Validate Codex behavior.
57
+ - Validate Claude Code behavior.
58
+ - Define backup implementation.
59
+ - Define Telegram control implementation.
60
+
61
+ ## Next recommended task
62
+
63
+ G-002 Validate Codex compatibility.
64
+
65
+ ## Project state update needed
66
+
67
+ Completed. Global `PROJECT_STATE.md` and `TASK_REGISTRY.md` were updated.
68
+
reports/task_reports/TEMPLATE.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Task Report — TASK_ID
2
+
3
+ Status:
4
+ Date:
5
+ Project:
6
+ Owner:
7
+ Reviewer:
8
+
9
+ ## Goal
10
+
11
+ ## Non-goals
12
+
13
+ ## Summary
14
+
15
+ ## Files changed
16
+
17
+ ## Commands run
18
+
19
+ ## Tests
20
+
21
+ ## Reuse decision
22
+
23
+ ## Risks
24
+
25
+ ## Security / leakage check
26
+
27
+ ## What remains
28
+
29
+ ## Next recommended task
30
+
31
+ ## Project state update needed
32
+
skills/anti_leakage/SKILL.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: anti_leakage
3
+ description: Check temporal data, features, labels, splits and backtests for leakage.
4
+ ---
5
+
6
+ # anti_leakage
7
+
8
+ ## Purpose
9
+
10
+ Prevent invalid prediction and simulation results.
11
+
12
+ ## Required Checks
13
+
14
+ - Every temporal feature has availability metadata.
15
+ - `available_at <= prediction_time`.
16
+ - Labels are separated from features.
17
+ - Train/test split respects time.
18
+ - Backtests are walk-forward.
19
+ - No future constituents or corrected data are used without availability timestamps.
20
+ - Evaluation code cannot access target-period data during feature construction.
21
+
22
+ ## Blocking Conditions
23
+
24
+ Block the task if:
25
+
26
+ - availability is unknown
27
+ - future data can enter features
28
+ - labels are mixed into features
29
+ - random split is used where time matters
30
+ - backtest uses look-ahead information
31
+
32
+ ## Output
33
+
34
+ ```markdown
35
+ ## Leakage Audit
36
+ Status: pass / fail
37
+ Checks:
38
+ Risks:
39
+ Required fixes:
40
+ ```
41
+
skills/code_review/SKILL.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: code_review
3
+ description: Review scope, correctness, tests, security and maintainability before merge.
4
+ ---
5
+
6
+ # code_review
7
+
8
+ ## Purpose
9
+
10
+ Block risky changes and keep the codebase maintainable.
11
+
12
+ ## Checklist
13
+
14
+ - Scope matches the task.
15
+ - Existing code search is documented.
16
+ - Reuse decision is justified.
17
+ - Tests are present or missing tests are justified.
18
+ - Security risks are checked.
19
+ - Temporal leakage is checked when relevant.
20
+ - Duplication is avoided.
21
+ - Architecture stays simple.
22
+ - Performance impact is understood.
23
+ - Docs and task report are updated.
24
+
25
+ ## Output
26
+
27
+ Return findings first, ordered by severity:
28
+
29
+ ```markdown
30
+ ## Findings
31
+ - Severity: file:line — issue and impact
32
+
33
+ ## Questions
34
+
35
+ ## Verdict
36
+ approve / request changes / block
37
+ ```
38
+
skills/context_compression/SKILL.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: context_compression
3
+ description: Compress task context into durable project state without conversation noise.
4
+ ---
5
+
6
+ # context_compression
7
+
8
+ ## Purpose
9
+
10
+ Keep the project memory short and useful.
11
+
12
+ ## Keep
13
+
14
+ - decisions
15
+ - changed files
16
+ - task IDs
17
+ - risks
18
+ - test status
19
+ - next tasks
20
+ - links to task reports
21
+
22
+ ## Remove
23
+
24
+ - conversation noise
25
+ - abandoned ideas
26
+ - repeated command output
27
+ - temporary debugging details
28
+
29
+ ## Required Action
30
+
31
+ Update `PROJECT_STATE.md` after the task report is written.
32
+
33
+ ## Output Shape
34
+
35
+ ```markdown
36
+ ## Current Status
37
+ ## Recent Task Reports
38
+ ## Known Risks
39
+ ## Next Priorities
40
+ ```
41
+
skills/docker_deploy/SKILL.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: docker_deploy
3
+ description: Define minimal Docker and Docker Compose deployments with safe defaults.
4
+ ---
5
+
6
+ # docker_deploy
7
+
8
+ ## Purpose
9
+
10
+ Deploy services with small, understandable Docker configuration.
11
+
12
+ ## Rules
13
+
14
+ - Keep Dockerfiles minimal.
15
+ - Use `.dockerignore`.
16
+ - Use `docker-compose.yml` for local multi-service runs.
17
+ - Mount volumes only when needed.
18
+ - Store secrets in environment variables, never in images.
19
+ - Use restart policies for long-running services.
20
+ - Add healthchecks for services.
21
+ - Route logs to stdout/stderr.
22
+ - Avoid exposing ports publicly unless required.
23
+
24
+ ## Compose Defaults
25
+
26
+ - `restart: unless-stopped`
27
+ - named volumes for persistent data
28
+ - explicit ports
29
+ - no hardcoded secrets
30
+ - healthcheck for web/API services
31
+
32
+ ## Output
33
+
34
+ ```markdown
35
+ ## Docker Deployment Plan
36
+ Services:
37
+ Ports:
38
+ Volumes:
39
+ Secrets:
40
+ Healthchecks:
41
+ Risks:
42
+ ```
43
+
skills/reuse_first/SKILL.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: reuse_first
3
+ description: Search and reuse existing code before creating anything new.
4
+ ---
5
+
6
+ # reuse_first
7
+
8
+ ## Purpose
9
+
10
+ Prevent duplication, overengineering and unnecessary modules by forcing a search and reuse decision before coding.
11
+
12
+ ## Principles
13
+
14
+ - Reuse First.
15
+ - DRY.
16
+ - YAGNI.
17
+ - KISS.
18
+ - Prefer modifying an existing small component over building a parallel one.
19
+ - Build only when reuse or modification is not appropriate.
20
+
21
+ ## Required Search
22
+
23
+ Run searches for:
24
+
25
+ - similar functions
26
+ - existing schemas
27
+ - tests
28
+ - configs
29
+ - CLI commands
30
+ - docs and ADRs
31
+
32
+ Recommended commands:
33
+
34
+ ```bash
35
+ rg "keyword" .
36
+ rg --files
37
+ find . -maxdepth 3 -type f
38
+ ```
39
+
40
+ ## Required Output
41
+
42
+ ```markdown
43
+ ## Existing Code Search
44
+ Commands used:
45
+ Files found:
46
+ Reusable components:
47
+ Missing components:
48
+
49
+ ## Reuse Decision
50
+ Decision: reuse / modify / build / stop
51
+ Reason:
52
+ ```
53
+
54
+ ## Decision Rules
55
+
56
+ - `reuse`: existing code already solves the need.
57
+ - `modify`: existing code almost solves the need.
58
+ - `build`: no suitable existing code exists and the feature is required.
59
+ - `stop`: requested work is unnecessary, unsafe or out of scope.
60
+
skills/security_check/SKILL.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: security_check
3
+ description: Check secrets, env files, permissions, dependencies, endpoints, logs and tokens.
4
+ ---
5
+
6
+ # security_check
7
+
8
+ ## Purpose
9
+
10
+ Prevent secret exposure and unsafe deployment defaults.
11
+
12
+ ## Checks
13
+
14
+ - No `.env` committed.
15
+ - `.env.example` contains names only.
16
+ - No token, API key, password or private key in files.
17
+ - Logs do not print secrets.
18
+ - Endpoints require auth when needed.
19
+ - Dependencies are necessary and pinned where appropriate.
20
+ - File permissions are appropriate for keys and configs.
21
+ - Dangerous actions require explicit confirmation.
22
+
23
+ ## Recommended Commands
24
+
25
+ ```bash
26
+ rg "API_KEY|TOKEN|SECRET|PASSWORD|PRIVATE KEY" .
27
+ rg ".env" .
28
+ ```
29
+
30
+ ## Output
31
+
32
+ ```markdown
33
+ ## Security Audit
34
+ Status: pass / fail
35
+ Findings:
36
+ Required fixes:
37
+ ```
38
+