Arckit fr code reuse

From tractorjuice/arckit-codex · View interactive version

Arckit fr code reuse is an AI agent skill from the GitHub repository tractorjuice/arckit-codex. [COMMUNITY] Assess public code reuse opportunities before building from scratch — search code.gouv.fr, the SILL, and European public code repositories; produce a build-vs-reuse decision matrix

How to use this skill

Skill file

⚠️ Community-contributed command — not part of the officially-maintained ArcKit baseline. Output should be reviewed by qualified DPO / RSSI / legal counsel before reliance. Citations to ANSSI / CNIL / EU regulations may lag the current text — verify against the source.

You are helping an enterprise architect assess public code reuse opportunities before commissioning new development for a French public administration project. French State administrations are directed by the Circulaire du Premier ministre n°6264/SG du 27 avril 2021 (politique publique de la donnée, des algorithmes et des codes sources) to strengthen the opening of public source code and the use of free and open source software, and the Loi pour une République Numérique (2016, Art. 16) requires administrations to encourage free software and open formats. The duty to publish code comes from the Code des relations entre le public et l'administration (CRPA), as amended by the same law: source code is an administrative document (L300-2), communicable on request (L311-1) and, for administrations with 50 or more agents, published online (L312-1-1), subject to the exceptions in L311-4 to L311-6. In practice this means they are expected to:

  1. Search for and reuse existing public code before building from scratch
  2. Publish code developed for the administration as open source (unless exceptions apply)
  3. Contribute improvements back upstream when forking existing public code

The primary French public code resources are:

User Input

$ARGUMENTS

Instructions

Note: Before generating, scan projects/ for existing project directories. For each project, list all ARC-*.md artifacts, check external/ for reference documents, and check 000-global/ for cross-project policies. If no external docs exist but they would improve output, ask the user.

Step 0: Read existing artifacts from the project context

MANDATORY (warn if missing):

RECOMMENDED (read if available, note if missing):

OPTIONAL (read if available, skip silently):

Step 0b: Read external documents and policies

Step 1: Identify or Create Project

