Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .claude/skills/create-pr/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
name: create-pr
description: GitHubにPull Requestを作成するスキル。コミット・プッシュ済みの状態で、現在のブランチの変更内容を分析し、適切なタイトルと説明文でPRを作成する。「PRを作成して」「プルリクエストを作って」「PR作って」などのトリガーで発動。
---

# PR作成スキル

## 前提条件

- コミット済み
- プッシュ済み
- GitHubリポジトリと連携済み

## ワークフロー

### 1. 現在のブランチ情報を取得

```bash
git branch --show-current
```

### 2. デフォルトブランチを自動検出

```bash
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
```

### 3. 変更内容を把握

デフォルトブランチとの差分コミットを取得:

```bash
git log <default-branch>..HEAD --oneline
```

詳細な変更内容を確認:

```bash
git diff <default-branch>...HEAD --stat
```

### 4. PRを作成

```bash
gh pr create --title "<タイトル>" --body "<本文>"
```

## PR本文フォーマット(英語で出力)

```markdown
## Summary
- 変更内容の要約を箇条書きで(1-3点)

## Changes
- 具体的な変更点を箇条書きで

## Test Plan
- テスト方法や確認事項
```

## 注意事項

- PRのタイトルと本文は**英語**で作成すること
- コミットメッセージを参考にしつつ、読み手にわかりやすい表現にする
- 変更が大きい場合はChangesセクションを充実させる
- 変更が小さい場合はシンプルに保つ
1 change: 1 addition & 0 deletions .claude/skills/update-manual/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ xlmakeの機能追加、更新時にマニュアルを修正する。
1. マニュアルの該当箇所を特定する
2. 変更内容に基づき、影響範囲を調査する
- マニュアルの対象ページのリストアップ(日本語、英語 etc)
- @website/docs, @website/i18n
- マニュアルに対応するインデックスファイルの修正有無(@docs/spec/all-specs.md)
- README.md
- 結合テスト(./tests)
Expand Down
13 changes: 1 addition & 12 deletions docs/impl/2026-01-10_phase1-2-detailed-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,30 +242,22 @@ export type TableOptions<T> = {
// スタイル
style?: TableStyle;
border?: BorderStyle;

// 条件付きスタイル
conditionalStyle?: (row: T, col: keyof T) => CellStyle | {};
};
```

**実装上の注意**:
- `data` の型: `T & { _style?: ... }`
- 各行にセル単位のスタイルを指定可能(`_style` プロパティ)
- 例: `{ name: "太郎", age: 30, _style: { age: { bold: true } } }`
- `conditionalStyle` は関数型
- 行とカラムを受け取り、スタイルを返す
- 空オブジェクト `{}` を返すとスタイル適用なし

**スタイルのカスケーディング優先度**(低 → 高):
1. `preset` - ベース
2. `columns[].style` - 列単位
3. `style.header` / `style.body` - 行種類
4. `conditionalStyle()` - 条件付き
5. `data[]._style` - セル単位(最優先)
4. `data[]._style` - セル単位(最優先)

**テスト方針**:
- 型定義のみなので、コンパイルが通ることを確認
- `conditionalStyle` の型が正しく推論されることを確認

---

Expand Down Expand Up @@ -686,15 +678,12 @@ export const tableOptionsSchema = z.object({
mergeSameValues: z.boolean().optional(),
style: tableStyleSchema.optional(),
border: borderStyleSchema.optional(),
conditionalStyle: z.function().optional(),
}).strict();
```

**実装上の注意**:
- `data` は `z.record(z.unknown())` で任意のオブジェクト配列として扱う
- ジェネリック型 `<T>` はランタイムでは扱えないため
- `conditionalStyle` は `z.function()` でバリデーション
- 関数の引数や戻り値の型検証はZodでは困難(TypeScriptの型に任せる)
- `autoWidth` は `"all" | "body" | false` のUnion型

