lanternspec 0.2.6__tar.gz → 0.2.8__tar.gz
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.
- {lanternspec-0.2.6/src/lanternspec.egg-info → lanternspec-0.2.8}/PKG-INFO +8 -6
- {lanternspec-0.2.6 → lanternspec-0.2.8}/README.md +7 -5
- {lanternspec-0.2.6 → lanternspec-0.2.8}/pyproject.toml +1 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/check/check_docs.py +17 -2
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/check/doctor.py +14 -3
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/check/templates.py +1 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/cli/__init__.py +2 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/cli/check.py +20 -9
- lanternspec-0.2.8/src/lanternspec/cli/color.py +98 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/cli/refs.py +137 -2
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/cli/report.py +3 -2
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/cli/work.py +4 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/enums.py +40 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/meta.py +38 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/profile.py +13 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/project.py +5 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/sections.py +17 -5
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/learn/debt.py +63 -23
- lanternspec-0.2.8/src/lanternspec/refs/convert.py +809 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/refs/domain.py +2 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/refs/index.py +3 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/refs/sources.py +59 -3
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/doc_map.py +10 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/obsidian.py +8 -7
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/scan.py +12 -5
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/conventions/go.yaml +2 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/conventions/python.yaml +4 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/conventions/typescript.yaml +4 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-domain/SKILL.md +1 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-idea/SKILL.md +10 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-plan/SKILL.md +1 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-ref/SKILL.md +2 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-ref/domain.md +14 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-template/SKILL.md +4 -2
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/ADR.md +7 -6
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/API.md +6 -3
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Architecture.md +5 -4
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Collaboration Rules.md +5 -4
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Competency Card.md +47 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Data.md +6 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Debt Card.md +50 -0
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Design.md +70 -0
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Docs MOC.md +28 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Feature List.md +6 -3
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Glossary.md +7 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Idea.md +51 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Known Tech.md +6 -3
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Legacy Map.md +9 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Log.md +48 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Meeting Notes.md +4 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Plan.md +73 -0
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Project Definition.md +54 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Screens.md +6 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Session Log.md +29 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Tasks.md +8 -6
- lanternspec-0.2.8/src/lanternspec/resources/locales/en/templates/Work Division Rules.md +36 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/_meta/enums.yaml +1 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-domain/SKILL.md +1 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-idea/SKILL.md +10 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-plan/SKILL.md +1 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-ref/SKILL.md +2 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-ref/domain.md +14 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-template/SKILL.md +4 -2
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates/ADR.md +7 -6
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates/API.md +6 -3
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates/_meta/enums.yaml +1 -0
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//352/260/234/353/260/234/353/254/270/354/204/234 MOC.md" +28 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//352/270/260/353/212/245 /353/252/251/353/241/235.md" +6 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//352/270/260/353/241/235.md +48 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//352/270/260/354/241/264 /353/254/270/354/204/234 /354/247/200/353/217/204.md" +9 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//352/270/260/355/232/215.md +73 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//353/215/260/354/235/264/355/204/260.md +6 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//353/266/200/354/261/204 /354/271/264/353/223/234.md" +50 -0
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//354/204/244/352/263/204.md +70 -0
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//354/204/270/354/205/230 /352/270/260/353/241/235.md" +29 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//354/213/234/354/212/244/355/205/234 /352/265/254/354/241/260.md" +5 -4
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//354/225/204/353/212/224 /352/270/260/354/210/240.md" +6 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//354/225/204/354/235/264/353/224/224/354/226/264.md +51 -0
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//354/227/255/353/237/211 /354/271/264/353/223/234.md" +47 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//354/232/251/354/226/264/354/247/221.md +7 -3
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//354/236/221/354/227/205 /353/202/230/353/210/204/352/270/260 /352/270/260/354/244/200.md" +36 -0
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//355/224/204/353/241/234/354/240/235/355/212/270 /354/240/225/354/235/230/354/204/234.md" +54 -0
- lanternspec-0.2.8/src/lanternspec/resources/locales/ko/templates//355/225/240 /354/235/274.md" +36 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//355/230/221/354/227/205 /352/267/234/354/271/231.md" +5 -4
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//355/231/224/353/251/264.md +6 -3
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//355/232/214/354/235/230/353/241/235.md +4 -3
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/messages.yaml +64 -10
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/names.yaml +1 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/install.py +45 -12
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/parts.py +25 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/ideas.py +67 -10
- {lanternspec-0.2.6 → lanternspec-0.2.8/src/lanternspec.egg-info}/PKG-INFO +8 -6
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec.egg-info/SOURCES.txt +3 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_checks.py +6 -3
- lanternspec-0.2.8/tests/test_color.py +26 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_english.py +1 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_install_and_aux.py +8 -8
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_later_features.py +117 -2
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_layout.py +2 -2
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_obsidian.py +1 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_refs.py +158 -1
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_work_line.py +62 -0
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Competency Card.md +0 -42
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Debt Card.md +0 -46
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Design.md +0 -61
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Docs MOC.md +0 -26
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Idea.md +0 -44
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Log.md +0 -45
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Plan.md +0 -63
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Project Definition.md +0 -50
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Session Log.md +0 -27
- lanternspec-0.2.6/src/lanternspec/resources/locales/en/templates/Work Division Rules.md +0 -29
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//352/260/234/353/260/234/353/254/270/354/204/234 MOC.md" +0 -26
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//352/270/260/353/241/235.md +0 -45
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//352/270/260/355/232/215.md +0 -63
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//353/266/200/354/261/204 /354/271/264/353/223/234.md" +0 -46
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//354/204/244/352/263/204.md +0 -61
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//354/204/270/354/205/230 /352/270/260/353/241/235.md" +0 -27
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//354/225/204/354/235/264/353/224/224/354/226/264.md +0 -44
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//354/227/255/353/237/211 /354/271/264/353/223/234.md" +0 -42
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//354/236/221/354/227/205 /353/202/230/353/210/204/352/270/260 /352/270/260/354/244/200.md" +0 -29
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//355/224/204/353/241/234/354/240/235/355/212/270 /354/240/225/354/235/230/354/204/234.md" +0 -50
- lanternspec-0.2.6/src/lanternspec/resources/locales/ko/templates//355/225/240 /354/235/274.md" +0 -34
- {lanternspec-0.2.6 → lanternspec-0.2.8}/LICENSE +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/setup.cfg +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/__main__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/check/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/check/budget.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/check/githooks.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/check/layout.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/check/legacy.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/cli/common.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/cli/core.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/cli/learn.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/cli/tools.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/frontmatter.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/links.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/messages.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/names.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/new_id.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/outline.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/principles.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/state.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/taskfile.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/core/templating.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/learn/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/learn/knowledge/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/learn/knowledge/drafts.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/learn/knowledge/mcp_server.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/learn/knowledge/notion.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/learn/knowledge/obsidian.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/refs/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/refs/rules.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/refs/terms.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/evaluate.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/harness.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/principles_doc.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/resume.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/sections_doc.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/status.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/report/views.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/conventions/rust.yaml +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/conventions/swift.yaml +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/agents/AGENTS.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-adr/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-build/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-check/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-design/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-init/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-learn/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-map/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-ref/rules.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-ref/terms.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-report/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-resume/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-sync/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/skills/l-task/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Deployment.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Platform Integration.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/en/templates/Server Operations.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/agents/AGENTS.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-adr/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-build/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-check/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-design/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-init/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-learn/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-map/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-ref/rules.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-ref/terms.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-report/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-resume/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-sync/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/skills/l-task/SKILL.md +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//353/260/260/355/217/254.md" +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//354/204/234/353/262/204 /353/260/260/355/217/254 /302/267 /354/232/264/354/230/201.md" +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/locales/ko/templates//355/224/214/353/236/253/355/217/274 /354/227/260/353/217/231.md" +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/resources/principles.yaml +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/agent_hooks.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/antigravity.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/base.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/claude.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/close.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/codex.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/docs_mode.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/health.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/rules.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/runlog.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/sessions.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/tools/skills.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/__init__.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/branches.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/dbml.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/epic_rules.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/pack.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/progress.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/scaffold.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/screen.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/stages.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec/work/tasks.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec.egg-info/dependency_links.txt +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec.egg-info/entry_points.txt +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec.egg-info/requires.txt +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/src/lanternspec.egg-info/top_level.txt +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_budget.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_core.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_enums_single_source.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_git.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_learning_line.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_messages.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_name_overlap.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_names.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_part_delivery.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_parts.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_principles.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_principles_data.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_release_script.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_resume.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_skill_commands.py +0 -0
- {lanternspec-0.2.6 → lanternspec-0.2.8}/tests/test_tool_health.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lanternspec
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: Spec-driven development for agentic software engineering
|
|
5
5
|
Author: Jihyeok Jeong
|
|
6
6
|
License-Expression: MIT
|
|
@@ -222,6 +222,7 @@ Material people already have stays in its own form and is indexed by section, so
|
|
|
222
222
|
|
|
223
223
|
- **Outside material never reaches git.** Its paths, titles and index all stay in `.lantern/`.
|
|
224
224
|
- **Sections are read by address.** `lantern ref read "Privacy#Retention period"`
|
|
225
|
+
- **Originals are read through copies.** `lantern ref convert --apply` turns PDF · Word · PowerPoint · HWP into Markdown cut into sections, and Excel · CSV into a card of sheets, columns and row counts, next to the original. It marks the quality too (HWP without headings or tables is "check it", a scanned PDF "no text"). PDF needs `pdftotext` (poppler).
|
|
225
226
|
|
|
226
227
|
## Managing unfamiliar tech — knowledge base and understanding debt
|
|
227
228
|
|
|
@@ -245,7 +246,7 @@ There are three kinds of debt.
|
|
|
245
246
|
| Kind | Meaning |
|
|
246
247
|
|---|---|
|
|
247
248
|
| 🧠 Understanding | you follow it when it's explained, but it isn't yours yet. Reopened if you ask again after resolving it |
|
|
248
|
-
| 🛠 Competency | you understand it but haven't done it yourself. Practised with exercises (`lantern debt promote`) |
|
|
249
|
+
| 🛠 Competency | you understand it but haven't done it yourself, or a blocked idea needs it. Practised with exercises (`lantern debt promote`) |
|
|
249
250
|
| 🧱 Technical | debt left in the code (technical debt) |
|
|
250
251
|
|
|
251
252
|
## Design principles and ways of working
|
|
@@ -259,7 +260,8 @@ Picks design principles and code conventions from a table, based on the project
|
|
|
259
260
|
- In existing projects, lint and format settings already in use are recorded, never changed.
|
|
260
261
|
- When the code grows past a size boundary, `lantern doctor` asks whether to raise the principles one level.
|
|
261
262
|
- The language of code comments can be set apart from the documents with `project.comment_language`.
|
|
262
|
-
- See the result with `lantern principles show`; run lint and type checks with `lantern lint`
|
|
263
|
+
- See the result with `lantern principles show`; run lint and type checks with `lantern lint` (in each part's folder when there are parts)
|
|
264
|
+
- CI (`lantern install --ci`) prepares tools and checks in each part's folder. Leave a heavy part out with `ci: false` on that part in `lantern.yaml`. In existing projects, lint and type errors only warn at first and CI passes; once they are clean, set `build.ci_lint: block`.
|
|
263
265
|
|
|
264
266
|
### How the AI works
|
|
265
267
|
`lantern harness suggest` looks at code size, work in progress, whether tests exist and past runs, and recommends one of three modes.
|
|
@@ -281,13 +283,13 @@ Import mockups with `lantern screen import`; `lantern screen compare` finds wher
|
|
|
281
283
|
setup install [--language] [--tools] [--mcp] [--ci|--no-ci] · upgrade [--apply] · doctor · harness suggest
|
|
282
284
|
profile profile show|docs|write|set · principles show|detect · parts [add|ignore] · enums list|rename · sections list|rename|off|on
|
|
283
285
|
documents scaffold init [--plan] | work | doc | idea | adr | meeting | custom · new-id · map · meta get|set
|
|
284
|
-
checks check [--changed] [--epic W-012] · lint · check-dbml · dbml render|from-sql|diff
|
|
286
|
+
checks check [--changed] [--epic W-012] · lint [--ci] · check-dbml · dbml render|from-sql|diff
|
|
285
287
|
work task next [--all]|start|done|ac|list|estimate · task add [--parallel] · pack · screen import|compare
|
|
286
288
|
work branch|start|list|finish|archive|stage · design approve · unit-log add · idea find|status
|
|
287
289
|
learning knowledge search|read|propose|write|areas · debt find|new|ask|resolve|promote|practice|known|status|list · mcp
|
|
288
|
-
reports report [--views] [--summary] · status · resume [--session] [--more] · scan [--tests] · sync adopt · eval · obsidian plugins
|
|
290
|
+
reports report [--views] [--summary] · status · resume [--session] [--more] · scan [--tests] [--ci] · sync adopt · eval · obsidian plugins
|
|
289
291
|
templates template list|lint|level|bump|outdated|diff|usage|new|migrate · legacy adopt|todos
|
|
290
|
-
references ref list|check|index|read · tag|exclude|rules · terms|term|glossary|candidate · domain|describe|attach
|
|
292
|
+
references ref list|check|index|read · tag|exclude|rules · terms|term|glossary|candidate · domain|describe|attach · convert [--apply]|preview
|
|
291
293
|
git hooks install|uninstall|status · docs-mode local|shared
|
|
292
294
|
wrap-up close <skill>
|
|
293
295
|
```
|
|
@@ -207,6 +207,7 @@ Material people already have stays in its own form and is indexed by section, so
|
|
|
207
207
|
|
|
208
208
|
- **Outside material never reaches git.** Its paths, titles and index all stay in `.lantern/`.
|
|
209
209
|
- **Sections are read by address.** `lantern ref read "Privacy#Retention period"`
|
|
210
|
+
- **Originals are read through copies.** `lantern ref convert --apply` turns PDF · Word · PowerPoint · HWP into Markdown cut into sections, and Excel · CSV into a card of sheets, columns and row counts, next to the original. It marks the quality too (HWP without headings or tables is "check it", a scanned PDF "no text"). PDF needs `pdftotext` (poppler).
|
|
210
211
|
|
|
211
212
|
## Managing unfamiliar tech — knowledge base and understanding debt
|
|
212
213
|
|
|
@@ -230,7 +231,7 @@ There are three kinds of debt.
|
|
|
230
231
|
| Kind | Meaning |
|
|
231
232
|
|---|---|
|
|
232
233
|
| 🧠 Understanding | you follow it when it's explained, but it isn't yours yet. Reopened if you ask again after resolving it |
|
|
233
|
-
| 🛠 Competency | you understand it but haven't done it yourself. Practised with exercises (`lantern debt promote`) |
|
|
234
|
+
| 🛠 Competency | you understand it but haven't done it yourself, or a blocked idea needs it. Practised with exercises (`lantern debt promote`) |
|
|
234
235
|
| 🧱 Technical | debt left in the code (technical debt) |
|
|
235
236
|
|
|
236
237
|
## Design principles and ways of working
|
|
@@ -244,7 +245,8 @@ Picks design principles and code conventions from a table, based on the project
|
|
|
244
245
|
- In existing projects, lint and format settings already in use are recorded, never changed.
|
|
245
246
|
- When the code grows past a size boundary, `lantern doctor` asks whether to raise the principles one level.
|
|
246
247
|
- The language of code comments can be set apart from the documents with `project.comment_language`.
|
|
247
|
-
- See the result with `lantern principles show`; run lint and type checks with `lantern lint`
|
|
248
|
+
- See the result with `lantern principles show`; run lint and type checks with `lantern lint` (in each part's folder when there are parts)
|
|
249
|
+
- CI (`lantern install --ci`) prepares tools and checks in each part's folder. Leave a heavy part out with `ci: false` on that part in `lantern.yaml`. In existing projects, lint and type errors only warn at first and CI passes; once they are clean, set `build.ci_lint: block`.
|
|
248
250
|
|
|
249
251
|
### How the AI works
|
|
250
252
|
`lantern harness suggest` looks at code size, work in progress, whether tests exist and past runs, and recommends one of three modes.
|
|
@@ -266,13 +268,13 @@ Import mockups with `lantern screen import`; `lantern screen compare` finds wher
|
|
|
266
268
|
setup install [--language] [--tools] [--mcp] [--ci|--no-ci] · upgrade [--apply] · doctor · harness suggest
|
|
267
269
|
profile profile show|docs|write|set · principles show|detect · parts [add|ignore] · enums list|rename · sections list|rename|off|on
|
|
268
270
|
documents scaffold init [--plan] | work | doc | idea | adr | meeting | custom · new-id · map · meta get|set
|
|
269
|
-
checks check [--changed] [--epic W-012] · lint · check-dbml · dbml render|from-sql|diff
|
|
271
|
+
checks check [--changed] [--epic W-012] · lint [--ci] · check-dbml · dbml render|from-sql|diff
|
|
270
272
|
work task next [--all]|start|done|ac|list|estimate · task add [--parallel] · pack · screen import|compare
|
|
271
273
|
work branch|start|list|finish|archive|stage · design approve · unit-log add · idea find|status
|
|
272
274
|
learning knowledge search|read|propose|write|areas · debt find|new|ask|resolve|promote|practice|known|status|list · mcp
|
|
273
|
-
reports report [--views] [--summary] · status · resume [--session] [--more] · scan [--tests] · sync adopt · eval · obsidian plugins
|
|
275
|
+
reports report [--views] [--summary] · status · resume [--session] [--more] · scan [--tests] [--ci] · sync adopt · eval · obsidian plugins
|
|
274
276
|
templates template list|lint|level|bump|outdated|diff|usage|new|migrate · legacy adopt|todos
|
|
275
|
-
references ref list|check|index|read · tag|exclude|rules · terms|term|glossary|candidate · domain|describe|attach
|
|
277
|
+
references ref list|check|index|read · tag|exclude|rules · terms|term|glossary|candidate · domain|describe|attach · convert [--apply]|preview
|
|
276
278
|
git hooks install|uninstall|status · docs-mode local|shared
|
|
277
279
|
wrap-up close <skill>
|
|
278
280
|
```
|
|
@@ -559,7 +559,8 @@ def check_file(project: Project, path: Path, text: str, ctx: _Ctx) -> list[Findi
|
|
|
559
559
|
rel,
|
|
560
560
|
"template-major",
|
|
561
561
|
msg(
|
|
562
|
-
"Template '{tname}' changed a lot
|
|
562
|
+
"Template '{tname}' changed a lot since this document was made "
|
|
563
|
+
"(template version {get} → {value}, not the LanternSpec version)",
|
|
563
564
|
tname=tname,
|
|
564
565
|
get=meta.get("template_version"),
|
|
565
566
|
value=ctx.templates.versions[tname],
|
|
@@ -575,13 +576,15 @@ def check_file(project: Project, path: Path, text: str, ctx: _Ctx) -> list[Findi
|
|
|
575
576
|
rel,
|
|
576
577
|
"template-minor",
|
|
577
578
|
msg(
|
|
578
|
-
"Template '{tname}' changed ({get} → {value}
|
|
579
|
+
"Template '{tname}' changed since this document was made (template version {get} → {value}, "
|
|
580
|
+
"not the LanternSpec version) — its '{section}' section says what changed",
|
|
579
581
|
tname=tname,
|
|
580
582
|
get=meta.get("template_version"),
|
|
581
583
|
value=ctx.templates.versions[tname],
|
|
582
584
|
section=project.names.marker("changelog"),
|
|
583
585
|
),
|
|
584
586
|
1,
|
|
587
|
+
msg('To bring this document along: lantern template migrate "{docs_rel}"', docs_rel=project.docs_rel(path)),
|
|
585
588
|
)
|
|
586
589
|
)
|
|
587
590
|
|
|
@@ -619,6 +622,18 @@ def check_file(project: Project, path: Path, text: str, ctx: _Ctx) -> list[Findi
|
|
|
619
622
|
):
|
|
620
623
|
out.append(Finding("warn", rel, "dropped-reason", msg("A dropped idea needs a one-line reason (dropped_reason)"), 1))
|
|
621
624
|
|
|
625
|
+
# idea: blocked says why and what would reopen it
|
|
626
|
+
if (
|
|
627
|
+
doc_type == "idea"
|
|
628
|
+
and meta.get("status") == project.enums["idea_status"].roles.get("blocked")
|
|
629
|
+
and not (str(meta.get("blocked_reason") or "").strip() and str(meta.get("revisit_when") or "").strip())
|
|
630
|
+
):
|
|
631
|
+
out.append(
|
|
632
|
+
Finding(
|
|
633
|
+
"warn", rel, "blocked-reason", msg("A blocked idea needs why (blocked_reason) and what would reopen it (revisit_when)"), 1
|
|
634
|
+
)
|
|
635
|
+
)
|
|
636
|
+
|
|
622
637
|
# tasks
|
|
623
638
|
if doc_type == "tasks":
|
|
624
639
|
out += _check_tasks(project, path, text, rel)
|
|
@@ -161,8 +161,9 @@ def _reference_rows(project: Project) -> list[tuple[str, str]]:
|
|
|
161
161
|
|
|
162
162
|
found = src_mod.sources(project)
|
|
163
163
|
excluded = [str(x) for x in project.profile.get("references.exclude") or []]
|
|
164
|
+
waiting = src_mod.pending(project)
|
|
164
165
|
if not found and not excluded and not project.profile.get("references.outside_rules"):
|
|
165
|
-
return []
|
|
166
|
+
return [(WARN, "domain: " + waiting)] if waiting else []
|
|
166
167
|
out = [(BAD, msg("references.{kind}: {path} doesn't exist", kind=s.kind, path=s.entry)) for s in found if not s.path.exists()]
|
|
167
168
|
for kind in src_mod.KINDS:
|
|
168
169
|
for entry in project.profile.get(f"references.{kind}") or []:
|
|
@@ -193,6 +194,8 @@ def _reference_rows(project: Project) -> list[tuple[str, str]]:
|
|
|
193
194
|
by_kind.setdefault(s.document.source.kind, []).append(s.document.name + ("" if s.never else f" ({len(s.changed)})"))
|
|
194
195
|
for kind, docs in by_kind.items():
|
|
195
196
|
out.append((WARN, msg("{kind}: changed or never indexed since /l-ref: {items} — /l-ref {kind}", kind=kind, items=", ".join(docs))))
|
|
197
|
+
if waiting:
|
|
198
|
+
out.append((WARN, "domain: " + waiting))
|
|
196
199
|
for address in excluded:
|
|
197
200
|
try:
|
|
198
201
|
src_mod.locate(project, address)
|
|
@@ -391,10 +394,18 @@ def format_result(rows: list[tuple[str, str]]) -> str:
|
|
|
391
394
|
>>> print(format_result([(OK, "lantern.yaml 형식"), (WARN, "MOC가 없습니다 — lantern map")]))
|
|
392
395
|
✔ lantern.yaml 형식
|
|
393
396
|
⚠ MOC가 없습니다 — lantern map
|
|
394
|
-
|
|
397
|
+
⚠ 문제 0개 · 경고 1개
|
|
395
398
|
"""
|
|
396
399
|
bad = sum(1 for r in rows if r[0] == BAD)
|
|
397
400
|
warn = sum(1 for r in rows if r[0] == WARN)
|
|
398
401
|
lines = [f"{icon} {text}" for icon, text in rows]
|
|
399
|
-
lines.append(
|
|
402
|
+
lines.append(
|
|
403
|
+
""
|
|
404
|
+
if not rows
|
|
405
|
+
else (
|
|
406
|
+
msg("✔ All good")
|
|
407
|
+
if not bad and not warn
|
|
408
|
+
else msg("{mark} {bad} problems · {warn} warnings", mark=BAD if bad else WARN, bad=bad, warn=warn)
|
|
409
|
+
)
|
|
410
|
+
)
|
|
400
411
|
return "\n".join(lines).rstrip()
|
|
@@ -585,7 +585,7 @@ def skeleton_from(project: Project, name: str, source: Path) -> str:
|
|
|
585
585
|
out += [
|
|
586
586
|
"",
|
|
587
587
|
f"{m.group(1)} {current}",
|
|
588
|
-
msg("> [!guide]
|
|
588
|
+
msg("> [!guide] One line on what goes in '{current}'", current=current),
|
|
589
589
|
"",
|
|
590
590
|
]
|
|
591
591
|
filled, table_state = False, ""
|
|
@@ -11,7 +11,7 @@ import sys
|
|
|
11
11
|
|
|
12
12
|
from .. import __version__
|
|
13
13
|
from ..core.messages import msg
|
|
14
|
-
from . import check, core, learn, refs, report, tools, work
|
|
14
|
+
from . import check, color, core, learn, refs, report, tools, work
|
|
15
15
|
from .common import CliError, Handler
|
|
16
16
|
|
|
17
17
|
GROUPS = (tools, core, work, learn, refs, report, check) # order of the help list
|
|
@@ -64,6 +64,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
64
64
|
if len(argv) >= 2 and argv[0] == "task" and argv[1] == "add":
|
|
65
65
|
argv = ["task-add", *argv[2:]]
|
|
66
66
|
_use_project_language()
|
|
67
|
+
color.enable()
|
|
67
68
|
parser = build_parser()
|
|
68
69
|
a = parser.parse_args(argv)
|
|
69
70
|
if not getattr(a, "fn", None):
|
|
@@ -141,23 +141,33 @@ def cmd_doctor(a: argparse.Namespace) -> int:
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
def cmd_lint(a: argparse.Namespace) -> int:
|
|
144
|
-
"""`lantern lint` — run build.lint and build.typecheck
|
|
144
|
+
"""`lantern lint` — run the lint and type-check commands of each part, or build.lint and build.typecheck (/l-build · CI)."""
|
|
145
145
|
from ..report.scan import run_tests
|
|
146
|
+
from ..tools.parts import commands
|
|
146
147
|
|
|
147
148
|
project = _p()
|
|
148
|
-
cmds = [(role,
|
|
149
|
-
if not
|
|
149
|
+
cmds = [(role, part, cmd) for role in ("lint", "typecheck") for part, cmd in commands(project, role, ci=a.ci)]
|
|
150
|
+
if not cmds:
|
|
150
151
|
print(msg("ℹ No build.lint · build.typecheck, so skipped (lantern principles detect --write)"))
|
|
151
152
|
return 0
|
|
153
|
+
warn_only = a.ci and project.profile.ci_lint == "warn"
|
|
152
154
|
failed = 0
|
|
153
|
-
for role, cmd in cmds:
|
|
154
|
-
if
|
|
155
|
-
|
|
156
|
-
res
|
|
157
|
-
print(f"{'✔' if res['ok'] else '✖'} {role}: `{cmd}`")
|
|
155
|
+
for role, part, cmd in cmds:
|
|
156
|
+
res = run_tests(project, cmd, project.root / part if part else None)
|
|
157
|
+
where = f"{part} · " if part else ""
|
|
158
|
+
print(f"{'✔' if res['ok'] else '⚠' if warn_only else '✖'} {where}{role}: `{cmd}`")
|
|
158
159
|
if not res["ok"]:
|
|
159
160
|
failed += 1
|
|
160
161
|
print(res["tail"])
|
|
162
|
+
if warn_only: # a passing step hides its log, so GitHub Actions shows this on the run's page
|
|
163
|
+
print(f"::warning::{where}{role}: {cmd}")
|
|
164
|
+
if warn_only and failed:
|
|
165
|
+
print(
|
|
166
|
+
msg(
|
|
167
|
+
"⚠ {count} checks failed, but CI passes (build.ci_lint: warn) — once they are clean, set build.ci_lint: block", count=failed
|
|
168
|
+
)
|
|
169
|
+
)
|
|
170
|
+
return 0
|
|
161
171
|
return 1 if failed else 0
|
|
162
172
|
|
|
163
173
|
|
|
@@ -170,7 +180,8 @@ def register(add: Add) -> None:
|
|
|
170
180
|
p.add_argument("--json", action="store_true")
|
|
171
181
|
p.add_argument("--quiet", action="store_true", help=msg("Hide notes (ℹ)"))
|
|
172
182
|
p.add_argument("--strict", action="store_true", help=msg("Treat warnings as failures"))
|
|
173
|
-
add("lint", cmd_lint, msg("Code lint · type check (lantern.yaml build.lint · build.typecheck)"))
|
|
183
|
+
p = add("lint", cmd_lint, msg("Code lint · type check (each part's commands, or lantern.yaml build.lint · build.typecheck)"))
|
|
184
|
+
p.add_argument("--ci", action="store_true", help=msg("For CI: leave out parts with ci: false, and follow build.ci_lint"))
|
|
174
185
|
p = add("template", cmd_template, msg("Templates: list · lint · level · bump · outdated · diff · usage · new · migrate"))
|
|
175
186
|
p.add_argument("action", choices=["list", "lint", "level", "bump", "outdated", "diff", "usage", "new", "migrate"])
|
|
176
187
|
p.add_argument("name", nargs="?")
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""Color the status marks (✔ ⚠ ✖ ℹ) of command output on a terminal.
|
|
2
|
+
|
|
3
|
+
Responsibilities:
|
|
4
|
+
- pick a color for a line from the mark it starts with
|
|
5
|
+
- wrap stdout · stderr so every print gets colored, only on a terminal and without NO_COLOR
|
|
6
|
+
|
|
7
|
+
Not here:
|
|
8
|
+
- which mark a line gets → the command or the check that writes it
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import os
|
|
14
|
+
import sys
|
|
15
|
+
from typing import Any, TextIO
|
|
16
|
+
|
|
17
|
+
RESET = "\033[0m"
|
|
18
|
+
WHOLE_LINE = {"✖": "\033[31m", "⚠": "\033[33m"} # problems and warnings: the whole line stands out
|
|
19
|
+
MARK_ONLY = {"✔": "\033[32m", "ℹ": "\033[36m"} # fine and notes: only the mark, so the text stays calm
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def paint(line: str) -> str:
|
|
23
|
+
r"""Color one output line by the mark it starts with (after its indentation).
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
line: One line without its newline.
|
|
27
|
+
|
|
28
|
+
Returns:
|
|
29
|
+
The line with ANSI colors; unchanged when it starts with no mark.
|
|
30
|
+
|
|
31
|
+
Example:
|
|
32
|
+
>>> paint("⚠ hook이 실행되지 않았습니다")
|
|
33
|
+
'\x1b[33m⚠ hook이 실행되지 않았습니다\x1b[0m'
|
|
34
|
+
>>> paint(" ✔ 양식에 맞음")
|
|
35
|
+
' \x1b[32m✔\x1b[0m 양식에 맞음'
|
|
36
|
+
>>> paint("📄 docs/기획.md")
|
|
37
|
+
'📄 docs/기획.md'
|
|
38
|
+
"""
|
|
39
|
+
text = line.lstrip(" ")
|
|
40
|
+
pad = line[: len(line) - len(text)]
|
|
41
|
+
mark = text[:1]
|
|
42
|
+
if mark in WHOLE_LINE:
|
|
43
|
+
return f"{pad}{WHOLE_LINE[mark]}{text}{RESET}"
|
|
44
|
+
if mark in MARK_ONLY:
|
|
45
|
+
return f"{pad}{MARK_ONLY[mark]}{mark}{RESET}{text[1:]}"
|
|
46
|
+
return line
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class _Painted:
|
|
50
|
+
"""A text stream that colors each complete line before passing it on."""
|
|
51
|
+
|
|
52
|
+
def __init__(self, stream: TextIO) -> None:
|
|
53
|
+
self.stream = stream
|
|
54
|
+
self.pending = ""
|
|
55
|
+
|
|
56
|
+
def write(self, s: str) -> int:
|
|
57
|
+
*done, self.pending = (self.pending + s).split("\n")
|
|
58
|
+
for line in done:
|
|
59
|
+
self.stream.write(paint(line) + "\n")
|
|
60
|
+
return len(s)
|
|
61
|
+
|
|
62
|
+
def flush(self) -> None:
|
|
63
|
+
if self.pending:
|
|
64
|
+
self.stream.write(paint(self.pending))
|
|
65
|
+
self.pending = ""
|
|
66
|
+
self.stream.flush()
|
|
67
|
+
|
|
68
|
+
def __getattr__(self, name: str) -> Any:
|
|
69
|
+
return getattr(self.stream, name)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def wanted(stream: TextIO) -> bool:
|
|
73
|
+
"""Say whether to color a stream: a terminal, NO_COLOR unset, and not a dumb terminal.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
stream: The stream to write to.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
True when colors are wanted.
|
|
80
|
+
|
|
81
|
+
Example:
|
|
82
|
+
>>> import io
|
|
83
|
+
>>> wanted(io.StringIO())
|
|
84
|
+
False
|
|
85
|
+
"""
|
|
86
|
+
return stream.isatty() and "NO_COLOR" not in os.environ and os.environ.get("TERM") != "dumb"
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def enable() -> None:
|
|
90
|
+
"""Wrap stdout and stderr so status marks are colored, where colors are wanted.
|
|
91
|
+
|
|
92
|
+
Example:
|
|
93
|
+
>>> enable() # doctest: +SKIP
|
|
94
|
+
"""
|
|
95
|
+
for name in ("stdout", "stderr"):
|
|
96
|
+
stream = getattr(sys, name)
|
|
97
|
+
if not isinstance(stream, _Painted) and wanted(stream):
|
|
98
|
+
setattr(sys, name, _Painted(stream))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""References commands: ref (list · check · index · read · tag · exclude · rules · terms ·
|
|
1
|
+
"""References commands: ref (list · check · index · read · tag · exclude · rules · terms · glossary · domain · convert · preview …)."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
@@ -22,6 +22,8 @@ def cmd_ref(a: argparse.Namespace) -> int:
|
|
|
22
22
|
return _list(project)
|
|
23
23
|
if a.action == "domain":
|
|
24
24
|
return _domain(project, a.work or "", a.task or "")
|
|
25
|
+
if a.action == "convert":
|
|
26
|
+
return _convert(project, a.arg or "", a.apply)
|
|
25
27
|
if a.action == "rules":
|
|
26
28
|
return _rules(project, a.arg or "", a.must)
|
|
27
29
|
if a.action == "terms":
|
|
@@ -50,6 +52,8 @@ def cmd_ref(a: argparse.Namespace) -> int:
|
|
|
50
52
|
return _tag(project, a.arg, a.scope or "", a.strength, a.off)
|
|
51
53
|
if a.action == "describe":
|
|
52
54
|
return _describe(project, a)
|
|
55
|
+
if a.action == "preview":
|
|
56
|
+
return _preview(project, a.arg)
|
|
53
57
|
if a.action == "attach":
|
|
54
58
|
return _attach(project, a)
|
|
55
59
|
if a.action == "glossary":
|
|
@@ -142,6 +146,9 @@ def _domain(project: Project, work_id: str, task: str) -> int:
|
|
|
142
146
|
domain_mod.table(project)
|
|
143
147
|
or msg("No domain knowledge yet — put documents in {folder}, then /l-ref domain", folder=project.rel(project.folder("domain")))
|
|
144
148
|
)
|
|
149
|
+
waiting = src_mod.pending(project)
|
|
150
|
+
if waiting:
|
|
151
|
+
print("\n⚠ " + waiting)
|
|
145
152
|
return 0
|
|
146
153
|
work = project.find_work(work_id)
|
|
147
154
|
if work is None:
|
|
@@ -158,6 +165,127 @@ def _domain(project: Project, work_id: str, task: str) -> int:
|
|
|
158
165
|
return 0
|
|
159
166
|
|
|
160
167
|
|
|
168
|
+
def _size(n: int) -> str:
|
|
169
|
+
return f"{n / 1e6:.1f}MB" if n >= 1e6 else f"{-(-n // 1000)}KB" # rounded up, so 0 stays 0
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
QUALITY = {"ok": "✔", "check": "⚠", "empty": "✖"}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def _convert(project: Project, path: str, apply: bool) -> int:
|
|
176
|
+
"""List the domain-knowledge originals and what converting them would do; with --apply, convert the new and changed ones."""
|
|
177
|
+
import time
|
|
178
|
+
|
|
179
|
+
from ..refs import convert as conv
|
|
180
|
+
|
|
181
|
+
if path:
|
|
182
|
+
found = src_mod.resolve(project, path)
|
|
183
|
+
if found is None or not found.path.exists():
|
|
184
|
+
raise CliError(msg("{path} does not exist", path=path))
|
|
185
|
+
if found.outside:
|
|
186
|
+
raise CliError(msg("lantern ref convert works inside the project — convert material outside it there, then index the .md"))
|
|
187
|
+
items = conv.originals(found.path)
|
|
188
|
+
else:
|
|
189
|
+
items = src_mod.originals(project)
|
|
190
|
+
if not items:
|
|
191
|
+
print(
|
|
192
|
+
msg(
|
|
193
|
+
"No originals to convert — PDF · DOCX · PPTX · HWP · HWPX · XLSX · CSV put in {folder} show up here",
|
|
194
|
+
folder=project.rel(project.folder("domain")),
|
|
195
|
+
)
|
|
196
|
+
)
|
|
197
|
+
return 0
|
|
198
|
+
todo = [o for o in items if o.state in ("new", "changed")]
|
|
199
|
+
if not apply:
|
|
200
|
+
marks = {"new": "+", "changed": "~", "done": "✔", "edited": "⚠", "same": "=", "unknown": "?"}
|
|
201
|
+
for o in items:
|
|
202
|
+
tail = {
|
|
203
|
+
"same": msg("(same file as {path} — converted once)", path=project.rel(o.same_as)) if o.same_as else "",
|
|
204
|
+
"edited": msg("(the original changed, but its copy was edited by hand — left alone; delete the copy to convert again)"),
|
|
205
|
+
"unknown": msg("(can't be read — save it as PDF, DOCX or XLSX)"),
|
|
206
|
+
"done": f"→ {o.target.name}",
|
|
207
|
+
}.get(o.state, "")
|
|
208
|
+
print(f"{marks[o.state]} {o.label:<5} {_size(o.path.stat().st_size):>7} {project.rel(o.path)} {tail}".rstrip())
|
|
209
|
+
counts = {s: sum(1 for o in items if o.state == s) for s in ("done", "same", "unknown")}
|
|
210
|
+
print(
|
|
211
|
+
"\n"
|
|
212
|
+
+ msg(
|
|
213
|
+
"To convert: {todo} ({size}) · converted: {done} · duplicates: {same} · unreadable: {unknown}",
|
|
214
|
+
todo=len(todo),
|
|
215
|
+
size=_size(sum(o.path.stat().st_size for o in todo)),
|
|
216
|
+
**counts,
|
|
217
|
+
)
|
|
218
|
+
)
|
|
219
|
+
if todo:
|
|
220
|
+
print(
|
|
221
|
+
msg(
|
|
222
|
+
"→ lantern ref convert {path}--apply (only the copies are written; the originals stay as they are)",
|
|
223
|
+
path=f'"{path}" ' if path else "",
|
|
224
|
+
)
|
|
225
|
+
)
|
|
226
|
+
return 0
|
|
227
|
+
made, failed, total, started = 0, 0, 0, time.monotonic()
|
|
228
|
+
for o in todo:
|
|
229
|
+
try:
|
|
230
|
+
copy = conv.convert(o)
|
|
231
|
+
except conv.ConvertError as e:
|
|
232
|
+
failed += 1
|
|
233
|
+
print(f"✖ {project.rel(o.path)} — {e}")
|
|
234
|
+
continue
|
|
235
|
+
except Exception as e: # one odd file must not stop the rest; it is reported and left unconverted
|
|
236
|
+
failed += 1
|
|
237
|
+
print(
|
|
238
|
+
f"✖ {project.rel(o.path)} — "
|
|
239
|
+
+ msg("could not be read ({error}) — save it again as PDF or DOCX", error=f"{type(e).__name__}: {e}")
|
|
240
|
+
)
|
|
241
|
+
continue
|
|
242
|
+
made += 1
|
|
243
|
+
size = o.target.stat().st_size
|
|
244
|
+
total += size
|
|
245
|
+
note = f" — {copy.note}" if copy.note else ""
|
|
246
|
+
print(f"{QUALITY[copy.quality]} {project.rel(o.target)} ({_size(size)}){note}")
|
|
247
|
+
print(
|
|
248
|
+
"\n"
|
|
249
|
+
+ msg(
|
|
250
|
+
"Made {made} copies ({size} — read whole, at most {tokens} tokens) · failed {failed} · {seconds}s",
|
|
251
|
+
made=made,
|
|
252
|
+
size=_size(total),
|
|
253
|
+
tokens=f"{total:,}",
|
|
254
|
+
failed=failed,
|
|
255
|
+
seconds=round(time.monotonic() - started, 1),
|
|
256
|
+
)
|
|
257
|
+
)
|
|
258
|
+
if made:
|
|
259
|
+
print(msg("→ Describe them with /l-ref domain — it looks at lantern ref preview, not the whole text"))
|
|
260
|
+
return 1 if failed else 0
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def _preview(project: Project, name: str) -> int:
|
|
264
|
+
"""Print a reference document as its sections' addresses, sizes and first lines."""
|
|
265
|
+
from ..refs import convert as conv
|
|
266
|
+
|
|
267
|
+
doc = src_mod.find_document(project, name)
|
|
268
|
+
text = read(doc.path)
|
|
269
|
+
head = conv.read_header(text)
|
|
270
|
+
if head:
|
|
271
|
+
quality = {"ok": msg("good"), "check": msg("check it"), "empty": msg("no text")}.get(head.get("quality", ""), "")
|
|
272
|
+
print(
|
|
273
|
+
msg("Converted from {name} ({tool} · {quality})", name=head.get("from", ""), tool=head.get("tool", ""), quality=quality)
|
|
274
|
+
+ (f" — {head['note']}" if head.get("note") else "")
|
|
275
|
+
)
|
|
276
|
+
shown = conv.preview(text)
|
|
277
|
+
print(shown)
|
|
278
|
+
print(
|
|
279
|
+
"\n"
|
|
280
|
+
+ msg(
|
|
281
|
+
'Preview {preview} of {whole} — lantern ref read "<address>" reads one section',
|
|
282
|
+
preview=_size(len(shown.encode())),
|
|
283
|
+
whole=_size(len(text.encode())),
|
|
284
|
+
)
|
|
285
|
+
)
|
|
286
|
+
return 0
|
|
287
|
+
|
|
288
|
+
|
|
161
289
|
def _rules(project: Project, place: str, must: bool) -> int:
|
|
162
290
|
"""Print the company rules kept outside the project for the root or one part, word for word."""
|
|
163
291
|
from ..tools.rules import active_parts
|
|
@@ -198,7 +326,9 @@ def _check(project: Project, path: str) -> int:
|
|
|
198
326
|
raise CliError(msg("{path} doesn't exist", path=path))
|
|
199
327
|
docs = src_mod.documents(project, found)
|
|
200
328
|
if not docs:
|
|
201
|
-
raise CliError(
|
|
329
|
+
raise CliError(
|
|
330
|
+
msg("{path} holds no Markdown document — lantern ref convert makes .md copies of PDF · DOCX · HWP · XLSX first", path=path)
|
|
331
|
+
)
|
|
202
332
|
bad = 0
|
|
203
333
|
for d in docs:
|
|
204
334
|
text = read(d.path)
|
|
@@ -306,6 +436,8 @@ def register(add: Add) -> None:
|
|
|
306
436
|
"domain",
|
|
307
437
|
"describe",
|
|
308
438
|
"attach",
|
|
439
|
+
"convert",
|
|
440
|
+
"preview",
|
|
309
441
|
],
|
|
310
442
|
)
|
|
311
443
|
p.add_argument(
|
|
@@ -333,3 +465,6 @@ def register(add: Add) -> None:
|
|
|
333
465
|
p.add_argument("--work", help=msg("domain · attach: the work, e.g. W-012"))
|
|
334
466
|
p.add_argument("--task", help=msg("domain · attach: the task, e.g. T03"))
|
|
335
467
|
p.add_argument("--note", help=msg("attach: what it is used for, in a few words"))
|
|
468
|
+
p.add_argument(
|
|
469
|
+
"--apply", action="store_true", help=msg("convert: write the Markdown copies (without it, only shows what would happen)")
|
|
470
|
+
)
|
|
@@ -41,7 +41,7 @@ def cmd_scan(a: argparse.Namespace) -> int:
|
|
|
41
41
|
"""`lantern scan` — find docs-vs-code drift (text or JSON)."""
|
|
42
42
|
from ..report import scan
|
|
43
43
|
|
|
44
|
-
res = scan.run(_p(), rev=a.range, limit=a.limit, tests=a.tests)
|
|
44
|
+
res = scan.run(_p(), rev=a.range, limit=a.limit, tests=a.tests, ci=a.ci)
|
|
45
45
|
print(res.to_json() if a.json else res.format())
|
|
46
46
|
return 1 if res.tests is not None and not res.tests.get("ok") else 0 # CI fails on broken acceptance tests
|
|
47
47
|
|
|
@@ -151,7 +151,8 @@ def register(add: Add) -> None:
|
|
|
151
151
|
p = add("scan", cmd_scan, msg("Find doc-code mismatches"))
|
|
152
152
|
p.add_argument("--range", help=msg("git range (e.g. main..HEAD)"))
|
|
153
153
|
p.add_argument("--limit", type=int, default=200)
|
|
154
|
-
p.add_argument("--tests", action="store_true", help=msg("Run acceptance tests
|
|
154
|
+
p.add_argument("--tests", action="store_true", help=msg("Run acceptance tests (each part's test command, or build.test)"))
|
|
155
|
+
p.add_argument("--ci", action="store_true", help=msg("For CI: leave out parts with ci: false"))
|
|
155
156
|
p.add_argument("--json", action="store_true")
|
|
156
157
|
p = add("sync", cmd_sync, msg("Record the result of aligning"))
|
|
157
158
|
p.add_argument("action", choices=["adopt"])
|
|
@@ -82,6 +82,8 @@ def cmd_idea(a: argparse.Namespace) -> int:
|
|
|
82
82
|
if h["status"] == project.enums.value("idea_status", "dropped")
|
|
83
83
|
else ""
|
|
84
84
|
)
|
|
85
|
+
if h["blocked_reason"]:
|
|
86
|
+
extra = " — " + msg("{reason} (look again when: {revisit})", reason=h["blocked_reason"], revisit=h["revisit_when"])
|
|
85
87
|
print(
|
|
86
88
|
msg(
|
|
87
89
|
"{id} {title} ({kind} · {status}) score {score}{extra}",
|
|
@@ -97,7 +99,7 @@ def cmd_idea(a: argparse.Namespace) -> int:
|
|
|
97
99
|
if a.action == "status":
|
|
98
100
|
if not a.status:
|
|
99
101
|
raise CliError(msg("lantern idea status IDEA-014 <status>"))
|
|
100
|
-
p = ideas.idea_status(project, a.arg, a.status, work=a.work, reason=a.reason, note=a.note)
|
|
102
|
+
p = ideas.idea_status(project, a.arg, a.status, work=a.work, reason=a.reason, note=a.note, revisit=a.revisit)
|
|
101
103
|
print(f"✔ {project.rel(p)} → {a.status}")
|
|
102
104
|
return 0
|
|
103
105
|
return 1
|
|
@@ -427,6 +429,7 @@ def register(add: Add) -> None:
|
|
|
427
429
|
p.add_argument("--work")
|
|
428
430
|
p.add_argument("--reason")
|
|
429
431
|
p.add_argument("--note")
|
|
432
|
+
p.add_argument("--revisit", help=msg("status: for a blocked idea, what would reopen it"))
|
|
430
433
|
p = add("design", cmd_design, msg("Record design approval"))
|
|
431
434
|
p.add_argument("action", choices=["approve"])
|
|
432
435
|
p.add_argument("work")
|