Skip to content

Commit 4dfda58

Browse files
Merge pull request #2 from aws-samples/feature/unify-config-json
Feature/unify config json
2 parents 0fbeed2 + 5f4f533 commit 4dfda58

25 files changed

Lines changed: 135 additions & 105 deletions

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ web-ui/public/aws-exports.json
5151
# Config (contains secrets)
5252
infra/config.yaml
5353

54-
# Assets (downloaded via scripts)
54+
# Assets (downloaded via scripts) and user config
5555
skill/assets/aws/
5656
skill/assets/material/
57+
skill/assets/config.json
5758
*.tsbuildinfo
5859
.ash/
5960
?/

‎agent/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Layer 4 agent built with [Strands Agents](https://github.com/strands-agents/sdk-
2626
┌─────────┘ └──────────┐
2727
▼ ▼
2828
AgentCore Runtime Public / Local
29-
(pptx-maker MCP) MCP Servers
29+
(spec-driven-presentation-maker MCP) MCP Servers
3030
```
3131

3232
The agent is created via `create_agent()`, which:

‎agent/README_ja.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Agent は以下の 2 種類のツールを組み合わせて動作する。
1717

1818
```
1919
User → AgentCore Runtime → Agent
20-
├── MCP: pptx-maker (AgentCore Runtime + JWT)
20+
├── MCP: spec-driven-presentation-maker (AgentCore Runtime + JWT)
2121
├── MCP: AWS Knowledge (Public, no auth)
2222
├── MCP: AWS Pricing (Local stdio)
2323
├── Built-in: upload_tools
@@ -130,13 +130,13 @@ agent/
130130
### ビルド
131131

132132
```bash
133-
docker build -t pptx-maker-agent .
133+
docker build -t sdpm-agent .
134134
```
135135

136136
### 実行
137137

138138
```bash
139-
docker run -p 8080:8080 pptx-maker-agent
139+
docker run -p 8080:8080 sdpm-agent
140140
```
141141

142142
- ポート: `8080`

‎docs/en/custom-template.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ Icons are stored in `skill/assets/` with a `manifest.json` per source:
145145

146146
```
147147
skill/assets/
148-
├── config.json # Optional: extra source configuration
148+
├── config.json # Optional: user settings (gitignored, see config.example.json)
149+
├── config.example.json # Example config (git-managed)
149150
├── aws/
150151
│ ├── manifest.json # {"icons": [{"name": "Lambda", "file": "Lambda.svg", "tags": [...]}]}
151152
│ └── *.svg
@@ -181,17 +182,21 @@ Create a directory with your icons and a `manifest.json`:
181182
}
182183
```
183184

184-
Register in `skill/assets/config.json`:
185+
Register in `skill/assets/config.json` (copy from `config.example.json`):
185186

186187
```json
187188
{
189+
"output_dir": "~/Documents/SDPM-Presentations",
188190
"extra_sources": [
189191
{
190192
"name": "mybrand",
191193
"manifest": "/path/to/my-icons/manifest.json",
192194
"files_dir": "/path/to/my-icons/"
193195
}
194-
]
196+
],
197+
"preview": {
198+
"backend": ""
199+
}
195200
}
196201
```
197202

‎docs/ja/custom-template.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ uv run python3 scripts/download_material_icons.py
145145

146146
```
147147
skill/assets/
148-
├── config.json # 任意: 追加ソース設定
148+
├── config.json # 任意: ユーザー設定(git管理外、config.example.json を参照)
149+
├── config.example.json # 設定例(git管理)
149150
├── aws/
150151
│ ├── manifest.json # {"icons": [{"name": "Lambda", "file": "Lambda.svg", "tags": [...]}]}
151152
│ └── *.svg
@@ -181,17 +182,21 @@ skill/assets/
181182
}
182183
```
183184

184-
`skill/assets/config.json` に登録:
185+
`skill/assets/config.json` に登録(`config.example.json` をコピーして作成):
185186

186187
```json
187188
{
189+
"output_dir": "~/Documents/SDPM-Presentations",
188190
"extra_sources": [
189191
{
190192
"name": "mybrand",
191193
"manifest": "/path/to/my-icons/manifest.json",
192194
"files_dir": "/path/to/my-icons/"
193195
}
194-
]
196+
],
197+
"preview": {
198+
"backend": ""
199+
}
195200
}
196201
```
197202

‎mcp-local/tools.py‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
import json
1919

2020

21+
def _get_output_base_dir() -> Path:
22+
"""Return output base directory from config, with tilde expansion."""
23+
try:
24+
from sdpm.config import get_output_dir
25+
return get_output_dir()
26+
except Exception:
27+
return Path.home() / "Documents" / "SDPM-Presentations"
28+
29+
2130
def init_presentation(
2231
name: str,
2332
template: str,
@@ -45,7 +54,7 @@ def init_presentation(
4554

4655
ts = _dt.now().strftime("%Y%m%d-%H%M")
4756
dir_name = f"{ts}-{name}" if name else ts
48-
out_dir = Path.home() / "Documents" / "sdpm" / dir_name
57+
out_dir = _get_output_base_dir() / dir_name
4958
out_dir.mkdir(parents=True, exist_ok=True)
5059

5160
pres_data: dict[str, Any] = {"fonts": {"fullwidth": None, "halfwidth": None}, "slides": []}

‎skill/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: pptx-maker
2+
name: spec-driven-presentation-maker
33
description: "Generate PowerPoint presentations from JSON. Use when user wants to create slides, proposals, or presentation materials."
44
---
55

‎skill/assets/config.example.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"output_dir": "~/Documents/SDPM-Presentations",
3+
"extra_sources": [],
4+
"preview": {
5+
"backend": ""
6+
}
7+
}

‎skill/references/guides/setup.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Initial environment setup — read once on first use"
44

55
# Setup Guide
66

7-
Setup steps for using the pptx-maker Skill in a new environment.
7+
Setup steps for using the spec-driven-presentation-maker Skill in a new environment.
88

99
## Prerequisites
1010

‎skill/references/guides/source-material-guide.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run the following for each PPTX (`{name}` is the filename without extension):
1313

1414
1. Convert the existing PPTX to JSON to get structural data
1515
```bash
16-
uv run python3 scripts/pptx_to_json.py {input_pptx} -o /tmp/pptx-maker/{name}/{name}.json
16+
uv run python3 scripts/pptx_to_json.py {input_pptx} -o /tmp/sdpm/{name}/{name}.json
1717
```
1818
2. Generate previews to see all slides visually
1919
```bash
@@ -31,7 +31,7 @@ Review preview images and JSON, then inventory the following:
3131
Present the inventory to the user and agree on what to reuse.
3232

3333
## Rules
34-
- Output to `/tmp/pptx-maker/{name}/` — use distinct names to avoid collisions across multiple PPTXs
34+
- Output to `/tmp/sdpm/{name}/` — use distinct names to avoid collisions across multiple PPTXs
3535
- Complete both JSON conversion AND preview before proceeding to reuse assessment
3636
- Do NOT reuse colors (fill, fontColor, line, etc.) or styles — re-apply according to the new theme and design-rules.md
3737
- Only content (text, data, diagram structure) may be reused

0 commit comments

Comments
 (0)