spec-kitty-cli 0.12.1__py3-none-any.whl
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.
- spec_kitty_cli-0.12.1.dist-info/METADATA +1767 -0
- spec_kitty_cli-0.12.1.dist-info/RECORD +242 -0
- spec_kitty_cli-0.12.1.dist-info/WHEEL +4 -0
- spec_kitty_cli-0.12.1.dist-info/entry_points.txt +2 -0
- spec_kitty_cli-0.12.1.dist-info/licenses/LICENSE +21 -0
- specify_cli/__init__.py +171 -0
- specify_cli/acceptance.py +627 -0
- specify_cli/agent_utils/README.md +157 -0
- specify_cli/agent_utils/__init__.py +9 -0
- specify_cli/agent_utils/status.py +356 -0
- specify_cli/cli/__init__.py +6 -0
- specify_cli/cli/commands/__init__.py +46 -0
- specify_cli/cli/commands/accept.py +189 -0
- specify_cli/cli/commands/agent/__init__.py +22 -0
- specify_cli/cli/commands/agent/config.py +382 -0
- specify_cli/cli/commands/agent/context.py +191 -0
- specify_cli/cli/commands/agent/feature.py +1057 -0
- specify_cli/cli/commands/agent/release.py +11 -0
- specify_cli/cli/commands/agent/tasks.py +1253 -0
- specify_cli/cli/commands/agent/workflow.py +801 -0
- specify_cli/cli/commands/context.py +246 -0
- specify_cli/cli/commands/dashboard.py +85 -0
- specify_cli/cli/commands/implement.py +973 -0
- specify_cli/cli/commands/init.py +827 -0
- specify_cli/cli/commands/init_help.py +62 -0
- specify_cli/cli/commands/merge.py +755 -0
- specify_cli/cli/commands/mission.py +240 -0
- specify_cli/cli/commands/ops.py +265 -0
- specify_cli/cli/commands/orchestrate.py +640 -0
- specify_cli/cli/commands/repair.py +175 -0
- specify_cli/cli/commands/research.py +165 -0
- specify_cli/cli/commands/sync.py +364 -0
- specify_cli/cli/commands/upgrade.py +249 -0
- specify_cli/cli/commands/validate_encoding.py +186 -0
- specify_cli/cli/commands/validate_tasks.py +186 -0
- specify_cli/cli/commands/verify.py +310 -0
- specify_cli/cli/helpers.py +123 -0
- specify_cli/cli/step_tracker.py +91 -0
- specify_cli/cli/ui.py +192 -0
- specify_cli/core/__init__.py +53 -0
- specify_cli/core/agent_context.py +311 -0
- specify_cli/core/config.py +96 -0
- specify_cli/core/context_validation.py +362 -0
- specify_cli/core/dependency_graph.py +351 -0
- specify_cli/core/git_ops.py +129 -0
- specify_cli/core/multi_parent_merge.py +323 -0
- specify_cli/core/paths.py +260 -0
- specify_cli/core/project_resolver.py +110 -0
- specify_cli/core/stale_detection.py +263 -0
- specify_cli/core/tool_checker.py +79 -0
- specify_cli/core/utils.py +43 -0
- specify_cli/core/vcs/__init__.py +114 -0
- specify_cli/core/vcs/detection.py +341 -0
- specify_cli/core/vcs/exceptions.py +85 -0
- specify_cli/core/vcs/git.py +1304 -0
- specify_cli/core/vcs/jujutsu.py +1208 -0
- specify_cli/core/vcs/protocol.py +285 -0
- specify_cli/core/vcs/types.py +249 -0
- specify_cli/core/version_checker.py +261 -0
- specify_cli/core/worktree.py +506 -0
- specify_cli/dashboard/__init__.py +28 -0
- specify_cli/dashboard/diagnostics.py +204 -0
- specify_cli/dashboard/handlers/__init__.py +17 -0
- specify_cli/dashboard/handlers/api.py +143 -0
- specify_cli/dashboard/handlers/base.py +65 -0
- specify_cli/dashboard/handlers/features.py +390 -0
- specify_cli/dashboard/handlers/router.py +81 -0
- specify_cli/dashboard/handlers/static.py +50 -0
- specify_cli/dashboard/lifecycle.py +541 -0
- specify_cli/dashboard/scanner.py +437 -0
- specify_cli/dashboard/server.py +123 -0
- specify_cli/dashboard/static/dashboard/dashboard.css +722 -0
- specify_cli/dashboard/static/dashboard/dashboard.js +1424 -0
- specify_cli/dashboard/static/spec-kitty.png +0 -0
- specify_cli/dashboard/templates/__init__.py +36 -0
- specify_cli/dashboard/templates/index.html +258 -0
- specify_cli/doc_generators.py +621 -0
- specify_cli/doc_state.py +408 -0
- specify_cli/frontmatter.py +384 -0
- specify_cli/gap_analysis.py +915 -0
- specify_cli/gitignore_manager.py +300 -0
- specify_cli/guards.py +145 -0
- specify_cli/legacy_detector.py +83 -0
- specify_cli/manifest.py +286 -0
- specify_cli/merge/__init__.py +63 -0
- specify_cli/merge/executor.py +653 -0
- specify_cli/merge/forecast.py +215 -0
- specify_cli/merge/ordering.py +126 -0
- specify_cli/merge/preflight.py +230 -0
- specify_cli/merge/state.py +185 -0
- specify_cli/merge/status_resolver.py +354 -0
- specify_cli/mission.py +654 -0
- specify_cli/missions/documentation/command-templates/implement.md +309 -0
- specify_cli/missions/documentation/command-templates/plan.md +275 -0
- specify_cli/missions/documentation/command-templates/review.md +344 -0
- specify_cli/missions/documentation/command-templates/specify.md +206 -0
- specify_cli/missions/documentation/command-templates/tasks.md +189 -0
- specify_cli/missions/documentation/mission.yaml +113 -0
- specify_cli/missions/documentation/templates/divio/explanation-template.md +192 -0
- specify_cli/missions/documentation/templates/divio/howto-template.md +168 -0
- specify_cli/missions/documentation/templates/divio/reference-template.md +179 -0
- specify_cli/missions/documentation/templates/divio/tutorial-template.md +146 -0
- specify_cli/missions/documentation/templates/generators/jsdoc.json.template +18 -0
- specify_cli/missions/documentation/templates/generators/sphinx-conf.py.template +36 -0
- specify_cli/missions/documentation/templates/plan-template.md +269 -0
- specify_cli/missions/documentation/templates/release-template.md +222 -0
- specify_cli/missions/documentation/templates/spec-template.md +172 -0
- specify_cli/missions/documentation/templates/task-prompt-template.md +140 -0
- specify_cli/missions/documentation/templates/tasks-template.md +159 -0
- specify_cli/missions/research/command-templates/merge.md +388 -0
- specify_cli/missions/research/command-templates/plan.md +125 -0
- specify_cli/missions/research/command-templates/review.md +144 -0
- specify_cli/missions/research/command-templates/tasks.md +225 -0
- specify_cli/missions/research/mission.yaml +115 -0
- specify_cli/missions/research/templates/data-model-template.md +33 -0
- specify_cli/missions/research/templates/plan-template.md +161 -0
- specify_cli/missions/research/templates/research/evidence-log.csv +18 -0
- specify_cli/missions/research/templates/research/source-register.csv +18 -0
- specify_cli/missions/research/templates/research-template.md +35 -0
- specify_cli/missions/research/templates/spec-template.md +64 -0
- specify_cli/missions/research/templates/task-prompt-template.md +148 -0
- specify_cli/missions/research/templates/tasks-template.md +114 -0
- specify_cli/missions/software-dev/command-templates/accept.md +75 -0
- specify_cli/missions/software-dev/command-templates/analyze.md +183 -0
- specify_cli/missions/software-dev/command-templates/checklist.md +286 -0
- specify_cli/missions/software-dev/command-templates/clarify.md +157 -0
- specify_cli/missions/software-dev/command-templates/constitution.md +432 -0
- specify_cli/missions/software-dev/command-templates/dashboard.md +101 -0
- specify_cli/missions/software-dev/command-templates/implement.md +41 -0
- specify_cli/missions/software-dev/command-templates/merge.md +383 -0
- specify_cli/missions/software-dev/command-templates/plan.md +171 -0
- specify_cli/missions/software-dev/command-templates/review.md +32 -0
- specify_cli/missions/software-dev/command-templates/specify.md +321 -0
- specify_cli/missions/software-dev/command-templates/tasks.md +566 -0
- specify_cli/missions/software-dev/mission.yaml +100 -0
- specify_cli/missions/software-dev/templates/plan-template.md +132 -0
- specify_cli/missions/software-dev/templates/spec-template.md +116 -0
- specify_cli/missions/software-dev/templates/task-prompt-template.md +140 -0
- specify_cli/missions/software-dev/templates/tasks-template.md +159 -0
- specify_cli/orchestrator/__init__.py +75 -0
- specify_cli/orchestrator/agent_config.py +224 -0
- specify_cli/orchestrator/agents/__init__.py +170 -0
- specify_cli/orchestrator/agents/augment.py +112 -0
- specify_cli/orchestrator/agents/base.py +243 -0
- specify_cli/orchestrator/agents/claude.py +112 -0
- specify_cli/orchestrator/agents/codex.py +106 -0
- specify_cli/orchestrator/agents/copilot.py +137 -0
- specify_cli/orchestrator/agents/cursor.py +139 -0
- specify_cli/orchestrator/agents/gemini.py +115 -0
- specify_cli/orchestrator/agents/kilocode.py +94 -0
- specify_cli/orchestrator/agents/opencode.py +132 -0
- specify_cli/orchestrator/agents/qwen.py +96 -0
- specify_cli/orchestrator/config.py +455 -0
- specify_cli/orchestrator/executor.py +642 -0
- specify_cli/orchestrator/integration.py +1230 -0
- specify_cli/orchestrator/monitor.py +898 -0
- specify_cli/orchestrator/scheduler.py +832 -0
- specify_cli/orchestrator/state.py +508 -0
- specify_cli/orchestrator/testing/__init__.py +122 -0
- specify_cli/orchestrator/testing/availability.py +346 -0
- specify_cli/orchestrator/testing/fixtures.py +684 -0
- specify_cli/orchestrator/testing/paths.py +218 -0
- specify_cli/plan_validation.py +107 -0
- specify_cli/scripts/debug-dashboard-scan.py +61 -0
- specify_cli/scripts/tasks/acceptance_support.py +695 -0
- specify_cli/scripts/tasks/task_helpers.py +506 -0
- specify_cli/scripts/tasks/tasks_cli.py +848 -0
- specify_cli/scripts/validate_encoding.py +180 -0
- specify_cli/task_metadata_validation.py +274 -0
- specify_cli/tasks_support.py +447 -0
- specify_cli/template/__init__.py +47 -0
- specify_cli/template/asset_generator.py +206 -0
- specify_cli/template/github_client.py +334 -0
- specify_cli/template/manager.py +193 -0
- specify_cli/template/renderer.py +99 -0
- specify_cli/templates/AGENTS.md +190 -0
- specify_cli/templates/POWERSHELL_SYNTAX.md +229 -0
- specify_cli/templates/agent-file-template.md +35 -0
- specify_cli/templates/checklist-template.md +42 -0
- specify_cli/templates/claudeignore-template +58 -0
- specify_cli/templates/command-templates/accept.md +141 -0
- specify_cli/templates/command-templates/analyze.md +253 -0
- specify_cli/templates/command-templates/checklist.md +352 -0
- specify_cli/templates/command-templates/clarify.md +224 -0
- specify_cli/templates/command-templates/constitution.md +432 -0
- specify_cli/templates/command-templates/dashboard.md +175 -0
- specify_cli/templates/command-templates/implement.md +190 -0
- specify_cli/templates/command-templates/merge.md +374 -0
- specify_cli/templates/command-templates/plan.md +171 -0
- specify_cli/templates/command-templates/research.md +88 -0
- specify_cli/templates/command-templates/review.md +510 -0
- specify_cli/templates/command-templates/specify.md +321 -0
- specify_cli/templates/command-templates/status.md +92 -0
- specify_cli/templates/command-templates/tasks.md +199 -0
- specify_cli/templates/git-hooks/pre-commit +22 -0
- specify_cli/templates/git-hooks/pre-commit-agent-check +37 -0
- specify_cli/templates/git-hooks/pre-commit-encoding-check +142 -0
- specify_cli/templates/plan-template.md +108 -0
- specify_cli/templates/spec-template.md +118 -0
- specify_cli/templates/task-prompt-template.md +165 -0
- specify_cli/templates/tasks-template.md +161 -0
- specify_cli/templates/vscode-settings.json +13 -0
- specify_cli/text_sanitization.py +225 -0
- specify_cli/upgrade/__init__.py +18 -0
- specify_cli/upgrade/detector.py +239 -0
- specify_cli/upgrade/metadata.py +182 -0
- specify_cli/upgrade/migrations/__init__.py +65 -0
- specify_cli/upgrade/migrations/base.py +80 -0
- specify_cli/upgrade/migrations/m_0_10_0_python_only.py +359 -0
- specify_cli/upgrade/migrations/m_0_10_12_constitution_cleanup.py +99 -0
- specify_cli/upgrade/migrations/m_0_10_14_update_implement_slash_command.py +176 -0
- specify_cli/upgrade/migrations/m_0_10_1_populate_slash_commands.py +174 -0
- specify_cli/upgrade/migrations/m_0_10_2_update_slash_commands.py +172 -0
- specify_cli/upgrade/migrations/m_0_10_6_workflow_simplification.py +174 -0
- specify_cli/upgrade/migrations/m_0_10_8_fix_memory_structure.py +252 -0
- specify_cli/upgrade/migrations/m_0_10_9_repair_templates.py +168 -0
- specify_cli/upgrade/migrations/m_0_11_0_workspace_per_wp.py +182 -0
- specify_cli/upgrade/migrations/m_0_11_1_improved_workflow_templates.py +173 -0
- specify_cli/upgrade/migrations/m_0_11_1_update_implement_slash_command.py +160 -0
- specify_cli/upgrade/migrations/m_0_11_2_improved_workflow_templates.py +173 -0
- specify_cli/upgrade/migrations/m_0_11_3_workflow_agent_flag.py +114 -0
- specify_cli/upgrade/migrations/m_0_12_0_documentation_mission.py +155 -0
- specify_cli/upgrade/migrations/m_0_12_1_remove_kitty_specs_from_gitignore.py +183 -0
- specify_cli/upgrade/migrations/m_0_2_0_specify_to_kittify.py +80 -0
- specify_cli/upgrade/migrations/m_0_4_8_gitignore_agents.py +118 -0
- specify_cli/upgrade/migrations/m_0_5_0_encoding_hooks.py +141 -0
- specify_cli/upgrade/migrations/m_0_6_5_commands_rename.py +169 -0
- specify_cli/upgrade/migrations/m_0_6_7_ensure_missions.py +228 -0
- specify_cli/upgrade/migrations/m_0_7_2_worktree_commands_dedup.py +89 -0
- specify_cli/upgrade/migrations/m_0_7_3_update_scripts.py +114 -0
- specify_cli/upgrade/migrations/m_0_8_0_remove_active_mission.py +82 -0
- specify_cli/upgrade/migrations/m_0_8_0_worktree_agents_symlink.py +148 -0
- specify_cli/upgrade/migrations/m_0_9_0_frontmatter_only_lanes.py +346 -0
- specify_cli/upgrade/migrations/m_0_9_1_complete_lane_migration.py +656 -0
- specify_cli/upgrade/migrations/m_0_9_2_research_mission_templates.py +221 -0
- specify_cli/upgrade/registry.py +121 -0
- specify_cli/upgrade/runner.py +284 -0
- specify_cli/validators/__init__.py +14 -0
- specify_cli/validators/paths.py +154 -0
- specify_cli/validators/research.py +428 -0
- specify_cli/verify_enhanced.py +270 -0
- specify_cli/workspace_context.py +224 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"""Agent context management commands."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Optional
|
|
9
|
+
|
|
10
|
+
import typer
|
|
11
|
+
from rich.console import Console
|
|
12
|
+
from typing_extensions import Annotated
|
|
13
|
+
|
|
14
|
+
from specify_cli.core.paths import locate_project_root
|
|
15
|
+
from specify_cli.core.agent_context import (
|
|
16
|
+
parse_plan_for_tech_stack,
|
|
17
|
+
update_agent_context as update_context_file,
|
|
18
|
+
get_supported_agent_types,
|
|
19
|
+
get_agent_file_path,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
app = typer.Typer(
|
|
23
|
+
name="context",
|
|
24
|
+
help="Agent context management commands",
|
|
25
|
+
no_args_is_help=True
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
console = Console()
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _find_feature_directory(repo_root: Path, cwd: Path) -> Path:
|
|
32
|
+
"""Find the current feature directory.
|
|
33
|
+
|
|
34
|
+
Handles three contexts:
|
|
35
|
+
1. Worktree root (cwd contains kitty-specs/)
|
|
36
|
+
2. Inside feature directory (walk up to find kitty-specs/)
|
|
37
|
+
3. Main repo (find latest feature in kitty-specs/)
|
|
38
|
+
|
|
39
|
+
Args:
|
|
40
|
+
repo_root: Repository root path
|
|
41
|
+
cwd: Current working directory
|
|
42
|
+
|
|
43
|
+
Returns:
|
|
44
|
+
Path to feature directory
|
|
45
|
+
|
|
46
|
+
Raises:
|
|
47
|
+
ValueError: If feature directory cannot be determined
|
|
48
|
+
"""
|
|
49
|
+
# Check if we're in a worktree by looking for kitty-specs/ in current dir or parents
|
|
50
|
+
current = cwd
|
|
51
|
+
while current >= repo_root:
|
|
52
|
+
kitty_specs_dir = current / "kitty-specs"
|
|
53
|
+
if kitty_specs_dir.exists() and kitty_specs_dir.is_dir():
|
|
54
|
+
# Found kitty-specs/, look for feature subdirectory
|
|
55
|
+
feature_dirs = sorted(
|
|
56
|
+
[d for d in kitty_specs_dir.iterdir() if d.is_dir() and d.name.startswith(("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"))],
|
|
57
|
+
key=lambda p: p.name
|
|
58
|
+
)
|
|
59
|
+
if feature_dirs:
|
|
60
|
+
return feature_dirs[-1] # Return latest feature
|
|
61
|
+
current = current.parent
|
|
62
|
+
|
|
63
|
+
# Fallback: Look in main repo kitty-specs/
|
|
64
|
+
kitty_specs_main = repo_root / "kitty-specs"
|
|
65
|
+
if kitty_specs_main.exists():
|
|
66
|
+
feature_dirs = sorted(
|
|
67
|
+
[d for d in kitty_specs_main.iterdir() if d.is_dir() and d.name.startswith(("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"))],
|
|
68
|
+
key=lambda p: p.name
|
|
69
|
+
)
|
|
70
|
+
if feature_dirs:
|
|
71
|
+
return feature_dirs[-1]
|
|
72
|
+
|
|
73
|
+
raise ValueError("Could not determine feature directory. Ensure you're in a worktree or main repo with a feature.")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@app.command(name="update-context")
|
|
77
|
+
def update_context(
|
|
78
|
+
agent_type: Annotated[
|
|
79
|
+
Optional[str],
|
|
80
|
+
typer.Option(
|
|
81
|
+
"--agent-type",
|
|
82
|
+
"-a",
|
|
83
|
+
help=f"Agent type to update. Supported: {', '.join(get_supported_agent_types())}. Defaults to 'claude'."
|
|
84
|
+
)
|
|
85
|
+
] = "claude",
|
|
86
|
+
json_output: Annotated[
|
|
87
|
+
bool,
|
|
88
|
+
typer.Option(
|
|
89
|
+
"--json",
|
|
90
|
+
help="Output results as JSON for agent parsing"
|
|
91
|
+
)
|
|
92
|
+
] = False,
|
|
93
|
+
) -> None:
|
|
94
|
+
"""Update agent context file with tech stack from plan.md.
|
|
95
|
+
|
|
96
|
+
This command:
|
|
97
|
+
1. Detects current feature directory (worktree or main repo)
|
|
98
|
+
2. Parses plan.md to extract tech stack information
|
|
99
|
+
3. Updates specified agent file (CLAUDE.md, GEMINI.md, etc.)
|
|
100
|
+
4. Preserves manual additions between <!-- MANUAL ADDITIONS --> markers
|
|
101
|
+
5. Updates Active Technologies and Recent Changes sections
|
|
102
|
+
|
|
103
|
+
Examples:
|
|
104
|
+
# Update Claude context (default)
|
|
105
|
+
spec-kitty agent update-context
|
|
106
|
+
|
|
107
|
+
# Update Gemini context with JSON output
|
|
108
|
+
spec-kitty agent update-context --agent-type gemini --json
|
|
109
|
+
|
|
110
|
+
# Update from within a worktree
|
|
111
|
+
cd .worktrees/008-feature
|
|
112
|
+
spec-kitty agent update-context
|
|
113
|
+
"""
|
|
114
|
+
try:
|
|
115
|
+
# Locate repository root
|
|
116
|
+
repo_root = locate_project_root()
|
|
117
|
+
cwd = Path.cwd()
|
|
118
|
+
|
|
119
|
+
# Find feature directory
|
|
120
|
+
try:
|
|
121
|
+
feature_dir = _find_feature_directory(repo_root, cwd)
|
|
122
|
+
except ValueError as e:
|
|
123
|
+
if json_output:
|
|
124
|
+
print(json.dumps({"error": str(e), "success": False}))
|
|
125
|
+
else:
|
|
126
|
+
console.print(f"[red]Error:[/red] {e}")
|
|
127
|
+
sys.exit(1)
|
|
128
|
+
|
|
129
|
+
# Get plan path
|
|
130
|
+
plan_path = feature_dir / "plan.md"
|
|
131
|
+
if not plan_path.exists():
|
|
132
|
+
error_msg = f"Plan file not found: {plan_path}"
|
|
133
|
+
if json_output:
|
|
134
|
+
print(json.dumps({"error": error_msg, "success": False}))
|
|
135
|
+
else:
|
|
136
|
+
console.print(f"[red]Error:[/red] {error_msg}")
|
|
137
|
+
console.print(f"[yellow]Hint:[/yellow] Run /spec-kitty.plan to create plan.md first")
|
|
138
|
+
sys.exit(1)
|
|
139
|
+
|
|
140
|
+
# Verify agent file exists
|
|
141
|
+
agent_file_path = get_agent_file_path(agent_type, repo_root)
|
|
142
|
+
if not agent_file_path.exists():
|
|
143
|
+
error_msg = f"Agent file not found: {agent_file_path}"
|
|
144
|
+
if json_output:
|
|
145
|
+
print(json.dumps({"error": error_msg, "success": False}))
|
|
146
|
+
else:
|
|
147
|
+
console.print(f"[red]Error:[/red] {error_msg}")
|
|
148
|
+
console.print(f"[yellow]Hint:[/yellow] Create {agent_file_path.name} first")
|
|
149
|
+
sys.exit(1)
|
|
150
|
+
|
|
151
|
+
# Parse tech stack from plan.md
|
|
152
|
+
tech_stack = parse_plan_for_tech_stack(plan_path)
|
|
153
|
+
|
|
154
|
+
# Extract feature slug from directory name
|
|
155
|
+
feature_slug = feature_dir.name
|
|
156
|
+
|
|
157
|
+
# Update agent context file
|
|
158
|
+
update_context_file(
|
|
159
|
+
agent_type=agent_type,
|
|
160
|
+
tech_stack=tech_stack,
|
|
161
|
+
feature_slug=feature_slug,
|
|
162
|
+
repo_root=repo_root,
|
|
163
|
+
feature_dir=feature_dir,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
# Output result
|
|
167
|
+
if json_output:
|
|
168
|
+
result = {
|
|
169
|
+
"success": True,
|
|
170
|
+
"agent_type": agent_type,
|
|
171
|
+
"agent_file": str(agent_file_path),
|
|
172
|
+
"feature": feature_slug,
|
|
173
|
+
"tech_stack": {k: v for k, v in tech_stack.items() if v},
|
|
174
|
+
}
|
|
175
|
+
print(json.dumps(result, indent=2))
|
|
176
|
+
else:
|
|
177
|
+
console.print(f"[green]✓[/green] Updated {agent_file_path.name}")
|
|
178
|
+
console.print(f" Feature: {feature_slug}")
|
|
179
|
+
if tech_stack.get("language"):
|
|
180
|
+
console.print(f" Language: {tech_stack['language']}")
|
|
181
|
+
if tech_stack.get("dependencies"):
|
|
182
|
+
console.print(f" Dependencies: {tech_stack['dependencies']}")
|
|
183
|
+
if tech_stack.get("storage"):
|
|
184
|
+
console.print(f" Storage: {tech_stack['storage']}")
|
|
185
|
+
|
|
186
|
+
except Exception as e:
|
|
187
|
+
if json_output:
|
|
188
|
+
print(json.dumps({"error": str(e), "success": False}))
|
|
189
|
+
else:
|
|
190
|
+
console.print(f"[red]Error:[/red] {e}")
|
|
191
|
+
sys.exit(1)
|