Identify the target project from the hook context. If the project doesn't exist:

  1. Use Glob to list projects/*/ directories and find the highest NNN-* number
  2. Calculate the next number (zero-padded to 3 digits)
  3. Slugify the project name
  4. Use the Write tool to create projects/{NNN}-{slug}/README.md
  5. Set PROJECT_ID and PROJECT_PATH

Step 2: Read Source Artifacts

Read all documents from Step 0. Extract:

Step 3: Code Reuse Template Reading

Read the template (with user override support):

Step 4: Reuse Assessment

Step 4a: Component Decomposition

Break down the system into discrete components that can each be assessed independently for reuse. For each component, assign a COMP-xx ID and note:

Step 4b: code.gouv.fr Assessment

For each COMP-xx, search code.gouv.fr/sources for existing public administration code in the same domain. Assess each candidate repository:

  1. Relevance: Does it address the same functional need?
  2. Maintenance: When was the last commit? Are issues being addressed? Is there an active community?
  3. Documentation: Is the code documented sufficiently for reuse?
  4. Test coverage: Is there an automated test suite?
  5. Deployment: Can it be deployed in the project's environment (containerised, cloud-native, on-premise)?
  6. Licence: Is the licence compatible with the project's intended licence?
  7. Data handling: Does the component send data to third-party services (analytics, error tracking)?
  8. Publisher credibility: Is the publishing entity a reputable public administration, and is the code actively maintained?

Notable code.gouv.fr repositories to always consider by domain:

Step 4c: SILL Assessment

For each COMP-xx, check the SILL for recommended software in the same category:

  1. SILL listing: Is a relevant tool listed in the SILL?
  2. Status: What is the SILL status (in use / recommended)?
  3. Referent ministry: Which ministry is the referent — can they be contacted for implementation advice?
  4. Version: Is the listed version current?
  5. Support: Is commercial support available from a SILL-accredited provider?

The SILL is organised by category. Key categories to check: identity and access management, content management, databases, monitoring, collaboration, productivity, development tools, security.

Step 4d: European and International Public Code

For components with no French public code match, extend the search to:

Step 4e: Licence Compatibility Analysis

For each component selected for reuse, verify licence compatibility:

Step 4f: Build-vs-Reuse Decision Matrix

For each component, produce a decision with justification:

Step 4g: Contribution-Back Plan

For any component that is forked:

Step 4h: Publication Obligation

Assess which code developed for this project must be published as open source:

Step 5: Generate Code Reuse Assessment Document

CRITICAL: Use the Write tool to create the full assessment document.

  1. Detect version: Check for existing ARC-{PROJECT_ID}-REUSE-v*.md files:
  1. Auto-populate Document Control:
  1. Write the complete assessment following the template.

Before writing the file, read .arckit/references/quality-checklist.md and verify all Common Checks plus REUSE per-type checks pass.

Write the document to:

projects/{project_id}/ARC-{PROJECT_ID}-REUSE-v{VERSION}.md

Step 6: Summary Output

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Public Code Reuse Assessment Generated
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📄 Document: projects/{project_id}/ARC-{PROJECT_ID}-REUSE-v{VERSION}.md
📋 Document ID: {document_id}
📅 Date: {date}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Reuse Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Components assessed:    {N}
Reuse (as-is):          {N}
Fork and adapt:         {N}
SILL assembly:          {N}
Procure:                {N}
Build from scratch:     {N}

Estimated effort saved by reuse: {estimate}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Publication Obligation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Code to publish on code.gouv.fr: {Yes — N components / No / Partial}
{If exceptions: list with justification}

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Next steps:
1. {If procurement needed: Run $arckit-fr-marche-public for components requiring sourcing}
2. {If technology selection needed: Run $arckit-research for market alternatives}
3. Run $arckit-fr-dinum to verify alignment with DINUM open source doctrine
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Important Notes

Key References

| Document | Publisher | URL |

|----------|-----------|-----|

| code.gouv.fr — French public administration open source repositories | DINUM | https://code.gouv.fr/sources/ |

| SILL (Socle Interministériel de Logiciels Libres) — recommended open source software for the French State | DINUM | https://code.gouv.fr/sill/ |

| Circulaire PM n°6264/SG du 27 avril 2021 — politique publique de la donnée, des algorithmes et des codes sources | Légifrance | https://www.legifrance.gouv.fr/circulaire/id/45162 |

| Loi République Numérique (2016) — Art. 16 (encourage free software and open formats); Arts. 2 and 6 brought source code into the CRPA | Légifrance | https://www.legifrance.gouv.fr/loda/id/JORFTEXT000033202746 |

| CRPA L300-2 — source code is an administrative document | Légifrance | https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000033218936 |

| CRPA L312-1-1 — online publication of administrative documents | Légifrance | https://www.legifrance.gouv.fr/codes/article_lc/LEGIARTI000033205512 |

| EUPL-1.2 licence — recommended for French public code | Joinup / EC | https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 |

| Joinup — EU public code catalogue | European Commission | https://joinup.ec.europa.eu/ |

| DINUM mission logiciels libres | DINUM | https://code.gouv.fr/ |

Note for reviewers: French State administrations are instructed to open their source code and favour free software (Circulaire PM n°6264/SG, 2021), which in practice means searching for existing public code before commissioning new development, and to publish their source code online unless an exception applies (CRPA L300-2 and L312-1-1, as amended and created by the Loi République Numérique 2016; its Art. 16 only asks administrations to encourage free software). The SILL is a curated list of recommended free software maintained by an interministerial working group under DINUM — analogous in purpose to the UK's Technology Code of Practice open standards requirement, but with a formal recommended software list.

Success Criteria

Example Usage

$arckit-fr-code-reuse Assess reuse opportunities for a French ministry citizen portal — needs: identity/authentication, document management, notification service, content management, API gateway

$arckit-fr-code-reuse Code reuse assessment for 001 — DINUM digital services platform, check code.gouv.fr and SILL for dashboard, forms, and data visualisation components

$arckit-fr-code-reuse Reuse assessment for a French regional council digital services platform — citizen portal, internal workflow engine, GIS mapping, document signing

Suggested Next Steps

After completing this command, consider running:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.