flyee 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/bin/install.js +357 -0
- package/bridge/bridge.py +1780 -0
- package/bridge/local_tracker.py +722 -0
- package/core/agents/backend-specialist.md +266 -0
- package/core/agents/code-archaeologist.md +106 -0
- package/core/agents/database-architect.md +226 -0
- package/core/agents/debugger.md +225 -0
- package/core/agents/devops-engineer.md +323 -0
- package/core/agents/documentation-writer.md +104 -0
- package/core/agents/explorer-agent.md +73 -0
- package/core/agents/frontend-specialist.md +743 -0
- package/core/agents/game-developer.md +162 -0
- package/core/agents/mobile-developer.md +377 -0
- package/core/agents/orchestrator.md +416 -0
- package/core/agents/penetration-tester.md +188 -0
- package/core/agents/performance-optimizer.md +187 -0
- package/core/agents/product-manager.md +112 -0
- package/core/agents/product-owner.md +95 -0
- package/core/agents/project-planner.md +470 -0
- package/core/agents/qa-automation-engineer.md +103 -0
- package/core/agents/security-auditor.md +170 -0
- package/core/agents/seo-specialist.md +111 -0
- package/core/agents/stitch-designer.md +190 -0
- package/core/agents/tdd-reviewer.md +282 -0
- package/core/agents/test-engineer.md +158 -0
- package/core/scripts/auto_preview.py +148 -0
- package/core/scripts/checklist.py +243 -0
- package/core/scripts/cost_report.py +149 -0
- package/core/scripts/doc-sync-check.py +461 -0
- package/core/scripts/parse_user_stories.py +79 -0
- package/core/scripts/prepare_notion_updates.py +172 -0
- package/core/scripts/print_create_payload.py +18 -0
- package/core/scripts/session_manager.py +120 -0
- package/core/scripts/task_complete.py +127 -0
- package/core/scripts/verify_all.py +327 -0
- package/core/skills/analytics-strategy/SKILL.md +128 -0
- package/core/skills/api-patterns/SKILL.md +81 -0
- package/core/skills/api-patterns/api-style.md +42 -0
- package/core/skills/api-patterns/auth.md +24 -0
- package/core/skills/api-patterns/documentation.md +26 -0
- package/core/skills/api-patterns/graphql.md +41 -0
- package/core/skills/api-patterns/rate-limiting.md +31 -0
- package/core/skills/api-patterns/response.md +37 -0
- package/core/skills/api-patterns/rest.md +40 -0
- package/core/skills/api-patterns/scripts/api_validator.py +211 -0
- package/core/skills/api-patterns/security-testing.md +122 -0
- package/core/skills/api-patterns/trpc.md +41 -0
- package/core/skills/api-patterns/versioning.md +22 -0
- package/core/skills/app-builder/SKILL.md +75 -0
- package/core/skills/app-builder/agent-coordination.md +71 -0
- package/core/skills/app-builder/feature-building.md +53 -0
- package/core/skills/app-builder/project-detection.md +34 -0
- package/core/skills/app-builder/scaffolding.md +118 -0
- package/core/skills/app-builder/tech-stack.md +40 -0
- package/core/skills/app-builder/templates/SKILL.md +39 -0
- package/core/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/core/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/core/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/core/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/core/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/core/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/core/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/core/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/core/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/core/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/core/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/core/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/core/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/core/skills/architecture/SKILL.md +55 -0
- package/core/skills/architecture/context-discovery.md +43 -0
- package/core/skills/architecture/examples.md +94 -0
- package/core/skills/architecture/pattern-selection.md +68 -0
- package/core/skills/architecture/patterns-reference.md +50 -0
- package/core/skills/architecture/trade-off-analysis.md +77 -0
- package/core/skills/atomic-design/SKILL.md +282 -0
- package/core/skills/atomic-design/references/classification-guide.md +132 -0
- package/core/skills/atomic-design/references/quality-checklist.md +60 -0
- package/core/skills/atomic-design/references/stacks/stack-blade.md +254 -0
- package/core/skills/atomic-design/references/stacks/stack-nextjs.md +272 -0
- package/core/skills/atomic-design/references/stacks/stack-react.md +239 -0
- package/core/skills/atomic-design/references/stacks/stack-vue.md +224 -0
- package/core/skills/bash-linux/SKILL.md +199 -0
- package/core/skills/behavioral-modes/SKILL.md +242 -0
- package/core/skills/brainstorming/SKILL.md +163 -0
- package/core/skills/brainstorming/dynamic-questioning.md +373 -0
- package/core/skills/checkpointing-patterns/SKILL.md +163 -0
- package/core/skills/clean-code/SKILL.md +201 -0
- package/core/skills/code-review-checklist/SKILL.md +109 -0
- package/core/skills/code-truth-validation/SKILL.md +149 -0
- package/core/skills/component-library-discovery/SKILL.md +154 -0
- package/core/skills/content-strategy/SKILL.md +222 -0
- package/core/skills/context-budget/SKILL.md +155 -0
- package/core/skills/context-gathering-patterns/SKILL.md +278 -0
- package/core/skills/cost-tracking/SKILL.md +206 -0
- package/core/skills/database-design/SKILL.md +52 -0
- package/core/skills/database-design/database-selection.md +43 -0
- package/core/skills/database-design/indexing.md +39 -0
- package/core/skills/database-design/migrations.md +48 -0
- package/core/skills/database-design/optimization.md +36 -0
- package/core/skills/database-design/orm-selection.md +30 -0
- package/core/skills/database-design/schema-design.md +56 -0
- package/core/skills/database-design/scripts/schema_validator.py +172 -0
- package/core/skills/deployment-procedures/SKILL.md +295 -0
- package/core/skills/design-md/README.md +34 -0
- package/core/skills/design-md/SKILL.md +172 -0
- package/core/skills/design-md/examples/DESIGN.md +154 -0
- package/core/skills/design-system-enforcement/SKILL.md +339 -0
- package/core/skills/doc.md +177 -0
- package/core/skills/document-registry/SKILL.md +130 -0
- package/core/skills/documentation-publishing/SKILL.md +174 -0
- package/core/skills/documentation-templates/SKILL.md +194 -0
- package/core/skills/enhance-prompt/README.md +34 -0
- package/core/skills/enhance-prompt/SKILL.md +204 -0
- package/core/skills/enhance-prompt/references/KEYWORDS.md +114 -0
- package/core/skills/frontend-design/SKILL.md +430 -0
- package/core/skills/frontend-design/animation-guide.md +331 -0
- package/core/skills/frontend-design/color-system.md +311 -0
- package/core/skills/frontend-design/decision-trees.md +418 -0
- package/core/skills/frontend-design/motion-graphics.md +306 -0
- package/core/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/core/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/core/skills/frontend-design/typography-system.md +345 -0
- package/core/skills/frontend-design/ux-psychology.md +541 -0
- package/core/skills/frontend-design/visual-effects.md +383 -0
- package/core/skills/game-development/2d-games/SKILL.md +119 -0
- package/core/skills/game-development/3d-games/SKILL.md +135 -0
- package/core/skills/game-development/SKILL.md +167 -0
- package/core/skills/game-development/game-art/SKILL.md +185 -0
- package/core/skills/game-development/game-audio/SKILL.md +190 -0
- package/core/skills/game-development/game-design/SKILL.md +129 -0
- package/core/skills/game-development/mobile-games/SKILL.md +108 -0
- package/core/skills/game-development/multiplayer/SKILL.md +132 -0
- package/core/skills/game-development/pc-games/SKILL.md +144 -0
- package/core/skills/game-development/vr-ar/SKILL.md +123 -0
- package/core/skills/game-development/web-games/SKILL.md +150 -0
- package/core/skills/geo-fundamentals/SKILL.md +156 -0
- package/core/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/core/skills/git-workflow/SKILL.md +263 -0
- package/core/skills/history-check-patterns/SKILL.md +125 -0
- package/core/skills/i18n-localization/SKILL.md +154 -0
- package/core/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/core/skills/integration-completeness/SKILL.md +219 -0
- package/core/skills/intelligent-routing/SKILL.md +370 -0
- package/core/skills/lint-and-validate/SKILL.md +45 -0
- package/core/skills/lint-and-validate/scripts/lint_runner.py +173 -0
- package/core/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/core/skills/local-verification/SKILL.md +195 -0
- package/core/skills/mcp-builder/SKILL.md +176 -0
- package/core/skills/mobile-design/SKILL.md +394 -0
- package/core/skills/mobile-design/decision-trees.md +516 -0
- package/core/skills/mobile-design/mobile-backend.md +491 -0
- package/core/skills/mobile-design/mobile-color-system.md +420 -0
- package/core/skills/mobile-design/mobile-debugging.md +122 -0
- package/core/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/core/skills/mobile-design/mobile-navigation.md +458 -0
- package/core/skills/mobile-design/mobile-performance.md +767 -0
- package/core/skills/mobile-design/mobile-testing.md +356 -0
- package/core/skills/mobile-design/mobile-typography.md +433 -0
- package/core/skills/mobile-design/platform-android.md +666 -0
- package/core/skills/mobile-design/platform-ios.md +561 -0
- package/core/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/core/skills/mobile-design/touch-psychology.md +537 -0
- package/core/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/core/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/core/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/core/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/core/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/core/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/core/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/core/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/core/skills/nextjs-react-expert/SKILL.md +267 -0
- package/core/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/core/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/core/skills/nodejs-best-practices/SKILL.md +333 -0
- package/core/skills/notion-task-patterns/SKILL.md +2529 -0
- package/core/skills/page-specifications/SKILL.md +367 -0
- package/core/skills/parallel-agents/SKILL.md +175 -0
- package/core/skills/performance-profiling/SKILL.md +143 -0
- package/core/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/core/skills/plan-writing/SKILL.md +190 -0
- package/core/skills/powershell-windows/SKILL.md +167 -0
- package/core/skills/project-foundation/SKILL.md +117 -0
- package/core/skills/project-setup/SKILL.md +141 -0
- package/core/skills/project-tracking-patterns/SKILL.md +357 -0
- package/core/skills/project-type-discovery/SKILL.md +239 -0
- package/core/skills/python-patterns/SKILL.md +441 -0
- package/core/skills/qa-test-generation/SKILL.md +156 -0
- package/core/skills/react-components/README.md +36 -0
- package/core/skills/react-components/SKILL.md +47 -0
- package/core/skills/react-components/examples/gold-standard-card.tsx +80 -0
- package/core/skills/react-components/package-lock.json +231 -0
- package/core/skills/react-components/package.json +16 -0
- package/core/skills/react-components/resources/architecture-checklist.md +15 -0
- package/core/skills/react-components/resources/component-template.tsx +37 -0
- package/core/skills/react-components/resources/stitch-api-reference.md +14 -0
- package/core/skills/react-components/resources/style-guide.json +27 -0
- package/core/skills/react-components/scripts/fetch-stitch.sh +30 -0
- package/core/skills/react-components/scripts/validate.js +68 -0
- package/core/skills/red-team-tactics/SKILL.md +199 -0
- package/core/skills/remotion/README.md +105 -0
- package/core/skills/remotion/SKILL.md +393 -0
- package/core/skills/remotion/examples/WalkthroughComposition.tsx +78 -0
- package/core/skills/remotion/examples/screens.json +56 -0
- package/core/skills/remotion/resources/composition-checklist.md +124 -0
- package/core/skills/remotion/resources/screen-slide-template.tsx +123 -0
- package/core/skills/remotion/scripts/download-stitch-asset.sh +38 -0
- package/core/skills/seo-fundamentals/SKILL.md +129 -0
- package/core/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/core/skills/server-management/SKILL.md +161 -0
- package/core/skills/session-resilience/SKILL.md +199 -0
- package/core/skills/shadcn-ui/README.md +248 -0
- package/core/skills/shadcn-ui/SKILL.md +326 -0
- package/core/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
- package/core/skills/shadcn-ui/examples/data-table.tsx +313 -0
- package/core/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
- package/core/skills/shadcn-ui/resources/component-catalog.md +481 -0
- package/core/skills/shadcn-ui/resources/customization-guide.md +516 -0
- package/core/skills/shadcn-ui/resources/migration-guide.md +463 -0
- package/core/skills/shadcn-ui/resources/setup-guide.md +412 -0
- package/core/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
- package/core/skills/state-machine/SKILL.md +264 -0
- package/core/skills/stitch-loop/README.md +54 -0
- package/core/skills/stitch-loop/SKILL.md +203 -0
- package/core/skills/stitch-loop/examples/SITE.md +73 -0
- package/core/skills/stitch-loop/examples/next-prompt.md +25 -0
- package/core/skills/stitch-loop/resources/baton-schema.md +61 -0
- package/core/skills/stitch-loop/resources/site-template.md +104 -0
- package/core/skills/systematic-debugging/SKILL.md +109 -0
- package/core/skills/tailwind-patterns/SKILL.md +284 -0
- package/core/skills/tdd-validation/SKILL.md +243 -0
- package/core/skills/tdd-workflow/SKILL.md +284 -0
- package/core/skills/testing-patterns/SKILL.md +196 -0
- package/core/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/core/skills/ui-ux-discovery/SKILL.md +329 -0
- package/core/skills/ui-validation/SKILL.md +190 -0
- package/core/skills/ui-validation/scripts/ui_antipattern_check.py +317 -0
- package/core/skills/verification-gate/SKILL.md +205 -0
- package/core/skills/vulnerability-scanner/SKILL.md +276 -0
- package/core/skills/vulnerability-scanner/checklists.md +121 -0
- package/core/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/core/skills/web-design-guidelines/SKILL.md +57 -0
- package/core/skills/webapp-testing/SKILL.md +187 -0
- package/core/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/core/templates/ARCHITECTURE.template.md +407 -0
- package/core/templates/project-resources.example.json +71 -0
- package/core/workflows/atomic.md +182 -0
- package/core/workflows/brainstorm.md +134 -0
- package/core/workflows/check-task.md +242 -0
- package/core/workflows/copy-collect.md +306 -0
- package/core/workflows/create-agent.md +33 -0
- package/core/workflows/create-skill.md +39 -0
- package/core/workflows/create-workflow.md +33 -0
- package/core/workflows/create.md +92 -0
- package/core/workflows/debug.md +186 -0
- package/core/workflows/demand.md +443 -0
- package/core/workflows/deploy.md +260 -0
- package/core/workflows/discovery.md +267 -0
- package/core/workflows/document.md +272 -0
- package/core/workflows/ds-components.md +296 -0
- package/core/workflows/ds-init.md +58 -0
- package/core/workflows/ds-refactor.md +245 -0
- package/core/workflows/ds-references.md +197 -0
- package/core/workflows/ds-styleguide.md +237 -0
- package/core/workflows/ds-token-diff.md +103 -0
- package/core/workflows/ds-tokens.md +317 -0
- package/core/workflows/ds-validate.md +309 -0
- package/core/workflows/execute.md +483 -0
- package/core/workflows/extract-template.md +278 -0
- package/core/workflows/fix-failed-tests.md +160 -0
- package/core/workflows/init-project.md +386 -0
- package/core/workflows/legacy-project.md +849 -0
- package/core/workflows/log.md +97 -0
- package/core/workflows/new-project.md +610 -0
- package/core/workflows/new-project.md.bak +3292 -0
- package/core/workflows/new-task.md +404 -0
- package/core/workflows/orchestrate.md +237 -0
- package/core/workflows/page-build.md +296 -0
- package/core/workflows/plan.md +89 -0
- package/core/workflows/prd.md +255 -0
- package/core/workflows/preview.md +81 -0
- package/core/workflows/review-page.md +304 -0
- package/core/workflows/status.md +86 -0
- package/core/workflows/stitch.md +226 -0
- package/core/workflows/task-complete.md +473 -0
- package/core/workflows/task-update.md +163 -0
- package/core/workflows/tdd.md +344 -0
- package/core/workflows/test.md +251 -0
- package/core/workflows/ui-ux-pro-max.md +437 -0
- package/core/workflows/ux-mobile-optimize.md +262 -0
- package/core/workflows/ux-mobile-validate.md +297 -0
- package/engine-files/GEMINI.md +69 -0
- package/package.json +47 -0
- package/runtime-adapters/antigravity.js +26 -0
- package/runtime-adapters/claude.js +57 -0
- package/runtime-adapters/codex.js +51 -0
- package/runtime-adapters/copilot.js +51 -0
- package/runtime-adapters/cursor.js +51 -0
- package/runtime-adapters/gemini-cli.js +30 -0
- package/runtime-adapters/opencode.js +51 -0
- package/runtime-adapters/windsurf.js +51 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import re
|
|
2
|
+
import json
|
|
3
|
+
import argparse
|
|
4
|
+
import os
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
# =============================================================================
|
|
8
|
+
# AUTO-FILL MAPPINGS (Generic defaults)
|
|
9
|
+
# =============================================================================
|
|
10
|
+
|
|
11
|
+
# Default category based on Agent responsible
|
|
12
|
+
DEFAULT_AGENT_TO_CATEGORY = {
|
|
13
|
+
"frontend-specialist": ["Frontend", "UI/UX"],
|
|
14
|
+
"backend-specialist": ["Backend", "API"],
|
|
15
|
+
"mobile-developer": ["Mobile", "Frontend"],
|
|
16
|
+
"devops-engineer": ["DevOps", "Infra"],
|
|
17
|
+
"security-auditor": ["Backend", "Security"],
|
|
18
|
+
"debugger": ["Debug"],
|
|
19
|
+
"orchestrator": ["Planejamento"],
|
|
20
|
+
"database-architect": ["Backend", "Database"],
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
# Story Points based on Estimate
|
|
24
|
+
ESTIMATE_TO_POINTS = {
|
|
25
|
+
"S": 2, "XS": 1,
|
|
26
|
+
"Pequeno": 2,
|
|
27
|
+
"M": 3,
|
|
28
|
+
"MƩdio": 3,
|
|
29
|
+
"L": 5,
|
|
30
|
+
"Grande": 5,
|
|
31
|
+
"XL": 8,
|
|
32
|
+
"Muito Grande": 8,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def get_category(agent: str, custom_mapping=None) -> list:
|
|
36
|
+
"""Returns category list based on agent."""
|
|
37
|
+
mapping = custom_mapping or DEFAULT_AGENT_TO_CATEGORY
|
|
38
|
+
agent_key = agent.lower().replace(" ", "-").split(",")[0].strip()
|
|
39
|
+
|
|
40
|
+
for key, cats in mapping.items():
|
|
41
|
+
if key in agent_key or agent_key in key:
|
|
42
|
+
return cats
|
|
43
|
+
return ["Outros"]
|
|
44
|
+
|
|
45
|
+
def get_points(estimate: str) -> int:
|
|
46
|
+
"""Returns story points based on estimate."""
|
|
47
|
+
return ESTIMATE_TO_POINTS.get(estimate, 3)
|
|
48
|
+
|
|
49
|
+
def parse_markdown_stories(file_path):
|
|
50
|
+
"""Simple parser for Markdown user stories if JSON not provided"""
|
|
51
|
+
with open(file_path, "r", encoding="utf-8") as f:
|
|
52
|
+
content = f.read()
|
|
53
|
+
|
|
54
|
+
tasks = {}
|
|
55
|
+
current_task = None
|
|
56
|
+
|
|
57
|
+
lines = content.split('\n')
|
|
58
|
+
for line in lines:
|
|
59
|
+
m = re.match(r"^### (\d+\.\d+) (.+)", line)
|
|
60
|
+
if m:
|
|
61
|
+
if current_task:
|
|
62
|
+
tasks[current_task['id']] = current_task
|
|
63
|
+
|
|
64
|
+
current_task = {
|
|
65
|
+
'id': m.group(1),
|
|
66
|
+
'title': m.group(2).strip(),
|
|
67
|
+
'content': [],
|
|
68
|
+
'priority': 'MUST',
|
|
69
|
+
'estimate': 'S',
|
|
70
|
+
'agent': 'frontend-specialist'
|
|
71
|
+
}
|
|
72
|
+
elif current_task:
|
|
73
|
+
current_task['content'].append(line)
|
|
74
|
+
|
|
75
|
+
if "**Priority:**" in line:
|
|
76
|
+
current_task['priority'] = line.split("**Priority:**")[1].strip()
|
|
77
|
+
if "**Estimate:**" in line:
|
|
78
|
+
current_task['estimate'] = line.split("**Estimate:**")[1].strip()
|
|
79
|
+
if "**Agent:**" in line:
|
|
80
|
+
current_task['agent'] = line.split("**Agent:**")[1].strip()
|
|
81
|
+
|
|
82
|
+
if current_task:
|
|
83
|
+
tasks[current_task['id']] = current_task
|
|
84
|
+
|
|
85
|
+
return tasks
|
|
86
|
+
|
|
87
|
+
def main():
|
|
88
|
+
parser = argparse.ArgumentParser(description="Prepare Notion Updates from Stories")
|
|
89
|
+
parser.add_argument("--input", required=True, help="Input file (Markdown stories or parsed JSON)")
|
|
90
|
+
parser.add_argument("--database-id", required=True, help="Target Notion Database ID")
|
|
91
|
+
parser.add_argument("--epic", required=True, help="Epic name for the tasks (e.g. 'Authentication')")
|
|
92
|
+
parser.add_argument("--id-map", help="JSON file mapping Task IDs to Page IDs (for updates)")
|
|
93
|
+
parser.add_argument("--output", default="notion_updates.json", help="Output JSON file")
|
|
94
|
+
|
|
95
|
+
args = parser.parse_args()
|
|
96
|
+
|
|
97
|
+
# 1. Load Tasks
|
|
98
|
+
if args.input.endswith('.json'):
|
|
99
|
+
with open(args.input, 'r', encoding='utf-8') as f:
|
|
100
|
+
data = json.load(f)
|
|
101
|
+
# Convert list to dict if needed, or assume list format
|
|
102
|
+
if isinstance(data, list):
|
|
103
|
+
tasks = {t['id']: t for t in data}
|
|
104
|
+
else:
|
|
105
|
+
tasks = data
|
|
106
|
+
else:
|
|
107
|
+
tasks = parse_markdown_stories(args.input)
|
|
108
|
+
|
|
109
|
+
# 2. Load ID Map (if exists)
|
|
110
|
+
id_map = {}
|
|
111
|
+
if args.id_map and os.path.exists(args.id_map):
|
|
112
|
+
with open(args.id_map, 'r', encoding='utf-8') as f:
|
|
113
|
+
id_map = json.load(f)
|
|
114
|
+
|
|
115
|
+
print(f"Loaded {len(tasks)} tasks.")
|
|
116
|
+
if id_map:
|
|
117
|
+
print(f"Loaded {len(id_map)} ID mappings.")
|
|
118
|
+
|
|
119
|
+
updates = []
|
|
120
|
+
creates = []
|
|
121
|
+
|
|
122
|
+
for tid, tdata in tasks.items():
|
|
123
|
+
# Handle different structures (parsed json vs markdown dict)
|
|
124
|
+
description = tdata.get('description', "")
|
|
125
|
+
if not description and 'content' in tdata:
|
|
126
|
+
description = "\n".join(tdata['content']).strip()
|
|
127
|
+
|
|
128
|
+
agent = tdata.get('agent', 'Pending')
|
|
129
|
+
estimate = tdata.get('estimate', 'M')
|
|
130
|
+
priority = tdata.get('priority', 'Medium')
|
|
131
|
+
title = tdata.get('title', f"{tid} Task")
|
|
132
|
+
|
|
133
|
+
props = {
|
|
134
|
+
"ID": {"rich_text": [{"text": {"content": str(tid)}}]},
|
|
135
|
+
"Ćpico": {"select": {"name": args.epic}},
|
|
136
|
+
"Prioridade": {"select": {"name": priority}},
|
|
137
|
+
"Estimativa": {"rich_text": [{"text": {"content": estimate}}]}, # Changed to text as per ARCHITECTURE
|
|
138
|
+
"Agente": {"select": {"name": agent.replace(" + ", ",").split(",")[0].strip()}},
|
|
139
|
+
"Descrição": {"rich_text": [{"text": {"content": description[:1900]}}]},
|
|
140
|
+
|
|
141
|
+
# Auto-fill
|
|
142
|
+
"Categoria": {"multi_select": [{"name": "Feature"}]}, # Standardized to Feature
|
|
143
|
+
"Pontos": {"number": get_points(estimate)},
|
|
144
|
+
"% Progresso": {"number": 0},
|
|
145
|
+
"Tags": {"multi_select": [{"name": cat} for cat in get_category(agent)]} # Moved technical tags to Tags
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# Check if updating or creating
|
|
149
|
+
page_id = id_map.get(tid)
|
|
150
|
+
|
|
151
|
+
if page_id:
|
|
152
|
+
updates.append({"page_id": page_id, "properties": props})
|
|
153
|
+
else:
|
|
154
|
+
create_props = props.copy()
|
|
155
|
+
# Ensure title is set for creation
|
|
156
|
+
if "Nome da tarefa" not in create_props:
|
|
157
|
+
create_props["Nome da tarefa"] = {"title": [{"text": {"content": title}}]}
|
|
158
|
+
|
|
159
|
+
create_props["Status"] = {"status": {"name": "backlog"}}
|
|
160
|
+
creates.append({"parent": {"database_id": args.database_id}, "properties": create_props})
|
|
161
|
+
|
|
162
|
+
# Output
|
|
163
|
+
output_data = {"updates": updates, "creates": creates}
|
|
164
|
+
|
|
165
|
+
with open(args.output, "w", encoding="utf-8") as f:
|
|
166
|
+
json.dump(output_data, f, indent=2, ensure_ascii=False)
|
|
167
|
+
|
|
168
|
+
print(f"ā
Generated {len(updates)} updates and {len(creates)} creates")
|
|
169
|
+
print(f"š Output written to: {args.output}")
|
|
170
|
+
|
|
171
|
+
if __name__ == "__main__":
|
|
172
|
+
main()
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
target = sys.argv[1]
|
|
5
|
+
with open('notion_updates.json', 'r', encoding='utf-8') as f:
|
|
6
|
+
data = json.load(f)
|
|
7
|
+
|
|
8
|
+
found = False
|
|
9
|
+
for c in data['creates']:
|
|
10
|
+
title = c['properties']['Nome da tarefa']['title'][0]['text']['content']
|
|
11
|
+
if target in title:
|
|
12
|
+
with open('temp_payload.json', 'w', encoding='utf-8') as out:
|
|
13
|
+
json.dump(c, out, indent=2, ensure_ascii=False)
|
|
14
|
+
found = True
|
|
15
|
+
break
|
|
16
|
+
|
|
17
|
+
if not found:
|
|
18
|
+
print(f"Task containing '{target}' not found in creates.")
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Session Manager - Antigravity Kit
|
|
4
|
+
=================================
|
|
5
|
+
Analyzes project state, detects tech stack, tracks file statistics, and provides
|
|
6
|
+
a summary of the current session.
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
python .agent/scripts/session_manager.py status [path]
|
|
10
|
+
python .agent/scripts/session_manager.py info [path]
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import os
|
|
14
|
+
import json
|
|
15
|
+
import argparse
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Dict, Any, List
|
|
18
|
+
|
|
19
|
+
def get_project_root(path: str) -> Path:
|
|
20
|
+
return Path(path).resolve()
|
|
21
|
+
|
|
22
|
+
def analyze_package_json(root: Path) -> Dict[str, Any]:
|
|
23
|
+
pkg_file = root / "package.json"
|
|
24
|
+
if not pkg_file.exists():
|
|
25
|
+
return {"type": "unknown", "dependencies": {}}
|
|
26
|
+
|
|
27
|
+
try:
|
|
28
|
+
with open(pkg_file, 'r', encoding='utf-8') as f:
|
|
29
|
+
data = json.load(f)
|
|
30
|
+
|
|
31
|
+
deps = data.get("dependencies", {})
|
|
32
|
+
dev_deps = data.get("devDependencies", {})
|
|
33
|
+
all_deps = {**deps, **dev_deps}
|
|
34
|
+
|
|
35
|
+
stack = []
|
|
36
|
+
if "next" in all_deps: stack.append("Next.js")
|
|
37
|
+
elif "react" in all_deps: stack.append("React")
|
|
38
|
+
elif "vue" in all_deps: stack.append("Vue")
|
|
39
|
+
elif "svelte" in all_deps: stack.append("Svelte")
|
|
40
|
+
elif "express" in all_deps: stack.append("Express")
|
|
41
|
+
elif "nestjs" in all_deps or "@nestjs/core" in all_deps: stack.append("NestJS")
|
|
42
|
+
|
|
43
|
+
if "tailwindcss" in all_deps: stack.append("Tailwind CSS")
|
|
44
|
+
if "prisma" in all_deps: stack.append("Prisma")
|
|
45
|
+
if "typescript" in all_deps: stack.append("TypeScript")
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
"name": data.get("name", "unnamed"),
|
|
49
|
+
"version": data.get("version", "0.0.0"),
|
|
50
|
+
"stack": stack,
|
|
51
|
+
"scripts": list(data.get("scripts", {}).keys())
|
|
52
|
+
}
|
|
53
|
+
except Exception as e:
|
|
54
|
+
return {"error": str(e)}
|
|
55
|
+
|
|
56
|
+
def count_files(root: Path) -> Dict[str, int]:
|
|
57
|
+
stats = {"created": 0, "modified": 0, "total": 0}
|
|
58
|
+
# Simple count for now, comprehensive tracking would require git diff or extensive history
|
|
59
|
+
exclude = {".git", "node_modules", ".next", "dist", "build", ".agent", ".gemini", "__pycache__"}
|
|
60
|
+
|
|
61
|
+
for root_dir, dirs, files in os.walk(root):
|
|
62
|
+
dirs[:] = [d for d in dirs if d not in exclude]
|
|
63
|
+
stats["total"] += len(files)
|
|
64
|
+
|
|
65
|
+
return stats
|
|
66
|
+
|
|
67
|
+
def detect_features(root: Path) -> List[str]:
|
|
68
|
+
# Heuristic: look at folder names in src/
|
|
69
|
+
features = []
|
|
70
|
+
src = root / "src"
|
|
71
|
+
if src.exists():
|
|
72
|
+
possible_dirs = ["components", "modules", "features", "app", "pages", "services"]
|
|
73
|
+
for d in possible_dirs:
|
|
74
|
+
p = src / d
|
|
75
|
+
if p.exists() and p.is_dir():
|
|
76
|
+
# List subdirectories as likely features
|
|
77
|
+
for child in p.iterdir():
|
|
78
|
+
if child.is_dir():
|
|
79
|
+
features.append(child.name)
|
|
80
|
+
return features[:10] # Limit to top 10
|
|
81
|
+
|
|
82
|
+
def print_status(root: Path):
|
|
83
|
+
info = analyze_package_json(root)
|
|
84
|
+
stats = count_files(root)
|
|
85
|
+
features = detect_features(root)
|
|
86
|
+
|
|
87
|
+
print("\n=== Project Status ===")
|
|
88
|
+
print(f"\nš Project: {info.get('name', root.name)}")
|
|
89
|
+
print(f"š Path: {root}")
|
|
90
|
+
print(f"š·ļø Type: {', '.join(info.get('stack', ['Generic']))}")
|
|
91
|
+
print(f"š Status: Active")
|
|
92
|
+
|
|
93
|
+
print("\nš§ Tech Stack:")
|
|
94
|
+
for tech in info.get('stack', []):
|
|
95
|
+
print(f" ⢠{tech}")
|
|
96
|
+
|
|
97
|
+
print(f"\nā
Detected Modules/Features ({len(features)}):")
|
|
98
|
+
for feat in features:
|
|
99
|
+
print(f" ⢠{feat}")
|
|
100
|
+
if not features:
|
|
101
|
+
print(" (No distinct feature modules detected)")
|
|
102
|
+
|
|
103
|
+
print(f"\nš Files: {stats['total']} total files tracked")
|
|
104
|
+
print("\n====================\n")
|
|
105
|
+
|
|
106
|
+
def main():
|
|
107
|
+
parser = argparse.ArgumentParser(description="Session Manager")
|
|
108
|
+
parser.add_argument("command", choices=["status", "info"], help="Command to run")
|
|
109
|
+
parser.add_argument("path", nargs="?", default=".", help="Project path")
|
|
110
|
+
|
|
111
|
+
args = parser.parse_args()
|
|
112
|
+
root = get_project_root(args.path)
|
|
113
|
+
|
|
114
|
+
if args.command == "status":
|
|
115
|
+
print_status(root)
|
|
116
|
+
elif args.command == "info":
|
|
117
|
+
print(json.dumps(analyze_package_json(root), indent=2))
|
|
118
|
+
|
|
119
|
+
if __name__ == "__main__":
|
|
120
|
+
main()
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
|
|
2
|
+
import sys
|
|
3
|
+
import os
|
|
4
|
+
import argparse
|
|
5
|
+
import re
|
|
6
|
+
|
|
7
|
+
def update_task_md(file_path: str, task_id: str):
|
|
8
|
+
"""Updates the tabular status in task.md"""
|
|
9
|
+
if not os.path.exists(file_path):
|
|
10
|
+
return False
|
|
11
|
+
|
|
12
|
+
with open(file_path, 'r', encoding='utf-8') as f:
|
|
13
|
+
content = f.read()
|
|
14
|
+
|
|
15
|
+
lines = content.split('\n')
|
|
16
|
+
new_lines = []
|
|
17
|
+
updated = False
|
|
18
|
+
|
|
19
|
+
# Regex to match | 1 | or | 1.1 |
|
|
20
|
+
# Matches: pipe, space, id, space, pipe
|
|
21
|
+
# Using strict check for the ID column
|
|
22
|
+
|
|
23
|
+
for line in lines:
|
|
24
|
+
if line.strip().startswith('|'):
|
|
25
|
+
parts = [p.strip() for p in line.split('|')]
|
|
26
|
+
# parts[0] is empty (before first pipe), parts[1] is ID
|
|
27
|
+
if len(parts) > 2 and parts[1] == str(task_id):
|
|
28
|
+
# Found the row. Update last column (Status)
|
|
29
|
+
# Assuming standard 5-6 column layout.
|
|
30
|
+
# Let's rebuild the line carefully retaining structure if possible,
|
|
31
|
+
# or just replacing the last part.
|
|
32
|
+
# Easiest: Replace the last column content.
|
|
33
|
+
if "ā
Complete" not in parts[-2]: # Check status column (ignoring empty last part)
|
|
34
|
+
# Reconstruct line: replace last segment
|
|
35
|
+
# This is brittle if columns change. Let's use simple logic: replace last pipe content
|
|
36
|
+
last_pipe_index = line.rfind('|')
|
|
37
|
+
second_last_pipe = line.rfind('|', 0, last_pipe_index)
|
|
38
|
+
if second_last_pipe != -1:
|
|
39
|
+
new_line = line[:second_last_pipe] + "| ā
Complete |"
|
|
40
|
+
new_lines.append(new_line)
|
|
41
|
+
updated = True
|
|
42
|
+
continue
|
|
43
|
+
new_lines.append(line)
|
|
44
|
+
|
|
45
|
+
if updated:
|
|
46
|
+
with open(file_path, 'w', encoding='utf-8') as f:
|
|
47
|
+
f.write('\n'.join(new_lines))
|
|
48
|
+
print(f"ā
Updated task.md for Task {task_id}")
|
|
49
|
+
return updated
|
|
50
|
+
|
|
51
|
+
def update_project_progress(file_path: str, task_id: str):
|
|
52
|
+
"""Updates inline status in PROJECT-PROGRESS.md e.g. #1 -> #1 ā
"""
|
|
53
|
+
if not os.path.exists(file_path):
|
|
54
|
+
print(f"ā ļø {file_path} not found.")
|
|
55
|
+
return False
|
|
56
|
+
|
|
57
|
+
with open(file_path, 'r', encoding='utf-8') as f:
|
|
58
|
+
content = f.read()
|
|
59
|
+
|
|
60
|
+
# Check if already marked
|
|
61
|
+
# Pattern: #{task_id} followed by check or ā
|
|
62
|
+
# Regex: #{task_id}(?![^|\n]*ā
) - negative lookahead is tricky with other text
|
|
63
|
+
|
|
64
|
+
# Simple approach: Find "#{task_id}" not followed closely by "ā
"
|
|
65
|
+
updated_content = content
|
|
66
|
+
pattern = rf"#{task_id}(?![:\s-]*ā
)"
|
|
67
|
+
|
|
68
|
+
# If we find specifically "#{task_id}" and it doesn't have a check next to it
|
|
69
|
+
# We replace it with "#{task_id} ā
"
|
|
70
|
+
# But wait, the format is "#1-#4...".
|
|
71
|
+
# If tasks are grouped "#1-#4", verifying individual task #2 is hard.
|
|
72
|
+
# However, sometimes they are listed individually.
|
|
73
|
+
|
|
74
|
+
# If found individual marker:
|
|
75
|
+
if re.search(rf"#{task_id}\b", content):
|
|
76
|
+
# Naive replacement: #{id} -> #{id} ā
|
|
77
|
+
# But we must avoid double checking
|
|
78
|
+
updated_content = re.sub(rf"(#{task_id})\b(?![:\s-]*ā
)", r"\1 ā
", content)
|
|
79
|
+
|
|
80
|
+
if updated_content != content:
|
|
81
|
+
with open(file_path, 'w', encoding='utf-8') as f:
|
|
82
|
+
f.write(updated_content)
|
|
83
|
+
print(f"ā
Updated PROJECT-PROGRESS.md for Task {task_id}")
|
|
84
|
+
return True
|
|
85
|
+
else:
|
|
86
|
+
print(f"ā¹ļø Task {task_id} not found or already marked in PROJECT-PROGRESS.md")
|
|
87
|
+
return False
|
|
88
|
+
|
|
89
|
+
def main():
|
|
90
|
+
parser = argparse.ArgumentParser(description="Automate Task Completion")
|
|
91
|
+
parser.add_argument("task_id", help="Task ID (e.g. 1)")
|
|
92
|
+
parser.add_argument("time_spent", help="Time spent (e.g. '1h')")
|
|
93
|
+
parser.add_argument("summary", help="Summary message")
|
|
94
|
+
parser.add_argument("--project-root", default=".", help="Project root directory")
|
|
95
|
+
|
|
96
|
+
args = parser.parse_args()
|
|
97
|
+
|
|
98
|
+
# Update local files
|
|
99
|
+
# 1. task.md (Artifact)
|
|
100
|
+
# The artifact might be in a variable path, but usually we know the relative path or it's in the brain dir.
|
|
101
|
+
# We will search for task.md in the current directory or standard paths.
|
|
102
|
+
|
|
103
|
+
# Since we are running from root, let's try to find task.md
|
|
104
|
+
task_md_path = None
|
|
105
|
+
# Search recursively for task.md? No, usually in .brain or docs or root
|
|
106
|
+
# For now, let's assume the user passes absolute path or we look in typical spots
|
|
107
|
+
# In this environment, task.md is in the ephemeral brain dir.
|
|
108
|
+
# We can try to find it using `fd` logic or just checking known artifact path provided in memory?
|
|
109
|
+
# Actually, the agent knows the path. But the script doesn't.
|
|
110
|
+
# Hack: Update the script to look into the 'brain' folder if it knows it, or just scan current dir and subdirs
|
|
111
|
+
|
|
112
|
+
# For PROJECT-PROGRESS.md it is in docs/
|
|
113
|
+
proj_progress_path = os.path.join(args.project_root, "docs", "PROJECT-PROGRESS.md")
|
|
114
|
+
update_project_progress(proj_progress_path, args.task_id)
|
|
115
|
+
|
|
116
|
+
# Output Instructions for Agent
|
|
117
|
+
print(f"\nš¢ ACTION REQUIRED: Run bridge.py to sync with Flyee")
|
|
118
|
+
print(f"----------------------------------------")
|
|
119
|
+
print(f"TASK ID: {args.task_id}")
|
|
120
|
+
print(f"TIME: {args.time_spent}")
|
|
121
|
+
print(f"SUMMARY: {args.summary}")
|
|
122
|
+
print(f"----------------------------------------")
|
|
123
|
+
print("Run: python3 .agent/flyee-bridge/bridge.py --update-task <flyee-id> --status completed --result success")
|
|
124
|
+
print("Then: update docs/INDEX.md if any documents were created during this task.")
|
|
125
|
+
|
|
126
|
+
if __name__ == "__main__":
|
|
127
|
+
main()
|