Skip to content

SYZ-Coder/codebase-knowledge-wiki

Repository files navigation

Backend And Cross-Tech-Stack Spec Skill Library

This repository is an open skill library for code knowledge mapping, legacy-system understanding, central knowledge-repository building, and mixed-stack project analysis.

It is built by drawing on selected ideas and working principles from zread and sdd-riper, then upgrading and extending them into a more team-oriented skill library for long-term project knowledge reuse, cross-service analysis, mixed-stack mapping, and central knowledge-base maintenance.

Chinese README

For Chinese readers, start here:

It is organized around two sibling skills maintained in one place:

  1. backend-service-spec-skill
  2. cross-tech-stack-spec-skill

The goal is to keep backend-oriented knowledge mapping and cross-tech-stack extensions in a single repository so they are easier to maintain, publish, and read.

Important Note

The base skill and the extension skill now both use their formal names directly:

  • backend-service-spec-skill
  • cross-tech-stack-spec-skill

That means users should now invoke the base skill directly by its current formal name.

For example:

Use $backend-service-spec-skill to analyze this backend microservice project.

Quick Start Here

If this is your first time in the repository, use this root README as the entry guide:

  1. Read this file to understand the two skills, their boundaries, and the common entry prompts.
  2. If your target is a backend, microservice, legacy system, or platform service repository, continue with the Backend Service Spec Skill README.
  3. If your target is mobile, H5, Python, or a mixed-stack workspace, continue with the Cross Tech Stack Spec Skill README.

If you mainly want to know what backend-service-spec-skill can do before reading the full child README, start with the command overview below.

backend-service-spec-skill At A Glance

This is the primary skill in the repository for backend systems, microservice landscapes, legacy codebases, and platform-style service repositories.

1. create_codemap

Use it when:

  • you need a first-pass service landscape
  • you want to identify which services deserve deeper analysis next

Typical outputs:

  • service inventory
  • service boundaries
  • upstream/downstream dependencies
  • service-landscape overview pages
  • architecture diagram and service call graph by default in a standard run

Read more:

2. service_deep_dive

Use it when:

  • you have identified a high-value service
  • you want a vertical analysis of modules, interfaces, dependencies, and responsibilities

Typical outputs:

  • single-service structure pages
  • interface inventory
  • dependency pages
  • service rule or convention pages
  • upstream/downstream dependency diagram and module architecture diagram by default in a standard run

Read more:

3. crate_router_map

Use it when:

  • you want to trace a real request chain or message chain
  • you need to separate sync calls, async messaging, compensation, and real-time channels

Typical outputs:

  • key route-chain pages
  • sync/async split views
  • closure-status pages
  • sequence diagram and route call graph by default in a standard run

Read more:

4. build_domain_map

Use it when:

  • you already have service-level facts and want to consolidate them into domain-level knowledge
  • you are preparing long-lived artifacts for a central knowledge repository

Typical outputs:

  • business-domain pages
  • domain-to-service mapping pages
  • domain-level rule pages
  • domain context diagram by default in a standard run

Default output rule:

  • for the four backend core commands, a standard-output run now means text pages + companion Markdown/Mermaid diagrams
  • users only need to call out diagrams separately when they want narrower scope, special naming, or text-only output

Read more:

Suggested Reading Path

If you want the shortest path to first use:

  1. Read Backend Skill Quick Start
  2. Read Backend Skill Command Quick Reference
  3. Return to the Backend Service Spec Skill README for the complete explanation

If you want the full picture:

  1. Read this root README first
  2. Then read the Backend Service Spec Skill README
  3. Then read the Backend Skill Usage Guide
  4. If the project is mixed-stack, continue with the Cross Tech Stack Spec Skill README

How To Read The mydocs Output Structure

Many users understand that mydocs/ is the output root, but do not immediately know what each subdirectory is for. The simplest way to read it is:

