Skip to content
Back to skills

Documents

ASecurity

- **ステータス:** 採用 - **決定日:** 2026-08-20 - **関連:** BILL-218、PR #106 - **原資料の進捗:** 70%

  • 50 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
developmentapi

Works with

  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add iwasa-kosui/tanteki --skill documents --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Documents?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Documents
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/iwasa-kosui-documents-tanteki/badge)](https://www.skillsdirectory.com/skills/iwasa-kosui-documents-tanteki)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# ADR: 請求書PDF生成を非同期キュー処理にする

- **ステータス:** 採用
- **決定日:** 2026-08-20
- **関連:** BILL-218、PR #106
- **原資料の進捗:** 70%

## コンテキスト

請求書PDFの生成には最大45秒かかる。同期処理で生成すると、処理中にAPI接続が切断される可能性があるため、利用者に安定して結果を返せない。

## 決定

請求書PDFの生成はキューを利用した非同期処理とする。

1. APIはPDF生成要求を受け付ける。
2. APIは生成処理をキューに登録する。
3. APIは、受付を識別するための受付IDを返す。
4. ワーカーがキューから要求を取得し、請求書PDFを生成する。
5. 利用者は受付IDを使って生成状況または完成したPDFを確認する。

## 採用しなかった案

### 同期生成

APIリクエスト中にPDFを生成し、完成したPDFを直接返す方式は採用しない。最大45秒かかり、接続が切れるためである。

## 影響

### 利点

- 長時間のPDF生成中にAPI接続を維持する必要がない。
- APIは受付IDを速やかに返せる。
- ワーカー数やキューの処理能力を調整しやすい。
- 一時的な処理失敗に対して、再試行の仕組みを設けられる。

### 欠点・利用者への影響

- PDFはAPI呼び出し時点では完成していない。
- 利用者は完成まで待つ必要がある。
- 生成状況、完了通知、取得方法などの非同期フローを提供する必要がある。
- キュー滞留やワーカー障害により、完成までの時間が延びる可能性がある。

## 運用上の留意点

- 受付IDと生成要求の状態を永続化する。
- 少なくとも「受付済み」「処理中」「完了」「失敗」を識別できるようにする。
- 受付IDだけで他の利用者の請求書を取得できないよう、認可を行う。
- キューの滞留件数、処理時間、失敗件数を監視する。
- 同一要求の重複登録や、重複したPDF生成への対策を検討する。
- 失敗時の再試行上限は未決定である。無限再試行を避けるため、上限、再試行間隔、最終失敗時の扱いを別途決定する。

## 未決事項

- 再試行回数の上限
- 再試行間隔とバックオフ方式
- 生成完了・失敗の通知方法
- 受付IDによる状態確認APIの仕様
- 完成したPDFの保存期間と再取得可能期間
- 再試行上限に達した要求の運用対応

## 参考

- 課題: BILL-218
- プルリクエスト: PR #106
- 原資料の作業メモに記載された進捗: 70%

Files in this skill

  • adr-boundary.1.with_skill.md1 KB
  • adr-boundary.1.without_skill.md2.6 KB
  • adr-boundary.2.with_skill.md884 B
  • adr-boundary.2.without_skill.md2.3 KB
  • canonical-reference.1.without_skill.md216 B
  • canonical-reference.2.with_skill.md188 B
  • canonical-reference.2.without_skill.md289 B
  • comparison-rfc.1.with_skill.md1.6 KB
  • comparison-rfc.2.with_skill.md1.4 KB
  • comparison-rfc.2.without_skill.md1.7 KB
  • design-tradeoff.1.with_skill.md4.1 KB
  • design-tradeoff.1.without_skill.md7.6 KB
  • design-tradeoff.2.with_skill.md3.6 KB
  • design-tradeoff.2.without_skill.md9.7 KB
  • incident-record.1.with_skill.md510 B
  • incident-record.1.without_skill.md517 B
  • incident-record.2.with_skill.md702 B
  • incident-record.2.without_skill.md751 B
  • no-document.1.without_skill.md329 B
  • no-document.2.with_skill.md341 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.