engine7 7.0.1 → 7.0.3
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.
- package/dist/cli.mjs +66 -3
- package/package.json +1 -1
- package/templates/skills/aim/SKILL.md +143 -0
- package/templates/skills/docx/LICENSE.txt +30 -0
- package/templates/skills/docx/SKILL.md +590 -0
- package/templates/skills/docx/scripts/__init__.py +1 -0
- package/templates/skills/docx/scripts/accept_changes.py +135 -0
- package/templates/skills/docx/scripts/comment.py +318 -0
- package/templates/skills/docx/scripts/office/helpers/__init__.py +0 -0
- package/templates/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
- package/templates/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/templates/skills/docx/scripts/office/pack.py +159 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/templates/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/templates/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/templates/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/templates/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/templates/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/templates/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/templates/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/templates/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/templates/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/templates/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/templates/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/templates/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/templates/skills/docx/scripts/office/soffice.py +183 -0
- package/templates/skills/docx/scripts/office/unpack.py +132 -0
- package/templates/skills/docx/scripts/office/validate.py +111 -0
- package/templates/skills/docx/scripts/office/validators/__init__.py +15 -0
- package/templates/skills/docx/scripts/office/validators/base.py +847 -0
- package/templates/skills/docx/scripts/office/validators/docx.py +446 -0
- package/templates/skills/docx/scripts/office/validators/pptx.py +275 -0
- package/templates/skills/docx/scripts/office/validators/redlining.py +247 -0
- package/templates/skills/docx/scripts/templates/comments.xml +3 -0
- package/templates/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/templates/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/templates/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/templates/skills/docx/scripts/templates/people.xml +3 -0
- package/templates/skills/pdf/LICENSE.txt +30 -0
- package/templates/skills/pdf/SKILL.md +314 -0
- package/templates/skills/pdf/forms.md +294 -0
- package/templates/skills/pdf/reference.md +612 -0
- package/templates/skills/pptx/LICENSE.txt +30 -0
- package/templates/skills/pptx/SKILL.md +232 -0
- package/templates/skills/pptx/editing.md +205 -0
- package/templates/skills/pptx/pptxgenjs.md +420 -0
- package/templates/skills/pptx/scripts/__init__.py +0 -0
- package/templates/skills/pptx/scripts/add_slide.py +195 -0
- package/templates/skills/pptx/scripts/clean.py +286 -0
- package/templates/skills/pptx/scripts/office/helpers/__init__.py +0 -0
- package/templates/skills/pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/templates/skills/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/templates/skills/pptx/scripts/office/pack.py +159 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/templates/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/templates/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/templates/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/templates/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/templates/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/templates/skills/pptx/scripts/office/soffice.py +183 -0
- package/templates/skills/pptx/scripts/office/unpack.py +132 -0
- package/templates/skills/pptx/scripts/office/validate.py +111 -0
- package/templates/skills/pptx/scripts/office/validators/__init__.py +15 -0
- package/templates/skills/pptx/scripts/office/validators/base.py +847 -0
- package/templates/skills/pptx/scripts/office/validators/docx.py +446 -0
- package/templates/skills/pptx/scripts/office/validators/pptx.py +275 -0
- package/templates/skills/pptx/scripts/office/validators/redlining.py +247 -0
- package/templates/skills/pptx/scripts/thumbnail.py +289 -0
- package/templates/skills/sop/SKILL.md +243 -0
- package/templates/skills/xlsx/LICENSE.txt +30 -0
- package/templates/skills/xlsx/SKILL.md +292 -0
- package/templates/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/templates/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/templates/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/templates/skills/xlsx/scripts/office/pack.py +159 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/templates/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/templates/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/templates/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/templates/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/templates/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/templates/skills/xlsx/scripts/office/soffice.py +183 -0
- package/templates/skills/xlsx/scripts/office/unpack.py +132 -0
- package/templates/skills/xlsx/scripts/office/validate.py +111 -0
- package/templates/skills/xlsx/scripts/office/validators/__init__.py +15 -0
- package/templates/skills/xlsx/scripts/office/validators/base.py +847 -0
- package/templates/skills/xlsx/scripts/office/validators/docx.py +446 -0
- package/templates/skills/xlsx/scripts/office/validators/pptx.py +275 -0
- package/templates/skills/xlsx/scripts/office/validators/redlining.py +247 -0
- package/templates/skills/xlsx/scripts/recalc.py +184 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"""Create thumbnail grids from PowerPoint presentation slides.
|
|
2
|
+
|
|
3
|
+
Creates a grid layout of slide thumbnails for quick visual analysis.
|
|
4
|
+
Labels each thumbnail with its XML filename (e.g., slide1.xml).
|
|
5
|
+
Hidden slides are shown with a placeholder pattern.
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
python thumbnail.py input.pptx [output_prefix] [--cols N]
|
|
9
|
+
|
|
10
|
+
Examples:
|
|
11
|
+
python thumbnail.py presentation.pptx
|
|
12
|
+
# Creates: thumbnails.jpg
|
|
13
|
+
|
|
14
|
+
python thumbnail.py template.pptx grid --cols 4
|
|
15
|
+
# Creates: grid.jpg (or grid-1.jpg, grid-2.jpg for large decks)
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
import subprocess
|
|
20
|
+
import sys
|
|
21
|
+
import tempfile
|
|
22
|
+
import zipfile
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
import defusedxml.minidom
|
|
26
|
+
from office.soffice import get_soffice_env
|
|
27
|
+
from PIL import Image, ImageDraw, ImageFont
|
|
28
|
+
|
|
29
|
+
THUMBNAIL_WIDTH = 300
|
|
30
|
+
CONVERSION_DPI = 100
|
|
31
|
+
MAX_COLS = 6
|
|
32
|
+
DEFAULT_COLS = 3
|
|
33
|
+
JPEG_QUALITY = 95
|
|
34
|
+
GRID_PADDING = 20
|
|
35
|
+
BORDER_WIDTH = 2
|
|
36
|
+
FONT_SIZE_RATIO = 0.10
|
|
37
|
+
LABEL_PADDING_RATIO = 0.4
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def main():
|
|
41
|
+
parser = argparse.ArgumentParser(
|
|
42
|
+
description="Create thumbnail grids from PowerPoint slides."
|
|
43
|
+
)
|
|
44
|
+
parser.add_argument("input", help="Input PowerPoint file (.pptx)")
|
|
45
|
+
parser.add_argument(
|
|
46
|
+
"output_prefix",
|
|
47
|
+
nargs="?",
|
|
48
|
+
default="thumbnails",
|
|
49
|
+
help="Output prefix for image files (default: thumbnails)",
|
|
50
|
+
)
|
|
51
|
+
parser.add_argument(
|
|
52
|
+
"--cols",
|
|
53
|
+
type=int,
|
|
54
|
+
default=DEFAULT_COLS,
|
|
55
|
+
help=f"Number of columns (default: {DEFAULT_COLS}, max: {MAX_COLS})",
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
args = parser.parse_args()
|
|
59
|
+
|
|
60
|
+
cols = min(args.cols, MAX_COLS)
|
|
61
|
+
if args.cols > MAX_COLS:
|
|
62
|
+
print(f"Warning: Columns limited to {MAX_COLS}")
|
|
63
|
+
|
|
64
|
+
input_path = Path(args.input)
|
|
65
|
+
if not input_path.exists() or input_path.suffix.lower() != ".pptx":
|
|
66
|
+
print(f"Error: Invalid PowerPoint file: {args.input}", file=sys.stderr)
|
|
67
|
+
sys.exit(1)
|
|
68
|
+
|
|
69
|
+
output_path = Path(f"{args.output_prefix}.jpg")
|
|
70
|
+
|
|
71
|
+
try:
|
|
72
|
+
slide_info = get_slide_info(input_path)
|
|
73
|
+
|
|
74
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
75
|
+
temp_path = Path(temp_dir)
|
|
76
|
+
visible_images = convert_to_images(input_path, temp_path)
|
|
77
|
+
|
|
78
|
+
if not visible_images and not any(s["hidden"] for s in slide_info):
|
|
79
|
+
print("Error: No slides found", file=sys.stderr)
|
|
80
|
+
sys.exit(1)
|
|
81
|
+
|
|
82
|
+
slides = build_slide_list(slide_info, visible_images, temp_path)
|
|
83
|
+
|
|
84
|
+
grid_files = create_grids(slides, cols, THUMBNAIL_WIDTH, output_path)
|
|
85
|
+
|
|
86
|
+
print(f"Created {len(grid_files)} grid(s):")
|
|
87
|
+
for grid_file in grid_files:
|
|
88
|
+
print(f" {grid_file}")
|
|
89
|
+
|
|
90
|
+
except Exception as e:
|
|
91
|
+
print(f"Error: {e}", file=sys.stderr)
|
|
92
|
+
sys.exit(1)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def get_slide_info(pptx_path: Path) -> list[dict]:
|
|
96
|
+
with zipfile.ZipFile(pptx_path, "r") as zf:
|
|
97
|
+
rels_content = zf.read("ppt/_rels/presentation.xml.rels").decode("utf-8")
|
|
98
|
+
rels_dom = defusedxml.minidom.parseString(rels_content)
|
|
99
|
+
|
|
100
|
+
rid_to_slide = {}
|
|
101
|
+
for rel in rels_dom.getElementsByTagName("Relationship"):
|
|
102
|
+
rid = rel.getAttribute("Id")
|
|
103
|
+
target = rel.getAttribute("Target")
|
|
104
|
+
rel_type = rel.getAttribute("Type")
|
|
105
|
+
if "slide" in rel_type and target.startswith("slides/"):
|
|
106
|
+
rid_to_slide[rid] = target.replace("slides/", "")
|
|
107
|
+
|
|
108
|
+
pres_content = zf.read("ppt/presentation.xml").decode("utf-8")
|
|
109
|
+
pres_dom = defusedxml.minidom.parseString(pres_content)
|
|
110
|
+
|
|
111
|
+
slides = []
|
|
112
|
+
for sld_id in pres_dom.getElementsByTagName("p:sldId"):
|
|
113
|
+
rid = sld_id.getAttribute("r:id")
|
|
114
|
+
if rid in rid_to_slide:
|
|
115
|
+
hidden = sld_id.getAttribute("show") == "0"
|
|
116
|
+
slides.append({"name": rid_to_slide[rid], "hidden": hidden})
|
|
117
|
+
|
|
118
|
+
return slides
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def build_slide_list(
|
|
122
|
+
slide_info: list[dict],
|
|
123
|
+
visible_images: list[Path],
|
|
124
|
+
temp_dir: Path,
|
|
125
|
+
) -> list[tuple[Path, str]]:
|
|
126
|
+
if visible_images:
|
|
127
|
+
with Image.open(visible_images[0]) as img:
|
|
128
|
+
placeholder_size = img.size
|
|
129
|
+
else:
|
|
130
|
+
placeholder_size = (1920, 1080)
|
|
131
|
+
|
|
132
|
+
slides = []
|
|
133
|
+
visible_idx = 0
|
|
134
|
+
|
|
135
|
+
for info in slide_info:
|
|
136
|
+
if info["hidden"]:
|
|
137
|
+
placeholder_path = temp_dir / f"hidden-{info['name']}.jpg"
|
|
138
|
+
placeholder_img = create_hidden_placeholder(placeholder_size)
|
|
139
|
+
placeholder_img.save(placeholder_path, "JPEG")
|
|
140
|
+
slides.append((placeholder_path, f"{info['name']} (hidden)"))
|
|
141
|
+
else:
|
|
142
|
+
if visible_idx < len(visible_images):
|
|
143
|
+
slides.append((visible_images[visible_idx], info["name"]))
|
|
144
|
+
visible_idx += 1
|
|
145
|
+
|
|
146
|
+
return slides
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def create_hidden_placeholder(size: tuple[int, int]) -> Image.Image:
|
|
150
|
+
img = Image.new("RGB", size, color="#F0F0F0")
|
|
151
|
+
draw = ImageDraw.Draw(img)
|
|
152
|
+
line_width = max(5, min(size) // 100)
|
|
153
|
+
draw.line([(0, 0), size], fill="#CCCCCC", width=line_width)
|
|
154
|
+
draw.line([(size[0], 0), (0, size[1])], fill="#CCCCCC", width=line_width)
|
|
155
|
+
return img
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def convert_to_images(pptx_path: Path, temp_dir: Path) -> list[Path]:
|
|
159
|
+
pdf_path = temp_dir / f"{pptx_path.stem}.pdf"
|
|
160
|
+
|
|
161
|
+
result = subprocess.run(
|
|
162
|
+
[
|
|
163
|
+
"soffice",
|
|
164
|
+
"--headless",
|
|
165
|
+
"--convert-to",
|
|
166
|
+
"pdf",
|
|
167
|
+
"--outdir",
|
|
168
|
+
str(temp_dir),
|
|
169
|
+
str(pptx_path),
|
|
170
|
+
],
|
|
171
|
+
capture_output=True,
|
|
172
|
+
text=True,
|
|
173
|
+
env=get_soffice_env(),
|
|
174
|
+
)
|
|
175
|
+
if result.returncode != 0 or not pdf_path.exists():
|
|
176
|
+
raise RuntimeError("PDF conversion failed")
|
|
177
|
+
|
|
178
|
+
result = subprocess.run(
|
|
179
|
+
[
|
|
180
|
+
"pdftoppm",
|
|
181
|
+
"-jpeg",
|
|
182
|
+
"-r",
|
|
183
|
+
str(CONVERSION_DPI),
|
|
184
|
+
str(pdf_path),
|
|
185
|
+
str(temp_dir / "slide"),
|
|
186
|
+
],
|
|
187
|
+
capture_output=True,
|
|
188
|
+
text=True,
|
|
189
|
+
)
|
|
190
|
+
if result.returncode != 0:
|
|
191
|
+
raise RuntimeError("Image conversion failed")
|
|
192
|
+
|
|
193
|
+
return sorted(temp_dir.glob("slide-*.jpg"))
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def create_grids(
|
|
197
|
+
slides: list[tuple[Path, str]],
|
|
198
|
+
cols: int,
|
|
199
|
+
width: int,
|
|
200
|
+
output_path: Path,
|
|
201
|
+
) -> list[str]:
|
|
202
|
+
max_per_grid = cols * (cols + 1)
|
|
203
|
+
grid_files = []
|
|
204
|
+
|
|
205
|
+
for chunk_idx, start_idx in enumerate(range(0, len(slides), max_per_grid)):
|
|
206
|
+
end_idx = min(start_idx + max_per_grid, len(slides))
|
|
207
|
+
chunk_slides = slides[start_idx:end_idx]
|
|
208
|
+
|
|
209
|
+
grid = create_grid(chunk_slides, cols, width)
|
|
210
|
+
|
|
211
|
+
if len(slides) <= max_per_grid:
|
|
212
|
+
grid_filename = output_path
|
|
213
|
+
else:
|
|
214
|
+
stem = output_path.stem
|
|
215
|
+
suffix = output_path.suffix
|
|
216
|
+
grid_filename = output_path.parent / f"{stem}-{chunk_idx + 1}{suffix}"
|
|
217
|
+
|
|
218
|
+
grid_filename.parent.mkdir(parents=True, exist_ok=True)
|
|
219
|
+
grid.save(str(grid_filename), quality=JPEG_QUALITY)
|
|
220
|
+
grid_files.append(str(grid_filename))
|
|
221
|
+
|
|
222
|
+
return grid_files
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
def create_grid(
|
|
226
|
+
slides: list[tuple[Path, str]],
|
|
227
|
+
cols: int,
|
|
228
|
+
width: int,
|
|
229
|
+
) -> Image.Image:
|
|
230
|
+
font_size = int(width * FONT_SIZE_RATIO)
|
|
231
|
+
label_padding = int(font_size * LABEL_PADDING_RATIO)
|
|
232
|
+
|
|
233
|
+
with Image.open(slides[0][0]) as img:
|
|
234
|
+
aspect = img.height / img.width
|
|
235
|
+
height = int(width * aspect)
|
|
236
|
+
|
|
237
|
+
rows = (len(slides) + cols - 1) // cols
|
|
238
|
+
grid_w = cols * width + (cols + 1) * GRID_PADDING
|
|
239
|
+
grid_h = rows * (height + font_size + label_padding * 2) + (rows + 1) * GRID_PADDING
|
|
240
|
+
|
|
241
|
+
grid = Image.new("RGB", (grid_w, grid_h), "white")
|
|
242
|
+
draw = ImageDraw.Draw(grid)
|
|
243
|
+
|
|
244
|
+
try:
|
|
245
|
+
font = ImageFont.load_default(size=font_size)
|
|
246
|
+
except Exception:
|
|
247
|
+
font = ImageFont.load_default()
|
|
248
|
+
|
|
249
|
+
for i, (img_path, slide_name) in enumerate(slides):
|
|
250
|
+
row, col = i // cols, i % cols
|
|
251
|
+
x = col * width + (col + 1) * GRID_PADDING
|
|
252
|
+
y_base = (
|
|
253
|
+
row * (height + font_size + label_padding * 2) + (row + 1) * GRID_PADDING
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
label = slide_name
|
|
257
|
+
bbox = draw.textbbox((0, 0), label, font=font)
|
|
258
|
+
text_w = bbox[2] - bbox[0]
|
|
259
|
+
draw.text(
|
|
260
|
+
(x + (width - text_w) // 2, y_base + label_padding),
|
|
261
|
+
label,
|
|
262
|
+
fill="black",
|
|
263
|
+
font=font,
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
y_thumbnail = y_base + label_padding + font_size + label_padding
|
|
267
|
+
|
|
268
|
+
with Image.open(img_path) as img:
|
|
269
|
+
img.thumbnail((width, height), Image.Resampling.LANCZOS)
|
|
270
|
+
w, h = img.size
|
|
271
|
+
tx = x + (width - w) // 2
|
|
272
|
+
ty = y_thumbnail + (height - h) // 2
|
|
273
|
+
grid.paste(img, (tx, ty))
|
|
274
|
+
|
|
275
|
+
if BORDER_WIDTH > 0:
|
|
276
|
+
draw.rectangle(
|
|
277
|
+
[
|
|
278
|
+
(tx - BORDER_WIDTH, ty - BORDER_WIDTH),
|
|
279
|
+
(tx + w + BORDER_WIDTH - 1, ty + h + BORDER_WIDTH - 1),
|
|
280
|
+
],
|
|
281
|
+
outline="gray",
|
|
282
|
+
width=BORDER_WIDTH,
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
return grid
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
if __name__ == "__main__":
|
|
289
|
+
main()
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sop
|
|
3
|
+
description: "软件工程 SOP——任务四状态(pending/in_progress/block/completed) + calendar 源头同步 + 文档生命周期。做任务前必须读,派活/开工/卡住/完成时触发。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SOP — 工作流程标准
|
|
7
|
+
|
|
8
|
+
> **做事前先读这个。** 核心原则:做事前先写文档,明天看文档干活。
|
|
9
|
+
|
|
10
|
+
## 0. 什么时候读这个 SOP
|
|
11
|
+
|
|
12
|
+
**必须触发 `Skill("sop")` 的场景:**
|
|
13
|
+
- 收到新任务(翀哥/姐姐派活、自己领任务)
|
|
14
|
+
- 开始做一个 todo 之前
|
|
15
|
+
- 卡住了(要标 block)
|
|
16
|
+
- 完成任务(要标 completed + 验证)
|
|
17
|
+
- 不确定"这个该写到哪"
|
|
18
|
+
|
|
19
|
+
**核心原则:做事前先写文档,明天看文档干活。docs/ 手动维护,topics/ 是 auto memory 地盘别动。**
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. 任务四状态
|
|
24
|
+
|
|
25
|
+
每次状态变迁**必须记时间**,**同步到 calendar + SESSION-STATE + docs/todo/ + TodoWrite**:
|
|
26
|
+
|
|
27
|
+
| 标记 | 状态 | 变迁格式 |
|
|
28
|
+
|------|------|---------|
|
|
29
|
+
| `- [ ]` | pending | `- [ ] 任务名` |
|
|
30
|
+
| `- [~]` | in_progress | `- [~] 任务名 — started M/D HH:MM` |
|
|
31
|
+
| `- [!]` | block | `- [!] 任务名 — blocked: 原因, unlock: 条件 (M/D HH:MM)` |
|
|
32
|
+
| `- [x]` | completed | `- [x] 任务名 — M/D HH:MM→HH:MM (Nmin)` |
|
|
33
|
+
|
|
34
|
+
**规则**:
|
|
35
|
+
- 加任务必须先走 `calendar add-task`(强制带日期+时间),收到 notification 后再同步到其他位置
|
|
36
|
+
- 同时 `- [~]` 最多 1-2 个
|
|
37
|
+
- 状态变迁时立刻改标记 + 记时间,不要事后补
|
|
38
|
+
- `- [!]` block 必须带"原因 + 解锁条件"——单纯"卡了"等于没标
|
|
39
|
+
- block 解除后改回 `- [~]`,完成后改 `- [x]` + `calendar done`,**不直接从 block 跳 completed**
|
|
40
|
+
- **禁止用 emoji 标记状态**(~~✅~~ ~~🔄~~ ~~⏳~~ ~~🚧~~ ~~🔴~~ 全部废弃)
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 2. 任务同步——calendar 是源头
|
|
45
|
+
|
|
46
|
+
任务状态改了必须**一起改**:
|
|
47
|
+
|
|
48
|
+
| 位置 | 角色 | 谁看 |
|
|
49
|
+
|------|------|------|
|
|
50
|
+
| **calendar**(SQLite) | 持久真相源——任务时间线唯一源头 | nudge / 跨 session / 恢复 |
|
|
51
|
+
| **SESSION-STATE.md** | 跨 session 接力棒——心跳/恢复时读 | 跨 session / 心跳 / 协作者 |
|
|
52
|
+
| **docs/todo/ 文档** | 详细任务清单——背景+方案+验证标准 | 人 / 协作者 |
|
|
53
|
+
| **TodoWrite**(engine tool) | 当前 session 工作台——高亮在跑的 | 当前 session 自己 |
|
|
54
|
+
|
|
55
|
+
**分工**:
|
|
56
|
+
- calendar = 任务时间线(何时做什么、到期提醒、完成状态)
|
|
57
|
+
- docs/todo/ = 计划在哪、做到哪一步(永久)
|
|
58
|
+
- TodoWrite = 当前正在做哪个(session 内临时高亮)
|
|
59
|
+
- SESSION-STATE = 跨 session 留痕(恢复上下文读这里)
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 3. 文档生命周期
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
翀哥派活
|
|
67
|
+
→ calendar add-task(带日期+时间)→ notification 自动驱动同步 SESSION-STATE + TodoWrite
|
|
68
|
+
→ docs/research/ 调研(如果需要)
|
|
69
|
+
→ docs/decisions/ 写方案选择(如果需要决策)
|
|
70
|
+
→ 同步标 - [~] — started M/D HH:MM
|
|
71
|
+
→ 干活(开发任务走第 7 节脑暴→计划→执行→收尾)
|
|
72
|
+
→ 同步标 - [x] — M/D HH:MM→HH:MM (Nmin)
|
|
73
|
+
→ calendar done <id>
|
|
74
|
+
→ memory/daily/ 记录
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 4. 新建 TODO
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
calendar add-task(强制带日期+时间)
|
|
83
|
+
→ 收到 [task-created] notification
|
|
84
|
+
→ notification 驱动 LLM 按 SOP 同步(SESSION-STATE + TodoWrite)
|
|
85
|
+
→ 大任务另写 docs/todo/YYYY-MM-DD_主题.md(背景+方案+验证标准)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**写文档时加双链**:
|
|
89
|
+
```
|
|
90
|
+
相关调研:[docs/research/2026-06-15_xxx.md](../research/2026-06-15_xxx.md)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 5. 执行 TODO
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
Step 1: 同步标 in_progress(SESSION-STATE + docs/todo/ + TodoWrite)
|
|
99
|
+
Step 2: read docs/todo/ 对应文档 + 双链引用的 research/decisions
|
|
100
|
+
Step 3: 确认代码状态跟文档描述一致(文档可能过时)
|
|
101
|
+
Step 4: 有把握了再动手
|
|
102
|
+
|
|
103
|
+
卡住了:
|
|
104
|
+
→ 同步标 - [!] blocked: 原因, unlock: 条件
|
|
105
|
+
→ 告诉翀哥/姐姐
|
|
106
|
+
→ 解除后改回 - [~]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 6. 完成 TODO
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
Step 1: 同步标 completed(带起止时间)(SESSION-STATE + docs/todo/ + TodoWrite)
|
|
115
|
+
Step 2: calendar done <id>
|
|
116
|
+
Step 3: memory/daily/YYYY-MM-DD.md → 追加操作记录
|
|
117
|
+
Step 4: 调研/经验教训 → 确认已写到 docs/research/ 或 docs/knowledge/
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 7. 开发任务规范(脑暴→计划→执行→收尾)
|
|
123
|
+
|
|
124
|
+
> 来源:obra/superpowers(150k stars)+ Karpathy 4 条原则
|
|
125
|
+
> 触发:写新功能 / 改老逻辑 / 修 bug / 改配置——只要沾"创造"或"修改"
|
|
126
|
+
|
|
127
|
+
### 7.0 入口检查
|
|
128
|
+
|
|
129
|
+
**Red flag(这些想法 = 停):**
|
|
130
|
+
- "这个太简单不用设计" → 简单项目最浪费返工时间
|
|
131
|
+
- "我先写代码再设计" → 写完才发现方向错
|
|
132
|
+
- "用户已经说要什么了" → "要什么" ≠ "怎么做"
|
|
133
|
+
|
|
134
|
+
### 7.1 Direction Gate(每步一道——防白干)
|
|
135
|
+
|
|
136
|
+
**何时触发:**
|
|
137
|
+
- 写完 spec → Gate #1
|
|
138
|
+
- 写完 plan → Gate #2
|
|
139
|
+
- 执行中途觉得"这不对" → Gate #3
|
|
140
|
+
|
|
141
|
+
**确认什么:**
|
|
142
|
+
- 这是不是翀哥真正要的?
|
|
143
|
+
- 现在做这件事方向对吗?
|
|
144
|
+
- 有没有更简单的方案?
|
|
145
|
+
- 方向错了 → 立刻停,回到上一步
|
|
146
|
+
|
|
147
|
+
### 7.2 脑暴(Brainstorming)—— 不写代码,先想清楚
|
|
148
|
+
|
|
149
|
+
1. **看项目现状**(read files、check git log、找相关文档)——别凭印象动手
|
|
150
|
+
2. **一次问一个澄清问题**——multiple choice 优先
|
|
151
|
+
3. **给 2-3 个方案 + 各自权衡** + 我的推荐
|
|
152
|
+
4. **分段讲设计**——讲完一段问"这块对吗"
|
|
153
|
+
5. **写到 `docs/decisions/YYYY-MM-DD-主题.md`**
|
|
154
|
+
|
|
155
|
+
**HARD-GATE:没 spec + 用户没批准,不准写代码。**
|
|
156
|
+
|
|
157
|
+
**Karpathy 防过度设计红线:**
|
|
158
|
+
- 假想用户没提的"灵活性" → 不做
|
|
159
|
+
- "如果以后要 X" → 不做
|
|
160
|
+
- 200 行能搞定不写 500 行
|
|
161
|
+
- 多种解释就列出来,不要 silent pick
|
|
162
|
+
- 不确定就问
|
|
163
|
+
|
|
164
|
+
### 7.3 写计划(Writing-Plans)—— spec 批了再拆任务
|
|
165
|
+
|
|
166
|
+
1. **文件结构**——先列要建/改哪些文件
|
|
167
|
+
2. **拆任务**——每个 task = 一个可独立测试的交付物,2-5 分钟一步
|
|
168
|
+
3. **每个 task 写明**:精确文件路径 + 完整代码 + 期望输出
|
|
169
|
+
4. **写到 `docs/todo/YYYY-MM-DD-主题.md`**
|
|
170
|
+
|
|
171
|
+
**铁律:** 不写 placeholder / 不写"类似前面" / 每步带验证命令
|
|
172
|
+
|
|
173
|
+
### 7.4 执行(Executing-Plans)—— 一步步来
|
|
174
|
+
|
|
175
|
+
1. **先 review 整个 plan**——有疑问先问
|
|
176
|
+
2. **每个 task 走循环**:标 in_progress → 按 plan 步骤 → 跑验证 → 标 completed
|
|
177
|
+
3. **全做完** → 喊翀哥 review
|
|
178
|
+
|
|
179
|
+
**铁律:** 不准跳验证 / 不在 main/master 直接动手 / 卡住不瞎猜
|
|
180
|
+
|
|
181
|
+
### 7.5 收尾(Finishing)—— 最后一步
|
|
182
|
+
|
|
183
|
+
1. 跑全套测试
|
|
184
|
+
2. 给翀哥 4 个选项:merge / 开 PR / 留着 / 丢弃
|
|
185
|
+
3. 翀哥选了再执行
|
|
186
|
+
4. 清理 worktree
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 8. 文档分类速查
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
workspace/
|
|
194
|
+
├── docs/ ← 手动维护的文档
|
|
195
|
+
│ ├── research/ 调研报告(YYYY-MM-DD_主题.md)
|
|
196
|
+
│ ├── todo/ 待办清单(YYYY-MM-DD_主题.md)
|
|
197
|
+
│ ├── decisions/ 架构决策记录(为什么选A不选B)
|
|
198
|
+
│ ├── knowledge/ 知识文档(持续更新)
|
|
199
|
+
│ ├── sop/ 标准操作流程
|
|
200
|
+
│ ├── prd/ 产品需求文档(保留现有)
|
|
201
|
+
│ ├── stories/ Story 拆分(保留现有)
|
|
202
|
+
│ ├── archive/ 归档(保留现有)
|
|
203
|
+
│ ├── infra-config-snapshot/ 配置快照(保留现有)
|
|
204
|
+
└── topics/ ← auto memory 工作目录
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
| 场景 | 写到哪 |
|
|
208
|
+
|------|--------|
|
|
209
|
+
| 要做/正在做的事 | SESSION-STATE.md(四状态 + 时间) |
|
|
210
|
+
| 任务清单+方案 | docs/todo/YYYY-MM-DD_主题.md |
|
|
211
|
+
| 方案设计/架构决策 | docs/decisions/主题.md |
|
|
212
|
+
| 调研/技术研究 | docs/research/YYYY-MM-DD_主题.md |
|
|
213
|
+
| 知识文档(持续更新) | docs/knowledge/主题.md |
|
|
214
|
+
| 项目知识/经验教训 | docs/knowledge/主题.md |
|
|
215
|
+
| 产品需求文档 | docs/prd/主题.md |
|
|
216
|
+
| Story 拆分 | docs/stories/主题.md |
|
|
217
|
+
| 标准操作流程 | docs/sop/主题.md |
|
|
218
|
+
| 归档(完成的项目) | docs/archive/主题.md |
|
|
219
|
+
| 今天发生的事 | memory/daily/YYYY-MM-DD.md |
|
|
220
|
+
| 翀哥偏好/核心原则 | MEMORY.md |
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
旧的 `docs/design/` 和 `docs/superpowers/` 已删除,文档已归类到 decisions/ / archive/ / todo/。
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 9. 恢复上下文
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
1. read SESSION-STATE.md
|
|
231
|
+
2. calendar pending → 查未完成任务(持久真相源)
|
|
232
|
+
3. read memory/working-buffer.md
|
|
233
|
+
4. memory_search 搜索当前任务关键词
|
|
234
|
+
5. read memory/daily/今天.md + 昨天.md
|
|
235
|
+
6. 瞄一眼 docs/todo/ — 有没有 - [ ] 或 - [~] 或 - [!] 的
|
|
236
|
+
7. 全部答得上六问 → 开始工作
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**六问里的"做到哪了"** → 看 SESSION-STATE 四状态:
|
|
240
|
+
- `- [ ]` 还没开始
|
|
241
|
+
- `- [~]` 正在做(看 started 时间知道做了多久)
|
|
242
|
+
- `- [!]` 卡住了(看 blocked 原因 + unlock 条件)
|
|
243
|
+
- `- [x]` 已完成
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
© 2025 Anthropic, PBC. All rights reserved.
|
|
2
|
+
|
|
3
|
+
LICENSE: Use of these materials (including all code, prompts, assets, files,
|
|
4
|
+
and other components of this Skill) is governed by your agreement with
|
|
5
|
+
Anthropic regarding use of Anthropic's services. If no separate agreement
|
|
6
|
+
exists, use is governed by Anthropic's Consumer Terms of Service or
|
|
7
|
+
Commercial Terms of Service, as applicable:
|
|
8
|
+
https://www.anthropic.com/legal/consumer-terms
|
|
9
|
+
https://www.anthropic.com/legal/commercial-terms
|
|
10
|
+
Your applicable agreement is referred to as the "Agreement." "Services" are
|
|
11
|
+
as defined in the Agreement.
|
|
12
|
+
|
|
13
|
+
ADDITIONAL RESTRICTIONS: Notwithstanding anything in the Agreement to the
|
|
14
|
+
contrary, users may not:
|
|
15
|
+
|
|
16
|
+
- Extract these materials from the Services or retain copies of these
|
|
17
|
+
materials outside the Services
|
|
18
|
+
- Reproduce or copy these materials, except for temporary copies created
|
|
19
|
+
automatically during authorized use of the Services
|
|
20
|
+
- Create derivative works based on these materials
|
|
21
|
+
- Distribute, sublicense, or transfer these materials to any third party
|
|
22
|
+
- Make, offer to sell, sell, or import any inventions embodied in these
|
|
23
|
+
materials
|
|
24
|
+
- Reverse engineer, decompile, or disassemble these materials
|
|
25
|
+
|
|
26
|
+
The receipt, viewing, or possession of these materials does not convey or
|
|
27
|
+
imply any license or right beyond those expressly granted above.
|
|
28
|
+
|
|
29
|
+
Anthropic retains all right, title, and interest in these materials,
|
|
30
|
+
including all copyrights, patents, and other intellectual property rights.
|