Directory Main question it answers Best suited for
mydocs/codemap/ What does the overall workspace look like, and what are the core systems and relationships? People or AI building first-pass global understanding
mydocs/services/ How is one important service structured internally, and what interfaces and dependencies does it have? People or AI preparing to modify one service
mydocs/routermap/ How does one real request chain or message chain run? People or AI doing integration, route tracing, or incident analysis
mydocs/domains/ How should service facts be consolidated into durable business-domain knowledge? People or AI building a central knowledge repository
mydocs/context/ What shared cross-service facts exist around contracts, fields, context propagation, error semantics, async contracts, and external dependencies? People or AI doing cross-module coding, interface alignment, or debugging
mydocs/validation/ Which conclusions are closed with evidence, which remain clue-level, and what risks are still open? People or AI validating trustworthiness before reuse
mydocs/index/ What is the index, reading order, and scope boundary for this analysis pass? Anyone consuming the outputs

The directory most likely to be misunderstood is mydocs/context/:

  • it is not a private folder for one single service
  • it is better understood as the global cross-cutting context layer within the current analysis scope
  • it mainly serves cross-end, cross-service, and cross-route collaboration
  • its boundary is the systems included in the current analysis scope, not every repository in an organization

Scenario Navigation Table

If you are unsure where to start, choose an entry point by scenario:

Your scenario Recommended command / usage Read first
You just inherited a backend or microservice repository and need the global picture create_codemap Backend Service Spec Skill README
You already know a high-value service and want a vertical analysis service_deep_dive Backend Skill Quick Start
You want to trace a real request chain or message chain crate_router_map Backend Skill Command Quick Reference
You want to consolidate service facts into business-domain knowledge build_domain_map Backend Skill Command Output Map
The project is mobile, H5, Python, or mixed-stack $backend-service-spec-skill + $cross-tech-stack-spec-skill Cross Tech Stack Spec Skill README
You want a ready-to-send prompt for Codex reuse the examples in the root README quick-command section Quick Commands
You want the full workflow and supporting documents read the root README first, then the child README and usage guide Suggested Reading Path

One-Line Selection Guide

  • For the overall service landscape: start with create_codemap
  • For one important service: start with service_deep_dive
  • For a real cross-service chain: start with crate_router_map
  • For long-lived domain knowledge: finish with build_domain_map
  • For mixed-stack projects: use $backend-service-spec-skill as the base workflow and enable $cross-tech-stack-spec-skill

cross-tech-stack-spec-skill Diagram Snapshot

When the extension skill runs as a standard-output mixed-stack pass, companion Markdown/Mermaid diagrams should normally be generated together with the text pages.

Typical default diagrams:

  • mixed-stack architecture diagram
  • cross-layer call graph
  • page/app/backend/task/callback/bridge sequence diagram when a route needs explicit ordering
  • interface mapping diagram when enable_contract_map is enabled and evidence supports it
  • gateway forwarding diagram when enable_gateway_map is enabled
  • context propagation diagram when enable_context_propagation_map is enabled
  • producer/topic/consumer route diagram when enable_async_contract_map is enabled

Read more:

Open-Source Files

This repository also includes skill-usage companion files:

It also includes generic integration guidance for other AI development tools that support rules, instructions, prompts, or documentation context.

If your main question is how skill outputs should land in a central knowledge repository, the shortest path is:

  1. read From mydocs To A Central Knowledge Repository
  2. then read Central Knowledge Repository And OpenSpec Collaboration

Repository Layout

1. Backend Service Skill

Location:

  • ./backend-service-spec-skill/

Use this skill when the repository is mainly a legacy backend system, a microservice landscape, or a platform service family.

Core capabilities:

  • cross-service create_codemap
  • cross-service build_domain_map
  • crate_router_map
  • service_deep_dive

Read next:

2. Cross-Tech-Stack Extension Skill

Location:

  • ./cross-tech-stack-spec-skill/

Use this skill when the repository spans mobile, H5, Python, bridge, backend, MQ, callback, or other cross-tech-stack boundaries.

