Skip to main content

shikumi-devdoc

shikumi-devdoc is a library for describing developer documentation as Python canonical source with semantic structure, validating it with Shikumi, and realizing it as Markdown canonical documents.

It provides two foundations: Vocabulary and a common canonical document model. Terminology and spelling live in Vocabulary, while README, Authoring Guide, Project Status, CHANGELOG, Specification, API Reference, and similar documents use the same document model built from nested classes, docstring templates, and author-defined fields.

What it is for

Use shikumi-devdoc when continuously maintained developer documentation should keep its authoritative source as validated semantic information in Python and produce reproducible canonical documents with the required realization context.

Purpose Foundation
Manage terminology names and concept definitions in one place Vocabulary
Compose README, Authoring Guide, Project Status, CHANGELOG, Specification, API Reference, and similar documents canonical document model

Specification and API Reference are not built-in document kinds. Domain-specific meaning belongs to the author's field vocabulary. You can reuse the standard field sets under shikumi_devdoc.fields or define project-local fields.

Minimal usage

Install from PyPI:

pip install shikumi-devdoc

A minimal canonical source needs only a root class decorated with @canonical_source(...) and a nested class beneath it.

from shikumi_devdoc.norms.common import canonical_source

@canonical_source("Example", filename="example.md", placeholders=False, heading="identity")
class EXAMPLE:
    class Introduction:
        '''Hello from shikumi-devdoc.'''

Pass the module to the CLI to generate a canonical document:

shikumi-devdoc render document myproject.example -o build/

The generated Markdown is:

# Example

## Introduction

Hello from shikumi-devdoc.

Nested classes become child document nodes without additional decorators, and their nesting maps to heading depth. Context, fields, Vocabulary, indexes, and other features can be added to the same model when needed.

Core model

shikumi-devdoc does not treat hand-edited Markdown as the authoritative source. A canonical document is established through validation and realization from canonical source plus realization context.

canonical source
      + realization context
        ↓ Shikumi interpretation and validation
     SemanticView
        ↓ shikumi-devdoc realizer
canonical document
        ↓ project-specific publication workflow
  published document

shikumi-devdoc consistently owns the workflow through the canonical-document boundary. Translation, localization, prose editing, media conversion, and distribution belong to a project-specific publication workflow that produces published documents.

A canonical document uses one common document node / template / field / merge model. Nested classes define document hierarchy, docstrings provide body templates, and fields carry structured supplemental information. Prose such as background explanations can remain in docstrings, while information that matters structurally can be separated into fields.

The generic document core does not embed Specification or API Reference semantics. New document uses are expressed by combining the required field vocabulary and presentations with the same foundation rather than introducing a separate grammar.

Vocabulary and structured information

Vocabulary keeps terminology names and concept definitions as canonical source. Each Vocabulary term has a stable TERM_N class identity, so consuming documents can reference the term class instead of duplicating the human-facing term string.

merge @= TERMS.TERM_001

Templates can normally use a short reference such as {{TERM_001}}. If multiple Vocabularies contribute the same identity, qualify the Python identity only as far as needed to disambiguate it. See the Specification for the precise name-resolution rules.

Document-specific structured information is declared as fields. Authors can define project-local field vocabularies or reuse common standard field sets from shikumi_devdoc.fields. The generic core does not own the domain meaning of those fields.

Docstrings, prose_field, and title @= ... are template-bearing content and can use local references and external placeholders. A field written with name @= value is automatically available to templates on the same node as {{name}}; merge adds class targets, literal strings, or explicit aliases to the same local namespace. Ordinary field, list_field, table_field, and test_target_field values themselves remain literal content. test_target_field separates literal text that ordinary tests should inspect directly; Markdown fences and language markers belong in the surrounding template. Use reference_field when a Python object relationship should realize as a logical Markdown reference; the standard related field is a convenience field built on that presentation. Unreferenced fields can be appended to the body with APPEND or retained as source-only semantic information with IGNORE.

Documentation workflows with LLMs

One intended workflow is that people own intent, decisions, and review while an LLM assists with ongoing canonical-source maintenance.

The design therefore favors explicit meaning, mechanical validation, and stable regeneration of canonical documents rather than minimizing authoring syntax alone. At the same time, using an LLM is not a reason to accept unnecessary complexity, duplicated semantics, or abstractions without a concrete need.

Documentation

shikumi-devdoc dogfoods its own documentation system.

The devdocs/ tree also serves as a reference corpus for the authoring API. Comparing a canonical source with its corresponding canonical document shows the relationship between authoring, context injection, and realization output.

English published documents at the repository root and under docs/ are produced by a separate publication workflow using the Japanese canonical documents as input. That translation and publication process is not a feature of shikumi-devdoc itself.

Version

Current version: 0.3.1. Supported Python: >=3.11. See STATUS.md for the current development stage and notices.

License

shikumi-devdoc is available under the MIT License. See LICENSE.

Metadata

Release files for shikumi-devdoc 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shikumi-devdoc 0.3.1
File Size Uploaded
shikumi_devdoc-0.3.1.tar.gz 178.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shikumi-devdoc 0.3.1
File Interpreter ABI Platform
shikumi_devdoc-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 446.4 kB

Release files / shikumi_devdoc-0.3.1.tar.gz

Download URL shikumi_devdoc-0.3.1.tar.gz
Size 178.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e9218220d7e858cb3249e0f1115d189454c9cb28f78faadb59962a45d26c3f6d
BLAKE2b-256 checksum
How to use checksums
b11630d42fa8dca0f61a76f4a43064ff9de94eda4e0859d7a8bbdebbcdd8c067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / shikumi_devdoc-0.3.1-py3-none-any.whl

Download URL shikumi_devdoc-0.3.1-py3-none-any.whl
Size 268.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f86c20e37281916fc0fb217b8c9f0561d2b5b47c3def5fda0134de904f709d2
BLAKE2b-256 checksum
How to use checksums
903f7e586f2e02941c945e098c0e9c8647a6e13ac72ecf48c563d5263a689602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release history Release notifications | RSS feed

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page