56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# File 'lib/putpaws/ai/guide.rb', line 56
def self.skill_content(services: [])
services_line = services.empty? ? '(none configured yet — check .putpaws/application.json)' : services.join(', ')
" ---\n name: putpaws\n description: AWS operations for this project (CloudWatch logs, ECS deploy, db:migrate and one-off tasks on Fargate, CodeBuild CI) via the putpaws CLI. Use when asked to investigate logs, deploy, run rake tasks on AWS, or inspect ECS services.\n ---\n\n # putpaws\n\n Capistrano-style AWS operation commands. General form:\n\n bundle exec putpaws <service> <command> key=value\n\n Services in this project: \#{services_line}\n (services are the top-level keys of `.putpaws/application.json`)\n\n Discover commands with `bundle exec putpaws -T` (or `-D` for full descriptions).\n\n ## Read-only commands (safe to run without asking)\n\n - `bundle exec putpaws <service> info` \u2014 resolved settings, no AWS access\n - `bundle exec putpaws <service> log:tail since=2h` \u2014 CloudWatch logs (units: s/m/h/d/w, add `for=1h` to bound the range)\n - `bundle exec putpaws <service> log:tailf` \u2014 follow logs (long-running; prefer `log:tail` in automation)\n - `bundle exec putpaws ahead` \u2014 dry-run of provisioning (CREATE/UPDATE/SKIP)\n\n ## Mutating commands (confirm with the user before running)\n\n - `bundle exec putpaws <service> ecs:run cmd='bundle exec rake db:migrate' wait=true`\n \u2014 runs a one-off command on a temporary Fargate task and exits non-zero on failure.\n The best choice for migrations and rake tasks. Fully non-interactive.\n - `bundle exec putpaws <service> ecs:deploy wait=true` \u2014 redeploy the service (force new deployment)\n - `bundle exec putpaws <service> code_build:build branch=main` \u2014 start the CI build (build + push + deploy per buildspec)\n - `bundle exec putpaws <service> scheduler:deploy` \u2014 deploy schedules from `.putpaws/schedule.json`\n\n ## Interactive commands (avoid in non-TTY sessions; meant for humans)\n\n - `ecs:attach`, `ecs:shell`, `ecs:forward` \u2014 open live sessions into containers\n - `ready`, `steady`, `up`, `iam:grant` \u2014 provisioning flows with confirmation prompts\n\n ## Config files (source of truth, safe to read)\n\n - `.putpaws/application.json` \u2014 services and their cluster/log/build settings\n - `.putpaws/infra.json` \u2014 network (subnets/security groups) and target (cluster/taskdef) definitions\n - `.putpaws/schedule.json` \u2014 named schedules, `.putpaws/operators.json` \u2014 operator permission profiles\n - `.putpaws/provisioning/<service>/` \u2014 provisioning inputs (provision.json), state, IAM role drafts\n\n ## Suggested permission allowlist (.claude/settings.json)\n\n \"permissions\": {\n \"allow\": [\n \"Bash(bundle exec putpaws -T*)\",\n \"Bash(bundle exec putpaws * info)\",\n \"Bash(bundle exec putpaws * log:*)\"\n ]\n }\n\n ---\n Generated by putpaws \#{Putpaws::VERSION}. Refresh with `bundle exec putpaws away` after updating the gem.\n MD\nend\n"
|