**テスト方針**:
Expand Down
8 changes: 2 additions & 6 deletions docs/impl/2026-01-10_phase4-detailed-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ describe("hasPreset", () => {
1. プリセット(`preset`)
2. 列単位スタイル(`columns[].style`)
3. 行種類(`style.header` / `style.body`)
4. 条件付きスタイル(`conditionalStyle()`)
5. セル単位(`data[]._style`) ← 最優先
4. セル単位(`data[]._style`) ← 最優先

### 実装内容

Expand Down Expand Up @@ -325,22 +324,19 @@ import { getPreset } from "../styles/presets";
const preset = getPreset("basic");
const columnStyle = { align: "right" };
const headerStyle = preset.style?.header;
const conditionalStyle = { color: "#FF0000" };
const cellStyle = { bold: true };

// マージ(優先度順)
const finalStyle = mergeStyles(
headerStyle, // 1. プリセットのヘッダースタイル
columnStyle, // 2. 列単位スタイル
conditionalStyle, // 3. 条件付きスタイル
cellStyle, // 4. セル単位スタイル(最優先)
cellStyle, // 3. セル単位スタイル(最優先)
);

// 結果:
// {
// bold: true, // cellStyle から(最優先)
// fill: "#4472C4", // headerStyle から
// color: "#FF0000", // conditionalStyle から(headerStyleの#FFFFFFを上書き)
// align: "right", // columnStyle から(headerStyleのcenterを上書き)
// }
```
Expand Down
6 changes: 2 additions & 4 deletions docs/impl/2026-01-10_phase5-detailed-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export class SheetWriter {
* テーブルを書き込む
*/
private writeTable<T>(options: TableOptions<T>): void {
const { preset, columns, data, autoWidth, style, border, conditionalStyle } = options;
const { preset, columns, data, autoWidth, style, border } = options;

// プリセット取得
const presetConfig = preset ? getPreset(preset) : undefined;
Expand All @@ -441,7 +441,7 @@ export class SheetWriter {
this.writeHeaders(columns, leafColumns, headerDepth, presetConfig, style);

// データ行書き込み
this.writeDataRows(leafColumns, data, presetConfig, style, conditionalStyle);
this.writeDataRows(leafColumns, data, presetConfig, style);

// 罫線を適用
if (border || presetConfig?.border) {
Expand Down Expand Up @@ -507,7 +507,6 @@ export class SheetWriter {
const baseStyle = presetConfig?.style?.body;
const columnStyle = col.style;
const rowStyle = tableStyle?.body;
const condStyle = conditionalStyle?.(rowData, col.key) || {};
const cellStyle = rowData._style?.[col.key];

// ストライプ
Expand All @@ -521,7 +520,6 @@ export class SheetWriter {
stripeStyle,
columnStyle,
rowStyle,
condStyle,
cellStyle
);

Expand Down
9 changes: 1 addition & 8 deletions docs/impl/2026-01-11_integration-test-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ xlkitは「ブロックを上から積み上げる」設計のため、各ブロ
| mergeSameValues | 同値セルの垂直マージ |
| マルチヘッダー | 親カラム構造(階層ヘッダー) |
| border | 罫線設定 |
| conditionalStyle | 条件付きスタイル |
| _style | セル単位スタイル |

### 観点4: スタイル項目
Expand Down Expand Up @@ -148,7 +147,7 @@ xlkitは「ブロックを上から積み上げる」設計のため、各ブロ
| `03-formats.xlsx` | 数値/日付/通貨など書式 | 3 |
| `04-structure.xlsx` | 複数シート + space + 複合ブロック | 3 |
| `05-table-features.xlsx` | autoWidth/mergeSameValues/border | 5 |
| `06-cell-styles.xlsx` | _style + conditionalStyle | 2 |
| `06-cell-styles.xlsx` | _style | 1 |
| `07-image.xlsx` | 画像ブロック | 1 |

---
Expand Down Expand Up @@ -296,7 +295,6 @@ columns: [
| シート名 | カバーする機能 |
|---------|---------------|
| CellStyle | _style によるセル単位スタイル |
| ConditionalStyle | conditionalStyle 関数 |

**CellStyleシートのデータ:**
```typescript
Expand All @@ -307,11 +305,6 @@ data: [
]
```

**ConditionalStyleシートの条件:**
```typescript
conditionalStyle: (row) => row.profit < 0 ? { color: "#FF0000", bold: true } : {}
```

---

### 07-image.xlsx
Expand Down
1 change: 0 additions & 1 deletion docs/impl/2026-01-11_xlmake-api-implementation-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ type TableOptions<T> = {
mergeSameValues?: boolean;
style?: { header?: CellStyle; body?: CellStyle };
border?: BorderStyle;
conditionalStyle?: (row: T, col: keyof T) => CellStyle | {};
};
```

Expand Down
Loading