Core enhancements:

  • workspace layering
  • mixed-stack noise control
  • communication evidence levels
  • interface mapping
  • mixed-stack architecture and cross-layer diagrams
  • mixed-stack domain mapping
  • incremental update mode
  • eight optional switch-controlled deep-analysis pages

Read next:

How To Choose

Use only $backend-service-spec-skill when:

  • the repository is mainly backend or microservice oriented
  • service-level language is still accurate enough
  • cross-stack adaptation is not needed

Use $cross-tech-stack-spec-skill when:

  • the repository is mobile-first, H5-first, Python-first, or mixed-stack
  • interface and router analysis must cross frontend, gateway, backend, MQ, callback, or task layers
  • backend-only wording would distort the project structure

Use both together when:

  • you want the backend skill as the main workflow
  • and you need mixed-stack adaptation on top of it

Recommended wording:

Use $backend-service-spec-skill as the base workflow, and enable $cross-tech-stack-spec-skill for mixed-stack adaptation.

Quick Commands

Backend skill only

Use $backend-service-spec-skill to analyze this backend microservice project with standard outputs.
Generate the normal text pages and companion Markdown/Mermaid diagrams together.

Backend lightweight full

Use $backend-service-spec-skill to run a lightweight full analysis on this backend microservice project.
Requirements:
1. classify project scope first
2. run create_codemap
3. run service_deep_dive on 1 to 2 high-value services
4. run crate_router_map on 1 to 2 key chains
5. generate standard outputs, including companion Markdown/Mermaid diagrams by default
6. stay strictly grounded in code facts

Backend heavy full

Use $backend-service-spec-skill to run a heavy full analysis on this backend microservice project.
Requirements:
1. classify project scope first
2. run create_codemap
3. run service_deep_dive on multiple high-value services
4. run crate_router_map on multiple key chains
5. run build_domain_map last
6. generate standard outputs, including companion Markdown/Mermaid diagrams by default
7. output validation pages and unresolved-chain summaries
8. stay strictly grounded in code facts

Extension skill only

Use $cross-tech-stack-spec-skill to analyze this mixed-stack project.

Backend + extension

Use $backend-service-spec-skill as the base workflow, and enable $cross-tech-stack-spec-skill for mixed-stack adaptation.
Generate standard outputs and companion Markdown/Mermaid diagrams together.

Extension skill with all optional switches enabled

Use $backend-service-spec-skill as the base workflow, enable $cross-tech-stack-spec-skill, and turn on enable_contract_map + enable_gateway_map + enable_field_lineage + enable_context_propagation_map + enable_error_semantics + enable_async_contract_map + enable_external_dependency_dossier + enable_interface_verification_assets for a full enhanced analysis.
Generate standard outputs and companion Markdown/Mermaid diagrams together.

Full analysis mode

Use $backend-service-spec-skill as the base workflow, enable $cross-tech-stack-spec-skill,
turn on enable_contract_map + enable_gateway_map + enable_field_lineage + enable_context_propagation_map + enable_error_semantics + enable_async_contract_map + enable_external_dependency_dossier + enable_interface_verification_assets,
and generate separate standard artifacts for all enabled capabilities, including companion Markdown/Mermaid diagrams.

Note:

  • full analysis mode can consume substantially more tokens
  • it also increases scan time and output size
  • see Full Analysis Mode for guidance

Recommended Reading Order

  1. Read the backend quick-start guide first.
  2. Then read the backend-service README or usage guide.
  3. If the project is mixed-stack, continue to the extension README.
  4. If deeper interface analysis is needed, continue to the extension usage guide and optional-switch guide.

Additional Navigation

Chinese Navigation

For Chinese readers, start here:

About

这个仓库是一个面向 AI 辅助研发场景的项目分析与知识梳理开源库。 它的目标,不只是让 AI 在一次对话里回答一个问题。 它的目标,是帮助团队把真实项目中的代码知识,长期沉淀为可复用、可维护、可扩展的项目理解资产。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

No contributors